tracker_cmd 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +3 -0
- data/Gemfile +4 -0
- data/README.md +16 -0
- data/Rakefile +2 -0
- data/bin/mywork +24 -0
- data/lib/tracker_cmd/version.rb +3 -0
- data/lib/tracker_cmd.rb +28 -0
- data/tracker_cmd.gemspec +23 -0
- metadata +103 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
## Introduction
|
2
|
+
tracker_cmd is user centric command line tool for pivotal tracker.
|
3
|
+
|
4
|
+
## Configuration
|
5
|
+
You'll need to provide you pivotal tracker api token and initials as either a
|
6
|
+
global git configuration or as environment variables.
|
7
|
+
|
8
|
+
### Git Configuration
|
9
|
+
|
10
|
+
git config --global pivotal.token <API TOKEN>
|
11
|
+
git config --global pivotal.initials <INITIALS>
|
12
|
+
|
13
|
+
### Environment variable configuration
|
14
|
+
|
15
|
+
export PIVOTAL_TOKEN=<API TOKEN>
|
16
|
+
export PIVOTAL_INITIALS=<INITIALS>
|
data/Rakefile
ADDED
data/bin/mywork
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
#! /usr/bin/env ruby
|
2
|
+
require 'tracker_cmd'
|
3
|
+
require 'term/ansicolor'
|
4
|
+
|
5
|
+
include TrackerCmd
|
6
|
+
include Term::ANSIColor
|
7
|
+
|
8
|
+
Tracker.projects.each do |project|
|
9
|
+
mywork = Tracker.mywork(project['id'], INITIALS)
|
10
|
+
if mywork.any?
|
11
|
+
puts underline(project['name'])
|
12
|
+
mywork.each do |story|
|
13
|
+
# name = red(story['name'])
|
14
|
+
case story['current_state']
|
15
|
+
when 'unstarted'
|
16
|
+
puts " * #{story['name']} #{red('[Not Yet Started]')}"
|
17
|
+
when 'started'
|
18
|
+
puts " * #{story['name']} #{green('[Started]')}"
|
19
|
+
end
|
20
|
+
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/tracker_cmd.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'httparty'
|
2
|
+
|
3
|
+
module TrackerCmd
|
4
|
+
TOKEN = `git config --global pivotal.token` || `$PIVOTAL_TOKEN`
|
5
|
+
INITIALS = `git config --global pivotal.initials` || `$PIVOTAL_INITIALS`
|
6
|
+
|
7
|
+
class Tracker
|
8
|
+
include HTTParty
|
9
|
+
format :xml
|
10
|
+
base_uri 'http://www.pivotaltracker.com/services/v3'
|
11
|
+
headers({'X-TrackerToken' => TOKEN})
|
12
|
+
|
13
|
+
def self.projects
|
14
|
+
@projects = get('/projects')['projects']
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.stories(project_id)
|
18
|
+
get("/projects/#{project_id}/stories")['stories']
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.mywork(project_id, initials)
|
22
|
+
get("/projects/#{project_id}/stories", :query => {:filter => "mywork:#{initials}"})['stories']
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
|
data/tracker_cmd.gemspec
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path("../lib/tracker_cmd/version", __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = "tracker_cmd"
|
6
|
+
s.version = TrackerCmd::VERSION
|
7
|
+
s.platform = Gem::Platform::RUBY
|
8
|
+
s.authors = ['Blake Taylor']
|
9
|
+
s.email = ['btaylor@agoragames.com']
|
10
|
+
s.homepage = "http://rubygems.org/gems/tracker_cmd"
|
11
|
+
s.summary = "User centric command line tool for pivotal tracker."
|
12
|
+
s.description = "Provides helpful functionlity for interactig with pivotal tracker from the command line."
|
13
|
+
|
14
|
+
s.required_rubygems_version = ">= 1.3.6"
|
15
|
+
s.rubyforge_project = "tracker_cmd"
|
16
|
+
|
17
|
+
s.add_development_dependency "bundler", ">= 1.0.0"
|
18
|
+
s.add_development_dependency "httparty", ">= 0.6.1"
|
19
|
+
|
20
|
+
s.files = `git ls-files`.split("\n")
|
21
|
+
s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
|
22
|
+
s.require_path = 'lib'
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tracker_cmd
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
version: 0.0.1
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Blake Taylor
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-12-01 00:00:00 -05:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: bundler
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
segments:
|
29
|
+
- 1
|
30
|
+
- 0
|
31
|
+
- 0
|
32
|
+
version: 1.0.0
|
33
|
+
type: :development
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: httparty
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
segments:
|
44
|
+
- 0
|
45
|
+
- 6
|
46
|
+
- 1
|
47
|
+
version: 0.6.1
|
48
|
+
type: :development
|
49
|
+
version_requirements: *id002
|
50
|
+
description: Provides helpful functionlity for interactig with pivotal tracker from the command line.
|
51
|
+
email:
|
52
|
+
- btaylor@agoragames.com
|
53
|
+
executables:
|
54
|
+
- mywork
|
55
|
+
extensions: []
|
56
|
+
|
57
|
+
extra_rdoc_files: []
|
58
|
+
|
59
|
+
files:
|
60
|
+
- .gitignore
|
61
|
+
- Gemfile
|
62
|
+
- README.md
|
63
|
+
- Rakefile
|
64
|
+
- bin/mywork
|
65
|
+
- lib/tracker_cmd.rb
|
66
|
+
- lib/tracker_cmd/version.rb
|
67
|
+
- tracker_cmd.gemspec
|
68
|
+
has_rdoc: true
|
69
|
+
homepage: http://rubygems.org/gems/tracker_cmd
|
70
|
+
licenses: []
|
71
|
+
|
72
|
+
post_install_message:
|
73
|
+
rdoc_options: []
|
74
|
+
|
75
|
+
require_paths:
|
76
|
+
- lib
|
77
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
78
|
+
none: false
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
segments:
|
83
|
+
- 0
|
84
|
+
version: "0"
|
85
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
|
+
none: false
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
segments:
|
91
|
+
- 1
|
92
|
+
- 3
|
93
|
+
- 6
|
94
|
+
version: 1.3.6
|
95
|
+
requirements: []
|
96
|
+
|
97
|
+
rubyforge_project: tracker_cmd
|
98
|
+
rubygems_version: 1.3.7
|
99
|
+
signing_key:
|
100
|
+
specification_version: 3
|
101
|
+
summary: User centric command line tool for pivotal tracker.
|
102
|
+
test_files: []
|
103
|
+
|