aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Manually merged from https://github.com/rubygems/rubygems/pull/2636"Hiroshi SHIBATA2020-09-23135-306/+0
| | | | | 31a6eaabc165d8a222e176f2c809d90622d88ec2 is obsoleted with https://github.com/rubygems/rubygems/pull/3820
* Manually merged from https://github.com/rubygems/rubygems/pull/2636Hiroshi SHIBATA2020-09-23135-0/+306
| | | | Enable Style/EmptyLinesAroundClassBody rubocop cop.
* Revert changes to rdoc & rubygems regarding Tempfile.open(&block)Benoit Daloze2020-08-293-7/+21
| | | | | * They likely want to support older Ruby/tempfile versions * Reverts part of e8c3872555fc85640505974e6b1c39d315572689
* Simplify Tempfile.open calls with a block as they now unlink the file ↵Benoit Daloze2020-08-293-21/+7
| | | | automatically
* [rubygems/rubygems] Enable `Layout/LeadingEmptyLines` in rubygemsDavid Rodríguez2020-07-311-1/+0
| | | | https://github.com/rubygems/rubygems/commit/9c17f220af
* [rubygems/rubygems] Fix some intermittent test failures on trufflerubyDavid Rodríguez2020-07-311-0/+2
| | | | | | | | | | | | | | | 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
* [rubygems/rubygems] Setup no longer generates formatted executables by defaultDavid Rodríguez2020-07-311-6/+4
| | | | | | Catch up with that change in `gem update --system` tests. https://github.com/rubygems/rubygems/commit/127ba14344
* [rubygems/rubygems] Let more exceptions flowDavid Rodríguez2020-07-311-3/+14
| | | | | | | | | | | | | | | | 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
* [rubygems/rubygems] Install plugins to user directoryNobuyoshi Nakada2020-07-311-0/+22
| | | | | | | | 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
* [rubygems/rubygems] Fix skip messageDavid Rodríguez2020-07-311-1/+1
| | | | https://github.com/rubygems/rubygems/commit/a763e539cd
* [rubygems/rubygems] Make sure tests at least load without opensslDavid Rodríguez2020-07-313-1/+12
| | | | https://github.com/rubygems/rubygems/commit/054d57f74b
* [rubygems/rubygems] Set the expected hash in one stepDavid Rodríguez2020-07-311-5/+4
| | | | https://github.com/rubygems/rubygems/commit/25912ce6c9
* [rubygems/rubygems] Remove unnecessary checkDavid Rodríguez2020-07-311-6/+4
| | | | | | | 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
* [rubygems/rubygems] https functionality was merged into `net/https`David Rodríguez2020-07-311-1/+1
| | | | https://github.com/rubygems/rubygems/commit/d81ce9e457
* [rubygems/rubygems] Run `test/rubygems/test_bundled_ca.rb` locallyDavid Rodríguez2020-07-311-36/+34
| | | | | | It's not that slow. https://github.com/rubygems/rubygems/commit/9b928a4503
* [rubygems/rubygems] Remove unused TEST_SSL environment variableDavid Rodríguez2020-07-311-1/+1
| | | | https://github.com/rubygems/rubygems/commit/1e2c3cf118
* [rubygems/rubygems] Fix encoding mismatch errors on MinGWNobuyoshi Nakada2020-07-311-2/+2
| | | | | | | | | | | 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
* [rubygems/rubygems] Reword warningbronzdoc2020-07-311-1/+1
| | | | https://github.com/rubygems/rubygems/commit/cbd4abf8cf
* [rubygems/rubygems] Warn on duplicate dependency in a specificationbronzdoc2020-07-311-0/+7
| | | | https://github.com/rubygems/rubygems/commit/af3e5f7883
* [rubygems/rubygems] Support PATH's using `File::ALT_SEPARATOR` in ↵David Rodríguez2020-07-311-0/+10
| | | | | | | | `Gem::Installer` Co-authored-by: MSP-Greg <MSP-Greg@users.noreply.github.com> https://github.com/rubygems/rubygems/commit/710b969b60
* [rubygems/rubygems] Prefer the standard separator on WindowsDavid Rodríguez2020-07-311-2/+2
| | | | | | | | | 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
* [rubygems/rubygems] Deduplicate the requirement operators in memoryJean Boussier2020-07-311-0/+6
| | | | https://github.com/rubygems/rubygems/commit/9963d33cf2
* Stop using deprecated OpenSSL::Digest constantsBart de Water2020-07-314-12/+10
|
* Enforce no empty lines around class body in rubygemsDavid Rodríguez2020-07-31135-306/+0
| | | | To normalize the code style with `bundler`.
* rubygems is needed to run solo-file testKoichi Sasada2020-07-151-0/+1
|
* test/rubygems/test_gem_package.rb: Skip a test when TMPDIR is too longYusuke Endoh2020-06-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Speed up setup test by not installing docsDavid Rodríguez2020-06-171-0/+2
| | | | This also makes this test consistent with the other tests in this file.
* Skip `test_gem_package_task` if `rake` not presentDavid Rodríguez2020-06-171-2/+11
| | | | Instead of erroring.
* Simplify handling of a `LoadError`David Rodríguez2020-06-171-2/+1
| | | | The `LoadError` has a `path` reader in all supported rubies.
* Exit with non-zero status on disabled gem system update.Josef Šimánek2020-06-151-2/+4
|
* Add Gem.disable_system_update_message to disable gem update --system if needed.Josef Šimánek2020-06-151-0/+17
|
* Remove encoding magic commentsDavid Rodríguez2020-06-156-8/+0
| | | | They are no longer needed since ruby 2.0.
* Deprecate `Gem::Util.silent_system`David Rodríguez2020-06-151-2/+4
| | | | There's better tools for this job.
* Replace `Gem::Util.silent_system` with better toolsDavid Rodríguez2020-06-151-2/+3
|
* Use space inside block braces everywhereDavid Rodríguez2020-06-1534-239/+239
| | | | To make rubygems code style consistent with bundler.
* Revert "Revert "[rubygems/rubygems] Remove unneeded global teardown""David Rodríguez2020-06-1510-4/+28
| | | | This reverts commit ac2c07e98373bb62be618001c897fa9d5809d8a4.
* Revert "Revert "[rubygems/rubygems] Remove unneeded teardown""David Rodríguez2020-06-151-6/+0
| | | | This reverts commit ceacb06311cf150cd3682b277bbe6cf7e7bbbc30.
* [rubygems/rubygems] Use parenthesis for clarity for ternary conditionBenoit Daloze2020-06-101-1/+1
| | | | https://github.com/rubygems/rubygems/commit/d1247472b9
* [rubygems/rubygems] Increase timeouts in test_gem_stream_ui.rbBenoit Daloze2020-06-101-1/+3
| | | | | * 0.1s is really short and fails in CI: #3622 https://github.com/rubygems/rubygems/commit/d8495ae1c1
* Skip tests which do not work until installed when load-relativeNobuyoshi Nakada2020-06-051-0/+3
|
* Show better failure messagesNobuyoshi Nakada2020-06-051-4/+9
|
* Enable `Style/MethodCallWithoutArgsParentheses` in rubygemsDavid Rodríguez2020-06-051-1/+1
|
* [rubygems/rubygems] Use LoadError#path to figure out the argument passed to ↵Yuki Nishijima2020-06-051-0/+27
| | | | | | 'require' https://github.com/rubygems/rubygems/commit/5995394ec4
* [rubygems/rubygems] Modify `RakeFileUtils.verbose_flag` only when neededDavid Rodríguez2020-06-051-18/+3
| | | | https://github.com/rubygems/rubygems/commit/d490309d75
* [rubygems/rubygems] Fix test warningsDavid Rodríguez2020-06-051-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [rubygems/rubygems] Only run optional validations in packaging contextsDavid Rodríguez2020-06-051-0/+11
| | | | https://github.com/rubygems/rubygems/commit/f4fe949dfa
* [rubygems/rubygems] Respect files loaded from default gems before rubygemsDavid Rodríguez2020-06-051-0/+18
| | | | https://github.com/rubygems/rubygems/commit/f3da3c1190
* [rubygems/rubygems] Use a real file to run the testBenoit Daloze2020-06-051-2/+5
| | | | | | * JRuby doesn't support multi-line -e. https://github.com/rubygems/rubygems/commit/1fb6657a7d
* [rubygems/rubygems] Add a more comprehensive and reliable test for upgraded ↵Benoit Daloze2020-06-051-0/+22
| | | | | | | | | 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
* [rubygems/rubygems] Relax test to still check we're calling the expected RubyBenoit Daloze2020-06-051-5/+1
| | | | | | | | | | | | | | * 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