ruby/spec/bundler/cache
Julie Haehn c5296d9396 [rubygems/rubygems] Respect --no-install option for git: sources
Currently, the --no-install option to `bundle package` is totally
ignored for git sources. This can have very strange effects if you have:

- a git-sourced gem,
- with native extensions,
- whose extconf.rb script depends on another gem,
- which is installed from Rubygems in the gemfile.

In that circumstance, `bundle package --no-install --all` will download
the Rubygems dependencies to `vendor/cache` but NOT install them. It
will also check out the git gems to `vendor/cache` (good), and attempt
to build their native extensions (bad!).

The native extension build will fail because the extconf.rb script crashes,
since the dependency it needs is missing.

I implemented a fix for this in `source/git.rb`, since this is analogous
to what's happening in `source/rubygems.rb`. I do admit though the whole
thing is a little strange though - an "install" method that.... proceeds
to look at a global flag to not install anything.

Add test to confirm cache respects the --no-install flag

5a77d1c397

Co-authored-by: KJ Tsanaktsidis <kj@kjtsanaktsidis.id.au>
2023-03-07 22:36:36 +00:00
..
cache_path_spec.rb
gems_spec.rb [rubygems/rubygems] Account for default gems not having remote when caching 2022-07-02 19:41:02 +09:00
git_spec.rb [rubygems/rubygems] Respect --no-install option for git: sources 2023-03-07 22:36:36 +00:00
path_spec.rb [rubygems/rubygems] Explicitly define a global source for tests 2021-07-27 09:25:57 +09:00
platform_spec.rb [rubygems/rubygems] s/bundle!/bundle 2020-06-18 19:14:15 +09:00