pt-flow 1.1.0 → 1.1.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.
- checksums.yaml +4 -4
- data/lib/pt-flow/ui.rb +14 -8
- data/lib/pt-flow/version.rb +1 -1
- data/spec/lib/pt-flow/ui_spec.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 768dff4a6a274534a3dfe9fb6af7d7bfc5c99feb
|
4
|
+
data.tar.gz: ca496ea954994659d003b93c96e92a96753a7607
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97757922cf2bb03bce2e1727620b11fdc4e4bfcd76cdd90b93bad4410d424f28cd521bbd4f60d5662149a37a99c08372ffabd92c769c7f731c5e5c4c69a68fcc
|
7
|
+
data.tar.gz: b822ef71c4033f5fdca6de7fc99c9f055b9e3303108435cd08d59c3601d47ff3c52e8dbb6ec32ddc47faca392633a5f7683a276272c4a4e450791c489c49cc13
|
data/lib/pt-flow/ui.rb
CHANGED
@@ -34,12 +34,9 @@ module PT::Flow
|
|
34
34
|
|
35
35
|
def finish
|
36
36
|
run("git push origin #{branch} -u")
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
run("hub pull-request -b #{branch.target} -h #{repo.user}:#{branch} -m \"#{title}\"")
|
41
|
-
finish_task(task)
|
42
|
-
merge! if @params.include?('--merge')
|
37
|
+
run("hub pull-request -b #{branch.target} -h #{repo.user}:#{branch} -m \"#{task_title}\"")
|
38
|
+
finish_task(current_task)
|
39
|
+
deliver! if @params.include?('--deliver')
|
43
40
|
end
|
44
41
|
|
45
42
|
def cleanup
|
@@ -80,11 +77,20 @@ module PT::Flow
|
|
80
77
|
end
|
81
78
|
end
|
82
79
|
|
83
|
-
def
|
80
|
+
def current_task
|
81
|
+
PivotalTracker::Story.find(branch.task_id, @project.id)
|
82
|
+
end
|
83
|
+
|
84
|
+
def task_title
|
85
|
+
current_task.name.gsub('"',"'") + " [Delivers ##{current_task.id}]"
|
86
|
+
end
|
87
|
+
|
88
|
+
def deliver!
|
84
89
|
finished_branch = branch
|
90
|
+
title = task_title
|
85
91
|
run "git checkout #{finished_branch.target}"
|
86
92
|
run "git pull"
|
87
|
-
run "git merge #{finished_branch}"
|
93
|
+
run "git merge #{finished_branch} --no-ff -m \"#{title}\""
|
88
94
|
run "git push origin #{finished_branch.target}"
|
89
95
|
end
|
90
96
|
|
data/lib/pt-flow/version.rb
CHANGED
data/spec/lib/pt-flow/ui_spec.rb
CHANGED
@@ -95,15 +95,15 @@ module PT::Flow
|
|
95
95
|
end
|
96
96
|
end
|
97
97
|
|
98
|
-
context 'given option --
|
98
|
+
context 'given option --deliver' do
|
99
99
|
it "pushes the current branch to origin, flags the story as finished, opens github pull request, merges it in and returns to master and pulls" do
|
100
100
|
UI.any_instance.should_receive(:run).with('git push origin new_feature.this-is-for-comments.4460038 -u')
|
101
101
|
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]\"")
|
102
102
|
UI.any_instance.should_receive(:run).with('git checkout new_feature')
|
103
103
|
UI.any_instance.should_receive(:run).with('git pull')
|
104
|
-
UI.any_instance.should_receive(:run).with(
|
104
|
+
UI.any_instance.should_receive(:run).with("git merge new_feature.this-is-for-comments.4460038 --no-ff -m \"This is for comments [Delivers #4460038]\"")
|
105
105
|
UI.any_instance.should_receive(:run).with('git push origin new_feature')
|
106
|
-
UI.new('finish', ['--
|
106
|
+
UI.new('finish', ['--deliver'])
|
107
107
|
end
|
108
108
|
end
|
109
109
|
end
|