open-remote 0.4.1 → 0.5.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 +5 -5
- data/lib/open-remote.rb +6 -3
- data/lib/or-version.rb +1 -1
- data/readme.md +4 -2
- metadata +17 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 0f7981de1fdc0b559dc943a509d7dcd5328faf30b09df63b62fa86354e46ebf0
|
4
|
+
data.tar.gz: f1c0f5cdd7b415f104dad42ab64c0b21f76cdd006c2f0180a5b867074fcc4789
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96502bb3f36f0c5e1e628f2c7949aa35f12910fa5bfe7761b2928ca613d331d4bd7dbecdc7c31f45fb9c8fa4e5b6bcd7262fa8ec4083400204324631319843a5
|
7
|
+
data.tar.gz: 74ea5cdc3d0ed4bba344fc8657ac5d35e7f555820684f03d26ac592b60946e36d643ddd11634559408f5ea144cb35774065f521e3abc90c2c7e122bcc8766699
|
data/lib/open-remote.rb
CHANGED
@@ -45,19 +45,22 @@ class OpenRemote
|
|
45
45
|
exit 1
|
46
46
|
end
|
47
47
|
|
48
|
-
remote_site = remotes.find { |
|
48
|
+
remote_site = remotes.find { |r| r.each_value.any? { |d| d.downcase.match search } }
|
49
49
|
|
50
50
|
if remote_site.nil?
|
51
51
|
puts "No remotes found that match #{search.to_s.red}. All remotes:\n" +
|
52
52
|
remotes.join("\n")
|
53
53
|
exit 1
|
54
54
|
else
|
55
|
-
remote_site
|
55
|
+
remote_site[:url]
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
59
|
def remotes
|
60
|
-
%x{git remote -v}.split("\n").map {
|
60
|
+
%x{git remote -v}.split("\n").map {|r| {
|
61
|
+
:remote => r.split[0],
|
62
|
+
:url => r.split[1],
|
63
|
+
}}.uniq
|
61
64
|
end
|
62
65
|
end
|
63
66
|
|
data/lib/or-version.rb
CHANGED
data/readme.md
CHANGED
@@ -37,15 +37,17 @@ removing the alias, if you don't want it anymore:
|
|
37
37
|
|
38
38
|
git open
|
39
39
|
|
40
|
-
opens the first git remote. to open a specific remote, specify some
|
41
|
-
|
40
|
+
opens the first listed git remote. to open a specific remote, specify some
|
41
|
+
of the remote or host name. for example:
|
42
42
|
|
43
43
|
git open bit
|
44
44
|
git open bucket
|
45
45
|
git open bitbucket
|
46
46
|
|
47
47
|
will all open the current repository's bitbucket remote in the browser.
|
48
|
+
additionally, you can use the remote name to specify which URL to open:
|
48
49
|
|
50
|
+
git open origin
|
49
51
|
|
50
52
|
## about
|
51
53
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: open-remote
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Warner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colored
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: prettier
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
description: open a git repo's web remote from your terminal, with 'git open'.
|
70
84
|
email: jwrnr@berkeley.edu
|
71
85
|
executables:
|
@@ -98,8 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
112
|
- !ruby/object:Gem::Version
|
99
113
|
version: '0'
|
100
114
|
requirements: []
|
101
|
-
|
102
|
-
rubygems_version: 2.6.14
|
115
|
+
rubygems_version: 3.0.6
|
103
116
|
signing_key:
|
104
117
|
specification_version: 4
|
105
118
|
summary: open a git repo's remote from your terminal (git open).
|