summaryrefslogtreecommitdiff
path: root/spec
AgeCommit message (Collapse)Author
2025-06-26[rubygems/rubygems] Reorganize post bundle message specs to run ↵David Rodríguez
independently of major version https://github.com/rubygems/rubygems/commit/70c69c45ba
2025-06-26[rubygems/rubygems] Use nicer indentationDavid Rodríguez
https://github.com/rubygems/rubygems/commit/7e959adce6
2025-06-26[rubygems/rubygems] Simplify pristine spec to not need checking major versionDavid Rodríguez
https://github.com/rubygems/rubygems/commit/bd2a170330
2025-06-25[rubygems/rubygems] Remove unnecessary loading of fileutils from path specsDavid Rodríguez
These specs load artifice before Bundler boots because of their global rubygems source. Artifice in turn loads `rack`, `rack-test`, and `tmpdir` which in turn load `fileutils`. Because of this, a missing `require` of `fileutils` in RubyGems would not be caught by specs. Loading artifice is not necessary for most of these specs, so remove the global source to avoid it. https://github.com/rubygems/rubygems/commit/aad871c997
2025-06-25[rubygems/rubygems] Remove message long gone from the code base from ↵David Rodríguez
expectations https://github.com/rubygems/rubygems/commit/2eaada3508
2025-06-25Simplify Set#inspect outputJeremy Evans
As Set is now a core collection class, it should have special inspect output. Ideally, inspect output should be suitable to eval, similar to array and hash (assuming the elements are also suitable to eval): set = Set[1, 2, 3] eval(set.inspect) == set # should be true The simplest way to do this is to use the Set[] syntax. This deliberately does not use any subclass name in the output, similar to array and hash. It is more important that users know they are dealing with a set than which subclass: Class.new(Set)[] # this does: Set[] # not: #<Class:0x00000c21c78699e0>[] This inspect change breaks the power_assert bundled gem tests, so add power_assert to TEST_BUNDLED_GEMS_ALLOW_FAILURES in the workflows. Implements [Feature #21389]
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] Helper for hax fileDavid Rodríguez
https://github.com/rubygems/rubygems/commit/8b7ddf8a07
2025-06-24[rubygems/rubygems] `bundle exec` does not need artifice in generalDavid Rodríguez
https://github.com/rubygems/rubygems/commit/cb1f19573a
2025-06-23[rubygems/rubygems] Handle `Errno::EADDRNOTAVAIL` gracefullyDavid Rodríguez
As showed by the unskiped spec, on Windows trying to use the 0.0.0.0 interface raises this error, and it's raised as a generic system error when trying to create a `bundler.lock` file. Here's is a better place to handle that. https://github.com/rubygems/rubygems/commit/e32c5a9e5c
2025-06-23[rubygems/rubygems] Remove usage of `Bundler::SpecSet#<<`David Rodríguez
https://github.com/rubygems/rubygems/commit/b556167793
2025-06-23[rubygems/rubygems] Fix flaky test failures in mirror probing specsDavid Rodríguez
The mirror probing spec file was moved to our regular suite, which runs in parallel, recently. These specs rely on starting and stopping actual servers in localhost, but this does not play nice with parallelization, because a spec may kill the webserver another spec has created. This commit moves mirror probing specs to not need to start servers in localhost and do something more similar to what the other specs do. https://github.com/rubygems/rubygems/commit/ca9a19706f
2025-06-19Skip to Bundler 4 directlyDavid Rodríguez
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-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-19[rubygems/rubygems] Never ignore gems from path sources during activationDavid Rodríguez
The "ignore" attribute is a RubyGems thing to mark when a installed gem should be ignored for activation because its extensions are not properly compiled. In the case of gems from path sources, the warning is not accurate because extensions are compiled into the local lib path, which is not where RubyGems leaves its sentinel `gem.build_complete` file. Also, there's a single version of each gem in the path source available to Bundler, so we always certainly want to consider that for activation and never makes sense to ignore it. https://github.com/rubygems/rubygems/commit/ec5d33695e
2025-06-18Exclude internal frames from backtraceYusuke Endoh
This changeset suppresses backtrace locations like `<internal:array>:211` as much as possible. Before the patch: ``` $ ruby -e '[1].fetch_values(42)' <internal:array>:211:in 'Array#fetch': index 42 outside of array bounds: -1...1 (IndexError) from <internal:array>:211:in 'block in Array#fetch_values' from <internal:array>:211:in 'Array#map!' from <internal:array>:211:in 'Array#fetch_values' from -e:1:in '<main>' ``` After the patch: ``` $ ./miniruby -e '[1].fetch_values(42)' -e:1:in 'Array#fetch_values': index 42 outside of array bounds: -1...1 (IndexError) from -e:1:in '<main>' ``` Specifically: * The special backtrace handling of BUILTIN_ATTR_C_TRACE is now always applied to frames with `<internal:...>`. * When multiple consecutive internal frames appear, all but the bottom (caller-side) frame are removed. [Misc #20968] Notes: Merged: https://github.com/ruby/ruby/pull/13238
2025-06-17[rubygems/rubygems] Etc exemption on Windows is no longer necessaryDavid Rodríguez
https://github.com/rubygems/rubygems/commit/228f59e3ab
2025-06-17[rubygems/rubygems] Reword a couple of specs to further clarify themDavid Rodríguez
https://github.com/rubygems/rubygems/commit/e28b5e306f
2025-06-17[rubygems/rubygems] Migrate mirror probe specs to use the compact index APIDavid Rodríguez
Could potentially fix some flakies we're using and make the specs more "modern" and simplifies them because less fallbacks are involved. https://github.com/rubygems/rubygems/commit/30da9a1a93
2025-06-17[rubygems/rubygems] Consistently use instance variables directlyDavid Rodríguez
I don't think the indirection improve things. https://github.com/rubygems/rubygems/commit/b408b28844
2025-06-17[rubygems/rubygems] Cleanup dead code, RubyGems 3.3 is no longer supportedDavid Rodríguez
https://github.com/rubygems/rubygems/commit/945a29a477
2025-06-16[Bug #20998] Check if the string is frozen in rb_str_locktmp() & ↵Benoit Daloze
rb_str_unlocktmp() Notes: Merged: https://github.com/ruby/ruby/pull/13615
2025-06-15Skip the optional capi digest specs if fiddle is not installedJeremy Evans
Should fix a failure on the OpenBSD RubyCI machine. Notes: Merged: https://github.com/ruby/ruby/pull/13616
2025-06-13[rubygems/rubygems] Surpressing warning for CGI library of Ruby 3.5+Hiroshi SHIBATA
``` ❯ bin/rspec ./spec/bundler/friendly_errors_spec.rb /Users/hsbt/Documents/github.com/rubygems/rubygems/bundler/spec/bundler/friendly_errors_spec.rb:5: warning: CGI library is removed from Ruby 3.5. Please use cgi/escape instead for CGI.escape and CGI.unescape features. If you need to use the full features of CGI library, Please install cgi gem. ``` https://github.com/rubygems/rubygems/commit/a23a951004
2025-06-12Tweak to spec setup so that `rspec` instead of our `bin/rspec` binstub still ↵David Rodríguez
works
2025-06-11Followed up https://github.com/ruby/net-http/commit/002441da1e for ruby/specHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13580
2025-06-11Fix `make test-bundler`David Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/13520
2025-06-11[rubygems/rubygems] Validate dependencies when doing bundle installRandy Stauner
https://github.com/rubygems/rubygems/commit/b0983f392f
2025-06-10Fix up birthtime specsNobuyoshi Nakada
There are two different possible messages: unsupported OS/version, and unsupported filesystem on a supported system.
2025-06-09[Feature #21219] Selective inspect of instance variablesNobuyoshi Nakada
Make Kernel#inspect ask which instance variables should be dumped by the result of `#instance_variables_to_inspect`. Co-Authored-By: Jean Boussier <byroot@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/13555
2025-06-06Fix birthtime specs on old LinuxNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/13540
2025-06-06[rubygems/rubygems] Ignore local specifications if they have incorrect ↵David Rodríguez
dependencies Currently ruby-dev installs an incorrect gemspec for rdoc, that does not declare its dependency on psych. This seems like a ruby-core bug, but it seems best for Bundler to ignore it, go with the remote specification instead, and print a warning. https://github.com/rubygems/rubygems/commit/227cafd657
2025-06-06Move most of Bundler::GemHelpers to Gem::PlatformSamuel Giddins
This will help centralize wheel platform selection logic eventually Signed-off-by: Samuel Giddins <segiddins@segiddins.me>
2025-06-06[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
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-06-06[rubygems/rubygems] Extract stdboth spec helperDavid Rodríguez
https://github.com/rubygems/rubygems/commit/bb13f4e702
2025-06-06[rubygems/rubygems] Cache commit SHA ref revisionsThomas Marshall
If the `ref` option is a specific commit SHA, we can check to see if it's already fetched locally. If it is, then we don't need to re-fetch it from the remote. The `ref` option might not be a commit SHA, so we're using the `#commit` method which returns the full SHA if it's a commit ref, or the locked revision, or nil. This is a small improvement that will make `bundle update` slightly faster in cases for git-sourced gems pinned to a specific commit. https://github.com/rubygems/rubygems/commit/f434c2e66c
2025-06-06[rubygems/rubygems] Add tests for GitProxy#checkoutThomas Marshall
This commit adds tests to capture the current behavior of `#checkout`. They are not exhaustive, but they cover cases cloning and fetching the repository with different ref types. This will make it easier to change the caching behavior in a subsequent commit. https://github.com/rubygems/rubygems/commit/f637a412a6
2025-06-06Deprecate passing arguments to Set#to_set and Enumerable#to_setJeremy Evans
Array#to_a, Hash#to_h, Enumerable#to_a, and Enumerable#to_h do not allow you to specify subclasses. This has undesired behavior when passing non-Set subclasses. All of these are currently allowed, and none make sense: ```ruby enum = [1,2,3].to_enum enum.to_set(Hash) enum.to_set(Struct.new("A", :a)) enum.to_set(ArgumentError) enum.to_set(Thread){} ``` Users who want to create instances of a subclass of Set from an enumerable should pass the enumerable to SetSubclass.new instead of using to_set. Notes: Merged: https://github.com/ruby/ruby/pull/13489
2025-06-05[rubygems/rubygems] Fix git source unlocking for multi-gem repositories like ↵David Rodríguez
Rails If you have ``` gem "rails", git: "https://github.com/rails/rails" ``` and then explicitly pin to an older ref, like ``` gem "rails", git: "https://github.com/rails/rails", ref: "https://github.com/rubygems/rubygems/commit/99bacb5aa8e5" ``` Then `bundle install` fails, because locked sources fail to be updated to use the new source. This commit fixes the problem by making sure get their source properly replaced. https://github.com/rubygems/rubygems/commit/5de8c2e0cf
2025-06-05[rubygems/rubygems] Fix `bundle update --bundler` when restarts disabledDavid Rodríguez
There's no reason why we should not update bundler as requested, even if restarts are disabled. https://github.com/rubygems/rubygems/commit/e59acd2a0d
2025-06-05[rubygems/rubygems] Look in configured path when checking if self-update ↵David Rodríguez
version is installed https://github.com/rubygems/rubygems/commit/1ce0882e6f
2025-06-05[rubygems/rubygems] Make update specs independent from version of BundlerDavid Rodríguez
https://github.com/rubygems/rubygems/commit/609b21a5fe
2025-06-05[rubygems/rubygems] Make self management specs independent from version of ↵David Rodríguez
Bundler https://github.com/rubygems/rubygems/commit/1257bd161e