Commit graph

112 commits

Author SHA1 Message Date
Antoine Marguerie
11492bd88d [rubygems/rubygems] Fix headings levels in Changelogs
And adapt release scripts and configuration to the new structure.

3deb1aedae
2025-06-05 19:12:39 +09:00
David Rodríguez
4e6ada3ae4 [rubygems/rubygems] Remove unnecessary and out of date ruby version check
We already do this check in `setup.rb` itself, which is run earlier.

160cc3f1c5
2024-11-25 14:56:08 +00:00
David Rodríguez
1e1a37220b [rubygems/rubygems] Fix gem update --system leaving old default bundler executables around
4b81add54c
2024-10-30 14:22:08 +00:00
Hiroshi SHIBATA
4aa3491bd2 Skip RDoc related feature if Gem::RDoc is not available 2024-09-01 20:00:13 +09:00
ccmywish
185a6c991e [rubygems/rubygems] Update contents of gem.bat on Windows
(https://github.com/rubygems/rubygems/pull/6483)

41d8cffd2e

Co-Authored-By: MSP-Greg <Greg.mpls@gmail.com>
2024-06-21 02:27:47 +00:00
David Rodriguez
c55c11d7d5 [rubygems/rubygems] Fix binstubs sometimes not getting regenerated when --destdir is given
This was only working for gems also installed in the default gem home.

47df02dbd9
2024-05-16 13:34:33 +00:00
David Rodríguez
7c72755da8 [rubygems/rubygems] Fix ruby setup.rb leaving traces in source folder
It's the `Gem::Installer` below what installs executables, and the code
being deleted here is now actually creating a `gems/` folder in the root
of the source repo when running `ruby setup.rb`.

0e69a8b0d6
2023-12-15 11:52:38 +00:00
David Rodríguez
c032dfb5cb
[rubygems/rubygems] Fix installing from source when same bundler version already a default gem
620119308e
2023-12-12 10:04:56 +09:00
David Rodríguez
23289ad45b
[rubygems/rubygems] Extract some common strings to variables
48bc573310
2023-12-12 10:04:56 +09:00
David Rodríguez
2755cb1b2f [rubygems/rubygems] Use modern hashes consistently
bb66253f2c
2023-12-07 22:29:33 +00:00
David Rodríguez
a4d80eee17 [rubygems/rubygems] Let RuboCop target Ruby 3.0
70243b1d72
2023-11-13 11:06:10 +09:00
Hiroshi SHIBATA
4bbeed6134 Merge RubyGems/Bundler master from 4076391fce5847689bf2ec402b17133fe4e32285 2023-05-30 21:50:07 +09:00
Hiroshi SHIBATA
d89cc317c6
util/rubocop -A --only Style/NumericLiteralPrefix 2023-04-11 19:12:28 +09:00
Hiroshi SHIBATA
e003784fc8 [rubygems/rubygems] util/rubocop -A --only Style/RegexpLiteral
9264d83421
2023-04-05 09:50:29 +00:00
Hiroshi SHIBATA
f24a86d83f util/rubocop -A --only Layout/EmptyLineAfterMagicComment 2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA
2e3cd1dc3e [rubygems/rubygems] Enabled Style/RedundantReturn cop
05cc97bdf8
2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA
4bb5ce8188 [rubygems/rubygems] util/rubocop -A --only Style/StringLiteralsInInterpolation
cb554f6eb7
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
760b8b7d24 [rubygems/rubygems] Change enforce style with Layout/CaseIndentation on rubygems
d4938259c4
2023-03-16 01:59:11 +00:00
Hiroshi SHIBATA
bbe56a6437 Merge RubyGems/Bundler master
from bfb0ae6977
2022-12-12 10:49:43 +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
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
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
Hiroshi SHIBATA
aeea88174d
Merge RubyGems and Bundler HEAD
125415593e
2022-05-20 17:32:19 +09:00
Hiroshi SHIBATA
678d58c850 Merge rubygems master 1e4eda741d732ca1bd7031aef0a16c7348adf7a5 2022-04-28 19:08:49 +09:00
David Rodríguez
f04954d95c
[rubygems/rubygems] Normalize end alignment style with Bundler
f7f504b24c
2022-01-19 11:20:36 +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 Rodriguez
e0c20485db [ruby/rubygems] Prefer require_relative for internal requires
51796f257a
2021-10-11 01:12:50 +09:00
David Rodríguez
54ae3f587e [rubygems/rubygems] Prefer require_relative to require for internal requires
c74fc58695
2021-08-31 19:06:14 +09:00
David Rodríguez
d01c3111c2 [rubygems/rubygems] Remove MacOS specific extra GEM_PATH
They should properly configure `GEM_PATH` instead.

3bd9ae33ca
2021-08-31 19:06:14 +09:00
Hiroshi SHIBATA
5537adf719 Track RubyGems master(3.3.0.dev) branch at 55634a8af18a52df86c4275d70fa1179118bcc20 2021-01-04 13:14:43 +09:00
Hiroshi SHIBATA
4aca77edde Merge prepare version of RubyGems 3.2.0 2020-12-08 17:30:02 +09:00
Hiroshi SHIBATA
ab6c4f8be3 Merge rubygems-3.2.0.rc.2 2020-10-15 14:12:02 +09:00
Hiroshi SHIBATA
b717f73402
Revert "Manually merged from https://github.com/rubygems/rubygems/pull/2636"
31a6eaabc1 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
David Rodríguez
b7e88e3c2f [rubygems/rubygems] Don't format executables on gem update --system
This restores 3.0 behavior and goes back to not formatting executables
by default on `gem update --system`. This is friendlier for jruby and
doesn't really affect OS packagers.

1a504b651d
2020-07-31 21:07:19 +09:00