summaryrefslogtreecommitdiff
path: root/spec
AgeCommit message (Collapse)Author
2024-09-30[rubygems/rubygems] Fix duplicated spec namesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/26f6600197
2024-09-30[rubygems/rubygems] Fix `stub.activated?` sometimes returning false after ↵Earlopain
activation under bundler Closes https://github.com/rubygems/rubygems/pull/8068 This issue only occurs if the underlying stub is a gem stub: https://github.com/Earlopain/rubygems/blob/f56098d8a193dcb94584d721e82b8cff397e5265/bundler/lib/bundler/stub_specification.rb#L109-L112 https://github.com/rubygems/rubygems/commit/9b0152b3d5
2024-09-30[rubygems/rubygems] I _think_ this workaround is no longer necessaryDavid Rodríguez
https://github.com/rubygems/rubygems/commit/6a76fedfd0
2024-09-26Update test dependenciesDavid Rodríguez
2024-09-26[rubygems/rubygems] Get specs to run on JRuby and make them passDavid Rodríguez
Turns out we were not running specs on JRuby, so we introduced a failure. Seems fine to skip. https://github.com/rubygems/rubygems/commit/4e2d6affb3
2024-09-24[rubygems/rubygems] Fix `bundler/inline` overwriting lockfilesDavid Rodríguez
This was introduced by https://github.com/rubygems/rubygems/commit/0b7be7bb7705, because the original patch was not adapted to some recent refactorings. https://github.com/rubygems/rubygems/commit/0bca60d6e5 Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org>
2024-09-23Add anonymous module name spec.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/7968
2024-09-23[rubygems/rubygems] Don't try to auto-install dev versions of Bundler not ↵David Rodríguez
available remotely https://github.com/rubygems/rubygems/commit/1a7a3fdeb9
2024-09-23[rubygems/rubygems] Ensure refs directory in cached git sourceDaniel Colson
See https://github.com/rubygems/rubygems/issues/8046 for details Prior to this commit a cached git source without a specific ref wouldn't survive pushing to a remote and then pulling on a different machine. We'd end up without a refs directory in the cache, at which point git won't recognize it as a repo. This commit fixes the problem by adding a refs directory if it's not already there. This needs to be done as early as possible, so any git commands will work as expected, so this commit adds it before creating the app cached git proxy. https://github.com/rubygems/rubygems/commit/8c89f0b065
2024-09-23[rubygems/rubygems] Fix `bundle outdated` with `--group` optionDavid Rodríguez
It was printing incorrect output and returning incorrect status. https://github.com/rubygems/rubygems/commit/96f5979c7d
2024-09-20[rubygems/rubygems] Disallow RubyGems warnings during Bundler test suiteDavid Rodríguez
https://github.com/rubygems/rubygems/commit/472371ee1e
2024-09-20[rubygems/rubygems] I don't think we need a conditional shebangDavid Rodríguez
https://github.com/rubygems/rubygems/commit/7ba7073a35
2024-09-20[rubygems/rubygems] Fix RubyGems warnings about missing shebangDavid Rodríguez
https://github.com/rubygems/rubygems/commit/362c960497
2024-09-20[rubygems/rubygems] Fix RubyGems warnings about pre-release dependenciesDavid Rodríguez
Nothing here relies on the dependency being on a pre-release, and Bundler does not use prereleases in the realworld. https://github.com/rubygems/rubygems/commit/96f5742ff1
2024-09-20[rubygems/rubygems] Fix RubyGems warnings about incorrect executable permissionsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/92dcf60fc1
2024-09-20[rubygems/rubygems] Fix RubyGems warnings about minimum required RubyDavid Rodríguez
https://github.com/rubygems/rubygems/commit/8f262f3a47
2024-09-20[rubygems/rubygems] Don't try to install locked bundler when `--local` is passedDavid Rodríguez
https://github.com/rubygems/rubygems/commit/907d46964d
2024-09-18Update exception message in string_for_symbolJeremy Evans
This is a static function only called in two places (rb_to_id and rb_to_symbol), and in both places, both symbols and strings are allowed. This makes the error message consistent with rb_check_id and rb_check_symbol. Fixes [Bug #20607] Notes: Merged: https://github.com/ruby/ruby/pull/11097
2024-09-17[rubygems/rubygems] Fix spelling, it's "cannot" rather than "can not"David Rodríguez
https://github.com/rubygems/rubygems/commit/3434f094a2
2024-09-17[rubygems/rubygems] Bump rubies in CI to 3.3.5David Rodríguez
A spec needed changes because now loading the default `json` prints a warning about `ostruct` getting loaded although it will be removed in the future. Use a different default gem to test this. https://github.com/rubygems/rubygems/commit/7415a66906 Co-authored-by: Samuel Giddins <segiddins@segiddins.me>
2024-09-17Skip failing examples related with ↵Hiroshi SHIBATA
https://github.com/ruby/ruby/commit/d81b0588bb3c97167d1f7e2d2a74185e0c19b68c
2024-09-17[rubygems/rubygems] Fix `--local` hitting the network when default gems are ↵David Rodríguez
included https://github.com/rubygems/rubygems/commit/b9a2d4d539
2024-09-17[rubygems/rubygems] Improve specDavid Rodríguez
The behavior it's testing is independent from the bundle path being used. https://github.com/rubygems/rubygems/commit/9a4b32ec82
2024-09-17[rubygems/rubygems] Fix spec to setup a default gem correctlyDavid Rodríguez
Looking at the description is something that used to be done a long time ago. https://github.com/rubygems/rubygems/commit/9c226f52a6
2024-09-16Complete specDavid Rodríguez
Co-authored-by: Vít Ondruch <vondruch@redhat.com>
2024-09-16[rubygems/rubygems] Remove temporary `.lock` files left around by gem installerDavid Rodríguez
https://github.com/rubygems/rubygems/commit/edbb2e3475
2024-09-13[rubygems/rubygems] Remove redundant arguments passed to `bundle` helperDavid Rodríguez
They are used by default. https://github.com/rubygems/rubygems/commit/0b7f7d879f
2024-09-13[rubygems/rubygems] Remove `BUNDLER_IGNORE_DEFAULT_GEM`David Rodríguez
As long as we use a high enough test version, the default version of Bundler should never get in the middle. https://github.com/rubygems/rubygems/commit/d63f0818aa
2024-09-13[rubygems/rubygems] Make sure test does not load system version of BundlerDavid Rodríguez
https://github.com/rubygems/rubygems/commit/d850ea1d95
2024-09-11[rubygems/rubygems] Uncomment and possibly fix spec on JRubyDavid Rodríguez
This was commented out almost 10 years ago, but I think it passes now! https://github.com/rubygems/rubygems/commit/4a6b1aba3c
2024-09-11[rubygems/rubygems] Fix `bundle exec rake install` failing when local gem ↵David Rodríguez
has extensions and `gemspec` DSL is being used In a `bundle exec` context, the local specification will actually be part of the known specifications, so RubyGems will assume it has already been installed, which is not actually true. This will cause `RequestSet` to rebuild extensions for a gem that's not actually installed, causing errors. The fix is to make sure detection of installed activation requests considers not only that there's a known spec with the same full name as the one being installed, but also that this spec is installed in the same gem_home were pretend to install the new gem. https://github.com/rubygems/rubygems/commit/a8ef1286a6
2024-09-11[rubygems/rubygems] Only raise DSLError during Gemfile parsing when it's ↵David Rodríguez
actually useful DSLError prints the specific line in a Gemfile where the error was raised. That's helpful when the error was explicitly raised by the Gemfile DSL or, in the case it's implicitly raised, when the offending code lives right in the Gemfile. If it's an internal error, or something buried dowm in user code called from the Gemfile, `DSLError` is not helpful since it hides the actual culprit. This commit tries to only raise `DSLError` in the cases mentioned above and otherwise let the original error be raised. https://github.com/rubygems/rubygems/commit/b30ff5a682
2024-09-11[rubygems/rubygems] Make an exe file executable when generating new gemsYuji Yaginuma
Currently, an exe file isn't executable when generating new gems because it doesn't have the correct permission. This PR sets the correct permission same as files under the `bin`. https://github.com/rubygems/rubygems/commit/6509bf128a
2024-09-10Suppress constant warning for test-bundled-gems-specHiroshi SHIBATA
2024-09-10[rubygems/rubygems] Mark to exclude examples at ruby/ruby repositoryHiroshi SHIBATA
`make test-bundler` on ruby/ruby don't have installed gemspec. So, `require "psych"` didn't activate psych as default gems on ruby repo. https://github.com/rubygems/rubygems/commit/f8ca514cbb
2024-09-10[rubygems/rubygems] Added example for bundler/inline conflictHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/6b1e8a14bd
2024-09-09Implement String#append_as_bytes(String | Integer, ...)Jean Boussier
[Feature #20594] A handy method to construct a string out of multiple chunks. Contrary to `String#concat`, it doesn't do any encoding negociation, and simply append the content as bytes regardless of whether this result in a broken string or not. It's the caller responsibility to check for `String#valid_encoding?` in cases where it's needed. When passed integers, only the lower byte is considered, like in `String#setbyte`. Notes: Merged: https://github.com/ruby/ruby/pull/11552
2024-09-09[rubygems/rubygems] Don't include hook templates in cached git sourceDaniel Colson
With a default git setup, each cloned repo in the cache will end up with ~60K of sample git hooks. These files all end in `.sample`, and they are disabled by default. Deleting them should be a no-op, and makes the cache a bit smaller. https://github.com/rubygems/rubygems/commit/d2149999cd
2024-09-06Implement Array#fetch_valuesJean Boussier
[Feature #20702] Works the same way than `Hash#fetch_values` for for array. Notes: Merged: https://github.com/ruby/ruby/pull/11557
2024-09-05Move Time#xmlschema in core and optimize itJean Boussier
[Feature #20707] Converting Time into RFC3339 / ISO8601 representation is an significant hotspot for applications that serialize data in JSON, XML or other formats. By moving it into core we can optimize it much further than what `strftime` will allow. ``` compare-ruby: ruby 3.4.0dev (2024-08-29T13:11:40Z master 6b08a50a62) +YJIT [arm64-darwin23] built-ruby: ruby 3.4.0dev (2024-08-30T13:17:32Z native-xmlschema 34041ff71f) +YJIT [arm64-darwin23] warming up...... | |compare-ruby|built-ruby| |:-----------------------|-----------:|---------:| |time.xmlschema | 1.087M| 5.190M| | | -| 4.78x| |utc_time.xmlschema | 1.464M| 6.848M| | | -| 4.68x| |time.xmlschema(6) | 859.960k| 4.646M| | | -| 5.40x| |utc_time.xmlschema(6) | 1.080M| 5.917M| | | -| 5.48x| |time.xmlschema(9) | 893.909k| 4.668M| | | -| 5.22x| |utc_time.xmlschema(9) | 1.056M| 5.707M| | | -| 5.40x| ``` Notes: Merged: https://github.com/ruby/ruby/pull/11510
2024-09-04[rubygems/rubygems] Load gemspecs in the context of its parent also when ↵David Rodríguez
using local overrides https://github.com/rubygems/rubygems/commit/0a6c1c53ce
2024-09-03Range#step: restore legacy behavior for String rangeszverok
Notes: Merged: https://github.com/ruby/ruby/pull/11454
2024-09-02[rubygems/rubygems] Don't try to remove previous install folder if it's emptyDavid Rodríguez
Ruby ships with empty directories for default gems. If Ruby installations has unsafe world-writable permissions, we will complain when about to install a gem that happens to be also a default gem, because we'll start by removing the previous install folder and that's supposed to be insecure due to too loose permissions. However, if the folder is empty, we don't actually need to remove anything, so we can skip the whole thing, avoiding the errors. https://github.com/rubygems/rubygems/commit/2f3cd8ac4e
2024-09-02[rubygems/rubygems] Improve insecure gem overwrite messageDavid Rodríguez
https://github.com/rubygems/rubygems/commit/7c71dac22e
2024-09-02[rubygems/rubygems] Make ruby-core check not depend on ENVDavid Rodríguez
I found it useful to be able to use `GEM_COMMAND` outside of a ruby-core env, so I made the ruby-core env detection not depend on it. https://github.com/rubygems/rubygems/commit/6cb389c290
2024-08-30[rubygems/rubygems] Emit progress to stderr when `--parseable` is passed to ↵Matt Brictson
`bundle outdated` Before, `bundle outdated --parseable` (or `--porcelain`) caused output to be completely silenced during definition resolution, so nothing was printed at all until the table of outdated gems was printed. With this change, `--parseable`/`--porcelain` now prints progress to stderr during resolution. E.g.: ``` Fetching gem metadata from https://rubygems.org/......... Resolving dependencies... ``` This provides a better user experience, especially when `outdated --parseable` takes several seconds or more. The report of outdated gems is still printed to stdout, and the exit status codes are unchanged, so the fundamental contract with other tools consuming the `outdated --parseable` result should not be affected. https://github.com/rubygems/rubygems/commit/7d4bb43570
2024-08-30[rubygems/rubygems] Don't blow up when explicit version is removed from some ↵David Rodríguez
git sources `version` is actually an attribute of the dependency, not of the git source. Sometimes it's passed to the git source to be able to fake a gemspec in case there's no gemspec in the source, but it should not be used for source comparison. https://github.com/rubygems/rubygems/commit/d936fbd78e
2024-08-30[rubygems/rubygems] Fix grammar in one spec descriptionDavid Rodríguez
https://github.com/rubygems/rubygems/commit/a1046466c9
2024-08-29[rubygems/rubygems] Reject unknown platforms when running `bundle lock ↵David Rodríguez
--add-platform` https://github.com/rubygems/rubygems/commit/1f93a2bdc5
2024-08-26[rubygems/rubygems] Emit progress to stderr when `--print` is passed to ↵Matt Brictson
`bundle lock` `bundle lock --print --update` can take a long time to fetch sources and resolve the lock file. Before, `--print` caused output to be completely silenced, so nothing was printed at all until the resolved lock file is finally emitted to stdout. With this change, `--print` now prints progress to stderr. E.g.: ``` Fetching gem metadata from https://rubygems.org/......... Resolving dependencies... ``` This provides a better user experience, especially when `lock --print --update` takes several seconds or more. The lock file is still printed to stdout, so tools consuming the lock file on stdout will not be affected. https://github.com/rubygems/rubygems/commit/6719baa700