Skip to content

Commit

Permalink
Adapt plugin to situation when a dependency is a string
Browse files Browse the repository at this point in the history
  • Loading branch information
tarnowsc committed May 6, 2024
1 parent 19abed4 commit a084d91
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
- '2.2.33'
- '2.3.19'
- '2.4.14'
- '2.5.4'

env:
TEST_BUNDLER_VERSION: ${{ matrix.bundler-version }}
Expand Down
Empty file added coverage/.keep
Empty file.
5 changes: 3 additions & 2 deletions lib/bundler/override/specset_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ module SpecSetPatch
def specs_for_dependency(dep, platform)
spec = super
return spec if spec.empty?
if Bundler::Override.override? dep.name
name = if dep.is_a?(String) then dep else dep.name end
if Bundler::Override.override? name
s = spec.first
param = Bundler::Override.params(dep.name)
param = Bundler::Override.params(name)
drop = param[:drop]
s.dependencies.delete_if { |d| drop.include? d.name }
requirements = param[:requirements]
Expand Down

0 comments on commit a084d91

Please sign in to comment.