File tree Expand file tree Collapse file tree 5 files changed +9
-23
lines changed
Expand file tree Collapse file tree 5 files changed +9
-23
lines changed Original file line number Diff line number Diff line change @@ -509,7 +509,7 @@ def path_separator
509509 end
510510
511511 def all_specs
512- Gem ::Specification . stubs . map do |stub |
512+ Gem ::Specification . stubs . reject ( & :default_gem? ) . map do |stub |
513513 StubSpecification . from_stub ( stub )
514514 end
515515 end
Original file line number Diff line number Diff line change @@ -225,11 +225,7 @@ def cached_built_in_gem(spec)
225225 cached_path = cached_path ( spec )
226226 if cached_path . nil?
227227 remote_spec = remote_specs . search ( spec ) . first
228- if remote_spec
229- cached_path = fetch_gem ( remote_spec )
230- else
231- 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."
232- end
228+ cached_path = fetch_gem ( remote_spec )
233229 end
234230 cached_path
235231 end
Original file line number Diff line number Diff line change 102102
103103 it "uses builtin gems when installing to system gems" do
104104 bundle "config set path.system true"
105- install_gemfile %(source "#{ file_uri_for ( gem_repo1 ) } "; gem 'json', '#{ default_json_version } ') , verbose : true
106- expect ( out ) . to include ( "Using json #{ default_json_version } " )
105+ install_gemfile %(source "#{ file_uri_for ( gem_repo2 ) } "; gem 'json', '#{ default_json_version } ') , verbose : true
106+ expect ( out ) . to include ( "Installing json #{ default_json_version } " )
107107 end
108108
109109 it "caches remote and builtin gems" do
143143 bundle "install --local"
144144 expect ( the_bundle ) . to include_gems ( "builtin_gem_2 1.0.2" )
145145 end
146-
147- it "errors if the builtin gem isn't available to cache" do
148- bundle "config set path.system true"
149-
150- install_gemfile <<-G
151- source "#{ file_uri_for ( gem_repo1 ) } "
152- gem 'json', '#{ default_json_version } '
153- G
154-
155- bundle :cache , raise_on_error : false
156- expect ( exitstatus ) . to_not eq ( 0 )
157- expect ( err ) . to include ( "json-#{ default_json_version } is built in to Ruby, and can't be cached" )
158- end
159146 end
160147
161148 describe "when there are also git sources" do
Original file line number Diff line number Diff line change 164164
165165 install_gemfile <<-G
166166 source "#{ file_uri_for ( gem_repo1 ) } "
167- gem "json"
168167 G
169168 end
170169
Original file line number Diff line number Diff line change @@ -1281,6 +1281,10 @@ def lock_with(ruby_version = nil)
12811281
12821282 describe "with gemified standard libraries" do
12831283 it "does not load Digest" , :ruby_repo do
1284+ build_repo2 do
1285+ build_gem "digest"
1286+ end
1287+
12841288 build_git "bar" , gemspec : false do |s |
12851289 s . write "lib/bar/version.rb" , %(BAR_VERSION = '1.0')
12861290 s . write "bar.gemspec" , <<-G
@@ -1299,7 +1303,7 @@ def lock_with(ruby_version = nil)
12991303 end
13001304
13011305 gemfile <<-G
1302- source "#{ file_uri_for ( gem_repo1 ) } "
1306+ source "#{ file_uri_for ( gem_repo2 ) } "
13031307 gem "bar", :git => "#{ lib_path ( "bar-1.0" ) } "
13041308 G
13051309
You can’t perform that action at this time.
0 commit comments