Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rakefile: Gem.source_index is also deperecated, use Gem::Specificatio…

…n but be backward-compatible with older versions of rubygems.
  • Loading branch information...
commit baad78a081b2ed6037a74cf994a8e20eb3c70ac5 1 parent 4887cba
@kalbasit kalbasit authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 Rakefile
View
4 Rakefile
@@ -15,7 +15,9 @@ end
def find_gem(gem_name)
begin
require 'rubygems'
- if Gem.respond_to?(:source_index)
+ if Gem.const_defined?(:Specification)
+ Gem::Specification.find_all_by_name(gem_name)
+ elsif Gem.respond_to?(:source_index)
Gem.source_index.find_name(gem_name)
else
Gem.cache.find_name(gem_name)
Please sign in to comment.
Something went wrong with that request. Please try again.