Giter Site home page Giter Site logo

voting's Introduction

Pre-requisites

  • Ruby 1.9.3
  • Redis Server download here
  • Ubuntu 11.10+ (recommended) or Mac OS X

Running

./configure
make

Make

make or make server
Runs Thin server in production mode (Captcha enabled)

make server-benchmark
Runs Thin server in benchmark mode (Captcha disabled)

make specs
Runs the RSpec tests

make kill
Shutdowns Thin server

make kill-redis
Shutdowns Redis server

Running manually

  1. Download redis

    wget http://redis.googlecode.com/files/redis-2.4.17.tar.gz

  2. Unpack redis

    tar zxvf redis-2.4.17.tar.gz

  3. Compile redis

    cd redis-2.4.17
    make

  4. Start redis-server

    cd src
    ./redis-server &

  5. Clone this repository

    git clone git://github.com/diegossilveira/voting.git
    cd voting

  6. Install required gems

    gem install bundler
    bundle install

  7. Run

    rackup config.ru -s thin -E [production|benchmark]

  8. Test

    Just access http://localhost:9292/voting

Environments

  • production
  • benchmark - use this one in order to skip captcha challenges

URLs

  • GET /voting [Participant selection page]
  • POST /voting/:id [Vote on participant]
  • GET /voting/stats [Get voting statistics]
  • GET /voting/reset [Reset the voting counts]

Testing

Unit tests were implemented using RSpec

`make specs`

voting's People

Contributors

diegossilveira avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.