summaryrefslogtreecommitdiff
path: root/spec
AgeCommit message (Collapse)Author
2023-12-13RubyGems 3.5+ will use vendored net-httpHiroshi SHIBATA
2023-12-13[rubygems/rubygems] Add a spec to cover what vendoring timeout fixesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/2662e45d75
2023-12-13[rubygems/rubygems] Remove no longer needed gem install during testDavid Rodríguez
https://github.com/rubygems/rubygems/commit/bdb78d8289
2023-12-13[rubygems/rubygems] Use vendored net-http in BundlerDavid Rodríguez
https://github.com/rubygems/rubygems/commit/0d758e8926
2023-12-13[rubygems/rubygems] Avoid loading artifice when not necessaryDavid Rodríguez
https://github.com/rubygems/rubygems/commit/ef97ad37bd
2023-12-13[rubygems/rubygems] Load hax.rb before anything when ↵David Rodríguez
`BUNDLER_IGNORE_DEFAULT_GEM` set https://github.com/rubygems/rubygems/commit/111bd11c36
2023-12-12Sync with upstream rubygems (#9206)David Rodríguez
2023-12-12[rubygems/rubygems] Bump rake version used by testsDavid Rodríguez
And make it easier to update next time. https://github.com/rubygems/rubygems/commit/1ea4bfa5d8
2023-12-12[rubygems/rubygems] Resolve `ruby file: ".ruby-version"` relative to GemfileMartin Emde
https://github.com/rubygems/rubygems/commit/0cbbaed8a5
2023-12-12[rubygems/rubygems] Ensure that the lockfile mtime is not altered on frozen ↵Martin Emde
install https://github.com/rubygems/rubygems/commit/6847709ee0
2023-12-12[rubygems/rubygems] bundle lock: Always touch the lockfileFranz Liedke
https://github.com/rubygems/rubygems/commit/fd2e71dfdb
2023-12-12[rubygems/rubygems] Make tests compatible with paths that contain a + charMartin Emde
https://github.com/rubygems/rubygems/commit/3355c80c90
2023-12-12[rubygems/rubygems] Use StringIO 3.1.0 in tests to work with ruby 3.3.0Martin Emde
https://github.com/rubygems/rubygems/commit/8a936d733d
2023-12-11[rubygems/rubygems] Override initialize in bundle rubygems_ext for NameTupleMartin Emde
https://github.com/rubygems/rubygems/commit/f63ce682d2
2023-12-08[rubygems/rubygems] Migrate documentation to be generated with nronnDavid Rodríguez
https://github.com/rubygems/rubygems/commit/55281f0eaa
2023-12-08[rubygems/rubygems] Extract generate_index command to ↵Samuel Giddins
rubygems-generate_index gem So generate_index can be implemented with dependencies, such as the compact index Took this approach from feedback in https://github.com/rubygems/rubygems/pull/6853 Running `gem generate_index` by default will use an installed rubygems-generate_index, or install and then use the command from the gem Apply suggestions from code review https://github.com/rubygems/rubygems/commit/fc1cb9bc9e Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org>
2023-12-08[rubygems/rubygems] Use `Minitest::TestTask` in a template file for `minitest`Yuji Yaginuma
`minitest` has introduced a rake task for running test on 5.16.0. https://github.com/minitest/minitest/blob/master/History.rdoc#5160--2022-06-14- This has some tasks related to running tests and it's useful for `minitest` user I think. https://github.com/minitest/minitest#rake-tasks- This PR changed to use the task in a template file for `minitest` https://github.com/rubygems/rubygems/commit/7a86d13062
2023-12-07[rubygems/rubygems] Use modern hashes consistentlyDavid Rodríguez
https://github.com/rubygems/rubygems/commit/bb66253f2c
2023-12-07Fix keyword splat passing as regular argumentJeremy Evans
Since Ruby 3.0, Ruby has passed a keyword splat as a regular argument in the case of a call to a Ruby method where the method does not accept keyword arguments, if the method call does not contain an argument splat: ```ruby def self.f(obj) obj end def self.fs(*obj) obj[0] end h = {a: 1} f(**h).equal?(h) # Before: true; After: false fs(**h).equal?(h) # Before: true; After: false a = [] f(*a, **h).equal?(h) # Before and After: false fs(*a, **h).equal?(h) # Before and After: false ``` The fact that the behavior differs when passing an empty argument splat makes it obvious that something is not working the way it is intended. Ruby 2 always copied the keyword splat hash, and that is the expected behavior in Ruby 3. This bug is because of a missed check in setup_parameters_complex. If the keyword splat passed is not mutable, then it points to an existing object and not a new object, and therefore it must be copied. Now, there are 3 specs for the broken behavior of directly using the keyword splatted hash. Fix two specs and add a new version guard. Do not keep the specs for the broken behavior for earlier Ruby versions, in case this fix is backported. For the ruby2_keywords spec, just remove the related line, since that line is unrelated to what the spec is testing. Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-12-06[rubygems/rubygems] Bundler::Fetcher uses Bundler::CIDetectorEric Mueller
Additionally, the result is memoized, as it's used twice in a row. This change does result in a net behavioral diff, as the list of ENVs being checked has been updated (now includes buildkite, taskcluster, cirrus, dsari, and drops buildbox and snap) https://github.com/rubygems/rubygems/commit/3fb445a5a1
2023-12-06[rubygems/rubygems] Duplicate Gem::CIDetector into bundlerEric Mueller
Because bundler needs to support older versions of rubygems, we can't actually rely on Gem::CIDetector (yet - in a year or so they might be able to consolidate, if they don't change futher). So we're copying it into the Bundler:: namespace, and enforcing that they stay completely in sync with a test. No other tests are needed, since Gem::CIDetector is already tested, and this is and will remain identical. https://github.com/rubygems/rubygems/commit/abc67f0da1
2023-12-05[rubygems/rubygems] Converts Bundler lockfile checksum validation to opt-in onlyMartin Emde
Looks for the CHECKSUMS section in the lockfile, activating the feature only if the section exists. Without a CHECKSUMS section, Bundler will continue as normal, validating checksums when gems are installed while checksums from the compact index are present. https://github.com/rubygems/rubygems/commit/2353cc93a4
2023-12-05[ruby/syntax_suggest] Change assertion to not rely on exact text from prismSchneems
The original ripper test was very stable as the output didn't change. Prism is under active development and changing their output shouldn't cause a failure to the ruby/ruby test suite like https://github.com/ruby/ruby/actions/runs/7104601478/job/19339940315. This commit moves from checking exact output to asserting that the string we get back is not empty. This should give the same level of confidence that some error message was caught, and is less brittle. https://github.com/ruby/syntax_suggest/commit/4b6abb763e
2023-12-05[ruby/syntax_suggest] Update docs, clean up PRSchneems
Removes or updates mentions of Ripper https://github.com/ruby/syntax_suggest/commit/08aaa3f50a
2023-12-05[ruby/syntax_suggest] Support lexing with PrismSchneems
https://github.com/ruby/syntax_suggest/commit/7f4176a914
2023-12-05[ruby/syntax_suggest] Initial support for the prism parserSchneems
Prism will be the parser in Ruby 3.3. We need to support 3.0+ so we will have to "dual boot" both parsers. Todo: - LexAll to support Prism lex output - Add tests that exercise both Ripper and prism codepaths on CI - Handle https://github.com/ruby/prism/issues/1972 in `ripper_errors.rb` - Update docs to not mention Ripper explicitly - Consider different/cleaner APIs for separating out Ripper and Prism https://github.com/ruby/syntax_suggest/commit/a7d6991cc4
2023-12-05[rubygems/rubygems] Fix crash when duplicating a dev dependency in Gemfile & ↵David Rodríguez
gemspec https://github.com/rubygems/rubygems/commit/e78c0a4a48
2023-12-04[ruby/syntax_suggest] Bump minimum Ruby version & update standardrbSchneems
https://github.com/ruby/syntax_suggest/commit/73753518e9
2023-12-04[ruby/syntax_suggest] Update standardrb to Ruby 3.0 standardsSchneems
https://github.com/ruby/syntax_suggest/commit/2771dcabe0
2023-12-01[rubygems/rubygems] major_deprecation accepts :removed_messageEric Mueller
If supplied, it uses that in place of the message for the case where the deprecation version is already past. https://github.com/rubygems/rubygems/commit/1deb73663c
2023-11-30Fix failing specMisaki Shioi
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-29Do not call the inplicit convercion spec on older ruby versionsTema Bolshakov
2023-11-29Fix Array#rassoc specTema Bolshakov
2023-11-27Update to ruby/spec@c3206f6Benoit Daloze
2023-11-27Update to ruby/mspec@9f83eeaBenoit Daloze
2023-11-27Opaque Etags for compact index requestsJosef Šimánek
This changes the CompactIndexClient to store etags received from the compact index in separate files rather than relying on the MD5 checksum of the file as the etag. Smoothes the upgrade from md5 etags to opaque by generating them when no etag file exists. This should reduce the initial impact of changing the caching behavior by reducing cache misses when the MD5 etag is the same. Eventually, the MD5 behavior should be retired and the etag should be considered completely opaque with no assumption that MD5 would match.
2023-11-27[rubygems/rubygems] Don't remember `--jobs` flagDavid Rodríguez
https://github.com/rubygems/rubygems/commit/9ab1136036
2023-11-27[rubygems/rubygems] Fix advice in `bundle install --system` deprecationDavid Rodríguez
https://github.com/rubygems/rubygems/commit/59a66e3560
2023-11-27[rubygems/rubygems] Avoid some unnecessary quotes in remember flag ↵David Rodríguez
deprecation message https://github.com/rubygems/rubygems/commit/3fd627e486
2023-11-27[rubygems/rubygems] Simplify remembered flags deprecation messageDavid Rodríguez
Configuration is now local by default. https://github.com/rubygems/rubygems/commit/6bc7709aa8
2023-11-27[rubygems/rubygems] Remove no longer necessary workaround for old RubyGemsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/ed4eaefac0
2023-11-26[rubygems/rubygems] Reduce allocations when installing gems with bundlerSamuel Giddins
``` ==> memprof.after.txt <== Total allocated: 1.13 MB (2352 objects) Total retained: 10.08 kB (78 objects) ==> memprof.before.txt <== Total allocated: 46.27 MB (38439 objects) Total retained: 9.94 kB (75 objects) ``` Yes, we were allocating 45MB of arrays in `dependencies_installed?`, it was accidentally cubic. https://github.com/rubygems/rubygems/commit/13ab874388
2023-11-23[rubygems/rubygems] Add --json bundle-outdated flag to produce ↵Eric Mueller
json-parseable output https://github.com/rubygems/rubygems/commit/65efa44bc0
2023-11-22[rubygems/rubygems] Fix universal lockfiles regressionDavid Rodriguez
If a platform specific variant would not match the current Ruby, we would still be considering it compatible with the initial resolution and adding its platform to the lockfile, but we would later fail to materialize it for installation due to not really being compatible. Fix is to only add platforms for variants that are also compatible with current Ruby and RubyGems versions. https://github.com/rubygems/rubygems/commit/75d1290843
2023-11-21[rubygems/rubygems] Fix invalid platform removal missing adjacent platformsBo Anderson
https://github.com/rubygems/rubygems/commit/4ce66c41a2
2023-11-15[rubygems/rubygems] User bundler UA when downloading gemsSamuel Giddins
Gem::RemoteFetcher uses Gem::Request, which adds the RubyGems UA. Gem::RemoteFetcher is used to download gems, as well as the full index. We would like the bundler UA to be used whenever bundler is making requests. This PR also avoids unsafely mutating the headers hash on the shared `Gem::RemoteFetcher.fetcher` instance, which could cause corruption or incorrect headers when making parallel requests. Instead, we create one remote fetcher per rubygems remote, which is similar to the connection segregation bundler is already doing https://github.com/rubygems/rubygems/commit/f0e8dacdec
2023-11-13[rubygems/rubygems] Make sure to `require "rubygems"` explicitlyNobuyoshi Nakada
This is also done in bundler/lib/bundler/rubygems_integration.rb, but bundler/lib/bundler.rb loads this file before it. https://github.com/rubygems/rubygems/commit/8840d8507b
2023-11-13[rubygems/rubygems] Add a warning in an edge case of using `gemspec` DSLDavid Rodríguez
If a Gemfile duplicates a development dependency also defined in a local gemspec with a different requirement, the requirement in the local gemspec will be silently ignored. This surprised me. I think we should either: * Make sure both requirements are considered, like it happens for runtime dependencies (I added a spec to illustrate the current behavior here). * Add a warning that the requirement in the gemspec will be ignored. I think the former is slightly preferable, but it may cause some bundle's that previously resolve to no longer resolver. I went with the latter but the more I think about it, the more this seems like it should behave like the former. https://github.com/rubygems/rubygems/commit/ad6843972f
2023-11-13[rubygems/rubygems] Let RuboCop target Ruby 3.0David Rodríguez
https://github.com/rubygems/rubygems/commit/70243b1d72