Skip to content

Commit

Permalink
Merge pull request #47 from lyrasis/debug-fields-all
Browse files Browse the repository at this point in the history
fix bug with using `fields: :all` introduced in 2.5.2
  • Loading branch information
kspurgin authored Oct 4, 2021
2 parents c1cfa8e + 0e949f3 commit 48e1843
Show file tree
Hide file tree
Showing 4 changed files with 229 additions and 170 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
kiba-extend (2.5.2)
kiba-extend (2.5.3)
activesupport (~> 6.1.4)
csv (~> 3.0)
dry-configurable (~> 0.11)
Expand Down
2 changes: 1 addition & 1 deletion lib/kiba/extend/transforms/clean.rb
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def initialize(fields:, find:, replace:, casesensitive: true, multival: false, s

# @private
def process(row)
@fields = @fields == :all ? row.keys : @fields
@fields = @fields == [:all] ? row.keys : @fields
@fields.each do |field|
oldval = row.fetch(field)
newval = if oldval.nil?
Expand Down
2 changes: 1 addition & 1 deletion lib/kiba/extend/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module Kiba
module Extend
VERSION = '2.5.2'
VERSION = '2.5.3'
end
end
Loading

0 comments on commit 48e1843

Please sign in to comment.