/serendipities

For viewing paths and serendipitious occasions in everyday life. Using Moves.

Primary LanguageRuby

Serendipities

CircleCI

For now, a moves-app viewer. Soon... better!

Up and running: https://serendipities.herokuapp.com/

Goals

  • Ingest moves data to the db
  • Tie a moves user to a twitter account
  • Allow a moves user with a twitter account to see where they crossed paths with their friends

Setup

First, get Ruby 2.0! I like rvm

\curl -L https://get.rvm.io | bash -s stable --ruby=2.0.0

Then, you'll need to sign up for a moves dev account, but it's super easy! Head to https://dev.moves-app.com/apps and create an app. Set your redirect URI to http://0.0.0.0:3000/auth/moves/callback and make a file in the root of the serendipities directory called .env In your .env, add the key and secret provided from the moves-app site like so:

MOVES_KEY=<insert moves key here>
MOVES_SECRET=<insert secret here>

Next you'll need postgres for your dev db. You'll need to set it up.

Make sure /usr/local/bin is in your PATH before /usr/bin, just in case you have some other version laying around. Check this with:

$ echo $PATH

Here's how you install postgres and get your dev environment running on it:

$ brew update
$ brew install postgres
$ initdb /usr/local/var/postgres
$ cp /usr/local/Cellar/postgresql/9.2.4/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
$ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
$ createuser -sP postgres
(enter "password" for the password)
$ rake db:drop db:create db:schema:load db:test:prepare

You may have to reinstall your pg gem for this to work, also. See the link above.

Then head to the cloned directory, and execute:

$ bundle
$ rake db:create db:migrate
$ rails s