gem-versions 1.0.0 → 1.0.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.
data/.gitignore CHANGED
@@ -1,4 +1,5 @@
1
1
  *.gem
2
2
  .bundle
3
+ .rbenv-version
3
4
  Gemfile.lock
4
5
  pkg/*
@@ -3,7 +3,7 @@ $:.push File.expand_path('../lib', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'gem-versions'
6
- s.version = '1.0.0'
6
+ s.version = '1.0.1'
7
7
  s.authors = [ 'Andy Stewart' ]
8
8
  s.email = 'boss@airbladesoftware.com'
9
9
  s.homepage = 'https://github.com/airblade/gem-versions'
@@ -40,9 +40,12 @@ class Gem::Commands::VersionsCommand < Gem::Command
40
40
  end
41
41
 
42
42
  def local_versions(name)
43
- # From Rubygems' Gem::Commands::QueryCommand
44
- dep = Gem::Dependency.new name, Gem::Requirement.default
45
- specs = Gem.source_index.search dep
43
+ specs = if Gem::Specification.respond_to? :find_all_by_name
44
+ Gem::Specification.find_all_by_name name
45
+ else
46
+ dep = Gem::Dependency.new name, Gem::Requirement.default
47
+ Gem.source_index.search dep
48
+ end
46
49
  specs.map { |spec| spec.version.to_s }
47
50
  end
48
51
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem-versions
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andy Stewart
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-22 00:00:00 +02:00
18
+ date: 2011-09-23 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency