Skip to content

Commit

Permalink
Resolve test failure from bundler 2.2.24+
Browse files Browse the repository at this point in the history
Bundler v2.2.24 changed the behaviour of `Bundler::Definition#specs_for` when the requested groups are empty from returning nothing to everything.
  • Loading branch information
iterateNZ authored and Phillip Aldridge committed Nov 7, 2023
1 parent da2308b commit a82ce21
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/warbler/traits/bundler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a82ce21

Please sign in to comment.