Permalink
Browse files

Fix fake yard for Rubygems 1.8.10+

  • Loading branch information...
1 parent debd937 commit 27656fb92fba2b50db41687a67220614dc2572f8 @indirect indirect committed Sep 14, 2011
Showing with 6 additions and 1 deletion.
  1. +6 −1 spec/support/builders.rb
View
@@ -167,7 +167,12 @@ def build_repo1
# The yard gem iterates over Gem.source_index looking for plugins
build_gem "yard" do |s|
s.write "lib/yard.rb", <<-Y
- Gem.source_index.find_name('').each do |gem|
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new("1.8.10")
+ specs = Gem::Specification
+ else
+ specs = Gem.source_index.find_name('')
+ end
+ specs.each do |gem|
puts gem.full_name
end
Y

0 comments on commit 27656fb

Please sign in to comment.