Skip to content

Commit

Permalink
prune present? and blank? commands
Browse files Browse the repository at this point in the history
  • Loading branch information
mnyrop committed Nov 9, 2023
1 parent 21a4935 commit 1d38d74
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion aperitiiif.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
spec.require_paths = ['lib']

spec.add_dependency 'colorize'
spec.add_dependency 'iiif-presentation'
spec.add_dependency 'iiif-presentation', '1.1'
spec.add_dependency 'liquid'
spec.add_dependency 'mimemagic'
spec.add_dependency 'parallel'
Expand Down
2 changes: 1 addition & 1 deletion lib/aperitiiif/batch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def seed
'label' => config.label,
'description' => config.batch_description,
'attribution' => config.batch_attribution
}.delete_if { |_key, val| val.blank? }
}.delete_if { |_key, val| val.to_s.empty? }
end

def iiif_collection
Expand Down
2 changes: 1 addition & 1 deletion lib/aperitiiif/batch/records.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def records_file_exists?(file = config.records_file)
def load_records!
self.items = items.map do |item|
record = find_record(item.id, records)
item.record = record if record.present?
item.record = record unless record.to_s.empty?
item
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/aperitiiif/item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def seed
'description' => record.description,
'source' => record.source,
'metadata' => record.custom_metadata
}.delete_if { |_key, val| val.blank? }
}.delete_if { |_key, val| val.to_s.empty? }
end

def build_manifest
Expand Down

0 comments on commit 1d38d74

Please sign in to comment.