Skip to content

tchu88/whats-happ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7c72dc7 · May 28, 2014
May 28, 2014
Apr 2, 2014
Apr 11, 2014
Apr 7, 2014
Apr 5, 2014
Apr 2, 2014
Apr 2, 2014
Apr 15, 2014
Apr 11, 2014
Apr 6, 2014
Apr 6, 2014
Apr 4, 2014
Apr 2, 2014
Apr 2, 2014
Apr 14, 2014
May 28, 2014
May 28, 2014
Apr 4, 2014
May 23, 2014
Apr 2, 2014
Apr 2, 2014

Repository files navigation

NO LONGER UNDER DEVELOPMENT

WhatsHapp Build Status

Setup

  1. Install Postgres

See http://postgresapp.com/

  1. Install the dependencies and setup the databases
git clone https://github.com/tchu88/whats-happ.git
cd whats-happ
bundle install
rake db:create
rake db:migrate
rake db:test:prepare
  1. Setup up local environment variables in .env (see https://github.com/bkeepers/dotenv)
cp .env.sample .env

Sign up for Twilio and set your TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, and TWILIO_FROM_NUMBER.

Tests

Run the test suite with the default rake task.

rake

Deploy (Heroku)

  1. Create an application

You must upgrade to a production level database to run the PostGIS extension. NOTE: this is not free.

heroku create your-app-name
heroku addons:add heroku-postgresql:premium-yanari
  1. Set environment variables
heroku config:set SECRET_TOKEN=`bundle exec rake secret` \
	TWILIO_ACCOUNT_SID=youraccountsid \
	TWILIO_AUTH_TOKEN=yourauthtoken \
	TWILIO_FROM_NUMBER=yourphonenumber \
	TWILIO_MESSAGES_NAME=nameofyourchoosing \
	TWILIO_MESSAGES_PASSWORD=yourchoiceofsecurepassword
  1. Set your Twilio messages request url

The /messages route is protected by HTTP Basic Authentication. The values of TWILIO_MESSAGES_NAME and TWILIO_MESSAGES_PASSWORD can be passed from Twilio in the url you control.

https://nameofyourchoosing:[email protected]/messages

  1. Push the code base

Sign up for Heroku and install the Toolbelt if you haven't already.

git push heroku master
heroku run rake db:migrate
  1. Add publishers

Drop into the heroku console (heroku run console) and add publisher records.

  1. Add the Heroku Scheduler addon

Once the addon is setup, visit the scheduler dashboard and schedule rake update_streams to run every 10 minutes or an interval of your choosing.

heroku addons:add scheduler