Commit graph

64552 commits

Author SHA1 Message Date
Frank Lam
0ba2f3e8a9 [rubygems/rubygems] Move already configured --ci hint to before CI file creation
2af2abe5fd
2020-06-18 19:14:15 +09:00
Frank Lam
091daaa715 [rubygems/rubygems] Lower verboseness of user-facing text for bundle gem
288f073c3c
2020-06-18 19:14:15 +09:00
Frank Lam
fedd3201f3 [rubygems/rubygems] Fix --ci flag manpage documentation
515effe8de
2020-06-18 19:14:15 +09:00
Frank Lam
a476d67f35 [rubygems/rubygems] Rebuild man pages for bundle gem
b5a9cec1be
2020-06-18 19:14:15 +09:00
Frank Lam
8e3136a03b [rubygems/rubygems] Make test framework/CI configuration for bundle gem consistent
* Add hints for --ci option

5f779f45b0
2020-06-18 19:14:15 +09:00
Frank Lam
a80a5706b1 [rubygems/rubygems] Remove extra whitespace
9986cd01fc
2020-06-18 19:14:15 +09:00
Frank Lam
27e07cd34f [rubygems/rubygems] Set CI global config to false in gem_helper_spec
39b18fe7fc
2020-06-18 19:14:15 +09:00
Frank Lam
760edb3743 [rubygems/rubygems] Fix CI spec typo
Co-authored-by: Olle Jonsson <olle.jonsson@gmail.com>
24f3739585
2020-06-18 19:14:15 +09:00
Frank Lam
52a900773e [rubygems/rubygems] Incorporate naming/grammar suggestions from olleolleolle
80571452ca
2020-06-18 19:14:15 +09:00
Frank Lam
e6479ac3f6 [rubygems/rubygems] Move CI specs below test framework specs
d8e416d89b
2020-06-18 19:14:15 +09:00
Frank Lam
0d3c185b59 [rubygems/rubygems] Remove shared examples for present test framework
* `bundle gem` has new option to select CI provider

320f3546c1
2020-06-18 19:14:15 +09:00
Frank Lam
25ac5b3606 [rubygems/rubygems] Separate CI and test framework shared examples
* `bundle gem` has new option to choose CI provider other than Travis CI

afaecf16de
2020-06-18 19:14:15 +09:00
Frank Lam
b46895aa93 [rubygems/rubygems] Extract shared example for absence of CI files
22cb599bcc
2020-06-18 19:14:15 +09:00
Andre Arko
3a2016b994 [rubygems/rubygems] minor language tweaks, small code refactor
84e9f3711c
2020-06-18 19:14:15 +09:00
Colby Swandale
6f9faa66fa [rubygems/rubygems] update question text
f14c8a5ec2
2020-06-18 19:14:15 +09:00
Hiroshi SHIBATA
cc059b16b2 Manually cherry-picked at 80260b3496 2020-06-18 19:14:15 +09:00
David Rodríguez
9be1baedbc [rubygems/rubygems] Remove unnecessary bundle install
These specs doesn't really need an installed bundle, they only need a
`Gemfile`.

06c85683ae
2020-06-18 19:14:15 +09:00
David Rodríguez
61b6f53337 [rubygems/rubygems] Make helpers raise by default
ade0c441d5
2020-06-18 19:14:15 +09:00
David Rodríguez
529a9e8a1f [rubygems/rubygems] Fix a couple of specs that were loading an incorrect bundler
We have a check on an `at_exit` hook that checks that system bundler is
never loaded instead of our development copy. The check was failing in
these cases, but in a silent way because the errors were being swallowed.

This commit changes these specs to make sure they load the right
bundler.

cd1c1bc297
2020-06-18 19:14:15 +09:00
David Rodríguez
5d78fb1c9a [rubygems/rubygems] Change spec to do the right thing on bundler 3
On bundler 3, the `--deployment` flag doesn't exist, so the `bundle
install --deployment` command was failing silently and the spec was
verifying a different scenario.

Change the spec to work the same regardless of bundler's major version.

Also, from the spec description it was not apparently that a specific
case involving deployment mode was being tested, so I reworded it to
make it more apparent.

3e33e2b927
2020-06-18 19:14:15 +09:00
David Rodríguez
974c40c842 [rubygems/rubygems] Fix some sudo specs to do the right thing on bundler 3
On bundler 3, where the default install path is `.bundle`, these specs
were trying to change permissions of the
`.bundle/ruby/<ruby_abi_version>` folder, which didn't exist yet,so the
permission changing command was failing and the spec was not testing the
right thing.

Change the specs so that the permissions are correctly changed, by first
configuring the local path to be `.bundle` (which creates the `.bundle`
folder), and then changing permissions of the `.bundle` folder
explicitly, which exists already.

2833162fb0
2020-06-18 19:14:15 +09:00
David Rodríguez
5454415750 [rubygems/rubygems] Fix spec to test the right thing on bundler 3
Bundler 3 installs by default to `.bundle`. That means that, because the
`bar` gem was not previously available at this location but as a system
gem, the initial `bundle install` was silently failing. As a
consequence, the spec was not testing the exact scenario it meant to
test.

202399521c
2020-06-18 19:14:15 +09:00
David Rodríguez
9939f4ad43 [rubygems/rubygems] Remove bad bundle install
This spec is specifically testing for the case where there's no
`Gemfile.lock` file and it's only doing the expected thing because the
`bundle install` command is silently failing. Remove the `bundle
install` to reduce confusion.

ec39fbde0e
2020-06-18 19:14:15 +09:00
David Rodríguez
8d7ed194cb [rubygems/rubygems] Simplify bundle update --ruby specs
They don't need to run that many commands, and the new version is also
more readable in my opinion.

efff3e3210
2020-06-18 19:14:15 +09:00
David Rodríguez
66b327af56 [rubygems/rubygems] Fix redundant commands
They are preceded by `install_gemfile` calls, which mean `bundle
install` is being run twice for no reason.

d2b2d10862
2020-06-18 19:14:15 +09:00
David Rodríguez
cceb77f57b [rubygems/rubygems] Fix unintended Gemfile installation
This command is failing because of the same reason that the subsequent
`bundle exec` is failing: the gemspec is invalid. The `bundle install`
here deviates the `bundle exec` focus from the test and is unnecessary:
all we need is a `Gemfile` that will trigger the `bundle exec`, so let's
create and avoid the extra command.

eb83cf6cf1
2020-06-18 19:14:15 +09:00
David Rodríguez
6aafea2d99 [rubygems/rubygems] Remove failing command that doesn't affect the spec
This command was silently failing but doesn't really affect the outcome
of the spec.

7880d08146
2020-06-18 19:14:15 +09:00
David Rodríguez
a8f9a97d49 [rubygems/rubygems] Remove broken test
It turns out that this test is checking essentially nothing useful. The
paperclip gem doesn't exist in our setup, so initial install is failing
and the test is only checking that calling `bundle check` 3 times on a
broken setup always returns the same thing.

I went to the history of this test:

* 105654a31e
* ae53be1f87
* d19f4a7b32
* 092f169d01
* 36878435b5

And have finally decided to remove it since I'm not sure changing it to
something else will lead to testing something useful and not already
tested.

6184322967
2020-06-18 19:14:15 +09:00
David Rodríguez
acd82bd923 [rubygems/rubygems] Fix silently broken spec
This spec was broken. The second `bundle install` was silently failing.
This means that the spec was actually checking an scenario completely
different from the one that was supposed to be tested. And also a very
dummy one: that running `bundle cache` twice doesn't cache a completely
unrelated gem.

f11a5d2df9
2020-06-18 19:14:15 +09:00
David Rodríguez
b0f07aff0b [rubygems/rubygems] Remove incorrect tags
The inner specs have separated specs for the `< 3` and `= 2` cases, so
this outer tag is incorrect.

61e905ca27
2020-06-18 19:14:15 +09:00
David Rodríguez
8c686475c8 [rubygems/rubygems] Migrate some specs to use "the new way"
The commands these specs run were throwing warnings in bundler 2, and
failing on bundler 3, effectively testing a different scenario to what
they were supposed to.

97ac1ced49
2020-06-18 19:14:15 +09:00
David Rodríguez
94fc709dd1 [rubygems/rubygems] s/rails_fail/rails_pinned_to_old_activesupport/
The `rails_fail` name is misleading because there's no specific reason
why such a gem would need to fail. As a matter of fact, `bundle
install`'ing a Genfile with only that dependency like the spec the
previous commit adds is not expected to fail.

b947f40701
2020-06-18 19:14:15 +09:00
David Rodríguez
f8f3f11ed5 [rubygems/rubygems] Fix only_update_to_newer_versions regression
The `only_update_to_newer_versions` feature flag will enable some new
behaviour in bundler 3 (or maybe earlier if we decide to consider it a
bug fix) that prevents `bundle update` from unexpectedly downgrading
direct dependencies.

This seems reasonable, but the current implementation is adding
additional requirements for all locked dependencies, not only from the
ones in the `Gemfile`. That causes some situations where the `Gemfile`
is edited and will resolve to older versions to start failing.

This commit fixes the problem by making sure extra requirements are
added exclusively for direct dependencies in the `Gemfile`, not for all
direct dependencies in the lock file.

128b4596e1
2020-06-18 19:14:15 +09:00
Nobuyoshi Nakada
a447563cf8
[DOC] Added Exception.exception to Exception.new [ci skip] 2020-06-18 11:36:21 +09:00
Nobuyoshi Nakada
cf1ee151b1
Read in ASCII-8BIT to get rid of invalid encoding error 2020-06-18 11:36:21 +09:00
Yusuke Endoh
5755397064 test/webrick/test_filehandler.rb: implicitly fall back to UTF-8
33588714/job/hcgin7xo3sarr0r2
```
  2) Failure:
WEBrick::TestFileHandler#test_cjk_in_path
[D:/a/ruby/ruby/src/test/webrick/utils.rb:72]:
exceptions on 1 threads:
U+3042 to WINDOWS-1252 in conversion from UTF-8 to WINDOWS-1252
```
2020-06-18 10:18:32 +09:00
Yusuke Endoh
82354afbf9 test/webrick/test_filehandler.rb: remove unused variable 2020-06-18 09:40:44 +09:00
Yusuke Endoh
bed17974a1 test/webrick/test_filehandler.rb: no .encode("filesystem") if US-ASCII
http://ci.rvm.jp/logfiles/brlog.trunk-theap-asserts.20200618-002305
```
I, [2020-06-18T00:28:11.661066 #31625]  INFO -- :   1) Failure:
I, [2020-06-18T00:28:11.661157 #31625]  INFO -- : WEBrick::TestFileHandler#test_cjk_in_path [/tmp/ruby/v3/src/trunk-theap-asserts/test/webrick/utils.rb:72]:
I, [2020-06-18T00:28:11.661216 #31625]  INFO -- : exceptions on 1 threads:
I, [2020-06-18T00:28:11.661269 #31625]  INFO -- : U+3042 from UTF-8 to US-ASCII
```
2020-06-18 09:37:54 +09:00
Yusuke Endoh
35a6741816 Revert "[DOC] Added Exception.exception to Exception.new [ci skip]"
This reverts commit 957825639c.

Do not use [ci skip]!!!!
2020-06-18 09:19:43 +09:00
Yusuke Endoh
2d817e0564 test/webrick/test_filehandler.rb: Second try to fix the CI error
93e6fa1d31 failed to fix the issue.
I suspect that the request path must be encoded as filesystem encoding.
2020-06-18 09:14:13 +09:00
Nobuyoshi Nakada
957825639c
[DOC] Added Exception.exception to Exception.new [ci skip] 2020-06-18 09:00:34 +09:00
Nobuyoshi Nakada
e14cba354c
[DOC] argument to Exception#excepton is optional [ci skip] 2020-06-18 08:59:47 +09:00
Nobuyoshi Nakada
cc46d514dc
$(PREP) is needed to run $(MINIRUBY) 2020-06-18 01:42:12 +09:00
git
41a4c80d28 * 2020-06-18 [ci skip] 2020-06-18 01:16:21 +09:00
Takashi Kokubun
e544a3a23c
Remove obsoleted opt_call_c_function insn (#3232)
* Remove obsoleted opt_call_c_function insn

* Keep opt_call_c_function with DEFINE_INSN_IF
2020-06-17 09:16:01 -07:00
Yusuke Endoh
e30ff63fd4 test/rubygems/test_gem_package.rb: Skip a test when TMPDIR is too long
to suppress the following failure:

20200617T130007Z.fail.html.gz
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
David Rodríguez
e0337ce597 Remove unnecessary explicit rake activation 2020-06-17 21:16:56 +09:00