pt-flow 0.8.2 → 1.0.0
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.
- checksums.yaml +4 -4
- data/README.md +13 -2
- data/lib/pt-flow/repo.rb +1 -1
- data/lib/pt-flow/ui.rb +1 -1
- data/lib/pt-flow/version.rb +1 -1
- data/spec/lib/pt-flow/ui_spec.rb +23 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a26b6831610100b35a16f96da432f35aec1806f7
|
4
|
+
data.tar.gz: 81a35f52d0247c3e5736a8bba8ce98ac850425ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4d69e7a53b87df1e0f15bc7e7d6fb780b8ffc78da6bdf6737bddb792edda6d81d20a2213620ecb8d0d435416560796db84b7b84547cd8ef65b6bf55f796a74f
|
7
|
+
data.tar.gz: 8b3efd25f8840d8673ac5e00a67d3fbc04d4d57741c4edcb1a1f1d09f4788990d33ee40da58d15d0aeda35765d8b0e935918518c4e8f153effcb1a090c100164
|
data/README.md
CHANGED
@@ -12,11 +12,12 @@ Set up webhook for Pivotal Tracker:
|
|
12
12
|
|
13
13
|
https://github.com/#{repo}/admin/hooks
|
14
14
|
|
15
|
-
### Usage
|
15
|
+
### Basic Usage
|
16
16
|
|
17
17
|
```bash
|
18
18
|
$ git start
|
19
|
-
# shows lists of tasks - choosing one starts/assigns the task on pt and
|
19
|
+
# shows lists of tasks - choosing one starts/assigns the task on pt and
|
20
|
+
# automatically creates and checks out a new branch.
|
20
21
|
|
21
22
|
$ git finish
|
22
23
|
# pushes branch, finishes task on pt, and creates a pull request
|
@@ -26,3 +27,13 @@ $ git finish
|
|
26
27
|
$ git cleanup
|
27
28
|
# cleans up local/remote story branches already merged with current release branch
|
28
29
|
```
|
30
|
+
|
31
|
+
### Other commands
|
32
|
+
|
33
|
+
```bash
|
34
|
+
# creating new stories
|
35
|
+
$ git create # prompts for name
|
36
|
+
$ git create 'as an admin I can delete users'
|
37
|
+
|
38
|
+
# creating and starting a new story
|
39
|
+
$ git start 'as an admin I can delete users'
|
data/lib/pt-flow/repo.rb
CHANGED
data/lib/pt-flow/ui.rb
CHANGED
@@ -37,7 +37,7 @@ module PT::Flow
|
|
37
37
|
task = PivotalTracker::Story.find(branch.task_id, @project.id)
|
38
38
|
title = task.name.gsub('"',"'") + " [Delivers ##{task.id}]"
|
39
39
|
|
40
|
-
run("hub pull-request -b #{branch.target} -h #{repo.user}:#{branch} \"#{title}\"")
|
40
|
+
run("hub pull-request -b #{branch.target} -h #{repo.user}:#{branch} -m \"#{title}\"")
|
41
41
|
finish_task(task)
|
42
42
|
end
|
43
43
|
|
data/lib/pt-flow/version.rb
CHANGED
data/spec/lib/pt-flow/ui_spec.rb
CHANGED
@@ -74,10 +74,31 @@ describe PT::Flow::UI do
|
|
74
74
|
end
|
75
75
|
|
76
76
|
describe '#finish' do
|
77
|
+
context 'ssh repo' do
|
78
|
+
before do
|
79
|
+
system('git checkout -B new_feature')
|
80
|
+
system('git remote rm origin')
|
81
|
+
system('git remote add origin git@github.com:cookpad/pt-flow.git')
|
82
|
+
|
83
|
+
prompt.should_receive(:ask).and_return('3')
|
84
|
+
PT::Flow::UI.new('start')
|
85
|
+
end
|
86
|
+
|
87
|
+
it "pushes the current branch to origin, flags the story as finished, and opens a github pull request" do
|
88
|
+
PT::Flow::UI.any_instance.should_receive(:run).with('git push origin new_feature.this-is-for-comments.4460038 -u')
|
89
|
+
PT::Flow::UI.any_instance.should_receive(:run).with("hub pull-request -b new_feature -h cookpad:new_feature.this-is-for-comments.4460038 -m \"This is for comments [Delivers #4460038]\"")
|
90
|
+
PT::Flow::UI.new('finish')
|
91
|
+
current_branch.should == 'new_feature.this-is-for-comments.4460038'
|
92
|
+
WebMock.should have_requested(:put, "#{endpoint}/projects/102622/stories/4460038").with(body: /<current_state>finished<\/current_state>/)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
context 'https repo' do
|
77
98
|
before do
|
78
99
|
system('git checkout -B new_feature')
|
79
100
|
system('git remote rm origin')
|
80
|
-
system('git remote add origin
|
101
|
+
system('git remote add origin https://github.com/balvig/pt-flow.git')
|
81
102
|
|
82
103
|
prompt.should_receive(:ask).and_return('3')
|
83
104
|
PT::Flow::UI.new('start')
|
@@ -85,10 +106,8 @@ describe PT::Flow::UI do
|
|
85
106
|
|
86
107
|
it "pushes the current branch to origin, flags the story as finished, and opens a github pull request" do
|
87
108
|
PT::Flow::UI.any_instance.should_receive(:run).with('git push origin new_feature.this-is-for-comments.4460038 -u')
|
88
|
-
PT::Flow::UI.any_instance.should_receive(:run).with("hub pull-request -b new_feature -h
|
109
|
+
PT::Flow::UI.any_instance.should_receive(:run).with("hub pull-request -b new_feature -h balvig:new_feature.this-is-for-comments.4460038 -m \"This is for comments [Delivers #4460038]\"")
|
89
110
|
PT::Flow::UI.new('finish')
|
90
|
-
current_branch.should == 'new_feature.this-is-for-comments.4460038'
|
91
|
-
WebMock.should have_requested(:put, "#{endpoint}/projects/102622/stories/4460038").with(body: /<current_state>finished<\/current_state>/)
|
92
111
|
end
|
93
112
|
end
|
94
113
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pt-flow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Balvig
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pt
|
@@ -198,7 +198,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
198
198
|
version: '0'
|
199
199
|
requirements: []
|
200
200
|
rubyforge_project:
|
201
|
-
rubygems_version: 2.
|
201
|
+
rubygems_version: 2.1.0
|
202
202
|
signing_key:
|
203
203
|
specification_version: 4
|
204
204
|
summary: Some extra methods for the pt gem to use in our dev flow.
|