pt-flow 0.3.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,4 @@
1
1
  class PT::Flow::UI < PT::UI
2
-
3
2
  def my_work #default command
4
3
  help
5
4
  end
@@ -19,9 +18,9 @@ class PT::Flow::UI < PT::UI
19
18
  def finish
20
19
  run("git push origin #{current_branch}")
21
20
  task = PivotalTracker::Story.find(current_task_id, @project.id)
21
+ title = task.name.gsub('"',"'")
22
+ run("hub pull-request -b #{current_target} \"#{title}\"")
22
23
  finish_task(task)
23
- pull_request_url = "#{github_page_url}/pull/new/#{current_target}...#{current_branch}?title=#{CGI::escape(task.name)} [##{task.id}]&body=#{task.url}"
24
- run("open '#{pull_request_url}'")
25
24
  end
26
25
 
27
26
  def deliver
@@ -1,5 +1,5 @@
1
1
  module PT
2
2
  module Flow
3
- VERSION = "0.3.2"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
@@ -16,6 +16,7 @@ Gem::Specification.new do |gem|
16
16
  gem.version = PT::Flow::VERSION
17
17
 
18
18
  gem.add_dependency 'pt'
19
+ gem.add_dependency 'hub'
19
20
 
20
21
  gem.add_development_dependency 'rspec', '~> 2.9'
21
22
  gem.add_development_dependency 'webmock'
@@ -59,14 +59,14 @@ describe PT::Flow::UI do
59
59
 
60
60
  describe '#finish' do
61
61
  before do
62
- #TODO: Stubbed endpoint ALWAYS returns story 4459994, need a way to check it is actually getting the right id from the branch
62
+ #TODO: Stubbed endpoint ALWAYS returns story 4459994, need a way to check it is actually getting the right id from the branch
63
63
  system('git checkout -B new_feature-4459994')
64
64
  system('git remote add origin git@github.com:balvig/pt-flow.git')
65
65
  end
66
66
 
67
67
  it "pushes the current branch to origin, flags the story as finished, and opens a github pull request" do
68
68
  PT::Flow::UI.any_instance.should_receive(:run).with('git push origin new_feature-4459994')
69
- PT::Flow::UI.any_instance.should_receive(:run).with("open 'https://github.com/balvig/pt-flow/pull/new/new_feature...new_feature-4459994?title=It%27s+an+Unestimated+Feature [#4459994]&body=http://www.pivotaltracker.com/story/show/4459994'")
69
+ PT::Flow::UI.any_instance.should_receive(:run).with("hub pull-request -b new_feature \"It's an Unestimated Feature\"")
70
70
  PT::Flow::UI.new %w{ finish }
71
71
  WebMock.should have_requested(:put, "#{endpoint}/projects/102622/stories/4459994").with(body: /<current_state>finished<\/current_state>/)
72
72
  end
@@ -74,7 +74,7 @@ describe PT::Flow::UI do
74
74
 
75
75
  describe '#deliver' do
76
76
  before do
77
- #TODO: Stubbed endpoint ALWAYS returns story 4459994, need a way to check it is actually getting the right id from the branch
77
+ #TODO: Stubbed endpoint ALWAYS returns story 4459994, need a way to check it is actually getting the right id from the branch
78
78
  system('git checkout -B new_feature-4459994')
79
79
  end
80
80
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pt-flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-17 00:00:00.000000000 Z
12
+ date: 2012-10-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: pt
16
- requirement: !ruby/object:Gem::Requirement
16
+ requirement: &70092866862540 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,15 +21,21 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
24
+ version_requirements: *70092866862540
25
+ - !ruby/object:Gem::Dependency
26
+ name: hub
27
+ requirement: &70092866861940 !ruby/object:Gem::Requirement
25
28
  none: false
26
29
  requirements:
27
30
  - - ! '>='
28
31
  - !ruby/object:Gem::Version
29
32
  version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *70092866861940
30
36
  - !ruby/object:Gem::Dependency
31
37
  name: rspec
32
- requirement: !ruby/object:Gem::Requirement
38
+ requirement: &70092866860820 !ruby/object:Gem::Requirement
33
39
  none: false
34
40
  requirements:
35
41
  - - ~>
@@ -37,15 +43,10 @@ dependencies:
37
43
  version: '2.9'
38
44
  type: :development
39
45
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ~>
44
- - !ruby/object:Gem::Version
45
- version: '2.9'
46
+ version_requirements: *70092866860820
46
47
  - !ruby/object:Gem::Dependency
47
48
  name: webmock
48
- requirement: !ruby/object:Gem::Requirement
49
+ requirement: &70092866860200 !ruby/object:Gem::Requirement
49
50
  none: false
50
51
  requirements:
51
52
  - - ! '>='
@@ -53,15 +54,10 @@ dependencies:
53
54
  version: '0'
54
55
  type: :development
55
56
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
57
+ version_requirements: *70092866860200
62
58
  - !ruby/object:Gem::Dependency
63
59
  name: guard
64
- requirement: !ruby/object:Gem::Requirement
60
+ requirement: &70092866859260 !ruby/object:Gem::Requirement
65
61
  none: false
66
62
  requirements:
67
63
  - - ! '>='
@@ -69,15 +65,10 @@ dependencies:
69
65
  version: '0'
70
66
  type: :development
71
67
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
68
+ version_requirements: *70092866859260
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: guard-rspec
80
- requirement: !ruby/object:Gem::Requirement
71
+ requirement: &70092866858700 !ruby/object:Gem::Requirement
81
72
  none: false
82
73
  requirements:
83
74
  - - ! '>='
@@ -85,12 +76,7 @@ dependencies:
85
76
  version: '0'
86
77
  type: :development
87
78
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ! '>='
92
- - !ruby/object:Gem::Version
93
- version: '0'
79
+ version_requirements: *70092866858700
94
80
  description: Some extra methods for the pt gem to use in our dev flow.
95
81
  email:
96
82
  - jens@balvig.com
@@ -142,7 +128,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
142
128
  version: '0'
143
129
  segments:
144
130
  - 0
145
- hash: -2071167192702947183
131
+ hash: -1797519307488617695
146
132
  required_rubygems_version: !ruby/object:Gem::Requirement
147
133
  none: false
148
134
  requirements:
@@ -151,10 +137,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
137
  version: '0'
152
138
  segments:
153
139
  - 0
154
- hash: -2071167192702947183
140
+ hash: -1797519307488617695
155
141
  requirements: []
156
142
  rubyforge_project:
157
- rubygems_version: 1.8.23
143
+ rubygems_version: 1.8.11
158
144
  signing_key:
159
145
  specification_version: 3
160
146
  summary: Some extra methods for the pt gem to use in our dev flow.