Vita-Min is a Rails app that helps people access the VITA program through a digital intake form, a "valet" drop-off workflow using Zendesk, and a national landing page to find the nearest VITA site.
βΉοΈ These steps assume you are working with a macOS operating system, if that is not the case, some steps may be different. Ask a fellow teammate and we can update these setup steps to include the operating system you are using.
There are a few dependencies that are common for many web applications. The first being Homebrew.It is used to install many different types of packages for macOS.
If you don't already have Homebrew, install it with:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
MacOS comes with git installed but you can also install it with Homebrew if you want:
brew install git
If you don't have an SSH key on your computer to connect to GitHub, their documentation on how to add an SSH key is a good starting point. You will need to have an SSH key to download this repository locally.
To make pairing commit history easier, we use git duet, which can be installed with:
brew install git-duet/tap/git-duet
PDFtk is a toolkit for manipulating PDF documents. Download and install PDFtk from https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_server-2.02-mac_osx-10.11-setup.pkg
Get the development secret key from LastPass (development.key
) or ask a teammate who has it set up.
Add it to your configuration:
# In the root of vita-min
echo "[secret key]" > config/credentials/development.key
There is a setup script that handles virtually everything with a single command:
# In the root of vita-min
bin/setup
Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
If you see this error, PostgreSQL
is not running. You can get it running with:
brew services start postgresql
If you don't have rails installed, you can follow the official getting started guide.
With Rails installed, you can serve the application with:
rails server
# or for short
rails s
In development, you'll need to manually start the delayed_job worker using the following command:
rails jobs:work
To see emails in development, run rails jobs:work
. All emails are printed to its output console.
They are also logged in tmp/mail/#{to_address}
.
To run all test suites (RSpec unit & feature specs, Javascript Jest unit tests).
bin/test
We use Jest to run our JavaScript unit tests.
yarn jest
We us RSpec to run unit & feature tests.
# run RSpec unit & feature specs
rspec
# - or -
# run RSpec tests that failed on the last run
rspec --only-failures
# - or -
# run feature specs with Chrome visible
# (Chrome runs in the background normally without this flag enabled)
CHROME=y rspec
# - or -
# run RSpec with test coverage report
COVERAGE=y rspec
This repo has rubocop
installed. To check:
rubocop [app lib ...]
The rubocop settings files is in the root directory as .rubocop.yml
RubyMine integrates Rubocop by default. Settings can be found in the Preferences menu, under Editor > Inspections > Ruby > Gems and Gem Management > Rubocop.
Notes on deployment can be found in docs/deployment.
More documentation can be found in the docs folder.