summaryrefslogtreecommitdiff
path: root/spec/bundler/support
AgeCommit message (Collapse)Author
12 daysMove most of Bundler::GemHelpers to Gem::PlatformSamuel Giddins
This will help centralize wheel platform selection logic eventually Signed-off-by: Samuel Giddins <[email protected]>
12 days[rubygems/rubygems] Tweak to spec setup so that `rspec` instead of our ↵David Rodríguez
`bin/rspec` binstub still works https://github.com/rubygems/rubygems/commit/24e6699316
12 days[rubygems/rubygems] Extract stdboth spec helperDavid Rodríguez
https://github.com/rubygems/rubygems/commit/bb13f4e702
2025-06-03Remove hardcoded version of rake from Bundler testsDavid Rodríguez
Let them run against the version resolved by the `test_gems.rb` gemfile. This should fix ruby-core CI job that was broken by the release of rake 13.3.0.
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-05-31Update bundled gems list as of 2025-05-31git
2025-05-31rake 13.3.0 -> 13.2.1Koichi Sasada
`make test-bundler-parallel` prints many errors, so try to downgrade rake version. ``` 219) bundle install --standalone run in a subdirectory with --binstubs creates stubs that can be symlinked Failure/Error: raise <<~ERROR #{error_header} ---------------------------------------------------------------------- #{stdboth} ---------------------------------------------------------------------- ERROR RuntimeError: Commands: $ /home/ko1/ruby/build/trunk/ruby -I/home/ko1/ruby/src/trunk/spec/bundler -r/home/ko1/ruby/src/trunk/spec/bundler/support/artifice/compact_index.rb -r/home/ko1/ruby/src/trunk/spec/bundler/support/hax.rb /home/ko1/ruby/src/trunk/tmp/2.13/gems/system/bin/bundle config set --local path /home/ko1/ruby/src/trunk/tmp/2.13/bundled_app/bundle # $? => 0 Invoking `/home/ko1/ruby/build/trunk/ruby -I/home/ko1/ruby/src/trunk/spec/bundler -r/home/ko1/ruby/src/trunk/spec/bundler/support/artifice/compact_index.rb -r/home/ko1/ruby/src/trunk/spec/bundler/support/hax.rb /home/ko1/ruby/src/trunk/tmp/2.13/gems/system/bin/bundle install --standalone --binstubs` failed with output: ---------------------------------------------------------------------- [DEPRECATED] The --binstubs option will be removed in favor of `bundle binstubs --all` Could not find compatible versions Because every version of rails depends on rake = 13.3.0 and rake = 13.3.0 could not be found in rubygems repository https://gem.repo1/ or installed locally, rails cannot be used. So, because Gemfile depends on rails >= 0, version solving has failed. Fetching gem metadata from https://gem.repo1/... Resolving dependencies... ---------------------------------------------------------------------- Shared Example Group: "bundle install --standalone" called from ./spec/bundler/install/gems/standalone_spec.rb:532 # /home/ko1/ruby/src/trunk/spec/bundler/support/command_execution.rb:26:in 'Spec::CommandExecution#raise_error!' # /home/ko1/ruby/src/trunk/spec/bundler/support/subprocess.rb:66:in 'Spec::Subprocess#sh' # /home/ko1/ruby/src/trunk/spec/bundler/support/helpers.rb:216:in 'Spec::Helpers#sys_exec' # /home/ko1/ruby/src/trunk/spec/bundler/support/helpers.rb:107:in 'Spec::Helpers#bundle' # /home/ko1/ruby/src/trunk/spec/bundler/install/gems/standalone_spec.rb:482:in 'block (3 levels) in <top (required)>' # /home/ko1/ruby/src/trunk/spec/bundler/spec_helper.rb:107:in 'block (4 levels) in <top (required)>' # /home/ko1/ruby/src/trunk/spec/bundler/spec_helper.rb:107:in 'block (3 levels) in <top (required)>' # /home/ko1/ruby/src/trunk/spec/bundler/support/helpers.rb:355:in 'block in Spec::Helpers#with_gem_path_as' # /home/ko1/ruby/src/trunk/spec/bundler/support/helpers.rb:369:in 'Spec::Helpers#without_env_side_effects' # /home/ko1/ruby/src/trunk/spec/bundler/support/helpers.rb:350:in 'Spec::Helpers#with_gem_path_as' # /home/ko1/ruby/src/trunk/spec/bundler/spec_helper.rb:106:in 'block (2 levels) in <top (required)>' ``` Notes: Merged: https://github.com/ruby/ruby/pull/13483
2025-05-30Update bundled gems list as of 2025-05-30git
2025-05-29Initialize `gems` tmp when initializing bundled_gems_spec suiteDavid Rodríguez
That way it works even if no Bundler specs have run before. Notes: Merged: https://github.com/ruby/ruby/pull/13461
2025-05-26[rubygems/rubygems] Bump required_ruby_version to 3.2Samuel Giddins
Ruby 3.1 was EOL March 2025 Signed-off-by: Samuel Giddins <[email protected]> https://github.com/rubygems/rubygems/commit/29c21b1e78
2025-05-19[rubygems/rubygems] Fix test warnings introduced by recent CGI changesDavid Rodríguez
They read like this: ``` /home/runner/work/rubygems/rubygems/bundler/tmp/gems/base/ruby/3.4.0/gems/cgi-0.5.0.beta2/lib/cgi/util.rb:13: warning: method redefined; discarding old rfc1123_date /opt/hostedtoolcache/Ruby/3.4.3/x64/lib/ruby/3.4.0/cgi/util.rb:225: warning: previous definition of rfc1123_date was here /home/runner/work/rubygems/rubygems/bundler/tmp/gems/base/ruby/3.4.0/gems/cgi-0.5.0.beta2/lib/cgi/util.rb:34: warning: method redefined; discarding old pretty /opt/hostedtoolcache/Ruby/3.4.3/x64/lib/ruby/3.4.0/cgi/util.rb:246: warning: previous definition of pretty was here /home/runner/work/rubygems/rubygems/bundler/tmp/gems/base/ruby/3.4.0/gems/cgi-0.5.0.beta2/lib/cgi/escape.rb:16: warning: method redefined; discarding old escape /home/runner/work/rubygems/rubygems/bundler/tmp/gems/base/ruby/3.4.0/gems/cgi-0.5.0.beta2/lib/cgi/escape.rb:29: warning: method redefined; discarding old unescape /home/runner/work/rubygems/rubygems/bundler/tmp/gems/base/ruby/3.4.0/gems/cgi-0.5.0.beta2/lib/cgi/util.rb:13: warning: method redefined; discarding old rfc1123_date /opt/hostedtoolcache/Ruby/3.4.3/x64/lib/ruby/3.4.0/cgi/util.rb:225: warning: previous definition of rfc1123_date was here /home/runner/work/rubygems/rubygems/bundler/tmp/gems/base/ruby/3.4.0/gems/cgi-0.5.0.beta2/lib/cgi/util.rb:34: warning: method redefined; discarding old pretty /opt/hostedtoolcache/Ruby/3.4.3/x64/lib/ruby/3.4.0/cgi/util.rb:246: warning: previous definition of pretty was here /home/runner/work/rubygems/rubygems/bundler/tmp/gems/base/ruby/3.4.0/gems/cgi-0.5.0.beta2/lib/cgi/escape.rb:16: warning: method redefined; discarding old escape /home/runner/work/rubygems/rubygems/bundler/tmp/gems/base/ruby/3.4.0/gems/cgi-0.5.0.beta2/lib/cgi/escape.rb:29: warning: method redefined; discarding old unescape ``` The problem is that `rspec` loads `erb` for its configuration, which loads `cgi/util` from system gems. Then our tests change the `$LOAD_PATH` to make test gems installed in tmp visible to `require`, and then they all require `cgi` as a transitive dependency of `rack-test`, this time from `tmp` gems. This causes system and test specific copies to be mixed together and these warnings to be printed, but we have also observed failures in some tests with errors like > class variable @@accept_charset of CGI::Util is overtaken by CGI::Escape This changes should also fix those failures. The fix is to require all of `rack-test` (including `cgi`) before we have changed the `$LOAD_PATH`. Because the `$LOAD_PATH` is unchanged, RubyGems respects the version of `cgi` activated by RSpec, avoiding the double loads. https://github.com/rubygems/rubygems/commit/34e75465c6
2025-05-19[rubygems/rubygems] Test JRuby 10David Rodríguez
Necessary changes to get tests passing are: * Rewrite one "out of memory" error spec to not define a subclass inside a RSpec context block. Due to some [JRuby issue], that's failing in JRuby 10, so I rewrote the test so that the Bundler process really goes OOM and that class definition is not necessary. * JRuby 10, even if Ruby 3.4-compatible, has not yet adapted backtraces to include receivers, so our tests need an special case for JRuby when detecting a test method call inside backtraces. * Warbler test is upgraded to use JRuby 10. Getting it to pass needs [a PR] to warbler, so our test is temporarily pointing to that PR. [JRuby issue]: https://github.com/jruby/jruby/issues/8838 [a PR]: https://github.com/jruby/warbler/pull/557 https://github.com/rubygems/rubygems/commit/edec85d4c3
2025-05-09Added cgi for bundler testing. rack depends cgi/cookie.rbHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13275
2025-04-10Sync Bundler and adapt to new spec setupDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/13083
2025-04-01[rubygems/rubygems] Let compact index response parser consistently return a ↵David Rodríguez
mutable dependencies array That restores support for compact index dummy implementations that only lists versions, without checksums or dependencies. This format is undocumented, so we may want to get rid of it in the future. However, some of our tests rely on it, and some implementations did use it (gems.mutant.dev at least). And the way the code was written suggest that support was intentional. So for now, we should restore it. https://github.com/rubygems/rubygems/commit/0427d8c983
2025-03-12[rubygems/rubygems] Path helper to build paths in compact index cacheDavid Rodríguez
https://github.com/rubygems/rubygems/commit/d28f9b8515
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-03-10[rubygems/rubygems] Adapt specs to extraction of irb from ruby-coreDavid Rodríguez
This gets our daily Bundler CI back to green. https://github.com/rubygems/rubygems/commit/1bb70f75d2 Notes: Merged: https://github.com/ruby/ruby/pull/12890
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-21[rubygems/rubygems] bin/rubocop -a --only Style/MultipleComparisonHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/677e17aa2e
2025-02-19[rubygems/rubygems] Make sure empty gems are not reinstalled every timeDavid Rodríguez
Unfortunately this requires reverting a previous enhancement of reinstalling gems if they incorrectly ship with an empty installation dir. However, there's no way to distinguish this kind of bad state from a gem that's empty for real, for example, sorbet-static-and-runtime. This reverts commit https://github.com/rubygems/rubygems/commit/9720a9b980d2, and adds a spec to make sure empty gems are not reinstalled every time. https://github.com/rubygems/rubygems/commit/7c102394af
2025-02-19[rubygems/rubygems] Don't add gemspec to specification list of our test gemsDavid Rodríguez
Real gems hardly ever do this, so don't do it ourselves for testing either. https://github.com/rubygems/rubygems/commit/2c8960cfb4
2025-02-18[rubygems/rubygems] Fix locked gems being upgraded when locked dependencies ↵David Rodríguez
are incorrect Resolver had internal logic to prioritize locked versions when sorting versions, however part of it was not being actually hit because of how unlocking worked in the resolver: a package was allow to be unlocked when that was explicit requested or when the list of unlocks was empty. That did not make a lot of sense and other cases were working because the explicit list of unlocks was getting "artificially filled". Now we consider a package unlocked when explicitly requested (`bundle update <package>`), or when everything is being unlocked (`bundle install` with no lockfile or `bundle update`). This makes things simpler and gets the edge case added as a test case working as expected. https://github.com/rubygems/rubygems/commit/b8e55087f0
2025-02-18[rubygems/rubygems] Extract a `TheBundle#locked_specs` test helperDavid Rodríguez
https://github.com/rubygems/rubygems/commit/8cbe6573b4
2025-02-14[rubygems/rubygems] Let `:bundler` filter raise if not given major versionsDavid Rodríguez
Otherwise it doesn't work as expected and it may skip specs. https://github.com/rubygems/rubygems/commit/d6af077174
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 <[email protected]>
2025-01-28[rubygems/rubygems] Use RubyGems helpers for finding a non local tag for specsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/a1d4ec1a3f
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] Remove unnecessary test codeDavid Rodríguez
It's always going to be either the first or the second platform in the list so no need to keep an explicit list of all platforms. https://github.com/rubygems/rubygems/commit/5d3cdb3855
2025-01-28[rubygems/rubygems] Improve simulating Windows during Bundler specsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/b48168bf1f
2025-01-28[rubygems/rubygems] Refactor specs to use platform strings directlyDavid Rodríguez
https://github.com/rubygems/rubygems/commit/d24c0c20e3
2025-01-16[rubygems/rubygems] Introduce Spec::Path.sinatra_dependency_paths for ↵Hiroshi SHIBATA
sinatra mock server https://github.com/rubygems/rubygems/commit/0a168156d5
2025-01-16[rubygems/rubygems] Extract logic to manipulate RUBYLIB in specs to a helperDavid Rodríguez
https://github.com/rubygems/rubygems/commit/0057382bb1
2025-01-14Remove test dependency on loggerDavid Rodríguez
I think logger is only used to figure out which methods need to be made noops in order to silence webrick during tests. However, it seems possible to do the same using webrick's builtin logger and the current method does not seem even correct since it's not guaranteed that the logger gem and webrick's logger will use the same methods. Notes: Merged: https://github.com/ruby/ruby/pull/12568
2025-01-14[rubygems/rubygems] Remove no longer used spec filterDavid Rodríguez
I think we have consistent behavior regardless of the version of git being used, and I'd like to keep it like that so I think we can remove this filter. https://github.com/rubygems/rubygems/commit/6a708128e9 Notes: Merged: https://github.com/ruby/ruby/pull/12568
2025-01-10Added logger dependency for Bundler's exampleHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12537
2025-01-02[rubygems/rubygems] unskip `print_args` and `fake_man` tests on Windowssodacris
https://github.com/rubygems/rubygems/commit/c8eeb0af9d
2024-12-13[rubygems/rubygems] Add note about why we don't use `Open3`David Rodríguez
https://github.com/rubygems/rubygems/commit/72316ed2fa
2024-12-13[rubygems/rubygems] No need for `--quiet` since we hide output by defaultDavid Rodríguez
https://github.com/rubygems/rubygems/commit/77133a23f5
2024-12-13[rubygems/rubygems] Don't print a bunch of blank lines when setting up ↵David Rodríguez
dependencies https://github.com/rubygems/rubygems/commit/48fd2d0514
2024-12-04[rubygems/rubygems] allow `bat` files to be created alongside with script ↵sodacris
files on Windows https://github.com/rubygems/rubygems/commit/ed5b847f03
2024-11-26[rubygems/rubygems] Enable `Performance/MapCompact` copDavid Rodríguez
https://github.com/rubygems/rubygems/commit/0c3a65871a
2024-11-26[rubygems/rubygems] More aggressive `Performance/FlatMap` cop configurationDavid Rodríguez
https://github.com/rubygems/rubygems/commit/d8d68cc00e
2024-11-21[rubygems/rubygems] Explicitly load build_metadata.rb because ↵Hiroshi SHIBATA
Spec::BuildMetadata is only called from BundlerBuilder. The current code is broken to call Spec::Builders#build_* method directly. https://github.com/rubygems/rubygems/commit/4922ae40dd
2024-11-21[rubygems/rubygems] Silent verbose stdout for dependency of test gemsHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/51854e1982
2024-11-19Test with sinatra to 4.1.0David Rodríguez
2024-11-14[rubygems/rubygems] Fix `bin/rake spec:all` taskDavid Rodríguez
Only in CI, if two different test runs are started (like `bin/rake spec:all` does), the second one would not install the dev version of Bundler and would fail to start. This commit makes it work the same locally and in CI. https://github.com/rubygems/rubygems/commit/7a5ca6c40f
2024-11-14[rubygems/rubygems] I don't see how this could happenDavid Rodríguez
https://github.com/rubygems/rubygems/commit/8b6f9b7f05
2024-10-10[rubygems/rubygems] Fix specs with missing extensions getting activatedDavid Rodríguez
https://github.com/rubygems/rubygems/commit/c80998a22a