Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 app
Octocat-spinner-32 config
Octocat-spinner-32 db
Octocat-spinner-32 doc
Octocat-spinner-32 lib
Octocat-spinner-32 log
Octocat-spinner-32 public
Octocat-spinner-32 script
Octocat-spinner-32 test
Octocat-spinner-32 vendor
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 config.ru
README.md

Joyance

Joyance is a project at London MMXII Hackathon which mesures and visualizes people's joyance for a theme.

It uses Datasift as data backend.

Getting started

  1. Sign up Datasift and Pusher
    Both Datasift and Pusher has free traial plan which is enough to try this application.

  2. Clone this project

  3. Set up Rails app

    % bundle install
    % rake db:migrate
    
  4. Set Datasift user ID and API key in environment variables

    % export DATASIFT_KEY=YOUR-API-KEY
    % export DATASIFT_USERNAME=YOUR-USER-NAME
    
  5. Set Pusher app ID, key and secret in environment variables

    % export PUSHER_APP_ID=APP-ID
    % export PUSHER_KEY=KEY-ID
    % export PUSHER_SECRET=SECRET
    
  6. Run script which counts up joyance

    % rails runner "Counter.count_up :olympics"
    

    (You don't have to stop script to go to the next step)

  7. Run server

    % rails s
    

Access

All support json format. e.g. http://127.0.0.1:3000/streams/olympics.json

Stream definition

You can add streams under app/streams.

Once you define a stream, you can count up the stream like below.

> Counter.count_up :new_stream
Something went wrong with that request. Please try again.