git-browse-remote 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -1
- data/lib/git/browse/remote/core.rb +1 -0
- data/lib/git/browse/remote/runner.rb +1 -0
- data/lib/git/browse/remote/version.rb +1 -1
- data/spec/bin_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33e1ffa2055a30a41b5ecf4812b7bfc399e8b707
|
4
|
+
data.tar.gz: 91ccfd42f40cc53299d2cb2996a391f90194f576
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eea06662b0fa1864425c00be9e31b275d04c562cb8d59ed3e5d89ebbe56930a0cf2c690ee71cb7ee8cbfa46a2e896ad8bc80eabc9be92c291ba27c5058abbe9d
|
7
|
+
data.tar.gz: fb26c62a9052836667d7e8abee677ce8aa73b1abec8ed5815f062a5a9069c27c91b071d2934a1e9c6878043b18d6eb13ddcc7995dec1a998a81dacd488a18620
|
data/.travis.yml
CHANGED
@@ -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)
|
data/spec/bin_spec.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2015-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|