645 Commits

Author SHA1 Message Date
xndcn
ac3f80a58e [rubygems/rubygems] Add writable check for cache dir
Sometimes "install_dir/cache" directory is not writable although "install_dir" is writable.

https://github.com/rubygems/rubygems/commit/665221cb69
2020-09-28 14:54:22 +09:00
Ellen Marie Dash
e8274a7683 [rubygems/rubygems] Add test for "gem update --system --silent"
https://github.com/rubygems/rubygems/commit/c3fb0db930
2020-09-28 14:54:22 +09:00
David Rodríguez
c6bdf75049 Disallow downgrades to too old versions
Consider the version original included with each ruby as the minimum
supported version.
2020-09-28 14:54:22 +09:00
bronzdoc
be980dd9fa [rubygems/rubygems] Deprecate --dryrun
https://github.com/rubygems/rubygems/commit/1715610648
2020-09-28 14:54:22 +09:00
bronzdoc
b83787b1ce [rubygems/rubygems] Make --dry-run flag consistent across rubygems commands
https://github.com/rubygems/rubygems/commit/addc644cad
2020-09-28 14:54:22 +09:00
Nobuyoshi Nakada
0629e695e3 Added --platform option to build command 2020-09-28 14:54:22 +09:00
Hiroshi SHIBATA
b717f73402
Revert "Manually merged from https://github.com/rubygems/rubygems/pull/2636"
31a6eaabc165d8a222e176f2c809d90622d88ec2 is obsoleted with
  https://github.com/rubygems/rubygems/pull/3820
2020-09-23 22:01:44 +09:00
Hiroshi SHIBATA
31a6eaabc1
Manually merged from https://github.com/rubygems/rubygems/pull/2636
Enable Style/EmptyLinesAroundClassBody rubocop cop.
2020-09-23 21:02:56 +09:00
Benoit Daloze
d7492a0be8 Revert changes to rdoc & rubygems regarding Tempfile.open(&block)
* They likely want to support older Ruby/tempfile versions
* Reverts part of e8c3872555fc85640505974e6b1c39d315572689
2020-08-29 12:49:20 +02:00
Benoit Daloze
e8c3872555 Simplify Tempfile.open calls with a block as they now unlink the file automatically 2020-08-29 12:23:23 +02:00
David Rodríguez
cba805536e [rubygems/rubygems] Enable Layout/LeadingEmptyLines in rubygems
https://github.com/rubygems/rubygems/commit/9c17f220af
2020-07-31 21:07:19 +09:00
David Rodríguez
e6be06e4ef [rubygems/rubygems] Fix some intermittent test failures on truffleruby
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
2020-07-31 21:07:19 +09:00
David Rodríguez
a9b044e97b [rubygems/rubygems] Setup no longer generates formatted executables by default
Catch up with that change in `gem update --system` tests.

https://github.com/rubygems/rubygems/commit/127ba14344
2020-07-31 21:07:19 +09:00
David Rodríguez
3921ab8291 [rubygems/rubygems] Let more exceptions flow
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
2020-07-31 21:07:19 +09:00
Nobuyoshi Nakada
ebf008b9ae [rubygems/rubygems] Install plugins to user directory
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
2020-07-31 21:07:19 +09:00
David Rodríguez
6608bc77b6 [rubygems/rubygems] Fix skip message
https://github.com/rubygems/rubygems/commit/a763e539cd
2020-07-31 21:07:19 +09:00
David Rodríguez
e1494145d9 [rubygems/rubygems] Make sure tests at least load without openssl
https://github.com/rubygems/rubygems/commit/054d57f74b
2020-07-31 21:07:19 +09:00
David Rodríguez
779f1a9c69 [rubygems/rubygems] Set the expected hash in one step
https://github.com/rubygems/rubygems/commit/25912ce6c9
2020-07-31 21:07:19 +09:00
David Rodríguez
34527927e8 [rubygems/rubygems] Remove unnecessary check
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
2020-07-31 21:07:19 +09:00
David Rodríguez
07dc9691a8 [rubygems/rubygems] https functionality was merged into net/https
https://github.com/rubygems/rubygems/commit/d81ce9e457
2020-07-31 21:07:19 +09:00
David Rodríguez
d3efba0950 [rubygems/rubygems] Run test/rubygems/test_bundled_ca.rb locally
It's not that slow.

https://github.com/rubygems/rubygems/commit/9b928a4503
2020-07-31 21:07:19 +09:00
David Rodríguez
ed3794495d [rubygems/rubygems] Remove unused TEST_SSL environment variable
https://github.com/rubygems/rubygems/commit/1e2c3cf118
2020-07-31 21:07:19 +09:00
Nobuyoshi Nakada
db2047ebaf [rubygems/rubygems] Fix encoding mismatch errors on MinGW
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
2020-07-31 21:07:19 +09:00
bronzdoc
6c19b0ec6e [rubygems/rubygems] Reword warning
https://github.com/rubygems/rubygems/commit/cbd4abf8cf
2020-07-31 21:07:19 +09:00
bronzdoc
00bdac18cf [rubygems/rubygems] Warn on duplicate dependency in a specification
https://github.com/rubygems/rubygems/commit/af3e5f7883
2020-07-31 21:07:19 +09:00
David Rodríguez
985309ac38 [rubygems/rubygems] Support PATH's using File::ALT_SEPARATOR in Gem::Installer
Co-authored-by: MSP-Greg <MSP-Greg@users.noreply.github.com>

https://github.com/rubygems/rubygems/commit/710b969b60
2020-07-31 21:07:19 +09:00
David Rodríguez
c090c64b4f [rubygems/rubygems] Prefer the standard separator on Windows
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
2020-07-31 21:07:19 +09:00
Jean Boussier
561576367b [rubygems/rubygems] Deduplicate the requirement operators in memory
https://github.com/rubygems/rubygems/commit/9963d33cf2
2020-07-31 21:07:19 +09:00
Bart de Water
8161cf85ba Stop using deprecated OpenSSL::Digest constants 2020-07-31 21:07:19 +09:00
David Rodríguez
a89665b7b1 Enforce no empty lines around class body in rubygems
To normalize the code style with `bundler`.
2020-07-31 21:07:19 +09:00
Koichi Sasada
fc220b129d rubygems is needed to run solo-file test 2020-07-15 11:21:33 +09:00
Yusuke Endoh
e30ff63fd4 test/rubygems/test_gem_package.rb: Skip a test when TMPDIR is too long
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-17 23:28:51 +09:00
David Rodríguez
b1d74afd3a Speed up setup test by not installing docs
This also makes this test consistent with the other tests in this file.
2020-06-17 21:16:56 +09:00
David Rodríguez
3d8e0d8e50 Skip test_gem_package_task if rake not present
Instead of erroring.
2020-06-17 21:16:56 +09:00
David Rodríguez
967dba157c Simplify handling of a LoadError
The `LoadError` has a `path` reader in all supported rubies.
2020-06-17 21:16:56 +09:00
Josef Šimánek
7a571103f2 Exit with non-zero status on disabled gem system update. 2020-06-15 21:20:37 +09:00
Josef Šimánek
3ab1cfc325 Add Gem.disable_system_update_message to disable gem update --system if needed. 2020-06-15 21:20:37 +09:00
David Rodríguez
49c42b6012 Remove encoding magic comments
They are no longer needed since ruby 2.0.
2020-06-15 21:20:37 +09:00
David Rodríguez
2b4abcff90 Deprecate Gem::Util.silent_system
There's better tools for this job.
2020-06-15 21:20:37 +09:00
David Rodríguez
afce7eb39e Replace Gem::Util.silent_system with better tools 2020-06-15 21:20:37 +09:00
David Rodríguez
955f1837a1 Use space inside block braces everywhere
To make rubygems code style consistent with bundler.
2020-06-15 21:20:37 +09:00
David Rodríguez
c3ecd1cbd3 Revert "Revert "[rubygems/rubygems] Remove unneeded global teardown""
This reverts commit ac2c07e98373bb62be618001c897fa9d5809d8a4.
2020-06-15 19:48:25 +09:00
David Rodríguez
3a2628025e Revert "Revert "[rubygems/rubygems] Remove unneeded teardown""
This reverts commit ceacb06311cf150cd3682b277bbe6cf7e7bbbc30.
2020-06-15 19:48:25 +09:00
Benoit Daloze
998ccb0831 [rubygems/rubygems] Use parenthesis for clarity for ternary condition
https://github.com/rubygems/rubygems/commit/d1247472b9
2020-06-10 21:33:46 +09:00
Benoit Daloze
b62e9c912d [rubygems/rubygems] Increase timeouts in test_gem_stream_ui.rb
* 0.1s is really short and fails in CI: #3622
https://github.com/rubygems/rubygems/commit/d8495ae1c1
2020-06-10 21:33:14 +09:00
Nobuyoshi Nakada
449b62ba01
Skip tests which do not work until installed when load-relative 2020-06-05 10:20:38 +09:00
Nobuyoshi Nakada
073ff73972
Show better failure messages 2020-06-05 10:20:06 +09:00
David Rodríguez
cfcb52fbe3 Enable Style/MethodCallWithoutArgsParentheses in rubygems 2020-06-05 07:32:42 +09:00
Yuki Nishijima
77ba8a1d61 [rubygems/rubygems] Use LoadError#path to figure out the argument passed to 'require'
https://github.com/rubygems/rubygems/commit/5995394ec4
2020-06-05 07:32:42 +09:00
David Rodríguez
5bbddba20b [rubygems/rubygems] Modify RakeFileUtils.verbose_flag only when needed
https://github.com/rubygems/rubygems/commit/d490309d75
2020-06-05 07:32:42 +09:00