Package not found. Please check the package name and try again.

gem-homepage 0.0.2 → 0.0.3

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,13 @@ 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)
26
- $stderr.puts "Made dep"
27
- spec = Gem.source_index.search(dep).first
28
- $stderr.puts "spec: #{spec.inspect}"
25
+ if Gem::Specification.respond_to? :find_all_by_name
26
+ spec = Gem::Specification.find_all_by_name(gemname).first
27
+ else
28
+ dep = Gem::Dependency.new(gemname)
29
+ spec = Gem.source_index.search(dep).first
30
+ end
29
31
  if spec
30
- $stderr.puts "found a spec"
31
32
  Launchy.open(spec.homepage)
32
33
  else
33
34
  say "The #{gemname.inspect} gem couldn't be found"
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.2
5
+ version: 0.0.3
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-05-01 00:00:00 Z
13
+ date: 2011-05-11 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.7.2
61
+ rubygems_version: 1.8.1
62
62
  signing_key:
63
63
  specification_version: 3
64
64
  summary: Open the homepage of a gem