Skip to content

nixme/warble

Folders and files

NameName
Last commit message
Last commit date

Latest commit

bcbb6af · Mar 7, 2013
Oct 19, 2012
Oct 19, 2012
Oct 9, 2012
May 20, 2012
Feb 11, 2012
Nov 21, 2011
Oct 9, 2012
Mar 31, 2011
Oct 9, 2012
Oct 19, 2012
Nov 21, 2011
Feb 12, 2012
May 20, 2012
Apr 17, 2011
Oct 12, 2012
Oct 12, 2012
Oct 9, 2012
Mar 7, 2013
Nov 21, 2011
Apr 20, 2011
Oct 9, 2012

Repository files navigation

Warble

The intelligent office jukebox...

Getting Started

You'll need a *nix environment. Following are instructions for OS X 10.7:

Prerequisites

Install Xcode and OS X GCC packages.

Use Homebrew to install Redis, rbenv, and ruby-build.

$ brew install redis rbenv ruby-build

Build Ruby

Set up rbenv for your shell:

$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile

Reload your shell.

Build and install Ruby 1.9.3:

$ rbenv install 1.9.3-p194   # Install MRI 1.9.3-p194

Add Bundler for dependency management:

$ gem install bundler
$ rbenv rehash               # Rebuild the rbenv shim binaries

Preparing the project

Install dependencies:

$ bundle install --binstubs --path vendor/bundle

Warble uses Facebook Connect to authenticate users. Create a new app at http://facebook.com/developers. Make sure to set the Site URL field to http://localhost:3000/.

Foreman loads environment variables from .env in the project root when booting the app. Copy the Facebook App ID and App Secret values from the app details on Facebook:

$ echo 'FACEBOOK_APP_ID=111111111111111' >> .env
$ echo 'FACEBOOK_APP_SECRET=abcdefabcdefabcdefabcdefabcdefab' >> .env

Add credentials for a Pandora partner. Pick one from http://pan-do-ra-api.wikia.com/wiki/Json/5/partners:

$ echo 'PANDORA_USERNAME=username' >> .env
$ echo 'PANDORA_PASSWORD=password' >> .env
$ echo 'PANDORA_DEVICE_ID=device_id' >> .env
$ echo 'PANDORA_ENCRYPTION_KEY=encryption_key' >> .env
$ echo 'PANDORA_DECRYPTION_KEY=decryption_key' >> .env

If you're running Warble on a Macintosh, you may need to instruct ElasticSearch to use Java in 32-bit mode.

$ echo 'JAVA_OPTS=-d32 -server' >> .env
$ echo 'ESJAVA_OPTS=-d32 -server' >> .env 

Copy the sample connection configurations:

$ cp config/redis.yml.sample config/redis.yml
$ cp config/database.yml.sample config/database.yml

Edit config/redis.yml and config/database.yml to match your local Redis and PostgreSQL configuration.

Running the application

Ensure Redis is running. You can find the proper incantations by running:

$ brew info redis

Start the web server, background processes, and other components with Foreman:

$ ./bin/foreman start

Now browse to http://localhost:3000/ and get warbling!