From 0eb2f9a5a08268af79aa1370e3e35ce8dcaf6a38 Mon Sep 17 00:00:00 2001 From: Phillip Aldridge Date: Tue, 7 Nov 2023 16:19:20 +1300 Subject: [PATCH] Resolve test failure from bundler 2.2.24+ Bundler v2.2.24 changed the behaviour of `Bundler::Definition#specs_for` when the requested groups are empty from returning nothing to everything. --- lib/warbler/traits/bundler.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/warbler/traits/bundler.rb b/lib/warbler/traits/bundler.rb index d7330edd..403db991 100644 --- a/lib/warbler/traits/bundler.rb +++ b/lib/warbler/traits/bundler.rb @@ -143,7 +143,8 @@ def bundler_specs bundle_without = config.bundle_without.map { |s| s.to_sym } definition = ::Bundler.definition all = definition.specs.to_a - requested = definition.specs_for(definition.groups - bundle_without).to_a + requested_groups = definition.groups - bundle_without + requested = requested_groups.empty? ? [] : definition.specs_for(requested_groups).to_a excluded_git_specs = (all - requested).select { |spec| ::Bundler::Source::Git === spec.source } excluded_git_specs.each { |spec| spec.groups << :warbler_excluded } requested + excluded_git_specs