Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 19 commits
  • 21 files changed
  • 0 commit comments
  • 2 contributors
View
58 Gemfile.lock
@@ -51,16 +51,16 @@ GEM
coffee-script (2.2.0)
coffee-script-source
execjs
- coffee-script-source (1.1.3)
- daemons (1.1.4)
- devise (1.5.2)
+ coffee-script-source (1.2.0)
+ daemons (1.1.5)
+ devise (1.5.3)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.0.3)
warden (~> 1.1)
diff-lcs (1.1.3)
erubis (2.7.0)
eventmachine (0.12.10)
- execjs (1.2.9)
+ execjs (1.2.13)
multi_json (~> 1.0)
haml (3.1.4)
happymapper (0.4.0)
@@ -70,13 +70,13 @@ GEM
jquery-rails (1.0.19)
railties (~> 3.0)
thor (~> 0.14)
- json (1.6.3)
+ json (1.6.4)
libxml-ruby (2.2.2)
mail (2.3.0)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
- mailcatcher (0.5.3)
+ mailcatcher (0.5.5)
activesupport (~> 3.0)
eventmachine (~> 0.12)
haml (~> 3.1)
@@ -88,15 +88,15 @@ GEM
mime-types (1.17.2)
multi_json (1.0.4)
nokogiri (1.5.0)
- orm_adapter (0.0.5)
- pg (0.11.0)
+ orm_adapter (0.0.6)
+ pg (0.12.2)
polyglot (0.3.3)
- rack (1.3.5)
+ rack (1.3.6)
rack-cache (1.1)
rack (>= 0.4)
rack-mount (0.8.3)
rack (>= 1.0.0)
- rack-protection (1.1.4)
+ rack-protection (1.2.0)
rack
rack-ssl (1.3.2)
rack
@@ -118,32 +118,32 @@ GEM
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2.2)
- rdoc (3.11)
+ rdoc (3.12)
json (~> 1.4)
rest-client (1.6.7)
mime-types (>= 1.16)
- rspec (2.7.0)
- rspec-core (~> 2.7.0)
- rspec-expectations (~> 2.7.0)
- rspec-mocks (~> 2.7.0)
- rspec-core (2.7.1)
- rspec-expectations (2.7.0)
+ rspec (2.8.0)
+ rspec-core (~> 2.8.0)
+ rspec-expectations (~> 2.8.0)
+ rspec-mocks (~> 2.8.0)
+ rspec-core (2.8.0)
+ rspec-expectations (2.8.0)
diff-lcs (~> 1.1.2)
- rspec-mocks (2.7.0)
- rspec-rails (2.7.0)
- actionpack (~> 3.0)
- activesupport (~> 3.0)
- railties (~> 3.0)
- rspec (~> 2.7.0)
- sass (3.1.11)
+ rspec-mocks (2.8.0)
+ rspec-rails (2.8.1)
+ actionpack (>= 3.0)
+ activesupport (>= 3.0)
+ railties (>= 3.0)
+ rspec (~> 2.8.0)
+ sass (3.1.12)
sass-rails (3.1.5)
actionpack (~> 3.1.0)
railties (~> 3.1.0)
sass (~> 3.1.10)
tilt (~> 1.3.2)
- sinatra (1.3.1)
- rack (~> 1.3, >= 1.3.4)
- rack-protection (~> 1.1, >= 1.1.2)
+ sinatra (1.3.2)
+ rack (~> 1.3, >= 1.3.6)
+ rack-protection (~> 1.2)
tilt (~> 1.3, >= 1.3.3)
skinny (0.2.0)
eventmachine (~> 0.12)
@@ -152,7 +152,7 @@ GEM
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- sqlite3 (1.3.4)
+ sqlite3 (1.3.5)
thin (1.3.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
@@ -163,7 +163,7 @@ GEM
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.31)
- uglifier (1.1.0)
+ uglifier (1.2.2)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
warden (1.1.0)
View
33 README → README.rst
@@ -5,9 +5,9 @@ Tracker_Poker
repo :: https://github.com/EmeraldCityProgrammingGroup/tracker_poker
heroku :: http://tracker-poker.herokuapp.com/
-===========
+
DESCRIPTION
-===========
+------------
Tracker_Poker is a way to automate the planning poker
meeting on an Agile project using a mobile phone.
@@ -15,21 +15,21 @@ meeting on an Agile project using a mobile phone.
Tracker_Poker is still in early development, so now
is the time to make your mark on the project.
-=================
+
FEATURES/PROBLEMS
-=================
+------------------
* TBD
-========
+
SYNOPSYS
-========
+---------
* % TBD/USAGE
-=======
+
INSTALL
-=======
+---------
# Checkout the project
$ git clone git://github.com/EmeraldCityProgrammingGroup/tracker_poker
@@ -50,9 +50,9 @@ INSTALL
You should then be able to navigate to `http://localhost:3000/` in a web browser.
-=============
+
HERKOKU SETUP
-=============
+---------------
If you wish to host a publicly available copy of Tracker_Poker,
the easiest option is to host it on [Heroku](http://heroku.com/).
@@ -82,9 +82,9 @@ HERKOKU SETUP
Once that's done, you will be able to view your site at
`http://APPNAME.heroku.com`.
-=============
+
TO CONTRIBUTE
-=============
+----------------
Tracker_Poker is currently welcoming contributions. If you'd like to help:
@@ -122,19 +122,20 @@ Here are some general guidelines for contributing:
* Also attend the <emerald city> Saturday classes.
-=======
+
LICENSE
-=======
+---------
* **Please put your open source license here.**
* **If you need help, check out this: http://www.opensource.org/licenses **
-=============
+
README FORMAT
-=============
+--------------
See http://docutils.sourceforge.net/docs/user/rst/quickref.html
for more information about the format used in the file. It is
called **Restructured Text**.
+
View
3  app/assets/javascripts/pivotal.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
View
3  app/assets/stylesheets/pivotal.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the pivotal controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
View
1  app/controllers/application_controller.rb
@@ -1,3 +1,4 @@
class ApplicationController < ActionController::Base
protect_from_forgery
+ before_filter :authenticate_user!
end
View
1  app/controllers/page_controller.rb
@@ -1,4 +1,5 @@
class PageController < ApplicationController
+ skip_before_filter :authenticate_user!
def index
@title = "Home"
end
View
44 app/controllers/pivotal_controller.rb
@@ -0,0 +1,44 @@
+class PivotalController < ApplicationController
+ def index
+ unless current_user.pivotal_users.empty?
+ PivotalTracker::Client.token = current_user.pivotal_users.last.token
+ redirect_to :pivotal_projects
+ end
+ end
+
+ def login
+ username = params[:user_name]
+ password = params[:password]
+ PivotalTracker::Client.token = nil
+ token = PivotalTracker::Client.token(username, password)
+ current_user.pivotal_users.create :token => token
+ unless token.nil?
+ redirect_to :pivotal_projects
+ else
+ redirect_to :povital
+ end
+ end
+
+ def projects
+ @projects = PivotalTracker::Project.all
+ end
+
+ def stories
+ list_stories "unstarted"
+
+ end
+ def ice_box
+ list_stories "unscheduled"
+ render "stories"
+ end
+ private
+
+ def list_stories(state)
+ @project = PivotalTracker::Project.find(params[:project_id].to_i)
+ # @stories = @project.stories.all( :current_state=>"unscheduled").map{|x| x if x.estimate == -1}.compact
+ @stories = @project.stories.all( :current_state=> state) # list stories moved out of the icebox
+ @active_count = @stories.size
+ @stories = @stories.collect{|x| x if x.estimate == -1}.compact
+ @unestimated_count = @stories.size
+ end
+end
View
8 app/helpers/application_helper.rb
@@ -7,4 +7,12 @@ def title
end
result
end
+
+ def login_text
+ if user_signed_in?
+ "Welcome #{current_user.email} | #{link_to 'Sign out', destroy_user_session_path, :method => :delete }".html_safe
+ else
+ "Welcome Guest | #{link_to "Log-in", new_user_session_path}".html_safe
+ end
+ end
end
View
2  app/helpers/pivotal_helper.rb
@@ -0,0 +1,2 @@
+module PivotalHelper
+end
View
11 app/views/layouts/application.html.erb
@@ -7,9 +7,14 @@
<%= csrf_meta_tags %>
</head>
<body>
- <div>
- <%= link_to "Home", root_path %> |<%= link_to "About", about_path %> |<%= link_to "Contact", contact_path %>
- </div>
+ <div id="topbar">
+ <div class="nav">
+ <%= link_to "Home", root_path %> |<%= link_to "About", about_path %>|<%= link_to "Contact", contact_path %>
+ </div>
+ <div class="login">
+ <%= login_text %>
+ </div>
+ </div>
<p class="notice"><%= notice %></p>
<p class="alert"><%= alert %></p>
<div class='container_16'>
View
9 app/views/pivotal/index.html.erb
@@ -0,0 +1,9 @@
+<div class="grid_16"><h1>Please Log-in to your Pivotal account</h1></div>
+<%= form_tag :action => :login do %>
+ <div class="grid_2"><label>User Name:</label></div>
+ <div class="grid_3"><%= text_field_tag :user_name %></div>
+ <div class="clear" ></div>
+ <div class="grid_2"><label>Password:</label></div>
+ <div class="grid_3"><%= password_field_tag :password %></div>
+ <div class="grid_5"><div align="center"><%= submit_tag :Login %></div></div>
+<% end %>
View
2  app/views/pivotal/login.html.erb
@@ -0,0 +1,2 @@
+<h1>Pivotal#login</h1>
+<p>Find me in app/views/pivotal/login.html.erb</p>
View
6 app/views/pivotal/projects.html.erb
@@ -0,0 +1,6 @@
+<div class="grid_15"><h1>Select Pivotal Project</h1></div>
+<% @projects.each do |project| %>
+<div class="prefix_1 grid_5"><h2> <%= link_to "#{project.name} (#{project.id})", project_story_path(:project_id => project.id) %></h2></div>
+<div class="clear"></div>
+<% end %>
+
View
18 app/views/pivotal/stories.html.erb
@@ -0,0 +1,18 @@
+<div class="grid_15"><h1><%= @project.name %></h1></div>
+<div class="clear"></div>
+<div class="prefix_2 grid_5"><p><%= "Active Stories: #{@active_count}"%></p></div>
+<div class="grid_5"><p><%= "Unestimated Stories: #{@unestimated_count}"%></p></div>
+<div class="clear"></div>
+<% @stories.each do |story| %>
+<div class="prefix_1 grid_11"><h2> <%= "#{story.name} (#{story.id})" %></h2></div>
+<div class="clear"></div>
+<div class="prefix_2 grid_4"><p><%= "Points: #{story.estimate}" %></p></div>
+<div class="grid_4"><p><%= "Status: #{story.current_state}" %></p></div>
+<div class="clear"></div>
+<div class="prefix_2 grid_10"><p><%= "Labels: #{story.labels}" %></p></div>
+<div class="clear"></div>
+<div class="prefix_2 grid_10"><p><%= story.description %></p></div>
+<div class="clear"></div>
+<div class="prefix_1 grid_11"><hr /></div>
+<div class="clear"></div>
+<% end %>
View
6 config/routes.rb
@@ -1,5 +1,11 @@
TrackerPoker::Application.routes.draw do
+ match "pivotal" => "pivotal#index", :as => :pivotal
+ match "pivotal/login" => "pivotal#login", :as => :pivotal_login
+ match "pivotal/project/:project_id/stories" => "pivotal#stories", :as => :project_story
+ match "pivotal/project/:project_id/ice_box" => "pivotal#ice_box", :as => :project_ice_box
+ match "pivotal/projects" => "pivotal#projects", :as => :pivotal_projects
+
devise_for :users
match "about" => "page#about", :as => :about
View
16 db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20111217163756) do
+ActiveRecord::Schema.define(:version => 20111217170206) do
create_table "pivotal_users", :force => true do |t|
t.integer "user_id"
@@ -20,6 +20,11 @@
t.datetime "updated_at"
end
+ create_table "room_users", :force => true do |t|
+ t.integer "room_id"
+ t.integer "user_id"
+ end
+
create_table "rooms", :force => true do |t|
t.integer "project_id"
t.integer "current_story_id"
@@ -27,6 +32,15 @@
t.datetime "updated_at"
end
+ create_table "story_votes", :force => true do |t|
+ t.integer "story_id"
+ t.integer "user_id"
+ t.integer "room_id"
+ t.string "score"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
create_table "users", :force => true do |t|
t.string "email", :default => "", :null => false
t.string "encrypted_password", :limit => 128, :default => "", :null => false
View
19 spec/controllers/pivotal_controller_spec.rb
@@ -0,0 +1,19 @@
+require 'spec_helper'
+
+describe PivotalController do
+
+ describe "GET 'login'" do
+ it "returns http success" do
+ get 'login'
+ response.should_not be_success
+ end
+ end
+
+ describe "GET 'projects'" do
+ it "returns http success" do
+ get 'projects'
+ response.should_not be_success
+ end
+ end
+
+end
View
15 spec/helpers/pivotal_helper_spec.rb
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the PivotalHelper. For example:
+#
+# describe PivotalHelper do
+# describe "string concat" do
+# it "concats two strings with spaces" do
+# helper.concat_strings("this","that").should == "this that"
+# end
+# end
+# end
+describe PivotalHelper do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
View
3  spec/support/devise.rb
@@ -0,0 +1,3 @@
+RSpec.configure do |config|
+ config.include Devise::TestHelpers, :type => :controller
+end
View
5 spec/views/pivotal/login.html.erb_spec.rb
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe "pivotal/login.html.erb" do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
View
5 spec/views/pivotal/projects.html.erb_spec.rb
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe "pivotal/projects.html.erb" do
+ pending "add some examples to (or delete) #{__FILE__}"
+end

No commit comments for this range

Something went wrong with that request. Please try again.