Commit graph

371 commits

Author SHA1 Message Date
Hiroshi SHIBATA
15739c66b7 [rubygems/rubygems] Added only missing extensions option into pristine command
cfd0e615d7
2023-03-10 03:51:16 +00:00
Samuel Giddins
2d6097a0f5 [rubygems/rubygems] Fix method redefinition warning in gem exec specs
f177990d4c
2023-02-28 12:54:37 +00:00
Samuel Giddins
a17b1b19b1 [rubygems/rubygems] Always join with a string
Gem.path_separator can also be a regexp...

7e6e56a5f3
2023-02-22 08:42:20 +00:00
Samuel Giddins
0ca3a095be [rubygems/rubygems] Only update env if var exists
Will save on an error if it would be nil from an exception happening during that line

d6797a04e9
2023-02-22 08:42:19 +00:00
Samuel Giddins
80bfa1b30a [rubygems/rubygems] Fix resetting env in gem exec, and make sure it is set for gem exec gem
13a6dd4992
2023-02-22 08:42:18 +00:00
Samuel Giddins
2dd9698350 [rubygems/rubygems] Allow gem exec gem
a767f7b9be
2023-02-22 08:42:17 +00:00
Samuel Giddins
47d4f73ee7 [rubygems/rubygems] Remove platform option for gem exec
Also fix native extensions that load dependencies

a06f9870c7
2023-02-22 08:42:17 +00:00
Samuel Giddins
612ebd10c0 [rubygems/rubygems] Ensure dependencies are updated by default when running gem exec
664f3e1e5f
2023-02-22 08:42:16 +00:00
Samuel Giddins
3f0f9a7942 [rubygems/rubygems] Add gem exec description
dac1609fd5
2023-02-22 08:42:16 +00:00
Samuel Giddins
d81be0609b [rubygems/rubygems] Add specs for gem exec
3078e5834e
2023-02-22 08:42:16 +00:00
Samuel Giddins
cbe14cc8e6 [rubygems/rubygems] Add gem exec command
ca69a317f3
2023-02-22 08:42:15 +00:00
Hiroshi SHIBATA
a43f1d90c2 Merge RubyGems and Bundler master
from 0635c1423d
2023-01-10 15:53:07 +09:00
Gustavo Ribeiro
f5a035daf9 [rubygems/rubygems] deprecate gem build -C flag
fac241d4ef
2022-12-26 19:08:55 +00:00
Hiroshi SHIBATA
bbe56a6437 Merge RubyGems/Bundler master
from bfb0ae6977
2022-12-12 10:49:43 +09:00
Josef Šimánek
c7d043065c [rubygems/rubygems] Add 'call for update' to RubyGems install command.
05811f8248
2022-11-11 17:24:08 +09:00
David Rodríguez
24fd2f73d0 Resync Bundler & RubyGems 2022-09-08 11:25:03 +09:00
Hiroshi SHIBATA
44264b4fee Merge rubygems/bundler HEAD.
Pick from dfbb5a3811
2022-08-09 12:05:19 +09:00
Hiroshi SHIBATA
71794a75db Merge rubygems/bundler HEAD
Pick from 8331e63263
2022-08-03 13:14:10 +09:00
Takuya Noguchi
d7ffd3fea4
RubyGems: Enable Style/StringLiterals cop
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2022-07-22 12:07:23 +09:00
David Rodríguez
fa5724cca9 [rubygems/rubygems] Fix ruby setup.rb --destdir /foo modifying global specs
Running a command like that is actually removing any previous default
bundler specs in the default RubyGems installation (outside of destdir).
It should instead only modify destdir.

5ed275383c
2022-07-20 19:55:34 +09:00
David Rodríguez
a74634de10 [rubygems/rubygems] Fix upgrading RubyGems with a customized Gem.default_dir
16d01f9486
2022-07-18 19:07:55 +09:00
Takuya Noguchi
8e451d1083 [rubygems/rubygems] Fix wrong information about default RubyGems source
Also fix regression from rubygems/rubygems PR 3056

https://my.diffend.io/gems/rubygems-update/1.3.5/1.3.6/page/4#d2h-514986
https://my.diffend.io/gems/rubygems-update/2.0.0/2.0.2/page/2#d2h-514986

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

06b1e9ebc5
2022-07-15 17:32:05 +09:00
David Rodríguez
8c74eaa08d [rubygems/rubygems] Fix gem update --system crash while regenerating binstubs
Since a few commits ago, we no longer call `Gem::Specification.reset`
after each invocation of `Gem::Installer#install`. This means we don't
call it when the default Bundler is installed during `gem update
--system`. This causes no issues until the end of the upgrade process
when:

* The previous default Bundler spec is removed from disk.
* All specification stubs are turned into real specifications by loading
  them from disk. But the one for Bundler no longer exists so
  materializes to `nil` and regenerating binstubs crashes like this:

  ```
  Bundler 2.4.0.dev installed
  RubyGems 3.4.0.dev installed
  Regenerating binstubs
  ERROR:  While executing gem ... (NoMethodError)
      undefined method `platform' for nil:NilClass
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/pristine_command.rb:116:in `block in execute'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:981:in `block in each'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:980:in `each'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:980:in `each'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/pristine_command.rb:116:in `map'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/pristine_command.rb:116:in `each'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/pristine_command.rb:116:in `select'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/pristine_command.rb:116:in `execute'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command.rb:323:in `invoke_with_build_args'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command.rb:301:in `invoke'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/setup_command.rb:604:in `regenerate_binstubs'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/setup_command.rb:183:in `execute'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command.rb:323:in `invoke_with_build_args'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command_manager.rb:185:in `process_args'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command_manager.rb:149:in `run'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/gem_runner.rb:51:in `run'
  setup.rb:33:in `<main>'
  ```

We fix it by more carefully managing the removal of the previous default
Bundler gem.

9989f6d5af
2022-07-14 04:47:58 +09:00
Brian Le
902d1a5c51 [rubygems/rubygems] add message when gems are requested to be updated but they are not installed
27953ffe9a
2022-07-06 02:59:14 +09:00
Brian Le
6eab8095fa [rubygems/rubygems] output gems already up-to-date regardless if any gems were updated
4ec608a573
2022-07-06 02:59:13 +09:00
David Rodríguez
a16de43f23 [rubygems/rubygems] Add gem env user_gemhome and gem env user_gemdir
14d3f80df6
2022-06-29 03:25:46 +09:00
David Rodríguez
1098fdf890 [rubygems/rubygems] Also document gem env argument aliases
6d841ccbd4
2022-06-29 03:25:45 +09:00
David Rodríguez
7a33d3df6a [rubygems/rubygems] Document better names for gem env arguments
I think `gem env home` and `gem env path` read very nice.

b89da79456
2022-06-29 03:25:45 +09:00
David Rodríguez
12a5fa408b Sync RubyGems & Bundler with upstream repo 2022-06-24 10:52:02 +09:00
David Rodríguez
6e3295e554 [rubygems/rubygems] Make code to find target update version easier to follow
a7f81cc7ee
2022-05-28 19:22:54 +09:00
David Rodríguez
e9c4e37f1f [rubygems/rubygems] Remove unnecessary name and platform filter
It's already done before.

49d28cfde5
2022-05-28 19:22:53 +09:00
David Rodríguez
e78c1ddb1e [rubygems/rubygems] Fix rubygems update when non default --install-dir is configured
9f3b21192d
2022-05-28 19:22:15 +09:00
Hiroshi SHIBATA
aeea88174d
Merge RubyGems and Bundler HEAD
125415593e
2022-05-20 17:32:19 +09:00
Matthias Viehweger
5741ae379b [rubygems/rubygems] Generalize description to account for different push servers
cbf13edd3a
2022-04-29 17:19:19 +09:00
Matthias Viehweger
3cf107fde2 [rubygems/rubygems] Clarify description of owner-flags
28864b1057
2022-04-29 17:19:18 +09:00
Hiroshi SHIBATA
678d58c850 Merge rubygems master 1e4eda741d732ca1bd7031aef0a16c7348adf7a5 2022-04-28 19:08:49 +09:00
David Rodríguez
4317a6750d [rubygems/rubygems] Forbid downgrading past the originally shipped version on Ruby 3.1
68bef90339
2022-01-25 01:11:39 +09:00
David Rodríguez
0dd8c6157d [rubygems/rubygems] Don't pass regexp to Gem::Dependency.new during gem dependency
89dd5158a4
2022-01-19 15:56:36 +09:00
David Rodríguez
1d530ae27a [rubygems/rubygems] Remove dead method
477d5f6f6e
2022-01-19 15:56:36 +09:00
David Rodríguez
0350c179ea [rubygems/rubygems] Don't pass regexp to Gem::Dependeny.new from list, search, and query commands
It's deprecated functionality.

13d3eb6cb0
2022-01-19 15:56:35 +09:00
David Rodríguez
f04954d95c
[rubygems/rubygems] Normalize end alignment style with Bundler
f7f504b24c
2022-01-19 11:20:36 +09:00
loadkpi
7c70151aed [rubygems/rubygems] Fix gem update --system for already installed version of rubygems-update
c167d513a7
2022-01-15 14:00:35 +09:00
ximenasandoval
73be7a85cd [rubygems/rubygems] Fix suggestions flag
b55a1393ca
2022-01-06 23:58:39 +09:00
ximenasandoval
cea4a81056 [rubygems/rubygems] Let fetch understand gem:version syntax
Fix version error message

Add tests to fetch error messages

Fix default version since is not necessary

070620ebe4
2022-01-06 23:58:38 +09:00
David Rodríguez
be476f38f9 [rubygems/rubygems] Don't crash when updating to an unsupported rubygems-update version
b0badcd00a
2021-12-27 22:57:46 +09:00
David Rodríguez
dd022c1f76 [rubygems/rubygems] Don't redownload rubygems-update package if already there
This makes it easier to test the upgrade process locally and should be
more efficient in certain cases where the user has already upgraded in
the past.

ed6cc88494
2021-12-27 21:32:32 +09:00
Hiroshi SHIBATA
7e084ed707 Merge RubyGems and Bundler master
Merge from 793ad95ecb
2021-12-15 18:05:18 +09:00
David Rodríguez
a72aecac3a [rubygems/rubygems] Don't write outside of destdir when regenerating plugins
141ef4cb9a
2021-12-05 05:47:46 +09:00
David Rodríguez
9dc76e102e [rubygems/rubygems] Don't write outside of destdir when installing default bundler
a62d00c5e8
2021-12-05 05:47:45 +09:00
David Rodríguez
ec28771fde [rubygems/rubygems] Fold a line that got out of hand
49317d8beb
2021-12-05 05:47:45 +09:00