Skip to content

Latest commit

 

History

History
99 lines (65 loc) · 2.58 KB

README.md

File metadata and controls

99 lines (65 loc) · 2.58 KB

TravisCI: Build Status

SnapCI: Build Status

Project Setup

  • Fork the repo
  • Install VirtualBox
  • Install Vagrant
  • Request access to Okta Preview from TechOps

Spin up the Vagrant box

  • $ cd vagrant_postgres91_utf8_rails
  • $ vagrant up
    • vagrant up will provision the Vagrant box, create the databases, and run the bundler
  • $ vagrant ssh
  • $ cd workspace

Set up the local environment

  • $ echo "PORT=9292" > .env
  • $ echo "RACK_ENV=development" >> .env
  • $ rake db:schema:load
    • loads the latest schema without going through each migration individually (faster than rake db:migrate)
  • $ rake db:seed
    • add dummy data to local environment
  • $ RAILS_ENV=test rake db:schema:load
    • set up test environment

Run the test suite

  • Using capybara-webkit
    • $ xvfb-run rspec
    • If you repeatedly receive the error "Xvfb failed to start," try $ xvfb-run --server-num=1 rspec.
  • Using poltergeist
    • $ bundle exec rspec
  • For manual testing, see the db/seeds.rb file for user log-on information

Start the local server

  • $ foreman start (this will not return)

If your foreman is very slow, try getting a new network setup:

  • $ sudo dhclient (this will give a File Exists, that's ok)
  • $ foreman start

View the dev site locally:

Deploying the ReviewSite to heroku

When deploying to a new heroku instance (developers will NOT need to do this), please specify e-mail account settings in the following configuration variables.

Account details for sending emails from:

  • MAIL_SERVER=smtp.gmail.com
  • MAIL_PORT=587
  • MAIL_DOMAIN=thoughtworks.org
  • [email protected]
  • MAIL_PASSWORD=<password>
  • MAIL_TLS=true

The Address that should appear in the "from" line of the sent e-mails:

The base domain that should be used for the links that appear in the emails.

  • DOMAIN=twreviewsite.herokuapp.com

In order to prevent the mailer from sending e-mail on non-production heroku instance, it is possible to redirect all e-mail to an address that you control.

Questions?

Email Valerie Roske (varoske@thoughtworks)