Skip to content

uwblueprint/somo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Somo

CircleCI Code Climate Test Coverage

Development

Development is typically done on a local machine with local instances of various services (data stores, email sender, etc).

We are currently running on Ruby 2.3, Rails 4, and PostgreSQL 9.4. Homebrew is recommended for installing dependencies.

Set up Postgres

  1. brew install postgresql or use Postgres.app
  2. A general postgres database user is recommended; CREATEDB and SUPERUSER privileges are required:
$ createuser -s -d postgres # createuser is a command line tool installed with postgres
  1. Start/manage the postgres service via:
$ pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
$ pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log status

There are some settings to make it start by default as well.

\q + ENTER in terminal to quit interactive terminal

Set up Rails

  1. Install and manage Ruby versions with rvm. Make sure to install the correct Ruby version, which is specified in the [Gemfile]
  2. bundle install to install dependencies
  3. Create a file config/secrets.ymland add the following keys:
development:
  secret_key_base: <your_secret_key>
  twilio_account_id: <twilio_account_id>
  twilio_auth_token: <twilio_auth_token>
  somo_phone_number: <somo_phone_number>

Use rake secret to generate secret keys. Access the docs here for API dev and test keys.

  1. rake db:create to create the databases.

  2. rake db:migrate to run migrations (creating the tables and their associations).

  3. rails server and go to localhost:3000

  4. Run rspec in the root directory to run the specs.

Style Guide

  1. Strings
  • Use single quotes instead of double quotes.
  1. Hashes
  • Prefer : over =>.
  1. Indentation
  • Use 2 spaces.
  • There should be no use of tabs.
  1. Spacing
  • There should be no trailing whitespace.
  • There should be no empty new lines at the end of a file.
  1. Line length
  • The maximum number of characters per line should be 100.

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •