tracker_cmd 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -2,15 +2,11 @@
2
2
  tracker_cmd is user centric command line tool for pivotal tracker.
3
3
 
4
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.
5
+ You'll need to provide you pivotal tracker api token and initials as git configuration.
7
6
 
8
7
  ### Git Configuration
9
8
 
10
9
  git config --global pivotal.token <API TOKEN>
11
10
  git config --global pivotal.initials <INITIALS>
12
11
 
13
- ### Environment variable configuration
14
-
15
- export PIVOTAL_TOKEN=<API TOKEN>
16
- export PIVOTAL_INITIALS=<INITIALS>
12
+ Note: Find your api token and intials on your [profile page](https://www.pivotaltracker.com/profile).
data/bin/mywork CHANGED
@@ -5,20 +5,30 @@ require 'term/ansicolor'
5
5
  include TrackerCmd
6
6
  include Term::ANSIColor
7
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]')}"
8
+ unless TOKEN.blank? || INITIALS.blank?
9
+ Tracker.projects.each do |project|
10
+ mywork = Tracker.mywork(project['id'], INITIALS)
11
+ if mywork.any?
12
+ puts underline(project['name'])
13
+ mywork.select{ |story| story['current_state'] =~ /(unstarted|started)/}.each do |story|
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
19
20
  end
20
-
21
-
22
21
  end
23
22
  end
23
+ else
24
+ print <<USAGE
25
+
26
+ We're missing your pivotal tracker api token and/or initials. Set them as follows...
27
+
28
+ git config --global pivotal.token <API TOKEN>
29
+ git config --global pivotal.initials <INITIALS>
30
+
31
+ Note: Find your api token and intials on your profile page. https://www.pivotaltracker.com/profile
32
+
33
+ USAGE
24
34
  end
@@ -1,3 +1,3 @@
1
1
  module TrackerCmd
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/tracker_cmd.rb CHANGED
@@ -1,8 +1,10 @@
1
+
2
+
1
3
  require 'httparty'
2
4
 
3
5
  module TrackerCmd
4
- TOKEN = `git config --global pivotal.token` || `$PIVOTAL_TOKEN`
5
- INITIALS = `git config --global pivotal.initials` || `$PIVOTAL_INITIALS`
6
+ TOKEN = `git config pivotal.token`
7
+ INITIALS = `git config pivotal.initials`
6
8
 
7
9
  class Tracker
8
10
  include HTTParty
@@ -24,5 +26,3 @@ module TrackerCmd
24
26
  end
25
27
 
26
28
  end
27
-
28
-
data/tracker_cmd.gemspec CHANGED
@@ -1,3 +1,5 @@
1
+
2
+
1
3
  # -*- encoding: utf-8 -*-
2
4
  require File.expand_path("../lib/tracker_cmd/version", __FILE__)
3
5
 
@@ -15,7 +17,9 @@ Gem::Specification.new do |s|
15
17
  s.rubyforge_project = "tracker_cmd"
16
18
 
17
19
  s.add_development_dependency "bundler", ">= 1.0.0"
18
- s.add_development_dependency "httparty", ">= 0.6.1"
20
+
21
+ s.add_runtime_dependency "httparty", ">= 0.6.1"
22
+ s.add_runtime_dependency "term-ansicolor", ">= 1.0.5"
19
23
 
20
24
  s.files = `git ls-files`.split("\n")
21
25
  s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Blake Taylor
@@ -45,8 +45,23 @@ dependencies:
45
45
  - 6
46
46
  - 1
47
47
  version: 0.6.1
48
- type: :development
48
+ type: :runtime
49
49
  version_requirements: *id002
50
+ - !ruby/object:Gem::Dependency
51
+ name: term-ansicolor
52
+ prerelease: false
53
+ requirement: &id003 !ruby/object:Gem::Requirement
54
+ none: false
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ segments:
59
+ - 1
60
+ - 0
61
+ - 5
62
+ version: 1.0.5
63
+ type: :runtime
64
+ version_requirements: *id003
50
65
  description: Provides helpful functionlity for interactig with pivotal tracker from the command line.
51
66
  email:
52
67
  - btaylor@agoragames.com