Commit graph

331 commits

Author SHA1 Message Date
Hiroshi SHIBATA
08753f2037 [rubygems/rubygems] Use https instead of http
bcbe6f7b7a
2024-02-21 03:30:22 +00:00
David Rodríguez
d64d0b5423
Vendor uri gem in RubyGems 2024-01-29 12:14:21 +09:00
David Rodríguez
6bd997ecfd [rubygems/rubygems] Remove no longer necessary code
b7d2de2ba8
2024-01-24 13:56:07 +09:00
David Rodríguez
0156b7416c [rubygems/rubygems] Always avoid "Updating rubygems-update" message
The fact that under the hood the upgrade is done through a
rubygems-update gem is an implementation detail that does not really
help users to know.

Plus, it reads a bit weird.

0fa5c50258
2024-01-11 13:51:52 +09:00
David Rodríguez
3980cebda5 [rubygems/rubygems] Make gem update --system respect ruby version constraints
36052abbe2
2024-01-11 13:51:52 +09:00
David Rodríguez
aa908aa065 [rubygems/rubygems] Remove old condition no longer necessary
701980b240
2024-01-11 13:51:52 +09:00
Hiroshi SHIBATA
ea31461ba0 [rubygems/rubygems] bin/rubocop -A --only Style/StringLiterals
f25013bcc0
2024-01-11 13:51:52 +09:00
Hiroshi SHIBATA
ff0119354e [rubygems/rubygems] bin/rubocop -A --only Performance/StringInclude
34df962cf4
2024-01-11 13:51:52 +09:00
hyuraku
577bc8254e [rubygems/rubygems] remove useless comments from unpack_command.rb
7576c21295
2024-01-04 00:39:54 +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
Samuel Giddins
4817166e54 [rubygems/rubygems] Extract generate_index command to rubygems-generate_index gem
So generate_index can be implemented with dependencies, such as the compact index

Took this approach from feedback in https://github.com/rubygems/rubygems/pull/6853

Running `gem generate_index` by default will use an installed rubygems-generate_index, or install and then use the command from the gem

Apply suggestions from code review

fc1cb9bc9e

Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org>
2023-12-08 06:09:51 +00: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
David Rodríguez
54511303a4 [rubygems/rubygems] Drop support for Ruby 2.6 and Ruby 2.7 in RubyGems
10c26a483d
2023-11-13 11:06:10 +09:00
Vít Ondruch
ca7444cc44
[rubygems/rubygems] Allow --install-dir to be specified together with --user-install
The combination of `install-dir` and `--user-install` used to be
disabled for no good reason. This even makes problem on Linux
distributions such as Fedora, where `--user-install` is set by default
via operating_system.rb.

The `--install-dir` is already prefered over the `--user-install` by
the implementation, therefore just drop the check.

313b1c5e76
2023-11-08 09:04:28 +09:00
Kyle Stevens
ef3f9f1a68 [rubygems/rubygems] Allow uninstalling multiple versions of same gem
Currently, you can install multiple versions of the same gem just fine:

```
$ gem install simplecov:0.19.0 simplecov:0.22.0
Fetching simplecov-0.19.0.gem
Successfully installed simplecov-0.19.0
Parsing documentation for simplecov-0.19.0
Installing ri documentation for simplecov-0.19.0
Done installing documentation for simplecov after 0 seconds
Fetching simplecov-0.22.0.gem
Successfully installed simplecov-0.22.0
Parsing documentation for simplecov-0.22.0
Installing ri documentation for simplecov-0.22.0
Done installing documentation for simplecov after 0 seconds
2 gems installed
```

But to uninstall both of them, you need to run the equivalent uninstall
command twice:

```
~$ gem uninstall simplecov:0.19.0 simplecov:0.22.0
Successfully uninstalled simplecov-0.22.0
~$ gem uninstall simplecov:0.19.0 simplecov:0.22.0
Gem 'simplecov' is not installed
Successfully uninstalled simplecov-0.19.0
```

This resolves that problem by using the gem's full name (which includes
the version) when tracking which ones have already been uninstalled so
when it gets to the second version listed it doesn't think it was
already uninstalled.

d96101b753
2023-10-18 10:17:58 +00:00
Josef Šimánek
0046c67dd8
[rubygems/rubygems] Fix typo: eglible -> eligible.
1e487e1337
2023-10-03 16:13:18 +09:00
Samuel Giddins
812c8196b6 [rubygems/rubygems] Remove usage of Dir.chdir that just execute a subprocess
Preferring instead to spawn the subprocess in the correct directory

ad5abd6a45
2023-09-21 18:30:37 +00:00
Hiroshi SHIBATA
827d66266b [rubygems/rubygems] auto-correct Style/YodaCondition
6d9e8025dc
2023-06-15 07:01:28 +09:00
Hiroshi SHIBATA
4bbeed6134 Merge RubyGems/Bundler master from 4076391fce5847689bf2ec402b17133fe4e32285 2023-05-30 21:50:07 +09:00
Jenny Shen
c7a8d63df8
Terminate interaction when rescuing WebauthnVerificationError during wait_for_otp
Co-authored-by: Betty Li <makewithbetty@gmail.com>
2023-04-12 11:57:43 +09:00
Jenny Shen
353f9adccc [rubygems/rubygems] Add otp command tests
c494112063
2023-04-12 11:51:05 +09:00
Hiroshi SHIBATA
d89cc317c6
util/rubocop -A --only Style/NumericLiteralPrefix 2023-04-11 19:12:28 +09:00
Hiroshi SHIBATA
250e97c0fb [rubygems/rubygems] util/rubocop -A --only Style/FormatString
132a56569d
2023-04-07 05:13:05 +00:00
Hiroshi SHIBATA
fb822076d7 [rubygems/rubygems] util/rubocop -A --only Style/LineEndConcatenation
67ece7b8b6
2023-04-06 23:33:20 +00:00
Hiroshi SHIBATA
e003784fc8 [rubygems/rubygems] util/rubocop -A --only Style/RegexpLiteral
9264d83421
2023-04-05 09:50:29 +00:00
Hiroshi SHIBATA
a881b33818 [rubygems/rubygems] util/rubocop -A --only Performance/RegexpMatch
52ae4452c2
2023-04-04 12:20:43 +00:00
Hiroshi SHIBATA
f24a86d83f util/rubocop -A --only Layout/EmptyLineAfterMagicComment 2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA
50a03035ee util/rubocop -A --only Lint/NonLocalExitFromIterator 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
0eef33e113 [rubygems/rubygems] util/rubocop -A --only Style/Next
e5868e92f7
2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA
5efadf8139 [rubygems/rubygems] util/rubocop -A --only Lint/ShadowingOuterLocalVariable
82ed77178d
2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA
1ca67f13cd util/rubocop -A --only Style/RedundantSelf 2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
5211900d37 util/rubocop -A --only Style/SymbolProc 2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
b304cf324a util/rubocop -A --only Layout/ParameterAlignment 2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
0373615948 util/rubocop -A --only Layout/SpaceInsideArrayLiteralBrackets 2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
b6d3c06936 util/rubocop -A --only Performance/Casecmp 2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
72d09a568f [rubygems/rubygems] util/rubocop -A --only Style/RedundantBegin
b595d3cf0f
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
be4cc74e26 [rubygems/rubygems] util/rubocop -A --only Style/IfUnlessModifierOfIfUnless
97e0af2518
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
bf69d1fc5d [rubygems/rubygems] util/rubocop -A --only Style/OrAssignment
965fc82cfd
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
f4b073ef7a [rubygems/rubygems] util/rubocop -A --only Style/UnlessElse
184c03270c
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
6ad269dc39 [rubygems/rubygems] util/rubocop -A --only Style/RescueStandardError
80b57da926
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
70164eec0f [rubygems/rubygems] util/rubocop -A --only Style/RescueModifier
b490379eab
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
fef0313ec7 [rubygems/rubygems] util/rubocop -A --only Style/PreferredHashMethods
ae3bdc0e85
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
66bd2c1a1c [rubygems/rubygems] util/rubocop -A --only Style/CommentAnnotation
4e77a1d1d5
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
52ea7afa5f [rubygems/rubygems] util/rubocop -A --only Style/NegatedIf
aa95ee27a2
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
712d6e675b [rubygems/rubygems] util/rubocop -A --only Style/RedundantInterpolation
add44e56eb
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
4bb5ce8188 [rubygems/rubygems] util/rubocop -A --only Style/StringLiteralsInInterpolation
cb554f6eb7
2023-03-17 18:50:55 +09:00