idealian-git-pivotal 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +3 -3
- data/VERSION +1 -1
- data/git-pivotal.gemspec +2 -2
- data/lib/commands/base.rb +2 -0
- data/lib/commands/feature.rb +10 -0
- data/lib/commands/finish.rb +1 -1
- data/lib/commands/pick.rb +13 -5
- data/readme.markdown +6 -1
- metadata +21 -4
data/Rakefile
CHANGED
@@ -7,12 +7,12 @@ $LOAD_PATH.unshift('lib')
|
|
7
7
|
begin
|
8
8
|
require 'jeweler'
|
9
9
|
Jeweler::Tasks.new do |gemspec|
|
10
|
-
gemspec.name = "git-pivotal"
|
11
|
-
gemspec.summary = "A collection of git utilities to ease integration with Pivotal Tracker"
|
10
|
+
gemspec.name = "idealian-git-pivotal"
|
11
|
+
gemspec.summary = "a fork of git-pivital to support owner picking and different local integration branch A collection of git utilities to ease integration with Pivotal Tracker"
|
12
12
|
gemspec.description = "A collection of git utilities to ease integration with Pivotal Tracker"
|
13
13
|
gemspec.email = "jeff@trydionel.com"
|
14
14
|
gemspec.homepage = "http://github.com/trydionel/git-pivotal"
|
15
|
-
gemspec.authors = ["Jeff Tucker", "Sam Stokes"]
|
15
|
+
gemspec.authors = ["Jeff Tucker", "Sam Stokes", "Taylor Luk"]
|
16
16
|
|
17
17
|
gemspec.add_dependency "nokogiri"
|
18
18
|
gemspec.add_dependency "rest-client"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.4
|
data/git-pivotal.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{git-pivotal}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jeff Tucker", "Sam Stokes"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-04-09}
|
13
13
|
s.description = %q{A collection of git utilities to ease integration with Pivotal Tracker}
|
14
14
|
s.email = %q{jeff@trydionel.com}
|
15
15
|
s.executables = ["git-bug", "git-chore", "git-feature", "git-finish", "git-pick"]
|
data/lib/commands/base.rb
CHANGED
@@ -41,10 +41,12 @@ module Commands
|
|
41
41
|
token = get("git config --get pivotal.api-token").strip
|
42
42
|
id = get("git config --get pivotal.project-id").strip
|
43
43
|
name = get("git config --get pivotal.full-name").strip
|
44
|
+
target = get("git config --get pivotal.target").strip
|
44
45
|
|
45
46
|
options[:api_token] = token unless token == ""
|
46
47
|
options[:project_id] = id unless id == ""
|
47
48
|
options[:full_name] = name unless name == ""
|
49
|
+
options[:target] = target == "" ? "master" : target
|
48
50
|
end
|
49
51
|
|
50
52
|
def parse_argv(*args)
|
data/lib/commands/feature.rb
CHANGED
@@ -15,5 +15,15 @@ module Commands
|
|
15
15
|
"feature"
|
16
16
|
end
|
17
17
|
|
18
|
+
private
|
19
|
+
def story
|
20
|
+
# Try your own story first
|
21
|
+
@story ||= project.stories.find(:conditions => {
|
22
|
+
:story_type => type, :current_state => :unstarted, :owner => options[:full_name]
|
23
|
+
}, :limit => 1).first
|
24
|
+
|
25
|
+
# try anything not started
|
26
|
+
@story ||= project.stories.find(:conditions => { :story_type => type, :current_state => :unstarted }, :limit => 1).first
|
27
|
+
end
|
18
28
|
end
|
19
29
|
end
|
data/lib/commands/finish.rb
CHANGED
@@ -21,7 +21,7 @@ module Commands
|
|
21
21
|
put "Marking Story #{story_id} as finished..."
|
22
22
|
if story.update_attributes(:current_state => :finished)
|
23
23
|
|
24
|
-
target_branch =
|
24
|
+
target_branch = options[:target]
|
25
25
|
put "Merging #{current_branch} into #{target_branch}"
|
26
26
|
sys "git checkout #{target_branch}"
|
27
27
|
sys "git merge --no-ff #{current_branch}"
|
data/lib/commands/pick.rb
CHANGED
@@ -19,10 +19,6 @@ module Commands
|
|
19
19
|
super
|
20
20
|
|
21
21
|
put "Retrieving latest #{plural_type} from Pivotal Tracker..."
|
22
|
-
api = Pivotal::Api.new(:api_token => options[:api_token])
|
23
|
-
|
24
|
-
project = api.projects.find(:id => options[:project_id])
|
25
|
-
story = project.stories.find(:conditions => { :story_type => type, :current_state => :unstarted }, :limit => 1).first
|
26
22
|
|
27
23
|
unless story
|
28
24
|
put "No #{plural_type} available!"
|
@@ -56,6 +52,18 @@ module Commands
|
|
56
52
|
return 1
|
57
53
|
end
|
58
54
|
end
|
59
|
-
|
55
|
+
|
56
|
+
protected
|
57
|
+
def api
|
58
|
+
@api ||= Pivotal::Api.new(:api_token => options[:api_token])
|
59
|
+
end
|
60
|
+
|
61
|
+
def project
|
62
|
+
@project ||= api.projects.find(:id => options[:project_id])
|
63
|
+
end
|
64
|
+
|
65
|
+
def story
|
66
|
+
@story ||= project.stories.find(:conditions => { :story_type => type, :current_state => :unstarted }, :limit => 1).first
|
67
|
+
end
|
60
68
|
end
|
61
69
|
end
|
data/readme.markdown
CHANGED
@@ -30,7 +30,7 @@ When on a feature branch, this command will close the associated story in Pivota
|
|
30
30
|
##Installation
|
31
31
|
To install git-pivotal, simply run
|
32
32
|
|
33
|
-
[sudo] gem install git-pivotal
|
33
|
+
[sudo] gem install idealian-git-pivotal
|
34
34
|
|
35
35
|
<h2 id="config">Configuration</h2>
|
36
36
|
Once installed, git pivotal needs three bits of info: your Pivotal Tracker API Token, your name as it appears in Pivotal Tracker and your Pivotal Tracker project id. The former two are best set as a global git config options:
|
@@ -41,6 +41,11 @@ Once installed, git pivotal needs three bits of info: your Pivotal Tracker API T
|
|
41
41
|
The project id is best placed within your project's git config:
|
42
42
|
|
43
43
|
git config -f .git/config pivotal.project-id 88888
|
44
|
+
|
45
|
+
Different local integration branch (default: master)
|
46
|
+
|
47
|
+
git config -f .git/config pivotal.target develop
|
48
|
+
|
44
49
|
|
45
50
|
If you're not interested in storing these options in git, you can pass them into git pivotal as command line arguments. See the usage guides for more details.
|
46
51
|
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: idealian-git-pivotal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 31
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
7
8
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
9
|
+
- 4
|
10
|
+
version: 0.2.4
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Jeff Tucker
|
@@ -16,16 +17,18 @@ autorequire:
|
|
16
17
|
bindir: bin
|
17
18
|
cert_chain: []
|
18
19
|
|
19
|
-
date: 2010-
|
20
|
+
date: 2010-05-26 00:00:00 +10:00
|
20
21
|
default_executable:
|
21
22
|
dependencies:
|
22
23
|
- !ruby/object:Gem::Dependency
|
23
24
|
name: nokogiri
|
24
25
|
prerelease: false
|
25
26
|
requirement: &id001 !ruby/object:Gem::Requirement
|
27
|
+
none: false
|
26
28
|
requirements:
|
27
29
|
- - ">="
|
28
30
|
- !ruby/object:Gem::Version
|
31
|
+
hash: 3
|
29
32
|
segments:
|
30
33
|
- 0
|
31
34
|
version: "0"
|
@@ -35,9 +38,11 @@ dependencies:
|
|
35
38
|
name: rest-client
|
36
39
|
prerelease: false
|
37
40
|
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
38
42
|
requirements:
|
39
43
|
- - ">="
|
40
44
|
- !ruby/object:Gem::Version
|
45
|
+
hash: 3
|
41
46
|
segments:
|
42
47
|
- 0
|
43
48
|
version: "0"
|
@@ -47,9 +52,11 @@ dependencies:
|
|
47
52
|
name: builder
|
48
53
|
prerelease: false
|
49
54
|
requirement: &id003 !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
50
56
|
requirements:
|
51
57
|
- - ">="
|
52
58
|
- !ruby/object:Gem::Version
|
59
|
+
hash: 3
|
53
60
|
segments:
|
54
61
|
- 0
|
55
62
|
version: "0"
|
@@ -59,9 +66,11 @@ dependencies:
|
|
59
66
|
name: rspec
|
60
67
|
prerelease: false
|
61
68
|
requirement: &id004 !ruby/object:Gem::Requirement
|
69
|
+
none: false
|
62
70
|
requirements:
|
63
71
|
- - ">="
|
64
72
|
- !ruby/object:Gem::Version
|
73
|
+
hash: 3
|
65
74
|
segments:
|
66
75
|
- 0
|
67
76
|
version: "0"
|
@@ -71,9 +80,11 @@ dependencies:
|
|
71
80
|
name: rcov
|
72
81
|
prerelease: false
|
73
82
|
requirement: &id005 !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
74
84
|
requirements:
|
75
85
|
- - ">="
|
76
86
|
- !ruby/object:Gem::Version
|
87
|
+
hash: 3
|
77
88
|
segments:
|
78
89
|
- 0
|
79
90
|
version: "0"
|
@@ -83,9 +94,11 @@ dependencies:
|
|
83
94
|
name: mocha
|
84
95
|
prerelease: false
|
85
96
|
requirement: &id006 !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
86
98
|
requirements:
|
87
99
|
- - ">="
|
88
100
|
- !ruby/object:Gem::Version
|
101
|
+
hash: 3
|
89
102
|
segments:
|
90
103
|
- 0
|
91
104
|
version: "0"
|
@@ -154,23 +167,27 @@ rdoc_options:
|
|
154
167
|
require_paths:
|
155
168
|
- lib
|
156
169
|
required_ruby_version: !ruby/object:Gem::Requirement
|
170
|
+
none: false
|
157
171
|
requirements:
|
158
172
|
- - ">="
|
159
173
|
- !ruby/object:Gem::Version
|
174
|
+
hash: 3
|
160
175
|
segments:
|
161
176
|
- 0
|
162
177
|
version: "0"
|
163
178
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
179
|
+
none: false
|
164
180
|
requirements:
|
165
181
|
- - ">="
|
166
182
|
- !ruby/object:Gem::Version
|
183
|
+
hash: 3
|
167
184
|
segments:
|
168
185
|
- 0
|
169
186
|
version: "0"
|
170
187
|
requirements: []
|
171
188
|
|
172
189
|
rubyforge_project:
|
173
|
-
rubygems_version: 1.3.
|
190
|
+
rubygems_version: 1.3.7
|
174
191
|
signing_key:
|
175
192
|
specification_version: 3
|
176
193
|
summary: a fork of git-pivital to support owner picking and different local integration branch A collection of git utilities to ease integration with Pivotal Tracker
|