зеркало из https://github.com/github/ruby.git
[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. https://github.com/rubygems/rubygems/commit/ec1e5d83c8
This commit is contained in:
Родитель
35c65e7ba6
Коммит
851b3aa7dd
|
@ -401,9 +401,9 @@ module Bundler
|
||||||
"Do not attempt to fetch gems remotely and use the gem cache instead"
|
"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 "pre", :type => :boolean, :banner => "Check for newer pre-release gems"
|
||||||
method_option "source", :type => :array, :banner => "Check against a specific source"
|
method_option "source", :type => :array, :banner => "Check against a specific source"
|
||||||
method_option "filter-strict", :type => :boolean, :banner =>
|
method_option "filter-strict", :type => :boolean, :aliases => "--strict", :banner =>
|
||||||
"Only list newer versions allowed by your Gemfile requirements"
|
"Only list newer versions allowed by your Gemfile requirements"
|
||||||
method_option "strict", :type => :boolean, :aliases => "--update-strict", :banner =>
|
method_option "update-strict", :type => :boolean, :banner =>
|
||||||
"Strict conservative resolution, do not allow any gem to be updated past latest --patch | --minor | --major"
|
"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 "minor", :type => :boolean, :banner => "Prefer updating only to next minor version"
|
||||||
method_option "major", :type => :boolean, :banner => "Prefer updating to next major version (default)"
|
method_option "major", :type => :boolean, :banner => "Prefer updating to next major version (default)"
|
||||||
|
|
|
@ -604,6 +604,22 @@ RSpec.describe "bundle outdated" do
|
||||||
expect(out).to end_with(expected_output)
|
expect(out).to end_with(expected_output)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "only reports gems that have a newer version that matches the specified dependency version requirements, using --strict alias" do
|
||||||
|
update_repo2 do
|
||||||
|
build_gem "activesupport", "3.0"
|
||||||
|
build_gem "weakling", "0.0.5"
|
||||||
|
end
|
||||||
|
|
||||||
|
bundle :outdated, :strict => true, :raise_on_error => false
|
||||||
|
|
||||||
|
expected_output = <<~TABLE.strip
|
||||||
|
Gem Current Latest Requested Groups
|
||||||
|
weakling 0.0.3 0.0.5 ~> 0.0.1 default
|
||||||
|
TABLE
|
||||||
|
|
||||||
|
expect(out).to end_with(expected_output)
|
||||||
|
end
|
||||||
|
|
||||||
it "doesn't crash when some deps unused on the current platform" do
|
it "doesn't crash when some deps unused on the current platform" do
|
||||||
install_gemfile <<-G
|
install_gemfile <<-G
|
||||||
source "#{file_uri_for(gem_repo2)}"
|
source "#{file_uri_for(gem_repo2)}"
|
||||||
|
|
Загрузка…
Ссылка в новой задаче