lib/longleaf/specs/metadata_builder.rb in longleaf-1.0.0 vs lib/longleaf/specs/metadata_builder.rb in longleaf-1.1.0
- old
+ new
@@ -27,10 +27,15 @@
def with_checksum(alg, value)
@checksums = Hash.new unless @data.key?(MF::CHECKSUMS)
@checksums[alg] = value
self
end
+
+ def with_physical_path(phys_path)
+ @physical_path = phys_path
+ self
+ end
def with_service(name, timestamp: ServiceDateHelper::formatted_timestamp, run_needed: false, properties: nil,
failure_timestamp: nil)
timestamp = format_timestamp(timestamp)
failure_timestamp = format_timestamp(failure_timestamp) unless failure_timestamp.nil?
@@ -54,10 +59,11 @@
services: @services,
deregistered: @deregistered,
registered: @registered,
checksums: @checksums,
file_size: @file_size,
- last_modified: @last_modified)
+ last_modified: @last_modified,
+ physical_path: @physical_path)
end
# Add the generated metadata record to the given file record
def register_to(file_rec)
file_rec.metadata_record = get_metadata_record