ruby-changes:71330
From: David <ko1@a...>
Date: Sun, 6 Mar 2022 22:17:15 +0900 (JST)
Subject: [ruby-changes:71330] 156079a85d (master): [rubygems/rubygems] Make `--strict` flag of `update` and `outdated` commands consistent
https://git.ruby-lang.org/ruby.git/commit/?id=156079a85d From 156079a85d29a137521e6b911a39c25f35a960d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...> Date: Tue, 1 Mar 2022 13:46:49 +0100 Subject: [rubygems/rubygems] Make `--strict` flag of `update` and `outdated` commands consistent Previously they had slightly different behavior when combined with conservative updating flags. The correct behavior is the `--update-strict` option, so `--script` now does that, The `--update-strict` option is left there for now but I will deprecate it later. https://github.com/rubygems/rubygems/commit/ab42046229 --- lib/bundler/cli.rb | 7 +++---- lib/bundler/cli/common.rb | 2 +- lib/bundler/man/bundle-add.1 | 2 +- lib/bundler/man/bundle-binstubs.1 | 2 +- lib/bundler/man/bundle-cache.1 | 2 +- lib/bundler/man/bundle-check.1 | 2 +- lib/bundler/man/bundle-clean.1 | 2 +- lib/bundler/man/bundle-config.1 | 2 +- lib/bundler/man/bundle-doctor.1 | 2 +- lib/bundler/man/bundle-exec.1 | 2 +- lib/bundler/man/bundle-gem.1 | 2 +- lib/bundler/man/bundle-info.1 | 2 +- lib/bundler/man/bundle-init.1 | 2 +- lib/bundler/man/bundle-inject.1 | 2 +- lib/bundler/man/bundle-install.1 | 2 +- lib/bundler/man/bundle-list.1 | 2 +- lib/bundler/man/bundle-lock.1 | 2 +- lib/bundler/man/bundle-open.1 | 2 +- lib/bundler/man/bundle-outdated.1 | 13 +++---------- lib/bundler/man/bundle-outdated.1.ronn | 11 +---------- lib/bundler/man/bundle-platform.1 | 2 +- lib/bundler/man/bundle-pristine.1 | 2 +- lib/bundler/man/bundle-remove.1 | 2 +- lib/bundler/man/bundle-show.1 | 2 +- lib/bundler/man/bundle-update.1 | 2 +- lib/bundler/man/bundle-viz.1 | 2 +- lib/bundler/man/bundle.1 | 2 +- lib/bundler/man/gemfile.5 | 2 +- spec/bundler/commands/outdated_spec.rb | 23 +++++++++++------------ 29 files changed, 43 insertions(+), 61 deletions(-) diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index 16651dfad9..922ba469a4 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -391,7 +391,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/cli.rb#L391 are up to date, Bundler will exit with a status of 0. Otherwise, it will exit 1. For more information on patch level options (--major, --minor, --patch, - --update-strict) see documentation on the same options on the update command. + --strict) see documentation on the same options on the update command. D method_option "group", :type => :string, :banner => "List gems from a specific group" method_option "groups", :type => :boolean, :banner => "List gems organized by groups" @@ -399,10 +399,9 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/cli.rb#L399 "Do not attempt to fetch gems remotely and use the gem cache instead" method_option "pre", :type => :boolean, :banner => "Check for newer pre-release gems" method_option "source", :type => :array, :banner => "Check against a specific source" - strict_is_update = Bundler.feature_flag.forget_cli_options? - method_option "filter-strict", :type => :boolean, :aliases => strict_is_update ? [] : %w[--strict], :banner => + method_option "filter-strict", :type => :boolean, :banner => "Only list newer versions allowed by your Gemfile requirements" - method_option "update-strict", :type => :boolean, :aliases => strict_is_update ? %w[--strict] : [], :banner => + method_option "strict", :type => :boolean, :aliases => "--update-strict", :banner => "Strict conservative resolution, do not allow any gem to be updated past latest --patch | --minor | --major" method_option "minor", :type => :boolean, :banner => "Prefer updating only to next minor version" method_option "major", :type => :boolean, :banner => "Prefer updating to next major version (default)" diff --git a/lib/bundler/cli/common.rb b/lib/bundler/cli/common.rb index ba259143b7..1a469f1d34 100644 --- a/lib/bundler/cli/common.rb +++ b/lib/bundler/cli/common.rb @@ -109,7 +109,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/cli/common.rb#L109 definition.gem_version_promoter.tap do |gvp| gvp.level = patch_level.first || :major - gvp.strict = options[:strict] || options["update-strict"] || options["filter-strict"] + gvp.strict = options[:strict] || options["filter-strict"] end end diff --git a/lib/bundler/man/bundle-add.1 b/lib/bundler/man/bundle-add.1 index 9be796e531..7ad5443cae 100644 --- a/lib/bundler/man/bundle-add.1 +++ b/lib/bundler/man/bundle-add.1 @@ -1,7 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/lib/bundler/man/bundle-add.1#L1 .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-ADD" "1" "February 2022" "" "" +.TH "BUNDLE\-ADD" "1" "March 2022" "" "" . .SH "NAME" \fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install diff --git a/lib/bundler/man/bundle-binstubs.1 b/lib/bundler/man/bundle-binstubs.1 index e12d38e0cc..20ad1c5cc8 100644 --- a/lib/bundler/man/bundle-binstubs.1 +++ b/lib/bundler/man/bundle-binstubs.1 @@ -1,7 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/lib/bundler/man/bundle-binstubs.1#L1 .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-BINSTUBS" "1" "February 2022" "" "" +.TH "BUNDLE\-BINSTUBS" "1" "March 2022" "" "" . .SH "NAME" \fBbundle\-binstubs\fR \- Install the binstubs of the listed gems diff --git a/lib/bundler/man/bundle-cache.1 b/lib/bundler/man/bundle-cache.1 index 36cf4df0cb..7929885924 100644 --- a/lib/bundler/man/bundle-cache.1 +++ b/lib/bundler/man/bundle-cache.1 @@ -1,7 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/lib/bundler/man/bundle-cache.1#L1 .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-CACHE" "1" "February 2022" "" "" +.TH "BUNDLE\-CACHE" "1" "March 2022" "" "" . .SH "NAME" \fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application diff --git a/lib/bundler/man/bundle-check.1 b/lib/bundler/man/bundle-check.1 index 80915d6ef6..b3a1a06b59 100644 --- a/lib/bundler/man/bundle-check.1 +++ b/lib/bundler/man/bundle-check.1 @@ -1,7 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/lib/bundler/man/bundle-check.1#L1 .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-CHECK" "1" "February 2022" "" "" +.TH "BUNDLE\-CHECK" "1" "March 2022" "" "" . .SH "NAME" \fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems diff --git a/lib/bundler/man/bundle-clean.1 b/lib/bundler/man/bundle-clean.1 index ee45ea7386..f48b453149 100644 --- a/lib/bundler/man/bundle-clean.1 +++ b/lib/bundler/man/bundle-clean.1 @@ -1,7 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/lib/bundler/man/bundle-clean.1#L1 .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-CLEAN" "1" "February 2022" "" "" +.TH "BUNDLE\-CLEAN" "1" "March 2022" "" "" . .SH "NAME" \fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory diff --git a/lib/bundler/man/bundle-config.1 b/lib/bundler/man/bundle-config.1 index 50fb599629..c84a2b106e 100644 --- a/lib/bundler/man/bundle-config.1 +++ b/lib/bundler/man/bundle-config.1 @@ -1,7 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/lib/bundler/man/bundle-config.1#L1 .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-CONFIG" "1" "February 2022" "" "" +.TH "BUNDLE\-CONFIG" "1" "March 2022" "" "" . .SH "NAME" \fBbundle\-config\fR \- Set bundler configuration options diff --git a/lib/bundler/man/bundle-doctor.1 b/lib/bundler/man/bundle-doctor.1 index 8c41483345..d638275a02 100644 --- a/lib/bundler/man/bundle-doctor.1 +++ b/lib/bundler/man/bundle-doctor.1 @@ -1,7 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/lib/bundler/man/bundle-doctor.1#L1 .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-DOCTOR" "1" "February 2022" "" "" +.TH "BUNDLE\-DOCTOR" "1" "March 2022" "" "" . .SH "NAME" \fBbundle\-doctor\fR \- Checks the bundle for common problems diff --git a/lib/bundler/man/bundle-exec.1 b/lib/bundler/man/bundle-exec.1 index bd9884ae51..90118c1fff 100644 --- a/lib/bundler/man/bundle-exec.1 +++ b/lib/bundler/man/bundle-exec.1 @@ -1,7 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/lib/bundler/man/bundle-exec.1#L1 .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-EXEC" "1" "February 2022" "" "" +.TH "BUNDLE\-EXEC" "1" "March 2022" "" "" . .SH "NAME" \fBbundle\-exec\fR \- Execute a command in the context of the bundle diff --git a/lib/bundler/man/bundle-gem.1 b/lib/bundler/man/bundle-gem.1 index a21a2cc3ec..10681e3696 100644 --- a/lib/bundler/man/bundle-gem.1 +++ b/lib/bundler/man/bundle-gem.1 @@ -1,7 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/lib/bundler/man/bundle-gem.1#L1 .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-GEM" "1" "February 2022" "" "" +.TH "BUNDLE\-GEM" "1" "March 2022" "" "" . .SH "NAME" \fBbundle\-gem\fR \- Generate a project skeleton for creating a rubygem diff --git a/lib/bundler/man/bundle-info.1 b/lib/bundler/man/bundle-info.1 index 2e9128f961..57bdc6bd93 100644 --- a/lib/bundler/man/bundle-info.1 +++ b/lib/bundler/man/bundle-info.1 @@ -1,7 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/lib/bundler/man/bundle-info.1#L1 .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-INFO" "1" "February 2022" "" "" +.TH "BUNDLE\-INFO" "1" "March 2022" "" "" . .SH "NAME" \fBbundle\-info\fR \- Show information for the given gem in your bundle diff --git a/lib (... truncated) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/