git-browse-remote 0.1.1 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 84c7c1cdde0ec934fd09d23ed6e43b47bc6fae85
4
- data.tar.gz: ae732ca4fe86a98a4f0d4cf77cf0f5709ad4ca1f
3
+ metadata.gz: 33e1ffa2055a30a41b5ecf4812b7bfc399e8b707
4
+ data.tar.gz: 91ccfd42f40cc53299d2cb2996a391f90194f576
5
5
  SHA512:
6
- metadata.gz: 5311b353f6adb40226f98d684d4695df80060323bd52ae6056bca62ba388b2d1978f9bd5be03177b3f55ce02b1ecc0e440a9d75ab8238d435aef3e05f1ae62eb
7
- data.tar.gz: 2c79fbd27cee8ec1f78b5b585dc203c17821ab774413f841704d038b7429e3ff46e81e1ab0f1293fddc1c294635235fb5823f8fc17335c250a3eebc562196027
6
+ metadata.gz: eea06662b0fa1864425c00be9e31b275d04c562cb8d59ed3e5d89ebbe56930a0cf2c690ee71cb7ee8cbfa46a2e896ad8bc80eabc9be92c291ba27c5058abbe9d
7
+ data.tar.gz: fb26c62a9052836667d7e8abee677ce8aa73b1abec8ed5815f062a5a9069c27c91b071d2934a1e9c6878043b18d6eb13ddcc7995dec1a998a81dacd488a18620
@@ -2,4 +2,6 @@ language: ruby
2
2
  rvm:
3
3
  - 1.8.7
4
4
  - 1.9.3
5
- - 2.0.0
5
+ - 2.0
6
+ - 2.1
7
+ - 2.2
@@ -23,6 +23,7 @@ module Git::Browse::Remote
23
23
  :top => 'https://{host}/{path}',
24
24
  :ref => 'https://{host}/{path}/tree/{short_ref}',
25
25
  :rev => 'https://{host}/{path}/commit/{commit}',
26
+ :pr => 'https://{host}/{path}/pull/{short_ref}',
26
27
  :file => 'https://{host}/{path}/{file.directory? and :tree or :blob}/{short_rev}/{file}{lines && "#L%s" % lines.join("-")}',
27
28
  },
28
29
 
@@ -20,6 +20,7 @@ module Git::Browse::Remote
20
20
  opt.on('--top', 'open `top` page') { @core.mode = :top }
21
21
  opt.on('--rev', 'open `rev` page') { @core.mode = :rev }
22
22
  opt.on('--ref', 'open `ref` page') { @core.mode = :ref }
23
+ opt.on('--pr', 'open `pr` page') { @core.mode = :pr }
23
24
  opt.on('--init [<host>=<recipe>]', 'initialize default url mappings') do |config|
24
25
  if config
25
26
  host, name = *config.split(/=/, 2)
@@ -1,7 +1,7 @@
1
1
  module Git
2
2
  module Browse
3
3
  module Remote
4
- VERSION = '0.1.1'
4
+ VERSION = '0.2.0'
5
5
  end
6
6
  end
7
7
  end
@@ -295,6 +295,12 @@ describe 'git-browse-remote' do
295
295
  end
296
296
  end
297
297
 
298
+ when_run_with_args '--pr' do
299
+ it 'should open the pull request page' do
300
+ expect(opened_url).to eq("https://github.com/user/repo/pull/branch-1")
301
+ end
302
+ end
303
+
298
304
  when_run_with_args 'README.md' do
299
305
  it 'should open the file page at current branch' do
300
306
  expect(opened_url).to eq("https://github.com/user/repo/blob/branch-1/README.md")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-browse-remote
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - motemen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-01 00:00:00.000000000 Z
11
+ date: 2015-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler