From 851b3aa7dde489502f517cc1ad9d31d9a3056197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Mon, 1 Aug 2022 17:11:20 +0200 Subject: [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 --- spec/bundler/commands/outdated_spec.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'spec/bundler') diff --git a/spec/bundler/commands/outdated_spec.rb b/spec/bundler/commands/outdated_spec.rb index 6b7c95f01b..e084af85d7 100644 --- a/spec/bundler/commands/outdated_spec.rb +++ b/spec/bundler/commands/outdated_spec.rb @@ -604,6 +604,22 @@ RSpec.describe "bundle outdated" do expect(out).to end_with(expected_output) 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 install_gemfile <<-G source "#{file_uri_for(gem_repo2)}" -- cgit v1.2.3