summaryrefslogtreecommitdiff
path: root/spec/bundler/commands/exec_spec.rb
AgeCommit message (Collapse)Author
2025-11-24Add SIGABRT to reserved signals in bundler specPeter Zhu
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-10-20[ruby/rubygems] Now ruby/rubygems is the canonical repository urlHiroshi SHIBATA
https://github.com/ruby/rubygems/commit/c637007e91
2025-09-26[rubygems/rubygems] add loading support on Windowssodacris
https://github.com/rubygems/rubygems/commit/04574ba59a
2025-09-26[rubygems/rubygems] skip checking title on Windows because it's not supportedsodacris
https://github.com/rubygems/rubygems/commit/fd2c54f371
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-06-24[rubygems/rubygems] `bundle exec` does not need artifice in generalDavid Rodríguez
https://github.com/rubygems/rubygems/commit/cb1f19573a
2025-06-19[rubygems/rubygems] Fix running gem commands in a `bundle exec` contextDavid Rodríguez
They should only load plugins from gems in the bundle. https://github.com/rubygems/rubygems/commit/a229507820
2025-06-06[rubygems/rubygems] Improve more exec specs to avoid swallowing errorsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/439e9bcf81
2025-06-06[rubygems/rubygems] Improve `bundle exec` with default gems specsDavid Rodríguez
Make them more consistent and not silently pass even if something regresses. These specs had a typo that made the assertion be that the `erb --version` output includes the empty string which is always obviously true. https://github.com/rubygems/rubygems/commit/451e07c305
2025-03-12Use erb executable againHiroshi SHIBATA
Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
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-02-28[rubygems/rubygems] Skip default gems executable example with Windows platformHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/b4a8bda811
2025-02-28[rubygems/rubygems] Update version for broken executables with default gemsHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/d2f90a81d9
2025-02-27Use erb for simple executable exampleHiroshi SHIBATA
2025-02-27Use syntax_suggest instead of erb executable.Hiroshi SHIBATA
erb is only working with Ruby 3.5dev.
2025-02-27Use erb executable instead of irbHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12821
2025-01-30Skip irb examples, I will handle related workarounds laterHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12671
2025-01-02[rubygems/rubygems] remove unnecessary codesodacris
https://github.com/rubygems/rubygems/commit/5c6ca7a58c
2025-01-02[rubygems/rubygems] unskip `print_args` and `fake_man` tests on Windowssodacris
https://github.com/rubygems/rubygems/commit/c8eeb0af9d
2025-01-02[rubygems/rubygems] Replace shell specific stuff with create_file scriptssodacris
https://github.com/rubygems/rubygems/commit/eea07ad691
2024-11-29[rubygems/rubygems] Enable pending exec specDavid Rodríguez
This is how Ruby works, and it's not going to change. So let's run the test since it makes no sense to keep it pending. https://github.com/rubygems/rubygems/commit/5f78d3c737
2024-11-29[rubygems/rubygems] Improve heredoc indentation in exec specsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/abb658757f
2024-11-29[rubygems/rubygems] Unify specs testing Bundler.setup failing behaviorDavid Rodríguez
They had slightly different behavior in Bundler 2 and Bundler 3 because Bundler 3 will auto-clean after `bundle install`, so one of them system installed gems won't be present when `Bundler.setup` fails. We can unify the specs by moving installing system gems to _after_ `bundle install`, so the behavior in both cases is the same. Also, only this spec actually needs these gems installed, so we can move that from the `before` block to the body of the spec. https://github.com/rubygems/rubygems/commit/b7251ec9c6
2024-11-21[rubygems/rubygems] move system_gems let commandssodacris
https://github.com/rubygems/rubygems/commit/1fc1e74f4d
2024-10-23[rubygems/rubygems] Fix running `bundler` (with a final `r`) in a `bundle ↵David Rodríguez
exec` context https://github.com/rubygems/rubygems/commit/ad95a1dfaa
2024-10-04[rubygems/rubygems] Remove outdated conditionals from testsSamuel Giddins
Signed-off-by: Samuel Giddins <segiddins@segiddins.me> https://github.com/rubygems/rubygems/commit/06eec6d855
2024-07-24Fix test failure of e7610582ad8fd05655221b183257ed358c903ac8Nobuyoshi Nakada
2024-07-23[rubygems/rubygems] Fix `bundle exec gem uninstall`David Rodríguez
* `bundle exec` assigns `Gem::Specification.all` to the set of specs known to Bundler (a `Bundler::SpecSet`). * `gem uninstall` recently started calling `#delete` on the set of specs stored in `Gem::Specification#all`. This, in RubyGems, is just an array of specs, so has a `#delete` method that receives a single element. * However, at some point I added a `SpecSet#delete` method that takes an array of specs, breaking the "Array-like" contract and making `gem uninstall` break when run in a `bundle exec` context. The fix is to make `Bundler::SpecSet#delete` handle being given a single spec. https://github.com/rubygems/rubygems/commit/e3acb7b01d
2024-06-28Synchronize Bundler & RubyGems (#11071)David Rodríguez
2024-06-25[rubygems/rubygems] Only validate resolution info in BundlerThomas Marshall
This commit switches out the full gemspec validation for a partial one which only performs resolution related checks. This will allow gem authors to run `bundle` commands immediately after creating a new gem with Bundler, rather than having to fix metadata validation issues in the default gemspec. https://github.com/rubygems/rubygems/commit/d5aa9cae9d
2024-05-24[rubygems/rubygems] Fix performance regression on applications with a local ↵David Rodríguez
cache Even if all gems are properly installed and no resolve is needed, we recently started always reading all packages in `vendor/cache` and extracting specifications from them. This commit fixes the problem by longer making considering cached specs the default and only enable them when a resolve is actually needed. https://github.com/rubygems/rubygems/commit/edeb2c42bf
2024-03-22[rubygems/rubygems] Fix incorrect `bundle update --bundler` messageDavid Rodriguez
https://github.com/rubygems/rubygems/commit/146de56353
2024-02-15Update the error message format in bundlerYusuke Endoh
2023-12-07[rubygems/rubygems] Use modern hashes consistentlyDavid Rodríguez
https://github.com/rubygems/rubygems/commit/bb66253f2c
2023-11-30[rubygems/rubygems] Allow auto-install to install missing git gemsSamuel Giddins
Currently, auto-install with git gems fails, when it would succeed with a rubygems-source gem Fix the issue by doing the same fallback for git errors as we do for missing gems, the git errors should only bubble up in these cases when the gem is not installed, meaning we want to go through the install flow (and any persistent errors will be raised through there) https://github.com/rubygems/rubygems/commit/e25a339f7a
2023-11-13[rubygems/rubygems] Drop support for Ruby 2.6 and Ruby 2.7 in BundlerDavid Rodríguez
https://github.com/rubygems/rubygems/commit/93619c97ff
2023-07-24[rubygems/rubygems] Prefer squiggly heredocs over custom helperDavid Rodríguez
https://github.com/rubygems/rubygems/commit/258476c38a
2023-03-22[rubygems/rubygems] Use indented heredocNobuyoshi Nakada
https://github.com/rubygems/rubygems/commit/085d2776d8
2023-03-07[rubygems/rubygems] Better suggestion when `bundler/setup` fails due to ↵David Rodríguez
missing gems If the original `BUNDLE_GEMFILE` is different from the default, then the suggestion wouldn't work as is. Before: ``` $ util/rubocop Could not find rubocop-1.30.1 in locally installed gems Run `bundle install` to install missing gems. $ rubygems git:(better-cmd-suggestion) ✗ bundle install Could not locate Gemfile ``` After: ``` $ util/rubocop Could not find rubocop-1.30.1 in locally installed gems Run `bundle install --gemfile /path/to/rubygems/bundler/tool/bundler/lint_gems.rb` to install missing gems. $ bundle install --gemfile /path/to/rubygems/bundler/tool/bundler/lint_gems.rb Fetching gem metadata from https://rubygems.org/......... Using ast 2.4.2 Using bundler 2.4.7 Using parser 3.1.2.0 Using rainbow 3.1.1 Using parallel 1.22.1 Using regexp_parser 2.5.0 Using rubocop-ast 1.18.0 Using rexml 3.2.5 Using ruby-progressbar 1.11.0 Using unicode-display_width 2.1.0 Fetching rubocop 1.30.1 Installing rubocop 1.30.1 Using rubocop-performance 1.14.2 Bundle complete! 2 Gemfile dependencies, 12 gems now installed. Use `bundle info [gemname]` to see where a bundled gem is installed. $ util/rubocop Inspecting 345 files ......................................................................................................................................................................................................................................................................................................................................................... 345 files inspected, no offenses detected ``` https://github.com/rubygems/rubygems/commit/bf1320d805
2023-02-21Merge rubygems/bundler masterHiroshi SHIBATA
Pick from https://github.com/rubygems/rubygems/commit/e9304aed7e43308b99e70c2f7b92028315fee8a5 Notes: Merged: https://github.com/ruby/ruby/pull/7345
2022-02-28Merge RubyGems and Bundler masterHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/5606
2021-12-17[rubygems/rubygems] Improve errors a bit moreDavid Rodríguez
https://github.com/rubygems/rubygems/commit/f481e8f41a
2021-12-17[rubygems/rubygems] Improve resolver error messagesDavid Rodríguez
Use a more standard naming for gems. https://github.com/rubygems/rubygems/commit/75121e83f1
2021-12-15Merge RubyGems and Bundler masterHiroshi SHIBATA
Merge from https://github.com/rubygems/rubygems/commit/793ad95ecb40e84a1dcb4cb60f2686843ed90de5 Notes: Merged: https://github.com/ruby/ruby/pull/5265
2021-11-16Merge the master branch of rubygems repoHiroshi SHIBATA
Picked from https://github.com/rubygems/rubygems/commit/4b498709a015a94e14a3852a1841a7a3e669133d
2021-08-31[rubygems/rubygems] Improve "gem not found in source" errorsDavid Rodríguez
When printing sources inside these error messages, it's useful to only consider the current state of the source. For example, when requiring `bundler/setup`, the source shouldn't be configured to be able to hit the network, so the error message should only mention "locally installed gems" to make that more clear. https://github.com/rubygems/rubygems/commit/30eb14f853 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Remove unnecessary escape sequencesDavid Rodríguez
Bundler formatters already take care of this. https://github.com/rubygems/rubygems/commit/c24415fdd5 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-07-27[rubygems/rubygems] Explicitly define a global source for testsDaniel Niknam
This is in preparation for deprecating source-less gemfiles. https://github.com/rubygems/rubygems/commit/d6493fa3e2
2021-07-14Merge RubyGems/Bundler master from 8459ebd6ad65ce3397233416dc64083ae7572bb9Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4648