rubygems-path 0.1.0 → 0.1.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 +4 -4
- data/lib/rubygems_plugin.rb +18 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1df73c6ca77aafd903d1d3e8d7a0a49c09fa62691a2122f061c8140758f9dbb
|
4
|
+
data.tar.gz: 5f21732654806a3e9796c654dc38e71b3ca39cfa37a284e310c1263e434d76b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b05edf818c8598a5a011d8987a46bd1a4a427452027ea53dec972dc1655d6633a5dd27769add3cbde18a51618b1f9efc6645add69ba5b5bafbc692174cca593
|
7
|
+
data.tar.gz: 9af6ff9151625622d25d751bccba9c9da3b0829b26cb3a6da90cc824ef06c5ade2ffeac2b3f761a8584e0b6704e98eb8c6d510bb9c7fcf295265b9ca57c18fb2
|
data/lib/rubygems_plugin.rb
CHANGED
@@ -8,11 +8,25 @@ class Gem::Commands::PathCommand < Gem::Command
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def execute
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
_, gem_name, filename = $*
|
12
|
+
if gem_name.nil?
|
13
|
+
raise Gem::CommandLineError, "Gem name missing"
|
14
|
+
end
|
15
|
+
gemspec = find_by_name(gem_name)
|
16
|
+
path = gemspec.full_gem_path
|
17
|
+
|
18
|
+
if filename.nil?
|
19
|
+
puts path
|
20
|
+
return
|
21
|
+
end
|
22
|
+
|
23
|
+
filepath = Dir["#{path}/**/#{filename}"].first
|
24
|
+
if filepath.nil?
|
25
|
+
raise Gem::CommandLineError, "Name not found within gem files"
|
26
|
+
end
|
27
|
+
puts filepath
|
14
28
|
rescue Gem::LoadError
|
15
|
-
alert_error "gem '#{
|
29
|
+
alert_error "gem '#{gem_name}' not found"
|
16
30
|
terminate_interaction 1
|
17
31
|
end
|
18
32
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubygems-path
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Grigory Petrov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|