aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/source.rb
diff options
context:
space:
mode:
authorCarl Lerche <carllerche@mac.com>2010-02-23 09:16:16 -0800
committerCarl Lerche <carllerche@mac.com>2010-02-23 09:16:16 -0800
commit2d16ba76f5805ae26a07d4bb371f2ce4ecd56dad (patch)
tree639ee018a6fd7734c8e64ef62d518da2b1d82527 /lib/bundler/source.rb
parent259224514e68ab4fde89b79c442d6546a99a83d8 (diff)
downloadbundler-2d16ba76f5805ae26a07d4bb371f2ce4ecd56dad.tar.gz
Apparently when you tell Rubygems to fetch all specs and prerelease specs, it doesn't really.
Diffstat (limited to 'lib/bundler/source.rb')
-rw-r--r--lib/bundler/source.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb
index b7ec6c79..7d8914e5 100644
--- a/lib/bundler/source.rb
+++ b/lib/bundler/source.rb
@@ -53,9 +53,11 @@ module Bundler
Bundler.ui.info "Fetching source index from #{uri}"
old, Gem.sources = Gem.sources, ["#{uri}"]
- Gem::SpecFetcher.new.list(true, true).each do |n,v|
+ fetch_all_specs do |n,v|
v.each do |name, version, platform|
+ puts "#{name}, #{version}" if name == "will_paginate"
next unless Gem::Platform.match(platform)
+ puts " * added" if name == "will_paginate"
spec = RemoteSpecification.new(name, version, platform, @uri)
spec.source = self
index << spec
@@ -66,6 +68,11 @@ module Bundler
ensure
Gem.sources = old
end
+
+ def fetch_all_specs(&blk)
+ Gem::SpecFetcher.new.list(true, false).each(&blk)
+ Gem::SpecFetcher.new.list(false, true).each(&blk)
+ end
end
class SystemGems