summaryrefslogtreecommitdiff
path: root/spec/bundler/runtime
AgeCommit message (Collapse)Author
2025-11-20[ruby/rubygems] Improve error messages and handling in testseileencodes
This is a first pass to improve the way errors are handled and raised in bundler's tests. The goal is to clean up tests and modernize them - these were some obvious areas that could be cleaned up. - Instead of raising "ZOMG" in the load error tests, it now tests for the actual error and gem raising. - Improve error messages where applicable. - All errors raise a specific error class, rather than falling back to a default and just setting a message. - Removed arguments and `bundle_dir` option from `TheBundle` class as it wasn't actually used so therefore we don't need to raise an error for extra arguments. - Removed error from `BundlerBuilder`, as it won't work if it's not `bundler`, also it never uses `name`. The only reaon `name` is passed in is because of metaprogramming on loading the right builder. I think that should eventually be refactored. - Replaced and removed `update_repo3` and `update_repo4` in favor of just `build_repo3` and `build_repo4`. Rather than tell someone writing tests to use a different method, automatically use the right method. https://github.com/ruby/rubygems/commit/68c39c8451
2025-11-14[ruby/rubygems] Fix triple spacing when generating lockfileJimmy Lin
https://github.com/ruby/rubygems/commit/d3baf4110e
2025-11-07[ruby/rubygems] Replace Pathname#rmtree to FileUtils.rm_rf directlyHiroshi SHIBATA
https://github.com/ruby/rubygems/commit/33c7a9a565
2025-09-11[rubygems/rubygems] Complete remembered options removalDavid Rodríguez
https://github.com/rubygems/rubygems/commit/573ffad3ea
2025-09-11[rubygems/rubygems] Completely remove `Bundle.*clean*` and ↵David Rodríguez
`Bundler.environment` helpers https://github.com/rubygems/rubygems/commit/e1b8bdcede
2025-08-18[rubygems/rubygems] Use a rubygems filter for the timeout specDavid Rodríguez
For consistency. https://github.com/rubygems/rubygems/commit/3e3364e19f
2025-08-18[rubygems/rubygems] Fix spec no longer run since rubygems timeout was renamedDavid Rodríguez
https://github.com/rubygems/rubygems/commit/4d0c058e6a
2025-07-25[rubygems/rubygems] Don't create an empty bundled_app when setting up depsDavid Rodríguez
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). https://github.com/rubygems/rubygems/commit/4bf89c0705
2025-07-25[rubygems/rubygems] Remove some unnecessary `artifice` argumentsDavid Rodríguez
Since `sys_exec` does not actually set it. https://github.com/rubygems/rubygems/commit/abc0fd0599
2025-07-25[rubygems/rubygems] Fix some specs running the wrong rakeDavid Rodríguez
https://github.com/rubygems/rubygems/commit/8d4eb154b1
2025-07-07[rubygems/rubygems] Stop allowing calling `#gem` on random objectsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/4b8570ae15
2025-07-02[rubygems/rubygems] Remove possibly incorrect specDavid Rodríguez
I spent quite a while on this and I have not been able to reproduce or even understand how the original issue would happen. I also suspect it never actually reproduced the original problem properly. Since I'm in the middle of migrating all specs away from touching the network, I decided to remove it since I can't write an equivalent spec without being able to understand the original problem. https://github.com/rubygems/rubygems/commit/c9dfa20877
2025-07-02[rubygems/rubygems] Rename some helpers to avoid name classesDavid Rodríguez
I plan to introduce a `base_system_gems` helper to actually install gems from `base_system_gem_path` into system gems but that would collapse with an existing helper. https://github.com/rubygems/rubygems/commit/714c209e62
2025-06-30[rubygems/rubygems] Remove "double CI" for testing Bundler 4 modeDavid Rodríguez
Since now every functionality that changes in Bundler 4 is under a setting, we can enable that setting to test the new functionality, without having to run our full CI twice. This can actually be seen as increasing coverage, because Bundler 4 functionality will now be tested on Windows, MacOS, or any other environment where previously "Bundler 4 mode" was not running. https://github.com/rubygems/rubygems/commit/1cb3e009fc
2025-06-26[rubygems/rubygems] Simulate Bundler 4 in a better wayDavid Rodríguez
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. https://github.com/rubygems/rubygems/commit/8129402193
2025-06-24[rubygems/rubygems] Fix `Bundler.original_env['GEM_HOME']` when Bundler is ↵David Rodríguez
trampolined https://github.com/rubygems/rubygems/commit/4c450eb05e
2025-06-24[rubygems/rubygems] Cleanup now unnecessary RUBYOPT handlingDavid Rodríguez
https://github.com/rubygems/rubygems/commit/ac83c78635
2025-06-24[rubygems/rubygems] Remove no longer necessary workarounds for restartsDavid Rodríguez
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. https://github.com/rubygems/rubygems/commit/fd92c855fb
2025-06-24[rubygems/rubygems] Use ENV consistently over CLI flags for specsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/dafe50f171
2025-06-24[rubygems/rubygems] `bundle exec` does not need artifice in generalDavid Rodríguez
https://github.com/rubygems/rubygems/commit/cb1f19573a
2025-06-19Skip to Bundler 4 directlyDavid Rodríguez
2025-06-19[rubygems/rubygems] Normalize Bundler version spec filtersDavid Rodríguez
https://github.com/rubygems/rubygems/commit/28b6a7cf5e
2025-06-19[rubygems/rubygems] Allow enabling "Bundler 3 mode" more easilyDavid Rodríguez
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. https://github.com/rubygems/rubygems/commit/4e92e9b209
2025-06-17[rubygems/rubygems] Etc exemption on Windows is no longer necessaryDavid Rodríguez
https://github.com/rubygems/rubygems/commit/228f59e3ab
2025-06-06[rubygems/rubygems] Extract stdboth spec helperDavid Rodríguez
https://github.com/rubygems/rubygems/commit/bb13f4e702
2025-06-05[rubygems/rubygems] Make self management specs independent from version of ↵David Rodríguez
Bundler https://github.com/rubygems/rubygems/commit/1257bd161e
2025-06-03[rubygems/rubygems] Remove unnecessary duplicate x64-mingw-ucrt entryNicholas La Roux
https://github.com/rubygems/rubygems/commit/d6f1f96585
2025-06-03[rubygems/rubygems] Partially phase out x64-mingw32 in favour of ↵Nicholas La Roux
x64-mingw-ucrt (platforms) - the x64-mingw32 platform has been superseded by x64-mingw-ucrt - the mingw-ucrt platform is present as of Windows 10, which was released 10 years ago in 2015 and all versions prior to 10 are end-of-life and 10 will be by mid October 2025 - newer rubies use the mingw-ucrt platform instead of the mingw32 platform, meaning using the deprecated platform can cause issues during gem installation https://github.com/rubygems/rubygems/commit/b9d871022e
2025-03-24[rubygems/rubygems] Reword log message about current platform being missingDavid Rodríguez
It reads better this way I think. https://github.com/rubygems/rubygems/commit/ce9743290d Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-24[rubygems/rubygems] Improve grammar of some error messagesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/558a4765c7 Notes: Merged: https://github.com/ruby/ruby/pull/12968
2025-03-12[rubygems/rubygems] Prefer `FileUtils.rm_r` to `FileUtils.rm_rf` for specsDavid Rodríguez
Because it does not swallow errors if it fails to remove the given folders, making issues easier to debug. https://github.com/rubygems/rubygems/commit/0db12d7afc
2025-03-12[rubygems/rubygems] Refactor specs to not try to remove folders that don't existDavid Rodríguez
This has the following benefits: * Avoid duplicated work in some specs that first build a repo, and then overwrite it with a completely different set of gems. * Reduce RSpec nesting and improve readability. * The change also made surfaces several specs that were incorrect since they were unintentionally not testing the right thing. https://github.com/rubygems/rubygems/commit/ed430883e0
2025-02-27[rubygems/rubygems] Improve error message when on read-only filesystemsDavid Rodríguez
If we fail to write the lockfile, give a better error. https://github.com/rubygems/rubygems/commit/81a08d6eda
2025-02-14[rubygems/rubygems] Use preferred `:windows` value for Windows exclusivelyDavid Rodríguez
https://github.com/rubygems/rubygems/commit/aee52d2874 Co-authored-by: johnnyshields <27655+johnnyshields@users.noreply.github.com>
2025-01-31Stop generating binstubs for Bundler itselfDavid Rodríguez
2025-01-28[rubygems/rubygems] Fix bug report template incorrectly showing upDavid Rodríguez
If a gem has an internal error, that should not make `bundle console` print the bug report template. https://github.com/rubygems/rubygems/commit/7432a9a084
2025-01-28[rubygems/rubygems] Support installing arm native gems on WindowsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/96496e3f53 Co-authored-by: Johnny Shields <johnny.shields@gmail.com>
2025-01-28[rubygems/rubygems] Remove duplicated `bundle install`David Rodríguez
https://github.com/rubygems/rubygems/commit/1774ac5db1
2025-01-28[rubygems/rubygems] Remove unnecessary platform helpersDavid Rodríguez
I think they add unnecessary indirection and inconsistency to the specs. https://github.com/rubygems/rubygems/commit/609924d985
2025-01-28[rubygems/rubygems] Improve simulating Windows during Bundler specsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/b48168bf1f
2025-01-16[rubygems/rubygems] Revert RubyGems plugins getting loaded on `Bundler.require`David Rodríguez
These changes were included when adding bundler plugin hooks for `Bundler.require`, but they seem completely unrelated to that feature, and have caused several issues. https://github.com/rubygems/rubygems/commit/8d56551dcf
2024-12-24Merge RubyGems-3.6.2 and Bundler-2.6.2David Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/12444
2024-12-13[rubygems/rubygems] Fix restarting with locked version when $PROGRAM_NAME ↵Camden Narzt
has been changed Use Process.argv0 instead of $PROGRAM_NAME because $PROGRAM_NAME is liable to be changed but Process.argv0 is not. https://github.com/rubygems/rubygems/commit/43b747dc9e
2024-11-28[rubygems/rubygems] Test with Ruby 3.4David Rodríguez
https://github.com/rubygems/rubygems/commit/23d06195fa
2024-11-19[rubygems/rubygems] Fix binstub test bugsodacris
the overwritten binstub in the test has a final new line that makes it not match "OMG" exactly from the beginning, that's why the test passes, but `bintubs` command without `--force` flag is not supposed to update the binstub. This change fixes the test to test what's supposed to update the binstub, and also fixes the assertion that that it will fail in the future if `--force` stops updating the binstub. https://github.com/rubygems/rubygems/commit/dfc9023337
2024-11-19Test with sinatra to 4.1.0David Rodríguez
2024-10-23[rubygems/rubygems] Remove the need for some bundler monkeypatchesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/f530f8686d
2024-10-22[rubygems/rubygems] Cleanup some specs after recent support dropDavid Rodríguez
https://github.com/rubygems/rubygems/commit/9548aa6766
2024-10-10[rubygems/rubygems] Remove code that's not needed for the spec to passDavid Rodríguez
https://github.com/rubygems/rubygems/commit/ce9f6285c4
2024-10-09[rubygems/rubygems] Fix `Gem::Specification#gem_dir` losing custom source ↵David Rodríguez
for some reason https://github.com/rubygems/rubygems/commit/f8f589b1b8