pt-flow 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pt-flow/repo.rb +7 -3
- data/lib/pt-flow/ui.rb +2 -3
- data/lib/pt-flow/version.rb +1 -1
- data/spec/lib/pt-flow/ui_spec.rb +1 -2
- data/spec/support/dummy.rb +0 -1
- metadata +1 -2
- data/Guardfile +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 993bfc7b0f78053e55a03d3086b0dd2aacd4e7e5
|
4
|
+
data.tar.gz: 1ea90b264351aec451f392fa0940f29385f98f21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa3ae6fa1498ed1e40cd0347e6f559c7a576727a1d6473eb09046731f434590067099541948150e7792644912d4554526a064e3e021680b63b80c8c1f2d6d4d2
|
7
|
+
data.tar.gz: 2f73ab2927eba6df52d46716069420463b7ec3e0462f3deb8d653f40ad2155551cce73ea99c740c057564e9678675f716cb3e430cccf0603a4ed19f61beab71b
|
data/lib/pt-flow/repo.rb
CHANGED
@@ -9,11 +9,15 @@ module PT::Flow
|
|
9
9
|
path.split('/').last
|
10
10
|
end
|
11
11
|
|
12
|
+
def url
|
13
|
+
"https://github.com/#{user}/#{name}"
|
14
|
+
end
|
15
|
+
|
12
16
|
private
|
13
17
|
|
14
|
-
|
15
|
-
|
16
|
-
|
18
|
+
def path
|
19
|
+
@path ||= `git config --get remote.origin.url`.strip.match(/github.com[:\/](\S+\/\S+)\.git/)[1]
|
20
|
+
end
|
17
21
|
|
18
22
|
end
|
19
23
|
end
|
data/lib/pt-flow/ui.rb
CHANGED
@@ -91,8 +91,8 @@ module PT::Flow
|
|
91
91
|
|
92
92
|
def pull_request
|
93
93
|
if @params.include?('--draft')
|
94
|
-
pr_url =
|
95
|
-
run "open #{pr_url}"
|
94
|
+
pr_url = repo.url + "/compare/#{branch.target}...#{branch}?expand=1&title=#{URI.escape(task_title)}"
|
95
|
+
run "open \"#{pr_url}\""
|
96
96
|
else
|
97
97
|
run("hub pull-request -b #{branch.target} -h #{repo.user}:#{branch} -m \"#{task_title}\"")
|
98
98
|
end
|
@@ -116,6 +116,5 @@ module PT::Flow
|
|
116
116
|
super
|
117
117
|
exit(false)
|
118
118
|
end
|
119
|
-
|
120
119
|
end
|
121
120
|
end
|
data/lib/pt-flow/version.rb
CHANGED
data/spec/lib/pt-flow/ui_spec.rb
CHANGED
@@ -121,7 +121,7 @@ module PT::Flow
|
|
121
121
|
context 'given option --draft' do
|
122
122
|
it "pushes the current branch to origin, flags the story as finished, and opens github pull request URL" do
|
123
123
|
UI.any_instance.should_receive(:run).with('git push origin new_feature.this-is-for-comments.4460038 -u')
|
124
|
-
UI.any_instance.should_receive(:run).with(
|
124
|
+
UI.any_instance.should_receive(:run).with("open \"https://github.com/cookpad/pt-flow/compare/new_feature...new_feature.this-is-for-comments.4460038?expand=1&title=This%20is%20for%20comments%20[Delivers%20%234460038]\"")
|
125
125
|
UI.new('finish', ['--draft'])
|
126
126
|
end
|
127
127
|
end
|
@@ -158,6 +158,5 @@ module PT::Flow
|
|
158
158
|
UI.new('finish')
|
159
159
|
end
|
160
160
|
end
|
161
|
-
|
162
161
|
end
|
163
162
|
end
|
data/spec/support/dummy.rb
CHANGED
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: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Balvig
|
@@ -150,7 +150,6 @@ files:
|
|
150
150
|
- ".gitignore"
|
151
151
|
- ".travis.yml"
|
152
152
|
- Gemfile
|
153
|
-
- Guardfile
|
154
153
|
- LICENSE
|
155
154
|
- README.md
|
156
155
|
- Rakefile
|
data/Guardfile
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
# A sample Guardfile
|
2
|
-
# More info at https://github.com/guard/guard#readme
|
3
|
-
|
4
|
-
guard 'rspec', :version => 2, :all_on_start => false, :all_after_pass => false do
|
5
|
-
watch(%r{^spec/.+_spec\.rb$})
|
6
|
-
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
7
|
-
watch('spec/spec_helper.rb') { "spec" }
|
8
|
-
end
|