Commit graph

124 commits

Author SHA1 Message Date
David Rodríguez
60fca1defc
Cancel --force deprecation in favor of --redownload
I realized `--redownload` is not a good name, because it does not
necessarily redownloads gems. It only forces reinstallation even if gem
is already installed.

So I believe `--force` is actually a better name and the introduction of
`--force` was a misunderstanding of what the `--force` flag did at the
time.

Let's cancel the deprecation of `--force`.

For now the `--redownload` alias is left around until we decide what to
do with it.
2025-07-17 11:10:46 +09:00
David Rodríguez
44dd27c430 [rubygems/rubygems] Fix bundle binstub --path=foo not printing a deprecation warning
Like others, it's a remembered option which we are deprecating in favor
of configuration.

801d5dd943
2025-07-17 11:07:14 +09:00
David Rodríguez
19d931b50d [rubygems/rubygems] Fix bundle cache path=foo not printing a deprecation message
0af03eea5d
2025-07-17 11:07:13 +09:00
David Rodríguez
249cf5397f [rubygems/rubygems] Remove unnecessary flag_deprecation method
d1f8e1c4ac
2025-07-17 11:07:12 +09:00
David Rodríguez
c451f478e6 [rubygems/rubygems] Refactor remembered flag deprecation logic
88dd7d2d45
2025-07-17 11:07:11 +09:00
David Rodríguez
81da38b308 Sync RubyGems 2025-07-03 13:43:00 +09:00
David Rodríguez
7f057e13e0
[rubygems/rubygems] Add a verbose setting to enable verbose output for all commands
0aa1be946f
2025-07-02 10:34:19 +09:00
David Rodríguez
29ceefe595
[rubygems/rubygems] Consistently access CLI flags with symbols
1497d3f146
2025-07-02 10:34:19 +09:00
David Rodríguez
82692b32c1
[rubygems/rubygems] Log when simulate_version is enabled
Tweak version output and verbose mode to be transparent about Bundler
simulating a different version than the real one.

179354d153
2025-07-02 10:34:18 +09:00
David Rodríguez
0e1ca4962f
[rubygems/rubygems] None of the global options have default so this seems unnecessary
bea87eab0b
2025-07-02 10:34:18 +09:00
David Rodríguez
daedebd64a
[rubygems/rubygems] Remove print_only_version_number setting
I don't think it makes sense to make this tiny behavior change
configurable. If someone wants to parse version output, and we have a
public setting, they are going to need to accommodate their regexps to
both values of the setting.

In addition to this, I plan to enhance version output with a note about
"simulated version", and in that case, "print_only_version_number" would
no longer hold, since what we print will be more than that anyways.

So, I'd like to remove the setting and change the output in Bundler 4
with no way to opt out.

d84e9dcf09
2025-07-02 10:34:18 +09:00
Hiroshi SHIBATA
949f125f0f [rubygems/rubygems] Use Bundler.settings[gem.bundle]
b16511598e
2025-06-30 12:56:50 +09:00
Hiroshi SHIBATA
5798eeb7c7 [rubygems/rubygems] Added bundle option to method_option
1413086e92
2025-06-30 12:56:50 +09:00
David Rodríguez
441f18df52
Skip to Bundler 4 directly 2025-06-19 10:23:36 +09:00
Cody Cutrer
22a7f6b6c2 [rubygems/rubygems] Recognize JRuby loaded from a classloader, not just any JAR
Such is the case if you embed JRuby into an application dynamically (such
as via OSGi). From my test environment:

```
irb(main):006:0> $LOADED_FEATURES.grep(/cli.rb/)
=> ["uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/cli.rb"]
```

75ac5d46a7
2025-06-13 12:55:14 +09:00
Edouard CHIN
c2e58a9043
[rubygems/rubygems] Define bundler doctor as a subcommand
- See explanation in previous commit 170890befb

8f1b5a4479
2025-04-22 11:27:23 +09:00
David Rodríguez
ac959b177a [rubygems/rubygems] Clarify --target-rbconfig option banner
6625998ca6
2024-12-11 17:56:21 +00:00
David Rodríguez
99460d1eda [rubygems/rubygems] Add missing banners to bundle exec CLI flags
c6f62b2eed
2024-12-11 17:56:21 +00:00
David Rodríguez
06f074eb5c [rubygems/rubygems] Style CLI options consistently
In one liners, no whitespace for alignment.

413339a9ca
2024-12-11 17:56:20 +00:00
David Rodríguez
a1148d4aad [rubygems/rubygems] Cancel bundle console deprecation
506a863b36
2024-11-11 12:49:26 +00:00
David Rodríguez
f7b334e002 [rubygems/rubygems] Add bundle lock --add-checksums to add checksums to an existing lockfile
0a9c1ce60d
2024-11-08 10:27:03 +00:00
David Rodríguez
1f62a98f73 [rubygems/rubygems] Remove no longer necessary hacks to define the gem command
We did this because RubyGems `require` would call `gem` on self, so
defining a `gem` method in the CLI would cause conflicts. However, this
is not the case since
439c446489,
so this should no longer be necessary.

3e5c861046
2024-11-08 10:26:45 +00:00
David Rodríguez
5fa491b405 Normalize lockfile platforms 2024-10-26 18:44:15 +09:00
Jerome Dalbert
fce5bbd6a7 [rubygems/rubygems] Add bundle add --quiet option
This option is similar to the `bundle install --quiet` option

3bd773d827
2024-10-18 16:19:31 +00:00
David Rodríguez
67e1ea0028 [rubygems/rubygems] Remove inconsistent whitespace from CLI flags
RuboCop sometimes accepts extra spaces for alignment, but in this case I
don't see any consistent alignment.

a8c767e14b
2024-07-26 12:16:56 +00:00
Jerome Dalbert
2830a6ae38 [rubygems/rubygems] Only allow valid values for --test, --ci, and --linter options
d4360c9032
2024-07-02 19:54:23 +00:00
Yuta Saito
3e4b694565 [rubygems/rubygems] Bundler integration for --target-rbconfig option
f9fb413a19
2024-06-18 00:59:36 +00:00
David Rodríguez
3e84da0970 [rubygems/rubygems] Auto switch to locked bundler version even when using binstubs
076aba8b1c
2024-06-11 13:30:50 +00:00
Martin Emde
6b0afbb111 [rubygems/rubygems] Reorganize and refactor CompactIndexClient
71bcf354f5
2024-05-25 17:47:07 +00:00
Josh Nichols
6f4f360fc4 [rubygems/rubygems] Add auto_install support to require "bundler/setup"
We have some places that already use `bundle config auto_install true`,
ie:

7a144f3374/bundler/lib/bundler/cli.rb (L11)

This applies the same logic (copy and pasted) to happen when you
`require "bundler/setup"`.

bb3c922341
2024-04-25 18:46:05 +00:00
David Rodríguez
5577f138b4 [rubygems/rubygems] Properly resolve aliases when bundle help is run
5d9bf03c59
2024-04-25 10:35:02 +00:00
David Marshall
a64a42ae38 [rubygems/rubygems] bundle add --glob continued- quote glob value invocation in specs, add banner text for CLI recommending single quotes
6d2cf955f9
2024-04-12 13:31:43 +00:00
David Marshall
c4b5f3f142 [rubygems/rubygems] bundler CLI option for add gem --glob=
Bundler online documentation says that if the gem is located within a subdirectory of a git repository,
you can use the `:glob` option to specify the location of its .gemspec

`gem 'cf-copilot', git: 'https://github.com/cloudfoundry/copilot', glob: 'sdk/ruby/*.gemspec'`

This change allows for equivalent functionality from the bundler CLI

`bundle add cf-copilot --git=https://github.com/cloudfoundry/copilot --glob=sdk/ruby/*.gemspec`

91052e5868
2024-04-12 13:31:43 +00:00
David Rodríguez
f3123f8af2 [rubygems/rubygems] Use rubygems vendored uri from Bundler when available
5d6a8f2fb4
2024-01-29 12:15:10 +09:00
Hiroshi SHIBATA
a1d5c6555e [rubygems/rubygems] bin/rubocop -A --only Layout/ExtraSpacing
39be5cd236
2024-01-11 13:51:52 +09:00
Martin Emde
c1f4bfd41f [rubygems/rubygems] Revert "Merge pull request #7167 from nevinera/add-json-output-option-to-bundle-outdated"
This reverts commit a4ac5116b8, reversing
changes made to 8a6b180d0a.

a1efe4015d
2023-12-13 22:50:45 +00:00
Samuel Giddins
baf2ec2ca8 [rubygems/rubygems] Use match? when regexp match data is unused
Improved performance / reduced allocations

b04726c9a7
2023-12-13 22:00:26 +00:00
Samuel Giddins
e223dde329 [rubygems/rubygems] Allow bundle pristine to run in parallel
Also fix running when BUNDLE_NO_INSTALL happens to be set, same as with install/update commands

a555fd6ccd
2023-12-12 02:10:53 +00:00
David Rodríguez
2755cb1b2f [rubygems/rubygems] Use modern hashes consistently
bb66253f2c
2023-12-07 22:29:33 +00:00
Eric Mueller
73440e1ef2 [rubygems/rubygems] Many major_deprecations supply :removed_message
Generally the removed message is very similar, but often it needs to
specify that the feature has "been removed" instead of "will be
removed", or "been deprecated". And a few chunks of text needed more
substantial updates. And a number of them seemed to have been carefully
crafted to make sense in either context, so I left those alone.

8d42cf9104
2023-12-01 17:52:38 +00:00
Samuel Giddins
62e2e1da92 [rubygems/rubygems] Allow auto-install to install missing git gems
Currently, auto-install with git gems fails, when
it would succeed with a rubygems-source gem

Fix the issue by doing the same fallback for git errors as we do for
missing gems, the git errors should only bubble up in these cases when
the gem is not installed, meaning we want to go through the install flow
(and any persistent errors will be raised through there)

e25a339f7a
2023-11-30 03:41:15 +00:00
David Rodríguez
56ac1b0e14 [rubygems/rubygems] Fix advice in bundle install --system deprecation
59a66e3560
2023-11-27 15:04:40 +09:00
David Rodríguez
e00d7b6182 [rubygems/rubygems] Keep a single copy of the remembered flag deprecation message
cb4e26eabc
2023-11-27 15:04:40 +09:00
David Rodríguez
fe57be5a2e [rubygems/rubygems] Avoid some unnecessary quotes in remember flag deprecation message
3fd627e486
2023-11-27 15:04:40 +09:00
David Rodríguez
bd4bd61650 [rubygems/rubygems] Simplify remembered flags deprecation message
Configuration is now local by default.

6bc7709aa8
2023-11-27 15:04:40 +09:00
Eric Mueller
c424d15cb9 [rubygems/rubygems] Add --json bundle-outdated flag to produce json-parseable output
65efa44bc0
2023-11-23 18:03:17 +00:00
Samuel Giddins
b69bbf588a [rubygems/rubygems] User bundler UA when downloading gems
Gem::RemoteFetcher uses Gem::Request, which adds the RubyGems UA.
Gem::RemoteFetcher is used to download gems, as well as the full index.
We would like the bundler UA to be used whenever bundler is making
requests.

This PR also avoids unsafely mutating the headers hash on the shared
`Gem::RemoteFetcher.fetcher` instance, which could cause corruption or
incorrect headers when making parallel requests. Instead, we create one
remote fetcher per rubygems remote, which is similar to the connection
segregation bundler is already doing

f0e8dacdec
2023-11-15 08:33:14 +00:00
Hiroshi SHIBATA
f3b129241c [rubygems/rubygems] Applied Layout/SpaceAroundOperators cop
3139587be9
2023-03-16 01:59:12 +00:00
Hiroshi SHIBATA
38fa8eb4cb Merge rubygems/bundler master
Pick from e9304aed7e
2023-02-21 19:28:12 +09:00
yoka
799d805e21 [rubygems/rubygems] Raise invalid option when bundle open --path is called without a value
c242311158
2023-01-04 13:13:19 +00:00