summaryrefslogtreecommitdiff
path: root/test/rubygems
AgeCommit message (Collapse)Author
2020-08-29Revert changes to rdoc & rubygems regarding Tempfile.open(&block)Benoit Daloze
* They likely want to support older Ruby/tempfile versions * Reverts part of e8c3872555fc85640505974e6b1c39d315572689
2020-08-29Simplify Tempfile.open calls with a block as they now unlink the file ↵Benoit Daloze
automatically
2020-07-31[rubygems/rubygems] Enable `Layout/LeadingEmptyLines` in rubygemsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/9c17f220af Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31[rubygems/rubygems] Fix some intermittent test failures on trufflerubyDavid Rodríguez
Since they changed their default to not generate documentation on `gem install`, we're getting some intermittent test failures. Can be reproduced with: ``` TRUFFLERUBYOPT="--experimental-options --testing-rubygems" TESTOPTS=--name="/^\(?:TestGemGemRunner#\(?:test_list_succeeds\)\|TestGemCommandsUpdateCommand#\(?:test_handle_options_system\)\)$/ --seed=54277 --verbose" rake ``` Fix it by resetting all permanent CLI options when CLI runner loads configuration. https://github.com/rubygems/rubygems/commit/7d896f4b74 Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31[rubygems/rubygems] Setup no longer generates formatted executables by defaultDavid Rodríguez
Catch up with that change in `gem update --system` tests. https://github.com/rubygems/rubygems/commit/127ba14344 Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31[rubygems/rubygems] Let more exceptions flowDavid Rodríguez
If any error happens while verifying a package entry, it doesn't mean that the package is corrupt. It could be a bug in rubygems, for example. This in fact happened in CI and the current error doesn't make it easy to troubleshoot the root cause, since it doesn't provide a backtrace. See https://github.com/rubygems/rubygems/pull/3807/checks?check_run_id=862526615. So I propose to let the exception happens. There was something useful about the previous message, which is the file entry where the error happened, so I'm keeping that information in a warning message. https://github.com/rubygems/rubygems/commit/ece87d858f Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31[rubygems/rubygems] Install plugins to user directoryNobuyoshi Nakada
Fixes the `Gem::FilePermissionError` without the privilege. Initialize `@plugins_dir` to the user gem directory, when installing with `--user` option. https://github.com/rubygems/rubygems/commit/21a71ac769 Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31[rubygems/rubygems] Fix skip messageDavid Rodríguez
https://github.com/rubygems/rubygems/commit/a763e539cd Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31[rubygems/rubygems] Make sure tests at least load without opensslDavid Rodríguez
https://github.com/rubygems/rubygems/commit/054d57f74b Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31[rubygems/rubygems] Set the expected hash in one stepDavid Rodríguez
https://github.com/rubygems/rubygems/commit/25912ce6c9 Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31[rubygems/rubygems] Remove unnecessary checkDavid Rodríguez
No check is done for the other expectation and they are completely symmetric as far as I can see. https://github.com/rubygems/rubygems/commit/4de89e0718 Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31[rubygems/rubygems] https functionality was merged into `net/https`David Rodríguez
https://github.com/rubygems/rubygems/commit/d81ce9e457 Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31[rubygems/rubygems] Run `test/rubygems/test_bundled_ca.rb` locallyDavid Rodríguez
It's not that slow. https://github.com/rubygems/rubygems/commit/9b928a4503 Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31[rubygems/rubygems] Remove unused TEST_SSL environment variableDavid Rodríguez
https://github.com/rubygems/rubygems/commit/1e2c3cf118 Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31[rubygems/rubygems] Fix encoding mismatch errors on MinGWNobuyoshi Nakada
GNU make in MSys is localized to use UTF-8 while Ruby's filesystem encoding is set to OEM CodePage (e.g., CP932 in Japanese Edition), the read output from the make has broken encoding and results in "invalid byte sequence" errors. As `DESTDIR` is set to a US-ASCII 7bit clean string, matching as binary encoding should have no problems. https://github.com/rubygems/rubygems/commit/96a5e7523b Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31[rubygems/rubygems] Reword warningbronzdoc
https://github.com/rubygems/rubygems/commit/cbd4abf8cf Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31[rubygems/rubygems] Warn on duplicate dependency in a specificationbronzdoc
https://github.com/rubygems/rubygems/commit/af3e5f7883 Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31[rubygems/rubygems] Support PATH's using `File::ALT_SEPARATOR` in ↵David Rodríguez
`Gem::Installer` Co-authored-by: MSP-Greg <MSP-Greg@users.noreply.github.com> https://github.com/rubygems/rubygems/commit/710b969b60 Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31[rubygems/rubygems] Prefer the standard separator on WindowsDavid Rodríguez
It seems like the most common case since it requires no tricks on our CI environment. Co-authored-by: MSP-Greg <MSP-Greg@users.noreply.github.com> https://github.com/rubygems/rubygems/commit/751c475574 Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31[rubygems/rubygems] Deduplicate the requirement operators in memoryJean Boussier
https://github.com/rubygems/rubygems/commit/9963d33cf2 Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31Stop using deprecated OpenSSL::Digest constantsBart de Water
Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31Enforce no empty lines around class body in rubygemsDavid Rodríguez
To normalize the code style with `bundler`. Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-15rubygems is needed to run solo-file testKoichi Sasada
2020-06-17test/rubygems/test_gem_package.rb: Skip a test when TMPDIR is too longYusuke Endoh
to suppress the following failure: https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris11-gcc/ruby-master/log/20200617T130007Z.fail.html.gz https://rubyci.org/logs/rubyci.s3.amazonaws.com/android29-x86_64/ruby-master/log/20200617T131443Z.fail.html.gz ``` 1) Failure: TestGemPackage#test_extract_symlink_parent_doesnt_delete_user_dir [/export/home/chkbuild/chkbuild-gcc/tmp/build/20200617T130007Z/ruby/test/rubygems/test_gem_package.rb:620]: --- expected +++ actual @@ -1 +1 @@ -"installing into parent path /export/home/chkbuild/chkbuild-gcc/tmp/build/20200617T130007Z/ruby/tmp/test_rubygems_15916/extract/user/dir of /export/home/chkbuild/chkbuild-gcc/tmp/build/20200617T130007Z/ruby/tmp/test_rubygems_15916/extract/subdir is not allowed" +"installing into parent path link/dir of /export/home/chkbuild/chkbuild-gcc/tmp/build/20200617T130007Z/ruby/tmp/test_rubygems_15916/extract/subdir is not allowed" ``` These CI environments use very long TMPDIR for some reason. The test case creates a directory in TMPDIR and attempts to add a symbolic link to the path into a tarball. However, tar format limits the maximum length up to 99, so the path is truncated. This truncation makes the path check of `Gem::Package#install_location` pass through, and then the check of `#mkdir_p_safe` raises an error. The error message is slightly different from the expected value, so the test fails. I'm unsure what to do, so I tentatively skip the test when TMPDIR is long. I'll create a ticket into rubygems bug tracker.
2020-06-17Speed up setup test by not installing docsDavid Rodríguez
This also makes this test consistent with the other tests in this file. Notes: Merged: https://github.com/ruby/ruby/pull/3213
2020-06-17Skip `test_gem_package_task` if `rake` not presentDavid Rodríguez
Instead of erroring. Notes: Merged: https://github.com/ruby/ruby/pull/3213
2020-06-17Simplify handling of a `LoadError`David Rodríguez
The `LoadError` has a `path` reader in all supported rubies. Notes: Merged: https://github.com/ruby/ruby/pull/3213
2020-06-15Exit with non-zero status on disabled gem system update.Josef Šimánek
Notes: Merged: https://github.com/ruby/ruby/pull/3229
2020-06-15Add Gem.disable_system_update_message to disable gem update --system if needed.Josef Šimánek
Notes: Merged: https://github.com/ruby/ruby/pull/3229
2020-06-15Remove encoding magic commentsDavid Rodríguez
They are no longer needed since ruby 2.0. Notes: Merged: https://github.com/ruby/ruby/pull/3229
2020-06-15Deprecate `Gem::Util.silent_system`David Rodríguez
There's better tools for this job. Notes: Merged: https://github.com/ruby/ruby/pull/3229
2020-06-15Replace `Gem::Util.silent_system` with better toolsDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/3229
2020-06-15Use space inside block braces everywhereDavid Rodríguez
To make rubygems code style consistent with bundler. Notes: Merged: https://github.com/ruby/ruby/pull/3229
2020-06-15Revert "Revert "[rubygems/rubygems] Remove unneeded global teardown""David Rodríguez
This reverts commit ac2c07e98373bb62be618001c897fa9d5809d8a4. Notes: Merged: https://github.com/ruby/ruby/pull/3211
2020-06-15Revert "Revert "[rubygems/rubygems] Remove unneeded teardown""David Rodríguez
This reverts commit ceacb06311cf150cd3682b277bbe6cf7e7bbbc30. Notes: Merged: https://github.com/ruby/ruby/pull/3211
2020-06-10[rubygems/rubygems] Use parenthesis for clarity for ternary conditionBenoit Daloze
https://github.com/rubygems/rubygems/commit/d1247472b9
2020-06-10[rubygems/rubygems] Increase timeouts in test_gem_stream_ui.rbBenoit Daloze
* 0.1s is really short and fails in CI: #3622 https://github.com/rubygems/rubygems/commit/d8495ae1c1
2020-06-05Skip tests which do not work until installed when load-relativeNobuyoshi Nakada
2020-06-05Show better failure messagesNobuyoshi Nakada
2020-06-05Enable `Style/MethodCallWithoutArgsParentheses` in rubygemsDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Use LoadError#path to figure out the argument passed to ↵Yuki Nishijima
'require' https://github.com/rubygems/rubygems/commit/5995394ec4 Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Modify `RakeFileUtils.verbose_flag` only when neededDavid Rodríguez
https://github.com/rubygems/rubygems/commit/d490309d75 Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Fix test warningsDavid Rodríguez
Since `rake package` started printing to stdout by default, we get these warnings printed when running rubygems tests: ``` $ rake Run options: --seed 6097 # Running: ...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................mkdir -p pkg mkdir -p pkg/pkgr-1.2.3 rm -f pkg/pkgr-1.2.3/x ln x pkg/pkgr-1.2.3/x rm -f pkg/pkgr-1.2.3/y ln y pkg/pkgr-1.2.3/y cd pkg/pkgr-1.2.3 cd - .... Finished in 50.578889s, 43.0812 runs/s, 134.8191 assertions/s. 2179 runs, 6819 assertions, 0 failures, 0 errors, 0 skips Coverage report generated for Unit Tests to /home/deivid/Code/rubygems/coverage. 8080 / 8978 LOC (90.0%) covered. ``` The reason is that, although these tests wrap the `Rake.application["package"].invoke` with a `capture_io` block, the rake application initialization happens outside of this block, and a copy of `$stdout` is saved in there, and that's where the task prints. So the `capture_io` `$stdout` and `$stderr` dance is not effective. To fix, we move the `Rake` application initialization inside the `capture_io` block. https://github.com/rubygems/rubygems/commit/7f6e2398a5 Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Only run optional validations in packaging contextsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/f4fe949dfa Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Respect files loaded from default gems before rubygemsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/f3da3c1190 Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Use a real file to run the testBenoit Daloze
* JRuby doesn't support multi-line -e. https://github.com/rubygems/rubygems/commit/1fb6657a7d Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Add a more comprehensive and reliable test for upgraded ↵Benoit Daloze
default gems * Test that the correct version is loaded and that the default gem is not loaded at all. https://github.com/rubygems/rubygems/commit/ee08508b2a Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Relax test to still check we're calling the expected RubyBenoit Daloze
* But not enforce that error looks like /full/path/to/ruby/bin/ruby: No such file or directory but instead allow truffleruby: No such file or directory A typical output for gem_make.out looks like: current directory: /.../rubygems/tmp/test_rubygems_112388/gemhome/gems/a-2 /.../ruby-2.6.6/bin/ruby -I /.../rubygems/lib -r ./siteconf20200422-112388-nyrcy0.rb extconf.rb '' /.../ruby-2.6.6/bin/ruby: No such file or directory -- extconf.rb (LoadError) https://github.com/rubygems/rubygems/commit/e6e08882cc Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Fix check for testing in the ruby repositoryBenoit Daloze
* When testing in the rubygems/rubygems repository, the previous code would move the lib/ dir at the end of $LOAD_PATH, which would cause to load a mix of lib/ RubyGems and in-stdlib-dir RubyGems, which blows up. https://github.com/rubygems/rubygems/commit/f6f6f00ed1 Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Clarify what ↵Benoit Daloze
test_activate_via_require_respects_loaded_files does and tests * Clearly require the benchmark stdlib instead of far away in test_case.rb https://github.com/rubygems/rubygems/commit/d74b9ca04c Notes: Merged: https://github.com/ruby/ruby/pull/3184