The following items must be installed and running:
- Postgres
brew install postgresql - Redis
brew install redis - Slanger Note: Bundler will not install Slanger
- Mailcatcher
Note: This is run by foreman. Don't start manually.
gem install mailcatcher
The app expects the environmental variables defined in .env.example to
be set. Copy this file to .env and set the appropriate values.
We're using Foreman for process management so starting the app is as easy as running:
foreman start -f Procfile.dev
...with one caveat. Slanger doesn't seem to play well with Foreman and needs to be started on its own using:
slanger --app_key $SLANGER_KEY --secret $SLANGER_SECRET --webhook_url http://0.0.0.0:3000/pusher/existence
Test are run continually by Watchr
when each spec file is modified. Output is listed by Foreman
under the process named testruby.
Tests are run through Mocha via Teaspoon by visiting http://0.0.0.0:3000/teaspoon in your browser.
Mail sent in the dev environment is intercepted by Mailcatcher and can be read at http://127.0.0.1:1080
enter the following script in the rails console:
u = User.find_by_username!("someUsername")
u.roles << :admin
u.save!