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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 4f3d18b3a423bd576b812798445f84a5231acd42
4
- data.tar.gz: a8771124d4ff2e747f2b381c70793950e77cb33a
2
+ SHA256:
3
+ metadata.gz: 0f7981de1fdc0b559dc943a509d7dcd5328faf30b09df63b62fa86354e46ebf0
4
+ data.tar.gz: f1c0f5cdd7b415f104dad42ab64c0b21f76cdd006c2f0180a5b867074fcc4789
5
5
  SHA512:
6
- metadata.gz: 73b0e53fc95ed356e73fedca4a8771734bdaa74ad6efad008c9598af35bdc1e8a9333e5f2656791f348eb2d3728c402759655a06bee09dc3bb03f4d5340d3666
7
- data.tar.gz: 66e23c068f09b8c6ecd8caa8075481c7c9f6f180d051dac7070cd47a3abe439911284ec8ddae32a9b7269c26454e589137919db764f7ed765d2fde357763e480
6
+ metadata.gz: 96502bb3f36f0c5e1e628f2c7949aa35f12910fa5bfe7761b2928ca613d331d4bd7dbecdc7c31f45fb9c8fa4e5b6bcd7262fa8ec4083400204324631319843a5
7
+ data.tar.gz: 74ea5cdc3d0ed4bba344fc8657ac5d35e7f555820684f03d26ac592b60946e36d643ddd11634559408f5ea144cb35774065f521e3abc90c2c7e122bcc8766699
@@ -45,19 +45,22 @@ class OpenRemote
45
45
  exit 1
46
46
  end
47
47
 
48
- remote_site = remotes.find { |remote| remote.match search }
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 { |r| r.split[1] }.uniq
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
 
@@ -1,6 +1,6 @@
1
1
  # universal version tracking
2
2
 
3
3
  class OpenRemote
4
- Version = "0.4.1"
4
+ Version = "0.5.0"
5
5
  end
6
6
 
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 part (or
41
- all) of the host name. for example:
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.1
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: 2018-01-22 00:00:00.000000000 Z
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
- rubyforge_project:
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).