Commit graph

259 commits

Author SHA1 Message Date
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
David Rodríguez
ed7a50015a [rubygems/rubygems] Fix binstubs and plugins regeneration with --destdir is used
7079de16fa
2021-12-05 05:47:44 +09:00
Hiroshi SHIBATA
f3bda8987e
Merge the master branch of rubygems repo
Picked from 4b498709a0
2021-11-16 20:19:13 +09:00
David Rodríguez
907aa47527 [rubygems/rubygems] Fix ruby setup.rb command when --prefix is passed
8d04092f6e
2021-11-05 23:20:50 +09:00
David Rodríguez
f5a4fdae25 [rubygems/rubygems] Remove unnecessarily changing GEM_HOME
At this point gem paths are already loaded and memoize. Changing
`GEM_HOME` has no effect.

a1f62f0939
2021-11-05 23:20:48 +09:00
David Rodríguez
5b941ec90d [rubygems/rubygems] Remove unnecessary loop
Rubygems installs a single executable. Make that explicit.

2839d15521
2021-11-05 23:20:47 +09:00
Alyssa Ross
1506c8228b [rubygems/rubygems] Don't apply --destdir twice when running setup.rb
Prior to this patch, if I ran:

    ruby setup.rb --destdir /foo

Then Bundler files would be written into /foo/foo, because destdir was
being prepended, even though `bundler_spec.bin_dir` already included
destdir.

9e857ffb52
2021-11-05 07:23:36 +09:00
David Rodríguez
9503dd91a5 [rubygems/rubygems] Fix --destdir handling on Windows
Driver letters were not accounted for in one place.

fbe42460d7
2021-11-05 07:23:36 +09:00
David Rodríguez
5e855be86b [rubygems/rubygems] More refactoring of --destdir handling
f42c2025ed
2021-11-05 07:23:35 +09:00
David Rodríguez
70cbca48b8 [rubygems/rubygems] Refactor --destdir handling
8aab3d11b0
2021-11-05 07:23:35 +09:00
David Rodríguez
c5224c71ae [rubygems/rubygems] Fix gem install vs gem fetch inconsistency
b3e985799e
2021-11-03 17:42:39 +09:00
Hiroshi SHIBATA
4a39167260
Removed the related code of gem server 2021-11-02 10:19:34 +09:00
Jenny Shen
92ec010595
[rubygems/rubygems] Add support to build and sign certificates with multiple key algorithms
967876f15d

Co-Authored-By: Frederik Dudzik <frederik.dudzik@shopify.com>
2021-10-26 08:01:55 +09:00