lib/bundler/source/rubygems.rb in bundler-1.6.0.pre.1 vs lib/bundler/source/rubygems.rb in bundler-1.6.0.pre.2

- old
+ new

@@ -2,11 +2,10 @@ require 'rubygems/user_interaction' require 'rubygems/spec_fetcher' module Bundler class Source - # TODO: Refactor this class class Rubygems < Source API_REQUEST_LIMIT = 100 # threshold for switching back to the modern index instead of fetching every spec attr_reader :remotes, :caches attr_accessor :dependency_names @@ -66,13 +65,11 @@ def specs @specs ||= fetch_specs end def install(spec) - if installed_specs[spec].any? && gem_dir_exists?(spec) - return ["Using #{version_message(spec)}", nil] - end + return ["Using #{version_message(spec)}", nil] if installed_specs[spec].any? # Download the gem to get the spec, because some specs that are returned # by rubygems.org are broken and wrong. if spec.source_uri path = Fetcher.download_gem_from_uri(spec, spec.source_uri) @@ -274,18 +271,8 @@ ensure Bundler.rubygems.sources = old end end - def gem_dir_exists?(spec) - return true if spec.name == "bundler" - # Ruby 2 default gems - return true if spec.loaded_from.include?("specifications/default/") - # Ruby 1.9 default gems - return true if spec.summary =~ /is bundled with Ruby/ - - File.directory?(spec.full_gem_path) - end end - end end