This is the makeabox application that generates laser-cut path as a downloadable PDF file.
INFO: It’s recently been upgraded to use Rails 7.1 under the hood.
Assuming you develop on OS-X, it should be pretty trivial to get MakeABOX runnign locally using the provided Makefile:
make help
brew Installs Homebrew if on OS-X
bundle Run the local test suite
deploy-quick Deploy makeabox to production using Capistrano, skips tests and git status
deploy Deploy makeabox to production using Capistrano
git-status Ensures the local repo is clean
help Prints help message auto-generated from the comments.
lint-fix-all Runs rubocop with a more dangerous auto-correct
lint-fix Runs rubocop with auto-correct
lint Runs rubocop
pre-commit Runs rspec and rubocop before the commit
ruby Installs Ruby if needed
test Run the local test suiteIf you don’t have make in your system, you should run xcode-select --install to install the XCode command line tools, which will install make for you, as well as git.
After that, you can try running:
make testRunning RSpecs via the Makefile depends on having bundle install ran, which in turn depends on having Ruby installed.
Ruby is installed via rbenv, which is installed via brew on OS-X, and via apt on Linux.
Finally, make pre-commit will run both specs and rubocop to ensure your changes are green on CI.
To run the app locally, run it via make:
make pumaThis should start Puma, and open a browser window to https://localhost:3000/ where you can see the app running.
You can also start puma via:
❯ bin/puma-startBefore the next step, you need to have the private SSH key that Amazon gave you for your account, so that you can login as the user ubuntu and essentially — root.
Place this PEM file into a specific location: ${HOME}/.ssh/makeabox.pem and everything else will be easy.
Deploy is provided with Capistrano.
make deployOR, if you have locally modified changes you don’t want to check in yet, then:
make deploy-quickWe use NewRelic to monitor the application. The NewRelic dashboard is available here: