pt-flow 2.2.0 → 2.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a667cbbf9dbf5c7d6d2e79b14ad4460e4f35d3f6
4
- data.tar.gz: 052f3c3ce6cf5bc4e2251ca9a7a0132b3e7be013
3
+ metadata.gz: 993bfc7b0f78053e55a03d3086b0dd2aacd4e7e5
4
+ data.tar.gz: 1ea90b264351aec451f392fa0940f29385f98f21
5
5
  SHA512:
6
- metadata.gz: 080d734b5fbe6562fc8310723d62e11694958a4b75b0d617753e1247f20f65a7ff5ba6c3e0e6bcd61cbfbd2c42e70e2753057e8f0f41123c7ef6733d39aa41f9
7
- data.tar.gz: a62d96e5a1d068c3c176e276d00a37e6cea90931998a7a316a15288c0a75f2368ba0ee68e0ccd223df51821bf85bfa965820f72ea19b7480522b7328a8b00ec1
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
- def path
15
- @path ||= `git config --get remote.origin.url`.strip.match(/github.com[:\/](\S+\/\S+)\.git/)[1]
16
- end
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 = `hub compare -u #{branch.target}...#{branch}`.chomp + "?expand=1&title=#{URI.escape(task_title)}"
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
@@ -1,5 +1,5 @@
1
1
  module PT
2
2
  module Flow
3
- VERSION = '2.2.0'
3
+ VERSION = '2.2.1'
4
4
  end
5
5
  end
@@ -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('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]')
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
@@ -19,5 +19,4 @@ RSpec.configure do |config|
19
19
  system("git remote add origin file://#{origin_path}")
20
20
  system("git push -u origin master")
21
21
  end
22
-
23
22
  end
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.0
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