summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2014-08-15 22:23:50 -0700
committerAndre Arko <andre@arko.net>2014-08-15 22:24:08 -0700
commitef9e90f59ea82d3397cf9a7bbf9d90ddb92d655c (patch)
tree1b5448b2b563e9f0c524c8651e8c74223dc15a75
parent52d18078cd8cc4a4a179f03b7090e6c44c410c59 (diff)
downloadbundler-171.tar.gz
remove fetch_specs171
-rw-r--r--lib/bundler/source/rubygems.rb24
1 files changed, 9 insertions, 15 deletions
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index c92e902b79..397b994b43 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -65,7 +65,15 @@ module Bundler
alias_method :name, :to_s
def specs
- @specs ||= fetch_specs
+ @specs ||= begin
+ # remote_specs usually generates a way larger Index than the other
+ # sources, and large_idx.use small_idx is way faster than
+ # small_idx.use large_idx.
+ idx = @allow_remote ? remote_specs.dup : Index.new
+ idx.use(cached_specs, :override_dupes) if @allow_cached || @allow_remote
+ idx.use(installed_specs, :override_dupes)
+ idx
+ end
end
def install(spec)
@@ -216,20 +224,6 @@ module Bundler
end
end
- def fetch_specs
- # remote_specs usually generates a way larger Index than the other
- # sources, and large_idx.use small_idx is way faster than
- # small_idx.use large_idx.
- if @allow_remote
- idx = remote_specs.dup
- else
- idx = Index.new
- end
- idx.use(cached_specs, :override_dupes) if @allow_cached || @allow_remote
- idx.use(installed_specs, :override_dupes)
- idx
- end
-
def installed_specs
@installed_specs ||= begin
idx = Index.new