Don't let living together get in the way of living together.
We are using Ruby v2.1.2
, managed through RVM
; sqlite3
; and PhantomJS
. To setup your system for development, follow the guides below to success. If something doesn't work (or your OS is missing), feel free to update this README
;)
- Install Xcode or Xcode Developer Tools:
- Download Xcode form the App Store, OR
xcode-select --install
- Install Homebrew:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew update
- Setup RVM:
\curl -sSL https://get.rvm.io | bash -s stable --ruby
- Setup ruby:
rvm install ruby-2.1.2
andrvm use ruby-2.1.2
- Setup PhantomJS
brew install phantomjs
- Install gems:
bundle install
- Setup your environment variables:
- create a file in the application root:
.env
- The format of the file is
Key=Value
, with a newline separating each key. - All required keys are below. If a correpsonding value is not specified, talk to Jesse to get the value.
- The format of the file is
- Cookie Secret:
- Key =
SECRET_KEY_BASE
, Value = result ofrake secret
- Key =
- Default production admin user:
- Key =
ADMIN_NAME
, Value = anything you want - Key =
ADMIN_EMAIL
, Value = anything you want - Key =
ADMIN_PASSWORD
, Value = anything you want
- Key =
- Mandrill:
- Key =
MANDRILL_USERNAME
- Key =
MANDRILL_APIKEY
- Key =
- Facebook:
- Key =
FACEBOOK_ID
- Key =
FACEBOOK_SECRET
- Key =
- Twitter:
- Key =
TWITTER_ID
- Key =
TWITTER_SECRET
- Key =
bundle exec guard
- Feel special!
exit
to quit (notctrl+c
! That only works withrails s
)
- To run all tests:
rake
- To run a specific test file:
rake test TEST=test/models/widget_test.rb
- To run a specific test within a file:
ruby -Ilib:test test/models/widget_test.rb -n test_0003_refreshes
- To run all code quality metrics:
rake quality
- There are lots of different tests you can run individually:
rake quality:reek
rake quality:flog
rake quality:average
- checks that the average flog score is below a set thresholdrake quality:each
- indicates which methods are above a set threshold
rake quality:flay
rake quality:rails_best_practices