Commit graph

28 commits

Author SHA1 Message Date
David Rodríguez
63c4223775 [rubygems/rubygems] Don't create an empty bundled_app when setting up deps
Running everything in `bundled_app` by default causes the `bundled_app`
helper to be used everytime, and that will create a scoped bundled_app
folder if it does not exist. That causes `bin/rake spec:deps` to create
an empty `tmp/2.1/bundled_app` folder which is a bit weird.

This commit changes specs to not switch to a (possibly empty)
bundled_app directory when not necessary (for example, when running
`gem` commands in order to setup test dependencies).

4bf89c0705
2025-07-25 11:10:36 +09:00
David Rodríguez
bc5b594946 [rubygems/rubygems] Remove some unnecessary artifice arguments
Since `sys_exec` does not actually set it.

abc0fd0599
2025-07-25 11:10:35 +09:00
David Rodríguez
90085f62fb [rubygems/rubygems] Simulate Bundler 4 in a better way
Overriding the version constant feels too magic and creates a set of
problems. For example, Bundler will lock the simulated version, and that
can cause issues when the lockfile is used under an environment not
simulating Bundler 4 (it will try to auto-install and auto-switch to a
version that does not exist).

On top of that, it can only be configured with an ENV variable which is
not too flexible.

This commit takes a different approach of using a setting, which is
configurable through ENV or `bundle config`, and pass the simulated
version to `Bundler::FeatureFlag`. The real version is still the one set
by `VERSION`, but anything that `Bundler::FeatureFlag` controls will use
the logic of the "simulated version".

In particular, all feature flags and deprecation messages will respect
the simulated version, and this is exactly the set of functionality that
we want users to be able to easily try before releasing it.

8129402193
2025-06-26 08:06:48 +09:00
David Rodríguez
7a297ad2f9
[rubygems/rubygems] Fix Bundler.original_env['GEM_HOME'] when Bundler is trampolined
4c450eb05e
2025-06-24 12:10:50 +09:00
David Rodríguez
32a9f29cc8
[rubygems/rubygems] Remove no longer necessary workarounds for restarts
Since we no longer pass ruby CLI flags in our spec commands, we no
longer need the previous workaround and can get the realworld code
tested.

fd92c855fb
2025-06-24 12:10:50 +09:00
David Rodríguez
441f18df52
Skip to Bundler 4 directly 2025-06-19 10:23:36 +09:00
David Rodríguez
4245d522b2
[rubygems/rubygems] Allow enabling "Bundler 3 mode" more easily
Currently to test Bundler 3 mode we have to actually edit the version
file to simulate we're running a future version. This is inconvenient.

Instead, allow passing an environment variable, `BUNDLER_3_MODE`, to set
the "working mode" Bundler should use.

This can now be set easily by end users to enable them to try out the
changes in the future version and give us feedback.

It's unclear how version auto-switching should work when this
environment variable is set, so the auto-switching feature will be
disabled in that case.

4e92e9b209
2025-06-19 10:23:36 +09:00
David Rodríguez
417210c0ec [rubygems/rubygems] Make self management specs independent from version of Bundler
1257bd161e
2025-06-05 19:12:42 +09:00
David Rodríguez
9e0eb9778d Merge RubyGems-3.6.2 and Bundler-2.6.2 2024-12-24 07:21:10 +09:00
Camden Narzt
6cde41bc52 [rubygems/rubygems] Fix restarting with locked version when $PROGRAM_NAME has been changed
Use Process.argv0 instead of $PROGRAM_NAME because $PROGRAM_NAME is
liable to be changed but Process.argv0 is not.

43b747dc9e
2024-12-13 14:23:30 +00:00
David Rodríguez
54065f3b7b [rubygems/rubygems] Cleanup some specs after recent support drop
9548aa6766
2024-10-22 09:04:30 +00:00
David Rodríguez
5d53993a37 [rubygems/rubygems] Don't try to auto-install dev versions of Bundler not available remotely
1a7a3fdeb9
2024-09-23 10:53:32 +00:00
David Rodríguez
cf29594c03 [rubygems/rubygems] Don't try to install locked bundler when --local is passed
907d46964d
2024-09-20 09:58:24 +00:00
David Rodríguez
98c923ff4b
Synchronize Bundler & RubyGems (#11071) 2024-06-28 10:12:29 -04:00
David Rodríguez
3e84da0970 [rubygems/rubygems] Auto switch to locked bundler version even when using binstubs
076aba8b1c
2024-06-11 13:30:50 +00:00
David Rodríguez
7cd4282cc8 [rubygems/rubygems] Fix Bundler daily CI
A default Bundler copy with vendored net-http is causing a Bundler spec
to end up loading that copy instead of the copy of Bundler under test.
This is because of vcr, but we don't really need vcr in the command
that's failing, so I avoided loading it.

304ab6e1b9
2023-12-16 10:07:52 +08:00
David Rodríguez
6cefad7704 [rubygems/rubygems] Avoid loading artifice when not necessary
ef97ad37bd
2023-12-13 12:16:55 +09:00
David Rodríguez
2755cb1b2f [rubygems/rubygems] Use modern hashes consistently
bb66253f2c
2023-12-07 22:29:33 +00:00
Imir Kiyamov
23eb13d49d [rubygems/rubygems] Fixed malformed lockfile version on installing
c969a192bf
2023-08-28 07:41:51 +00:00
Hiroshi SHIBATA
dd1af4b22d
[rubygems/rubygems] Rename local to lockfile and global to system
456fd05d3a
2023-07-24 15:04:24 +09:00
Hiroshi SHIBATA
8cf5297ba5
[rubygems/rubygems] Dont't use Bundler::VERSION
46cd9be69a
2023-07-13 11:36:03 +09:00
Hiroshi SHIBATA
d3305cab44
[rubygems/rubygems] restart with BUNDLE_VERSION if it's specified
57cfe7cf8d
2023-07-13 11:36:03 +09:00
Hiroshi SHIBATA
f16c880f77
[rubygems/rubygems] Introduce bundle config set version feature
c431a1df52
2023-07-13 11:36:03 +09:00
Hiroshi SHIBATA
f3b129241c [rubygems/rubygems] Applied Layout/SpaceAroundOperators cop
3139587be9
2023-03-16 01:59:12 +00:00
Hiroshi SHIBATA
a43f1d90c2 Merge RubyGems and Bundler master
from 0635c1423d
2023-01-10 15:53:07 +09:00
Hiroshi SHIBATA
d6311cb1ca Track RubyGems 3.4.0dev and Bundler 2.4.0dev 2021-12-27 10:45:36 +09:00
Hiroshi SHIBATA
da6a5e3ed1 Merge RubyGems-3.3.3 and Bundler-2.3.3 2021-12-25 07:40:52 +09:00
Hiroshi SHIBATA
69dc2ea465 Merge RubyGems-3.3.0 and Bundler-2.3.0 2021-12-21 15:27:05 +09:00