summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2023-12-13 21:23:07 +0100
committerHiroshi SHIBATA <[email protected]>2023-12-14 20:22:48 +0800
commitb300f5a0e1b75dfd27d58890521a1085d44284b3 (patch)
tree237a2025d81fb8672dccaebeebeade7a350f1422 /lib
parenta10c11a66bae7ec4bfb56d0ccfe74a0c6681fc77 (diff)
[rubygems/rubygems] Revert "Improve default gem handling"
This reverts commit https://github.com/rubygems/rubygems/commit/091b4fcf2b99. https://github.com/rubygems/rubygems/commit/dcade3235f
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/rubygems_integration.rb2
-rw-r--r--lib/bundler/source/rubygems.rb6
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index 571b303816..fdbe85b4d2 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -509,7 +509,7 @@ module Bundler
end
def all_specs
- Gem::Specification.stubs.reject(&:default_gem?).map do |stub|
+ Gem::Specification.stubs.map do |stub|
StubSpecification.from_stub(stub)
end
end
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index 7e0b007006..dfcedb5b16 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -225,7 +225,11 @@ module Bundler
cached_path = cached_path(spec)
if cached_path.nil?
remote_spec = remote_specs.search(spec).first
- cached_path = fetch_gem(remote_spec)
+ if remote_spec
+ cached_path = fetch_gem(remote_spec)
+ else
+ Bundler.ui.warn "#{spec.full_name} is built in to Ruby, and can't be cached because your Gemfile doesn't have any sources that contain it."
+ end
end
cached_path
end