Commit graph

108 commits

Author SHA1 Message Date
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
yoka
87c17a141d [rubygems/rubygems] Enhance bundle open with --path option
3bf8e59304
2023-01-04 13:13:19 +00:00
Hiroshi SHIBATA
f6620037ba Merge RubyGems-3.4.0 and Bundler-2.4.0 2022-12-24 16:57:07 +09:00
Hiroshi SHIBATA
18ba89093a Merge RubyGems/Bundler master
Pick from ba3adad4d8
2022-12-20 13:15:02 +09:00
Josef Šimánek
8eb6618013 [rubygems/rubygems] Turn --ext option into string. Deprecate usage without explicit value.
- this is preparation for onboarding Rust based extension gem generator

d32801bdbc
2022-12-20 13:15:02 +09:00
Michael Siegfried
beef72965e [rubygems/rubygems] Clarify flag description
Prerelease versions are already considered in a certain circumstance,
and the 'if updating' is redundant in the update case anyway.

8d68635f8c
2022-12-20 13:15:02 +09:00
Michael Siegfried
2bc4f1dea5 [rubygems/rubygems] Support for pre flag in bundle update
Passing this flag allows bumping to the current version, even if that
version is prerelease. This works in concert with the current flags.

a6409e3509
2022-12-20 13:15:02 +09:00
Alyssa Ross
d4315284e9 [rubygems/rubygems] Add bundle lock --update --bundler
bundle lock --update can do everything that bundle update can do, but
it doesn't actually install gems. This is especially useful for
generating a lockfile on a machine that doesn't have the libraries
available to be able to build native extensions.

But, there was no parallel for bundle update --bundler. So let's add
one.

7fc00bd2a5
2022-12-18 19:17:42 +00:00
Shohei YOSHIDA
6cd0553ab7 [rubygems/rubygems] Update comment by the review comment
7c54dc56f6
2022-11-14 23:39:32 +00:00
Shohei YOSHIDA
436aa6e64d [rubygems/rubygems] Fix '--force' option documentation of 'bundle clean'
'--path' option is no longer used.

43b3d5f7bc
2022-11-14 23:39:32 +00:00
David Rodríguez
24fd2f73d0 Resync Bundler & RubyGems 2022-09-08 11:25:03 +09:00
Mike Dalessio
45fe7f7575
[rubygems/rubygems] Feature: bundle add supports --path option
32bee01fbe
2022-09-05 11:43:14 +09:00
Hiroshi SHIBATA
44264b4fee Merge rubygems/bundler HEAD.
Pick from dfbb5a3811
2022-08-09 12:05:19 +09:00
David Rodríguez
851b3aa7dd [rubygems/rubygems] Fix bundle outdated --strict
It should be an alias of `--filter-strict`.

`--update-strict` is essentially a dummy option with no special behavior
associated and should be deprecated.

ec1e5d83c8
2022-08-03 16:33:53 +09:00
Hiroshi SHIBATA
bfd09b1116 Merge rubygems master from 446cc57a7c 2022-07-29 15:46:15 +09:00
David Rodríguez
4f5eb48dea [rubygems/rubygems] Fix bundle package --no-install no longer skipping install
This is a regression from cf749f8ffa. The
funny thing is that we have a spec for this feature, so it was unclear
how we regressed here. It turns out there was a bug in one of our
negative matchers checking that gems ARE NOT included in a bundle.

This commit fixes the bug in the negative matcher and reverts
cf749f8ffa (with a slightly simpler diff).

3f9a4ff32a
2022-06-23 18:17:08 +09:00
David Rodríguez
95f5194b3c [rubygems/rubygems] Move no_install setting check to a more sensible place
It's only related to the `bundle cache` command, so it should be checked
there.

cf749f8ffa
2022-06-11 18:43:25 +09:00