summaryrefslogtreecommitdiff
path: root/test/rubygems
AgeCommit message (Collapse)Author
2022-04-29Prevent a "warning: `*' interpreted as argument prefix"Yusuke Endoh
2022-04-28Skip test for cargo builderHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/5669
2022-04-28Move testing_ruby_repo into test helperHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/5669
2022-04-28Merge ↵Hiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/3f7d0352e84b29d4a2d4cd93b31e5ebdb5f79cc6 Notes: Merged: https://github.com/ruby/ruby/pull/5669
2022-04-28[rubygems/rubygems] Original env is already set by common test setupDavid Rodríguez
https://github.com/rubygems/rubygems/commit/59449557dd Notes: Merged: https://github.com/ruby/ruby/pull/5669
2022-04-28[rubygems/rubygems] Fix test errors when `cargo` not presentDavid Rodríguez
Currently our tests try to detect whether `cargo` is installed or not, and if not, set tests that need `cargo` as pending. However, when this happens that test `setup` method is completely skipped, meaning that the `teardown` method will blow up when trying to switch back to the original folder, since it was not set. This commit fixes that. https://github.com/rubygems/rubygems/commit/1e4c1e6492 Notes: Merged: https://github.com/ruby/ruby/pull/5669
2022-04-28Merge rubygems master 1e4eda741d732ca1bd7031aef0a16c7348adf7a5Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/5669
2022-04-28[rubygems/rubygems] Add missing `open3` requiresDavid Rodríguez
https://github.com/rubygems/rubygems/commit/06ad654120 Notes: Merged: https://github.com/ruby/ruby/pull/5669
2022-04-28Merge RubyGems/Bundler masterHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/fe96fb6e2ac5a8b6df5e852470d11fa854301eca Notes: Merged: https://github.com/ruby/ruby/pull/5669
2022-04-19Github -> GitHubTim Smith
Fix the case of GitHub in various places Signed-off-by: Tim Smith <tsmith@mondoo.com> Notes: Merged: https://github.com/ruby/ruby/pull/5817
2022-04-16[rubygems/rubygems] Fix test issues surfaced using a stricter behavior of ↵David Rodríguez
`FileUtils` We were trying to remove directories using `FileUtils.rm_f` which is unexpected and does not remove anything. Changing to `FileUtils.rm_rf` actually removes the directories properly. That itself showed other issues: * One test was actually removing the gem package it was about to install, since it was living in the cache folder. To fix that, avoid removing the cache folder, and only make sure the other directories are created automatically, which seems enough. * Another test was actually removing an incorrect directory. Change it to remove the right one (the one that's asserted later to have been created). https://github.com/rubygems/rubygems/commit/5538e7ff20
2022-04-07[rubygems/rubygems] Set `@tempdir` as early as possibleDavid Rodríguez
We have seen some errors during test `setup` before `@tempdir` is actually set, in particular, when instantiating `Gem::MockUI` which in turn requires `stringio`. In this case, the `teardown` method will also produce an error because it tries to remove the `@tempdir`, which has not been set, so tries to remove a `nil` directory. It results in a confusing error like ``` <internal:D:/a/rubygems/rubygems/lib/rubygems/core_ext/kernel_require.rb>:85:in `require': Interrupt Error: test_bump_one_level(TestGemVersion): TypeError: no implicit conversion of nil into String C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/3.1.0/fileutils.rb:1570:in `path' from <internal:D:/a/rubygems/rubygems/lib/rubygems/core_ext/kernel_require.rb>:85:in `require' C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/3.1.0/fileutils.rb:1570:in `block in fu_list' from D:/a/rubygems/rubygems/lib/rubygems/mock_gem_ui.rb:43:in `initialize' C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/3.1.0/fileutils.rb:1570:in `map' from D:/a/rubygems/rubygems/test/rubygems/helper.rb:323:in `new' C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/3.1.0/fileutils.rb:1570:in `fu_list' from D:/a/rubygems/rubygems/test/rubygems/helper.rb:323:in `setup' C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/3.1.0/fileutils.rb:616:in `rm_r' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/fixture.rb:284:in `run_fixture_callback' C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/3.1.0/fileutils.rb:638:in `rm_rf' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/fixture.rb:272:in `block in create_fixtures_runner' D:/a/rubygems/rubygems/test/rubygems/helper.rb:462:in `teardown' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/fixture.rb:276:in `block in create_fixtures_runner' =============================================================================== from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/fixture.rb:257:in `run_fixture' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/fixture.rb:292:in `run_setup' Finished in 683.0312862 seconds. from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testcase.rb:564:in `block in run' ------------------------------------------------------------------------------- from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testcase.rb:563:in `catch' 2185 tests, 5929 assertions, 0 failures, 1 errors, 28 pendings, 0 omissions, 0 notifications from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testcase.rb:563:in `run' 98.7185% passed from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testsuite.rb:124:in `run_test' ------------------------------------------------------------------------------- from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testsuite.rb:53:in `run' 3.20 tests/s, 8.68 assertions/sTerminate batch job (Y/N)? from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testsuite.rb:124:in `run_test' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testsuite.rb:53:in `run' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testsuite.rb:124:in `run_test' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testsuite.rb:53:in `run' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunnermediator.rb:67:in `run_suite' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunnermediator.rb:45:in `block (2 levels) in run' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunnermediator.rb:102:in `with_listener' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunnermediator.rb:41:in `block in run' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunnermediator.rb:39:in `catch' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunnermediator.rb:39:in `run' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunner.rb:40:in `start_mediator' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunner.rb:25:in `start' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunnerutilities.rb:24:in `run' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/autorunner.rb:458:in `block in run' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/autorunner.rb:514:in `change_work_directory' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/autorunner.rb:457:in `run' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/autorunner.rb:66:in `run' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit.rb:518:in `block (2 levels) in <top (required)>' rake aborted! Interrupt: ``` The should make this same error much cleaner if it happens again. https://github.com/rubygems/rubygems/commit/fa649d22e8
2022-04-06[rubygems/rubygems] Use `ask_yes_no`Ashley Ellis Pierce
https://github.com/rubygems/rubygems/commit/1d38e167fa
2022-04-06[rubygems/rubygems] Use YAMLAshley Ellis Pierce
https://github.com/rubygems/rubygems/commit/6122e8cac5
2022-04-06[rubygems/rubygems] Accomodate gem hosts without profile/me endpointAshley Ellis Pierce
https://github.com/rubygems/rubygems/commit/31b6dcf5d3
2022-04-06[rubygems/rubygems] Update endpointAshley Ellis Pierce
https://github.com/rubygems/rubygems/commit/a5a7b3ec96
2022-04-06[rubygems/rubygems] Fix lintAshley Ellis Pierce
https://github.com/rubygems/rubygems/commit/a68bfde18e
2022-04-06[rubygems/rubygems] Make mfa the defaultAshley Ellis Pierce
https://github.com/rubygems/rubygems/commit/0b636f6902
2022-04-06[rubygems/rubygems] Correct mfa level nameAshley Ellis Pierce
https://github.com/rubygems/rubygems/commit/a002e351ae
2022-04-06[rubygems/rubygems] Enable mfa on specific keys during gem signinAshley Ellis Pierce
https://github.com/rubygems/rubygems/commit/e787f7f655
2022-03-24[rubygems/rubygems] Avoid crash in test teardownDavid Rodríguez
If an exception happens during test `setup` method, the `teardown` method will still be run for cleaning up, but if some other errors occurs then, it will hide the original error. This is happening sometimes in CI where restoring original gem hooks is failing because the error in `setup` happened before the variable holding the original hooks was initialized. This commit moves initialization of `@orig_hooks` to the beginning of the `setup` method to avoid this issue. https://github.com/rubygems/rubygems/commit/8524d2b74d
2022-02-22[rubygems/rubygems] Resolve cleaned-up error with temporary gemhomeHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/623162ad2b
2022-02-01Restore workaround for test_rubygems.rb, It still fails with chkbuild ↵Hiroshi SHIBATA
encironment
2022-02-01Sync latest Bundler & RubyGemsDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/5512
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