summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2011-09-14 15:49:09 -0700
committerAndre Arko <andre@arko.net>2011-09-14 15:49:09 -0700
commit27656fb92fba2b50db41687a67220614dc2572f8 (patch)
treef392f4cd0bc1b9a8b8ca568413122f8275be9687
parentdebd9372207f8b524de47a41614ecea7ccba5817 (diff)
downloadbundler-27656fb92fba2b50db41687a67220614dc2572f8.tar.gz
Fix fake yard for Rubygems 1.8.10+
-rw-r--r--spec/support/builders.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/support/builders.rb b/spec/support/builders.rb
index 936e1a4a2c..caaa1061c5 100644
--- a/spec/support/builders.rb
+++ b/spec/support/builders.rb
@@ -167,7 +167,12 @@ module Spec
# 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