summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/bundler/source/rubygems.rb13
-rw-r--r--spec/install/gems/simple_case_spec.rb16
2 files changed, 1 insertions, 28 deletions
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index 880f78ee7d..f69a5b3e8e 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -4,7 +4,6 @@ require 'rubygems/spec_fetcher'
module Bundler
module Source
- # TODO: Refactor this class
class Rubygems
API_REQUEST_LIMIT = 100 # threshold for switching back to the modern index instead of fetching every spec
@@ -68,7 +67,7 @@ module Bundler
end
def install(spec)
- if installed_specs[spec].any? && gem_dir_exists?(spec)
+ if installed_specs[spec].any?
return ["Using #{spec.name} (#{spec.version})", nil]
end
@@ -277,16 +276,6 @@ module Bundler
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
diff --git a/spec/install/gems/simple_case_spec.rb b/spec/install/gems/simple_case_spec.rb
index 431cdc2376..505e3d1f7e 100644
--- a/spec/install/gems/simple_case_spec.rb
+++ b/spec/install/gems/simple_case_spec.rb
@@ -337,22 +337,6 @@ describe "bundle install with gem sources" do
G
expect(exitstatus).to eq(0)
end
-
- it "reinstalls the gem if the gem dir is missing but the specification file exists" do
- gemfile(<<-G)
- source "file://#{gem_repo1}"
-
- gem 'foo'
- G
-
- bundle "install --path vendor/bundle"
-
- FileUtils.rm_rf(vendored_gems('gems/foo-1.0'))
-
- bundle "install"
-
- expect(vendored_gems('gems/foo-1.0')).to exist
- end
end
describe "when Bundler root contains regex chars" do