summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands/setup_command.rb
AgeCommit message (Collapse)Author
2023-12-15[rubygems/rubygems] Fix `ruby setup.rb` leaving traces in source folderDavid Rodríguez
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`. https://github.com/rubygems/rubygems/commit/0e69a8b0d6
2023-12-12[rubygems/rubygems] Fix installing from source when same bundler version ↵David Rodríguez
already a default gem https://github.com/rubygems/rubygems/commit/620119308e
2023-12-12[rubygems/rubygems] Extract some common strings to variablesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/48bc573310
2023-12-07[rubygems/rubygems] Use modern hashes consistentlyDavid Rodríguez
https://github.com/rubygems/rubygems/commit/bb66253f2c
2023-11-13[rubygems/rubygems] Let RuboCop target Ruby 3.0David Rodríguez
https://github.com/rubygems/rubygems/commit/70243b1d72
2023-05-30Merge RubyGems/Bundler master from 4076391fce5847689bf2ec402b17133fe4e32285Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7873
2023-04-11util/rubocop -A --only Style/NumericLiteralPrefixHiroshi SHIBATA
2023-04-05[rubygems/rubygems] util/rubocop -A --only Style/RegexpLiteralHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/9264d83421
2023-03-23util/rubocop -A --only Layout/EmptyLineAfterMagicCommentHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7582
2023-03-23[rubygems/rubygems] Enabled Style/RedundantReturn copHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/05cc97bdf8 Notes: Merged: https://github.com/ruby/ruby/pull/7582
2023-03-17[rubygems/rubygems] util/rubocop -A --only Style/StringLiteralsInInterpolationHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/cb554f6eb7
2023-03-16[rubygems/rubygems] Change enforce style with Layout/CaseIndentation on rubygemsHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/d4938259c4
2022-12-12Merge RubyGems/Bundler masterHiroshi SHIBATA
from https://github.com/rubygems/rubygems/commit/bfb0ae69776069155d2092702bfbb5a12617d85a Notes: Merged: https://github.com/ruby/ruby/pull/6906
2022-09-08Resync Bundler & RubyGemsDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/6330
2022-08-09Merge rubygems/bundler HEAD.Hiroshi SHIBATA
Pick from https://github.com/rubygems/rubygems/commit/dfbb5a38114640e0d8d616861607f3de73ee0199 Notes: Merged: https://github.com/ruby/ruby/pull/6224
2022-07-22RubyGems: Enable Style/StringLiterals copTakuya Noguchi
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2022-07-20[rubygems/rubygems] Fix `ruby setup.rb --destdir /foo` modifying global specsDavid Rodríguez
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. https://github.com/rubygems/rubygems/commit/5ed275383c
2022-07-18[rubygems/rubygems] Fix upgrading RubyGems with a customized `Gem.default_dir`David Rodríguez
https://github.com/rubygems/rubygems/commit/16d01f9486
2022-07-14[rubygems/rubygems] Fix `gem update --system` crash while regenerating binstubsDavid Rodríguez
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. https://github.com/rubygems/rubygems/commit/9989f6d5af
2022-05-20Merge RubyGems and Bundler HEADHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/125415593ead9ab69a9f0bb5392c9d7ec61b1f51
2022-04-28Merge rubygems master 1e4eda741d732ca1bd7031aef0a16c7348adf7a5Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/5669
2022-01-19[rubygems/rubygems] Normalize end alignment style with BundlerDavid Rodríguez
https://github.com/rubygems/rubygems/commit/f7f504b24c
2021-12-15Merge RubyGems and Bundler masterHiroshi SHIBATA
Merge from https://github.com/rubygems/rubygems/commit/793ad95ecb40e84a1dcb4cb60f2686843ed90de5 Notes: Merged: https://github.com/ruby/ruby/pull/5265
2021-12-05[rubygems/rubygems] Don't write outside of destdir when regenerating pluginsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/141ef4cb9a
2021-12-05[rubygems/rubygems] Don't write outside of destdir when installing default ↵David Rodríguez
bundler https://github.com/rubygems/rubygems/commit/a62d00c5e8
2021-12-05[rubygems/rubygems] Fold a line that got out of handDavid Rodríguez
https://github.com/rubygems/rubygems/commit/49317d8beb
2021-12-05[rubygems/rubygems] Fix binstubs and plugins regeneration with `--destdir` ↵David Rodríguez
is used https://github.com/rubygems/rubygems/commit/7079de16fa
2021-11-16Merge the master branch of rubygems repoHiroshi SHIBATA
Picked from https://github.com/rubygems/rubygems/commit/4b498709a015a94e14a3852a1841a7a3e669133d
2021-11-05[rubygems/rubygems] Fix `ruby setup.rb` command when `--prefix` is passedDavid Rodríguez
https://github.com/rubygems/rubygems/commit/8d04092f6e
2021-11-05[rubygems/rubygems] Remove unnecessarily changing GEM_HOMEDavid Rodríguez
At this point gem paths are already loaded and memoize. Changing `GEM_HOME` has no effect. https://github.com/rubygems/rubygems/commit/a1f62f0939
2021-11-05[rubygems/rubygems] Remove unnecessary loopDavid Rodríguez
Rubygems installs a single executable. Make that explicit. https://github.com/rubygems/rubygems/commit/2839d15521
2021-11-05[rubygems/rubygems] Don't apply `--destdir` twice when running `setup.rb`Alyssa Ross
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. https://github.com/rubygems/rubygems/commit/9e857ffb52
2021-11-05[rubygems/rubygems] Fix `--destdir` handling on WindowsDavid Rodríguez
Driver letters were not accounted for in one place. https://github.com/rubygems/rubygems/commit/fbe42460d7
2021-11-05[rubygems/rubygems] More refactoring of `--destdir` handlingDavid Rodríguez
https://github.com/rubygems/rubygems/commit/f42c2025ed
2021-11-05[rubygems/rubygems] Refactor `--destdir` handlingDavid Rodríguez
https://github.com/rubygems/rubygems/commit/8aab3d11b0
2021-10-11[ruby/rubygems] Prefer `require_relative` for internal requiresDavid Rodriguez
https://github.com/rubygems/rubygems/commit/51796f257a
2021-08-31[rubygems/rubygems] Prefer `require_relative` to `require` for internal requiresDavid Rodríguez
https://github.com/rubygems/rubygems/commit/c74fc58695 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Remove MacOS specific extra GEM_PATHDavid Rodríguez
They should properly configure `GEM_PATH` instead. https://github.com/rubygems/rubygems/commit/3bd9ae33ca Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-01-04Track RubyGems master(3.3.0.dev) branch at ↵Hiroshi SHIBATA
55634a8af18a52df86c4275d70fa1179118bcc20 Notes: Merged: https://github.com/ruby/ruby/pull/4021
2020-12-08Merge prepare version of RubyGems 3.2.0Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3864
2020-10-15Merge rubygems-3.2.0.rc.2Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3660
2020-09-23Revert "Manually merged from https://github.com/rubygems/rubygems/pull/2636"Hiroshi SHIBATA
31a6eaabc165d8a222e176f2c809d90622d88ec2 is obsoleted with https://github.com/rubygems/rubygems/pull/3820
2020-09-23Manually merged from https://github.com/rubygems/rubygems/pull/2636Hiroshi SHIBATA
Enable Style/EmptyLinesAroundClassBody rubocop cop.
2020-07-31[rubygems/rubygems] Don't format executables on `gem update --system`David Rodríguez
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. https://github.com/rubygems/rubygems/commit/1a504b651d Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-07-31Enforce no empty lines around class body in rubygemsDavid Rodríguez
To normalize the code style with `bundler`. Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-06-15Use space inside block braces everywhereDavid Rodríguez
To make rubygems code style consistent with bundler. Notes: Merged: https://github.com/ruby/ruby/pull/3229
2020-06-05[rubygems/rubygems] Fix template cleanup as wellDavid Rodríguez
https://github.com/rubygems/rubygems/commit/10cc79ee21 Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Fix installing template files with dotsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/a82a77251d Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Remove unnecessary parenthesisDavid Rodríguez
https://github.com/rubygems/rubygems/commit/97772bb066 Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-05-08[rubygems/rubygems] Remove old `gauntlet_rubygems` file on rubygems upgradeDavid Rodríguez
The file was removed at https://github.com/rubygems/rubygems/commit/65b709b095b8354ac2620d1a5d7d537e539f6498, shipped with rubygems 2.6.5. https://github.com/rubygems/rubygems/commit/739159a120 Notes: Merged: https://github.com/ruby/ruby/pull/3092