From 44e18ba682e31b59cc62cf8694a3d34ce2147277 Mon Sep 17 00:00:00 2001 From: Bimo Wijoyo Date: Tue, 21 Jan 2014 15:16:46 -0500 Subject: [PATCH] Added Planning Poker app --- Gemfile | 2 + Gemfile.lock | 31 ++++++++++ README.md | 94 ++++++++++++++++++++++++++++++ README.rdoc | 28 --------- config/environments/development.rb | 8 +++ config/environments/production.rb | 8 +++ config/locales/en.yml | 61 ++++++++++++------- faye.ru | 6 ++ 8 files changed, 188 insertions(+), 50 deletions(-) create mode 100644 README.md delete mode 100644 README.rdoc create mode 100644 faye.ru diff --git a/Gemfile b/Gemfile index b3fa562..b28c2fb 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,8 @@ source 'https://rubygems.org' gem 'rails', '4.0.2' +gem 'thin' +gem 'faye' # Assets gem 'jquery-rails' diff --git a/Gemfile.lock b/Gemfile.lock index 6c23ab1..760b56a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -35,6 +35,7 @@ GEM multi_json (~> 1.3) thread_safe (~> 0.1) tzinfo (~> 0.3.37) + addressable (2.3.5) arel (4.0.1) atomic (1.1.14) backtop (1.0.1) @@ -74,16 +75,39 @@ GEM execjs coffee-script-source (1.6.3) connection_pool (1.2.0) + cookiejar (0.3.0) crack (0.4.1) safe_yaml (~> 0.9.0) + daemons (1.1.9) debug_inspector (0.0.2) + em-http-request (1.1.1) + addressable (>= 2.3.4) + cookiejar + em-socksify (>= 0.3) + eventmachine (>= 1.0.3) + http_parser.rb (>= 0.6.0.beta.2) + em-socksify (0.3.0) + eventmachine (>= 1.0.0.beta.4) erubis (2.7.0) + eventmachine (1.0.3) execjs (2.0.2) + faye (1.0.1) + cookiejar (>= 0.3.0) + em-http-request (>= 0.3.0) + eventmachine (>= 0.12.0) + faye-websocket (>= 0.7.0) + multi_json (>= 1.0.0) + rack (>= 1.0.0) + websocket-driver (>= 0.3.0) + faye-websocket (0.7.1) + eventmachine (>= 0.12.0) + websocket-driver (>= 0.3.1) font-awesome-rails (4.0.3.1) railties (>= 3.2, < 5.0) happymapper (0.4.1) libxml-ruby (~> 2.0) hike (1.2.3) + http_parser.rb (0.6.0) i18n (0.6.9) jquery-rails (3.0.4) railties (>= 3.0, < 5.0) @@ -171,6 +195,10 @@ GEM therubyracer (0.12.0) libv8 (~> 3.16.14.0) ref + thin (1.6.1) + daemons (>= 1.0.9) + eventmachine (>= 1.0.0) + rack (>= 1.0.0) thor (0.18.1) thread_safe (0.1.3) atomic @@ -185,6 +213,7 @@ GEM uglifier (2.4.0) execjs (>= 0.3.0) json (>= 1.8.0) + websocket-driver (0.3.1) yui-compressor (0.12.0) PLATFORMS @@ -201,6 +230,7 @@ DEPENDENCIES capistrano-rails (~> 1.1) capistrano-rvm (~> 0.1) coffee-rails (~> 4.0.0) + faye font-awesome-rails jquery-rails mongoid! @@ -209,6 +239,7 @@ DEPENDENCIES sass-rails (~> 4.0.0) sdoc therubyracer + thin turbolinks uglifier (>= 1.0.3) yui-compressor diff --git a/README.md b/README.md new file mode 100644 index 0000000..6133337 --- /dev/null +++ b/README.md @@ -0,0 +1,94 @@ +# Pivotal Tracker: Planning Poker + +Planning poker, also called Scrum poker, is a consensus-based technique for estimating, mostly used to estimate effort or relative size of user stories in software development. In planning poker, members of the group make estimates by playing numbered cards in the app, instead of speaking them aloud. The cards are revealed, and the estimates are then discussed. By hiding the figures in this way, the group can avoid the cognitive bias of anchoring, where the first number spoken aloud sets a precedent for subsequent estimates. + +## Features +* Authentication from Pivotal Tracker +* Displays all user's projects in Pivotal Tracker +* Push Notifications when playing cards +* Bootstrap + Font-Awesome for responsive design + +## Dependencies +* Ruby 2.0.0 or later +* MongoDB +* Twitter Bootstrap +* Font-Awesome +* Pivotal Tracker gem (currently v3) +* Thin webserver for Faye +* Faye for Push Notifications + +## Frameworks +This application uses the following frameworks: + +* [Ruby on Rails](http://rubyonrails.org/) (4.0.2) +* [Twitter Bootstrap](http://twitter.github.com/bootstrap/) (Front-end) +* [jQuery](http://jquery.com/) (Javascript) + +## Gems +This application uses the following gems: + +* [Pivotal Tracker](https://github.com/jsmestad/pivotal-tracker) (Pivotal Tracker gem) +* [Faye](http://faye.jcoglan.com/) (Faye) +* [Mongoid](https://github.com/mongoid/mongoid) (Mongoid) +* [Twitter Bootstrap SASS](https://github.com/twbs/bootstrap-sass) (Twitter Bootstrap port to SASS) +* [Font-Awesome](https://github.com/bokmann/font-awesome-rails) (Font-Awesome Rails) +* [BackTop](https://github.com/bimovidia/backtop) (Back To Top functionality) + +## Getting Started + +Planning Poker uses MongoDB as its database. To install it, please refer to the following link: + +* [Install MongoDB](http://docs.mongodb.org/manual/installation/) - MongoDB installation tutorial +* [Mongoid](http://mongoid.org/en/mongoid/index.html) - Mongoid official website for documentations + +Planning Poker uses push notification with Faye. There are configuration files for each environments in config/environments: + + config.publisher = { + # production faye server - change the URL so that it points to the correct server. + domain: 'localhost:9292', + # secret key + secret: 'secret' + } + +Change the domain into the actual production domain when deploying the app. You might want to change the secret key as well. + +To get started, clone this repository to your local machine, and install dependencies: + +```shell +git clone git@github.com:bimovidia/planning-poker.git +cd planning-poker +bundle install +``` + +Open a new terminal and start the faye server: + +```shell +rackup faye.ru -s thin -E production -p 9292 +``` + +Run the application locally with: + +```shell +rails s +``` + +## Contributing + +Contributions are encouraged. You can contribute in many ways. For example, you might: + +* add documentation and "how-to" articles to the README or Wiki +* create an extension that provides additional functionality above and beyond Planning Poker itself +* fix bugs you've found in the Issue Tracker or improve / add new features to Planning Poker + +When contributing, you will need to: + +* follow git flow procedure +* follow the same style / convention used throughout the app (as much as you can) +* make sure your codes are well-tested and reviewed +* when fixing a bug, provide a failing test case that your patch solves +* provide proper documentation when necessary + +## Questions? +If you have questions or comments regarding this application, feel free to ask the following people: + +* Bimo Wijoyo **bimo.wijoyo@ecommerce.com** \ No newline at end of file diff --git a/README.rdoc b/README.rdoc deleted file mode 100644 index dd4e97e..0000000 --- a/README.rdoc +++ /dev/null @@ -1,28 +0,0 @@ -== README - -This README would normally document whatever steps are necessary to get the -application up and running. - -Things you may want to cover: - -* Ruby version - -* System dependencies - -* Configuration - -* Database creation - -* Database initialization - -* How to run the test suite - -* Services (job queues, cache servers, search engines, etc.) - -* Deployment instructions - -* ... - - -Please feel free to use a different markup language if you do not plan to run -rake doc:app. diff --git a/config/environments/development.rb b/config/environments/development.rb index ce7f233..f89f53a 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -24,4 +24,12 @@ # This option may cause significant delays in view rendering with a large # number of complex assets. config.assets.debug = true + + # Publisher for push notification + config.publisher = { + # development faye server + domain: 'localhost:9292', + # secret key + secret: 'secret' + } end diff --git a/config/environments/production.rb b/config/environments/production.rb index 491b17d..1d6f417 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -77,4 +77,12 @@ # Use default logging formatter so that PID and timestamp are not suppressed. config.log_formatter = ::Logger::Formatter.new + + # Publisher for push notification + config.publisher = { + # production faye server - change the URL so that it points to the correct server. + domain: 'localhost:9292', + # secret key + secret: 'secret' + } end diff --git a/config/locales/en.yml b/config/locales/en.yml index 0653957..79ff300 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1,23 +1,40 @@ -# Files in the config/locales directory are used for internationalization -# and are automatically loaded by Rails. If you want to use locales other -# than English, add the necessary files in this directory. -# -# To use the locales, use `I18n.t`: -# -# I18n.t 'hello' -# -# In views, this is aliased to just `t`: -# -# <%= t('hello') %> -# -# To use a different locale, set it with `I18n.locale`: -# -# I18n.locale = :es -# -# This would use the information in config/locales/es.yml. -# -# To learn more, please read the Rails Internationalization guide -# available at http://guides.rubyonrails.org/i18n.html. - en: - hello: "Hello world" + all: "All" + cancel: "Cancel" + editable: "Editable" + na: "N/A" + owner: "Owner" + reset: "Reset" + requester: "Requester" + reveal: "Reveal" + save: "Save" + signout: "Sign Out" + story: "Story" + unestimated: "Unestimated" + + projects: + id: "Project ID" + info: "Project Info" + labels: "Project Labels" + more: "More Project(s)" + name: "Project Name" + scheme: "Project Scheme" + scale: "Project Point Scale" + + stories: + id: "Story ID" + type: "Story Type" + points: "Story Points" + state: "Story State" + + # Flashes + flashes: + sessions: + destroy: "You have successfully logged out" + expired: "Your session has expired" + failed: "Invalid username or password" + signin: "You will need to sign in first" + success: "You have successfully logged in" + + stories: + update: "Story ID#%{id} has been updated successfully" \ No newline at end of file diff --git a/faye.ru b/faye.ru new file mode 100644 index 0000000..953e9c8 --- /dev/null +++ b/faye.ru @@ -0,0 +1,6 @@ +require 'faye' + +Faye::WebSocket.load_adapter('thin') + +bayeux = Faye::RackAdapter.new(:mount => '/faye', :timeout => 25) +run bayeux \ No newline at end of file