gem-homepage 0.0.3 → 0.0.4
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.
@@ -22,12 +22,18 @@ class Gem::Commands::HomepageCommand < Gem::Command
|
|
22
22
|
say "Usage: #{usage}"
|
23
23
|
return terminate_interaction
|
24
24
|
end
|
25
|
+
dep = Gem::Dependency.new(gemname,"> 0")
|
25
26
|
if Gem::Specification.respond_to? :find_all_by_name
|
26
27
|
spec = Gem::Specification.find_all_by_name(gemname).first
|
27
28
|
else
|
28
|
-
dep = Gem::Dependency.new(gemname)
|
29
29
|
spec = Gem.source_index.search(dep).first
|
30
30
|
end
|
31
|
+
if spec.nil?
|
32
|
+
#try remote if you didn't find it locally
|
33
|
+
fetcher = Gem::SpecFetcher.fetcher
|
34
|
+
t = fetcher.fetch(dep).first
|
35
|
+
spec = t.first if t
|
36
|
+
end
|
31
37
|
if spec
|
32
38
|
Launchy.open(spec.homepage)
|
33
39
|
else
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: gem-homepage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.4
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Tony Doan
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-06-22 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: launchy
|
@@ -58,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements: []
|
59
59
|
|
60
60
|
rubyforge_project:
|
61
|
-
rubygems_version: 1.8.
|
61
|
+
rubygems_version: 1.8.5
|
62
62
|
signing_key:
|
63
63
|
specification_version: 3
|
64
64
|
summary: Open the homepage of a gem
|