Sha256: 5721f6e57e74da212622566475e5c7fd05762638e569e94bb6fdcc825ff3ce59

Contents?: true

Size: 512 Bytes

Versions: 41

Compression:

Stored size: 512 Bytes

Contents

Dor::Identifiable.on_upgrade '3.6.1', 'Record Remediation Version' do |obj|
  version_tag = obj.identityMetadata.find_by_terms(:tag).find { |e| e.text =~ /Remediated By\s*:\s*(.+)/ }
  add_tag = false
  if version_tag
    current_version = Gem::Version.new($1)
    if current_version < Gem::Version.new(Dor::VERSION)
      version_tag.remove
      add_tag = true
    end
  else
    add_tag = true
  end

  if add_tag
    obj.identityMetadata.add_value :tag, "Remediated By : #{Dor::VERSION}"
  end
  add_tag
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
dor-services-4.25.1 lib/dor/migrations/identifiable/record_remediation.rb
dor-services-4.25.0 lib/dor/migrations/identifiable/record_remediation.rb
dor-services-5.15.1 lib/dor/migrations/identifiable/record_remediation.rb
dor-services-5.15.0 lib/dor/migrations/identifiable/record_remediation.rb
dor-services-5.14.2 lib/dor/migrations/identifiable/record_remediation.rb
dor-services-5.14.1 lib/dor/migrations/identifiable/record_remediation.rb
dor-services-5.14.0 lib/dor/migrations/identifiable/record_remediation.rb
dor-services-5.13.0 lib/dor/migrations/identifiable/record_remediation.rb
dor-services-5.12.0 lib/dor/migrations/identifiable/record_remediation.rb
dor-services-5.11.1 lib/dor/migrations/identifiable/record_remediation.rb
dor-services-5.11.0 lib/dor/migrations/identifiable/record_remediation.rb
dor-services-5.10.4 lib/dor/migrations/identifiable/record_remediation.rb
dor-services-5.10.3 lib/dor/migrations/identifiable/record_remediation.rb
dor-services-5.10.2 lib/dor/migrations/identifiable/record_remediation.rb
dor-services-5.10.1 lib/dor/migrations/identifiable/record_remediation.rb
dor-services-5.10.0 lib/dor/migrations/identifiable/record_remediation.rb
dor-services-5.9.1 lib/dor/migrations/identifiable/record_remediation.rb
dor-services-5.9.0 lib/dor/migrations/identifiable/record_remediation.rb
dor-services-5.8.2 lib/dor/migrations/identifiable/record_remediation.rb
dor-services-5.8.1 lib/dor/migrations/identifiable/record_remediation.rb