summaryrefslogtreecommitdiff
path: root/test/rubygems
AgeCommit message (Collapse)Author
2022-01-19[rubygems/rubygems] Don't pass regexp to `Gem::Dependeny.new` from list, ↵David Rodríguez
search, and query commands It's deprecated functionality. https://github.com/rubygems/rubygems/commit/13d3eb6cb0
2022-01-19Merge rubygems/rubygems HEAD.Hiroshi SHIBATA
Picked at 12aeef6ba9a3be0022be9934c1a3e4c46a03ed3a Notes: Merged: https://github.com/ruby/ruby/pull/5462
2022-01-19[rubygems/rubygems] Normalize end alignment style with BundlerDavid Rodríguez
https://github.com/rubygems/rubygems/commit/f7f504b24c
2022-01-15[rubygems/rubygems] Fix `gem update --system` for already installed version ↵loadkpi
of rubygems-update https://github.com/rubygems/rubygems/commit/c167d513a7
2022-01-15[rubygems/rubygems] Support binstubs with `--enable-load-relative` prologDavid Rodríguez
https://github.com/rubygems/rubygems/commit/32a5e9057a
2022-01-15[rubygems/rubygems] Privatize some test utilsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/386b3b85ca
2022-01-14[rubygems/rubygems] Remove redundant conditionBenoit Daloze
See https://github.com/rubygems/rubygems/pull/5210#discussion_r784807168 https://github.com/rubygems/rubygems/commit/cd0e961e81
2022-01-13[rubygems/rubygems] Let Version#spaceship accept a StringAkira Matsuda
With this patch, handwriting version comparisons become a little bit easier. before: SomeGem.version <=> Gem::Version.new('1.3') after: SomeGem.version <=> '1.3' https://github.com/rubygems/rubygems/commit/7e0dbb79f2
2022-01-06[rubygems/rubygems] Fix suggestions flagximenasandoval
https://github.com/rubygems/rubygems/commit/b55a1393ca
2022-01-06[rubygems/rubygems] Let fetch understand gem:version syntaxximenasandoval
Fix version error message Add tests to fetch error messages Fix default version since is not necessary https://github.com/rubygems/rubygems/commit/070620ebe4
2022-01-06[rubygems/rubygems] Fix `gem install <non-existent-gem> --force` crashDavid Rodríguez
Before: ``` $ gem install sfdsfdsfsdide --force ERROR: While executing gem ... (NoMethodError) undefined method `spec' for nil:NilClass @always_install << newest.spec ^^^^^ ``` After: ``` $ gem install sfdsfdsfsdide --force ERROR: Could not find a valid gem 'sfdsfdsfsdide' (>= 0) in any repository ``` https://github.com/rubygems/rubygems/commit/4e2bfd1101
2022-01-05[rubygems/rubygems] Fix race conditon on JRubyDavid Rodríguez
On JRuby, sometimes we get the following error in CI when running a realworld test that checks that `gem install rails` succeeds: ``` ERROR: While executing gem ... (NoMethodError) undefined method `ignored=' for nil:NilClass /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/stub_specification.rb:193:in `to_spec' org/jruby/RubyArray.java:2642:in `map' /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/specification.rb:758:in `_all' /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/specification.rb:956:in `each' org/jruby/RubyEnumerable.java:1710:in `any?' /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/resolver/activation_request.rb:111:in `installed?' /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/request_set.rb:173:in `block in install' ``` I'm not sure how this error is happening, but I think there's no need to copy the `@ignored` instance variable when materializing stub specifications. This instance variable is used to not print a warning about missing extensions more than once for each gem upon gem activation, but as far as I can see, it's only used by methods that work on specification stubs. Once specifications are materialized, I think it can be safely ignored. https://github.com/rubygems/rubygems/commit/301cecd5a7
2021-12-27[rubygems/rubygems] Don't crash when updating to an unsupported ↵David Rodríguez
`rubygems-update` version https://github.com/rubygems/rubygems/commit/b0badcd00a
2021-12-24Merge RubyGems-3.3.2 and Bundler-2.3.2Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/5334
2021-12-23Merge RubyGems-3.3.1 and Bundler-2.3.1Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/5325
2021-12-21[rubygems/rubygems] Skip find_in_unresolved_tree test for TruffleRuby due to ↵Brandon Fish
longer runtime https://github.com/rubygems/rubygems/commit/36b8fbc508
2021-12-15Skip test_operating_system_customizing_default_dir for failing with rubyciHiroshi SHIBATA
2021-12-15[rubygems/rubygems] Pass `:bimode` explicitly to `File.open`David Rodríguez
The `File::BINARY` flag is apparently ignored due to a ruby bug, and thus writing can cause encoding issues. https://github.com/rubygems/rubygems/commit/db4efbebf2
2021-12-15[rubygems/rubygems] Extract a helper to temporarily modify internal encodingDavid Rodríguez
https://github.com/rubygems/rubygems/commit/93051fd2aa
2021-12-15[rubygems/rubygems] Unify duplicated helperDavid Rodríguez
https://github.com/rubygems/rubygems/commit/c6ef75424d
2021-12-15Skip s390x because Travis CI was failing with unknown reasonHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/5265
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-12-13Prepare for removing RubyVM::JIT (#5262)Takashi Kokubun
Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2021-12-10[rubygems/rubygems] Properly fetch Gem#latest_spec_for with multiple sourcesKevin Logan
https://github.com/rubygems/rubygems/commit/a93ec63df3
2021-12-09[rubygems/rubygems] Don't load system rubygems during testsDavid Rodríguez
Since tests are about testing our development copy of rubygems, not whatever is installed in the system. https://github.com/rubygems/rubygems/commit/f5e0b68cdd
2021-12-06[rubygems/rubygems] Allow using `Gem::Version` without loading the rest of ↵David Rodríguez
rubygems https://github.com/rubygems/rubygems/commit/1b862537a5
2021-12-06[rubygems/rubygems] Fix incorrect quotingDavid Rodríguez
Test was just returning a string instead of actually exercising the require. https://github.com/rubygems/rubygems/commit/62c827d7e1
2021-12-06[rubygems/rubygems] add login & logout for the signin & signout commands ↵Colby Swandale
respectively https://github.com/rubygems/rubygems/commit/49b491970b
2021-12-06[rubygems/rubygems] LOAD_PATH is already reset globallyDavid Rodríguez
https://github.com/rubygems/rubygems/commit/b0bbb27115
2021-12-06[rubygems/rubygems] Remove unneded setupDavid Rodríguez
https://github.com/rubygems/rubygems/commit/9815a04e31
2021-12-05[rubygems/rubygems] Don't write outside of destdir when regenerating pluginsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/141ef4cb9a
2021-12-05[rubygems/rubygems] Don't write outside of destdir when installing default ↵David Rodríguez
bundler https://github.com/rubygems/rubygems/commit/a62d00c5e8
2021-12-02[rubygems/rubygems] Provide distinguished name which will be correctly parsed.Vít Ondruch
It seems that since ruby openssl 2.1.0 [[1]], the distinguished name submitted to `OpenSSL::X509::Name.parse` is not correctly parsed if it does not contain the first slash: ~~~ $ ruby -v ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux] $ gem list | grep openssl openssl (default: 2.2.0) $ irb -r openssl irb(main):001:0> OpenSSL::X509::Name.parse("CN=nobody/DC=example").to_s(OpenSSL::X509::Name::ONELINE) => "CN = nobody/DC=example" irb(main):002:0> OpenSSL::X509::Name.parse("/CN=nobody/DC=example").to_s(OpenSSL::X509::Name::ONELINE) => "CN = nobody, DC = example" ~~~ Instead, use `OpenSSL::X509::Name.new` directly as suggested by upstream maintainer. [1]: https://github.com/ruby/openssl/commit/19c67cd10c57f3ab7b13966c36431ebc3fdd653b https://github.com/rubygems/rubygems/commit/09ca0c2dae Co-authored-by: Kazuki Yamaguchi <k@rhe.jp>
2021-12-01Merge rubygems master fd676ac464491afaa0baf5435cb11b3f86229cbdHiroshi SHIBATA
2021-11-30[rubygems/rubygems] Fix race condition when reading & writing gemspecs ↵David Rodríguez
concurrently When bundler parallel installer installs gems concurrently, one can get confusing warnings like the following: ``` "[/home/runner/work/rubygems/rubygems/bundler/tmp/2/gems/system/specifications/zeitwerk-2.4.2.gemspec] isn't a Gem::Specification (NilClass instead). ``` I've got these warnings several times in the past, but I never managed to reproduce them, and never look deeply into the root cause, but this time a got a cause that reproduced quite frequently, so I looked into it. The problem is one thread reading a gemspec while another thread is writing it. The write of the gemspec was not protected, so `Gem::Specification.load` could end up seeing a truncated gemspec and thus throw this warning. The fix involve two changes: * Change the methods that write gemspecs to use `Gem.binary_write` which is protected by a lock. * Fix `Gem.binary_write` to create the file lock at file creation time, not when the file already exists after. The realworld user problem caused by this issue happens in bundler, but I'm fixing it in rubygems first, and then I'll backport to bundler whatever needs backporting to fix the issue on the bundler side. https://github.com/rubygems/rubygems/commit/a672e7555c
2021-11-30[rubygems/rubygems] Revert "Remove spec file before building"David Rodríguez
This reverts commit af604436d8141c34cb2e1e645b9b0d47bfd55a55. The issue that led to introducing it was never reproduced. I tried to repro with this patch and it still works just fine. Since this removal is getting in the middle for some race conditions I'm facing, I'm reverting the patch. https://github.com/rubygems/rubygems/commit/2dd267f0e4
2021-11-30[rubygems/rubygems] Run hooks tests on gemspecs not already installedDavid Rodríguez
The current `setup_base_installer` ends up using the `quick_gem` helper, which leaves the created specification installed. Instead, make sure to use the `util_spec` helper, which does a similar thing but doesn't leave the specification installed. The idea is that tests do not rely on the installer removing existing gemspecs, bacause I plan to stop doing that. https://github.com/rubygems/rubygems/commit/843f1a0abc
2021-11-18[rubygems/rubygems] `Gem::Specification.reset` already clears loaded spec cacheDavid Rodríguez
Plus, that method is supposed to be private. https://github.com/rubygems/rubygems/commit/f8a01ddb9f
2021-11-16Merge the master branch of rubygems repoHiroshi SHIBATA
Picked from https://github.com/rubygems/rubygems/commit/4b498709a015a94e14a3852a1841a7a3e669133d
2021-11-09[rubygems/rubygems] Remove more unused stuff from make command parsingDavid Rodríguez
https://github.com/rubygems/rubygems/commit/eba7d173d4
2021-11-09[rubygems/rubygems] This method is never passed a blockDavid Rodríguez
https://github.com/rubygems/rubygems/commit/d79ade274b
2021-11-09[rubygems/rubygems] Fix assert_contains_make_command on make defined by ↵Jun Aruga
environment variable. The `parse_make_command_line` in `assert_contains_make_command` fails to get the make targets correctly, when the make command is set with make options by environment variable such as `export make='make -j2'` at lib/rubygems/ext/builder.rb::make. So, we include the make options (eg, -XX) as a part of the command to fix the case. Note that this commit still doesn't fix the case of `export make='make -j 2'`. https://github.com/rubygems/rubygems/commit/7730ef3fa0
2021-11-09[rubygems/rubygems] Improve error message when make command doesn't matchDavid Rodríguez
https://github.com/rubygems/rubygems/commit/8c2725e9a6
2021-11-05[rubygems/rubygems] Fix `ruby setup.rb` command when `--prefix` is passedDavid Rodríguez
https://github.com/rubygems/rubygems/commit/8d04092f6e
2021-11-05[rubygems/rubygems] Bin dir should fall inside destdirDavid Rodríguez
Since that's what happens in real life when `--destdir` is passed. https://github.com/rubygems/rubygems/commit/55637bdc8a
2021-11-05[rubygems/rubygems] Remove unnecessary test setupDavid Rodríguez
The method being unit tested here doesn't use `RbConfig::CONFIG["bindir"]`. https://github.com/rubygems/rubygems/commit/d3f092ad14
2021-11-05[rubygems/rubygems] Simplify `--destdir` testDavid Rodríguez
https://github.com/rubygems/rubygems/commit/0571fd1ec6
2021-11-05[rubygems/rubygems] Refactor setup tests to not always pass `--prefix`David Rodríguez
Standard usage should be tested by default. I will add a test for `--prefix` once I fix that option since it's not working correctly at the moment. https://github.com/rubygems/rubygems/commit/50a7e34586
2021-11-05[rubygems/rubygems] Don't apply `--destdir` twice when running `setup.rb`Alyssa Ross
Prior to this patch, if I ran: ruby setup.rb --destdir /foo Then Bundler files would be written into /foo/foo, because destdir was being prepended, even though `bundler_spec.bin_dir` already included destdir. https://github.com/rubygems/rubygems/commit/9e857ffb52
2021-11-04[rubygems/rubygems] Fix typosNobuyoshi Nakada
https://github.com/rubygems/rubygems/commit/f328ef6f77