jsmestad-gripht_check 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.textile CHANGED
@@ -1,6 +1,6 @@
1
1
  h3. gripht
2
2
 
3
- p. Description to come.
3
+ p. Gripht (`git` + `graph`) is a sinatra application that provides visibility into multiple Pivotal Tracker projects. The goal is to give a high-level view of what each project is currently working on with javascript controlled updates. This will allow the application to be open in "kiosk" mode for public viewing eventually utilizing graphing libraries to better visualize things like velocity and statistical averages.
4
4
 
5
5
  h3. Copyright
6
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.1.0
@@ -0,0 +1,78 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{gripht_check}
5
+ s.version = "0.1.0"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Justin Smestad"]
9
+ s.date = %q{2009-05-22}
10
+ s.email = %q{justin.smestad@gmail.com}
11
+ s.extra_rdoc_files = [
12
+ "LICENSE",
13
+ "README.textile"
14
+ ]
15
+ s.files = [
16
+ ".gitignore",
17
+ "LICENSE",
18
+ "README.textile",
19
+ "Rakefile",
20
+ "TODO",
21
+ "VERSION",
22
+ "config.ru.example",
23
+ "gripht_check.gemspec",
24
+ "lib/gripht.rb",
25
+ "lib/gripht/app.rb",
26
+ "lib/gripht/views/application.js",
27
+ "lib/gripht/views/failed.haml",
28
+ "lib/gripht/views/index.haml",
29
+ "lib/gripht/views/layout.haml",
30
+ "spec/fixtures.rb",
31
+ "spec/gripht_spec.rb",
32
+ "spec/spec_helper.rb"
33
+ ]
34
+ s.homepage = %q{http://github.com/jsmestad/gripht}
35
+ s.rdoc_options = ["--charset=UTF-8"]
36
+ s.require_paths = ["lib"]
37
+ s.rubygems_version = %q{1.3.3}
38
+ s.summary = %q{TODO}
39
+ s.test_files = [
40
+ "spec/fixtures.rb",
41
+ "spec/gripht_spec.rb",
42
+ "spec/spec_helper.rb"
43
+ ]
44
+
45
+ if s.respond_to? :specification_version then
46
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
47
+ s.specification_version = 3
48
+
49
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
50
+ s.add_runtime_dependency(%q<sinatra>, [">= 0.9.1.1"])
51
+ s.add_runtime_dependency(%q<rubigen>, [">= 1.5.2"])
52
+ s.add_runtime_dependency(%q<rack-test>, [">= 0.1.0"])
53
+ s.add_runtime_dependency(%q<webrat>, [">= 0.4.3"])
54
+ s.add_runtime_dependency(%q<fakeweb>, [">= 1.2.0"])
55
+ s.add_runtime_dependency(%q<haml>, [">= 2.0.9"])
56
+ s.add_runtime_dependency(%q<rest-client>, [">= 0.9.2"])
57
+ s.add_runtime_dependency(%q<nokogiri>, [">= 0"])
58
+ else
59
+ s.add_dependency(%q<sinatra>, [">= 0.9.1.1"])
60
+ s.add_dependency(%q<rubigen>, [">= 1.5.2"])
61
+ s.add_dependency(%q<rack-test>, [">= 0.1.0"])
62
+ s.add_dependency(%q<webrat>, [">= 0.4.3"])
63
+ s.add_dependency(%q<fakeweb>, [">= 1.2.0"])
64
+ s.add_dependency(%q<haml>, [">= 2.0.9"])
65
+ s.add_dependency(%q<rest-client>, [">= 0.9.2"])
66
+ s.add_dependency(%q<nokogiri>, [">= 0"])
67
+ end
68
+ else
69
+ s.add_dependency(%q<sinatra>, [">= 0.9.1.1"])
70
+ s.add_dependency(%q<rubigen>, [">= 1.5.2"])
71
+ s.add_dependency(%q<rack-test>, [">= 0.1.0"])
72
+ s.add_dependency(%q<webrat>, [">= 0.4.3"])
73
+ s.add_dependency(%q<fakeweb>, [">= 1.2.0"])
74
+ s.add_dependency(%q<haml>, [">= 2.0.9"])
75
+ s.add_dependency(%q<rest-client>, [">= 0.9.2"])
76
+ s.add_dependency(%q<nokogiri>, [">= 0"])
77
+ end
78
+ end
data/lib/gripht/app.rb CHANGED
@@ -17,7 +17,20 @@ module Gripht
17
17
 
18
18
  get '/' do
19
19
  resource = RestClient::Resource.new 'http://www.pivotaltracker.com/services/v2/projects', :headers => { 'X-TrackerToken' => ENV['TRACKER_TOKEN']}
20
- @projects = Nokogiri::XML.parse(resource.get).xpath('//project').collect { |r| { :id => r.at('id').content, :name => r.at('name').content } }
20
+ @projects = Nokogiri::XML(resource.get).xpath('//project').collect { |r| { :id => r.at('id').content, :name => r.at('name').content } }
21
+ @projects.each do |project|
22
+ project.merge!({ :stories => Nokogiri::XML(resource["#{project[:id]}/stories?limit=10&filter=state%3Astarted"].get).xpath('//story').collect do |story|
23
+ {
24
+ :name => story.at('name').content,
25
+ :owner => story.at('owned_by').content,
26
+ :created_at => story.at('created_at').content,
27
+ :description => story.at('description').nil? ? "" : story.at('description').content,
28
+ :url => story.at('url').content,
29
+ :type => story.at('story_type').content
30
+ }
31
+ end
32
+ })
33
+ end
21
34
 
22
35
  haml :index
23
36
  end
@@ -1,3 +1,3 @@
1
1
  jQuery(document).ready(function($) {
2
-
2
+ $('.story a').live('click', function(){ $(this).next('p').slideToggle('slow'); });
3
3
  });
@@ -3,11 +3,24 @@
3
3
  %p Stuff goes here.
4
4
 
5
5
  %h3 Current Projects
6
- %ul
7
- = @projects
8
- - @projects.each do |project|
9
- %li= project[:name]
10
-
6
+
7
+ - @projects.each do |project|
8
+ %h4
9
+ = project[:name]
10
+ %span
11
+ = " - "
12
+ %a{:href => "http://www.pivotaltracker.com/projects/#{project[:id]}", :id => project[:id] }
13
+ View Project
14
+ %ul
15
+ - project[:stories].each do |story|
16
+ %li.story
17
+ %a{:href => "#"}= story[:name]
18
+ = "(#{story[:owner]})"
19
+ %p.hidden
20
+ = story[:description] != "" ? story[:description] : "No Description Provided."
21
+ %br
22
+ %a{:href => story[:url]} Open story on Pivotal Tracker.
23
+
11
24
 
12
25
  / - @projects.each do |project|
13
26
  / %li= project
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsmestad-gripht_check
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Smestad
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-21 00:00:00 -07:00
12
+ date: 2009-05-22 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -109,6 +109,7 @@ files:
109
109
  - TODO
110
110
  - VERSION
111
111
  - config.ru.example
112
+ - gripht_check.gemspec
112
113
  - lib/gripht.rb
113
114
  - lib/gripht/app.rb
114
115
  - lib/gripht/views/application.js