1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

97 commits

Author SHA1 Message Date
Josef Šimánek
0029e0948a
[rubygems/rubygems] Install stringio for standalone spec.
- previously it was required already by net/http, but it is not anymore using ruby-trunk
- 996d18a43f
- 364044e090 (diff-a1d29a94def02829fd4f9ba591199acf079e028f5a2002a77c363eb01212e112)

https://github.com/rubygems/rubygems/commit/be1779655a
2021-10-29 18:00:46 +09:00
David Rodriguez
f6d1909500
[rubygems/rubygems] Catch up with recent error message modification
https://github.com/rubygems/rubygems/commit/ae374c1f31
2021-10-25 20:48:51 +09:00
David Rodriguez
f7f85c1feb
[rubygems/rubygems] Manage global gem cache directly
Previously, it was maintained in sync with the standard cache. That was
less efficient, and it caused some error messages to point to non
existent files.

https://github.com/rubygems/rubygems/commit/931f8cb8a9
2021-10-25 20:48:51 +09:00
David Rodriguez
ad4e7308d2 [rubygems/rubygems] Make spec more realistic
The spec was just faking an installed gemspec without any installed gem
backing it up, resulting in `bundle install` claiming that the gem was
already installed when it was not.

https://github.com/rubygems/rubygems/commit/c35531d1c7
2021-10-13 16:21:41 +09:00
David Rodríguez
b857a87653 [rubygems/rubygems] Keep different code in custom branch in dummy repo
This doesn't affect the outcome of the test, but it makes the `git
commit` command inside `update_git` not fail because of not having
anything to commit.

https://github.com/rubygems/rubygems/commit/ad0160ed97
2021-10-09 08:04:59 +09:00
David Rodríguez
7116ec6199 [rubygems/rubygems] Requiring bundler/setup shouldn't try to hit the network
https://github.com/rubygems/rubygems/commit/06f5efce02
2021-08-31 19:06:14 +09:00
David Rodríguez
b17cdad2f8 [rubygems/rubygems] Remove redundant part of error message
It doesn't really add much, in my opinion. We want to be helpful, but
also concise when possible.

https://github.com/rubygems/rubygems/commit/9d56009cf7
2021-08-31 19:06:14 +09:00
David Rodríguez
f1c0729128 [rubygems/rubygems] Fix standalone generated script to deal with path sources
In the case of path sources, the path the source is pointing to should
be added directly to the `$LOAD_PATH` without any modifications.

https://github.com/rubygems/rubygems/commit/d3bba936f0

Co-authored-by: Daniel Niknam <mhmd.niknam@gmail.com>
2021-08-31 19:06:14 +09:00
David Rodríguez
7465b94f8a [rubygems/rubygems] Remove unnecessary ruby_version local variable
Under some case, this variable might not end up being used, in which
case running the script would print unused variable warnings.

https://github.com/rubygems/rubygems/commit/bf96030362
2021-08-31 19:06:14 +09:00
David Rodríguez
3aa087d533 [rubygems/rubygems] Remove unnecessary ruby_engine local variable
Under some case, this variable might not end up being used, in which
case running the script would print unused variable warnings.

https://github.com/rubygems/rubygems/commit/a2d6392ada
2021-08-31 19:06:14 +09:00
David Rodríguez
1d6551a02d [rubygems/rubygems] Remove unnecessary path local variable
We can use `__dir__` directly.

https://github.com/rubygems/rubygems/commit/0e6083ca94
2021-08-31 19:06:14 +09:00
David Rodríguez
c2f376bcc0 [rubygems/rubygems] Fix standalone install of default gems
Rubygems source replacement was broken.

https://github.com/rubygems/rubygems/commit/3549c122f6
2021-08-31 19:06:14 +09:00
David Rodríguez
570167eaa9 [rubygems/rubygems] Give a bundle install hint when bundle list fails
https://github.com/rubygems/rubygems/commit/98f5087e34
2021-08-31 19:06:14 +09:00
David Rodríguez
9a25a98c6b [rubygems/rubygems] Show all missing gems when using a bundle before installing it
Not only the first one that's missing.

This also allows us to simplify things.

https://github.com/rubygems/rubygems/commit/69718a9509
2021-08-31 19:06:14 +09:00
Daniel Niknam
2f9e0cf181
[rubygems/rubygems] Explicitly define a global source for tests
This is in preparation for deprecating source-less gemfiles.

https://github.com/rubygems/rubygems/commit/d6493fa3e2
2021-07-27 09:25:57 +09:00
David Rodríguez
6bcedabfdd
[rubygems/rubygems] Remove gem install hint when installing a gem fails
A fresh `gem install` might not reproduce the exact `bundle install`
environment that originally caused the error. It also makes it harder
for the user to troubleshoot the error since she needs to run a separate
command.

Instead, show the original error and backtrace directly.

https://github.com/rubygems/rubygems/commit/49c2abfec6
2021-07-27 09:25:55 +09:00
Hiroshi SHIBATA
896bbb9fad Merge RubyGems/Bundler master from 8459ebd6ad65ce3397233416dc64083ae7572bb9 2021-07-14 10:48:07 +09:00
Hiroshi SHIBATA
c082c6eb7c Sync RubyGems and Bundler with upstream 2021-07-07 15:31:52 +09:00
David Rodríguez
6e2240a2f9 Sync latest bundler & rubygems development version 2021-07-07 13:30:20 +09:00
David Rodríguez
5b0abba931 Sync bundler & rubygems 2021-05-11 11:29:41 +09:00
Hiroshi SHIBATA
ed149dbf46 Merge the master branch of Bundler 2021-04-15 15:36:15 +09:00
David Rodríguez
53468cc111 Sync latest development version of bundler & rubygems 2021-03-08 13:47:35 +09:00
Hiroshi SHIBATA
69ed64949b Track Bundler master(2.3.0.dev) branch at 55634a8af18a52df86c4275d70fa1179118bcc20 2021-01-04 13:14:43 +09:00
Hiroshi SHIBATA
339227363c Merge RubyGems 3.2.3 and Bundler 2.2.3 2020-12-23 10:17:41 +09:00
Hiroshi SHIBATA
0e40cc9b19 Merge RubyGems 3.2.2 and Bundler 2.2.2 2020-12-18 13:33:18 +09:00
Hiroshi SHIBATA
2fa9f3c032 Prepare to release rubygems-3.2.1 and bundler-2.2.1 2020-12-15 10:54:09 +09:00
Hiroshi SHIBATA
473f9d2df0 Merge prepare version of Bundler 2.2.0 2020-12-08 17:30:02 +09:00
Hiroshi SHIBATA
d386a58f6f Merge bundler-2.2.0.rc.2 2020-10-15 17:19:02 +09:00
David Rodríguez
2fafc08aa3 [rubygems/rubygems] Remove unneeded trailing conditions on exitstatus
https://github.com/rubygems/rubygems/commit/27e0e4ecb6
2020-07-15 16:05:12 +09:00
David Rodríguez
16823d4a05 [rubygems/rubygems] Remove unnecessary assertions on exitstatus
Since our helpers now raise by default if the subcommand fails, these
will never actually fail and are not necessary.

https://github.com/rubygems/rubygems/commit/6153b9321e
2020-07-15 16:05:12 +09:00
MSP-Greg
23cf99e99d [rubygems/rubygems] Bundler specs - Windows - remove skips, File.open => File.readlines
Using File.open without a block leaves a file reference that causes issues with file operations

commands/binstubs_spec.rb
install/gems/compact_index_spec.rb
install/gems/dependency_api_spec.rb
install/gems/standalone_spec.rb
runtime/executable_spec.rb

https://github.com/rubygems/rubygems/commit/4b9a6ca156
2020-07-15 16:05:12 +09:00
David Rodríguez
9cc7847849 s/sys_exec!/sys_exec 2020-06-18 19:14:15 +09:00
David Rodríguez
ea4824ee0f [rubygems/rubygems] s/run!/run
https://github.com/rubygems/rubygems/commit/e3f60d8aec
2020-06-18 19:14:15 +09:00
David Rodríguez
a572e78201 [rubygems/rubygems] s/gem_command!/gem_command
https://github.com/rubygems/rubygems/commit/f52733f6a4
2020-06-18 19:14:15 +09:00
David Rodríguez
696a50751b [rubygems/rubygems] s/install_gemfile!/install_gemfile
https://github.com/rubygems/rubygems/commit/4d1a0c465a
2020-06-18 19:14:15 +09:00
David Rodríguez
1436b5026c [rubygems/rubygems] s/bundle!/bundle
https://github.com/rubygems/rubygems/commit/746a4b3d74
2020-06-18 19:14:15 +09:00
David Rodríguez
61b6f53337 [rubygems/rubygems] Make helpers raise by default
https://github.com/rubygems/rubygems/commit/ade0c441d5
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.

https://github.com/rubygems/rubygems/commit/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.

https://github.com/rubygems/rubygems/commit/202399521c
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.

https://github.com/rubygems/rubygems/commit/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.

https://github.com/rubygems/rubygems/commit/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.

https://github.com/rubygems/rubygems/commit/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.

https://github.com/rubygems/rubygems/commit/128b4596e1
2020-06-18 19:14:15 +09:00
David Rodríguez
117b504b98 Fix most exec specs
The `gem_command` helper was failing to require `support/hax.rb`, which
takes care of making sure rubygems actually picks up the right `ruby`
executable under ruby-core setup (`ENV["RUBY"]`). This caused binstubs
to be generated with a wrong shebang, and that caused `bundle exec` to
not work. The error message was pretty confusing though due to
https://bugs.ruby-lang.org/issues/16952.
2020-06-15 12:38:39 +09:00
Hiroshi SHIBATA
459eb684b7 Manually pick from rubygems/rubygems changes at
ca5bf58402
2020-06-05 07:32:42 +09:00
David Rodríguez
e413e746af [rubygems/rubygems] Remove forgotten_command_line_usages from specs
Instead, use the non-deprecated option except when specifically testing
deprecated CLI flags. In that case, pass the flag directly and limit
the specs to `bundler < 3`.

https://github.com/rubygems/rubygems/commit/3d5e186241
2020-06-05 07:32:42 +09:00
David Rodríguez
61b61f426a [rubygems/rubygems] Reword specs to not mention deprecated flags
https://github.com/rubygems/rubygems/commit/f878a81f22
2020-06-05 07:32:42 +09:00
David Rodríguez
f02f19d62f [rubygems/rubygems] Rewrite dependency API specs to use new deployment mode
Some of them were passing "by chance" because they used a `bundle
install` command that failed, but the assertion was using the result of
the previous. Others were skipped on bundler 3. Now they all pass in all
versions.

https://github.com/rubygems/rubygems/commit/cedf611e11
2020-06-05 07:32:42 +09:00
David Rodríguez
332ecb0ad1 [rubygems/rubygems] Fix bundle install unintentionally saving configuration
Even if no explicit flags were passed to it.

https://github.com/rubygems/rubygems/commit/0598cbb68c
2020-06-05 07:32:42 +09:00
David Rodríguez
052d66050a [rubygems/rubygems] Change descriptions to not mention deprecated flags
https://github.com/rubygems/rubygems/commit/731b3783f1
2020-06-05 07:32:42 +09:00