Sha256: dd01dcbb61ac79f1d4ad180818d60ab9a4775e7510e0fe9456195496083ecb7c

Contents?: true

Size: 650 Bytes

Versions: 43

Compression:

Stored size: 650 Bytes

Contents

module Hyrax
  class FixityCheckFailureService < AbstractMessageService
    attr_reader :log_date, :checksum_audit_log, :file_set

    def initialize(file_set, checksum_audit_log:)
      @file_set = file_set
      @checksum_audit_log = checksum_audit_log
      @log_date = checksum_audit_log.created_at

      user = ::User.find_by_user_key(file_set.depositor)

      super(file_set, user)
    end

    def message
      uri = file_set.original_file.uri.to_s
      file_title = file_set.title.first
      "The fixity check run at #{log_date} for #{file_title} (#{uri}) failed."
    end

    def subject
      'Failing Fixity Check'
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
hyrax-2.9.6 app/services/hyrax/fixity_check_failure_service.rb
hyrax-2.9.5 app/services/hyrax/fixity_check_failure_service.rb
hyrax-2.9.4 app/services/hyrax/fixity_check_failure_service.rb
hyrax-2.9.3 app/services/hyrax/fixity_check_failure_service.rb
hyrax-2.9.2 app/services/hyrax/fixity_check_failure_service.rb
hyrax-2.9.1 app/services/hyrax/fixity_check_failure_service.rb
hyrax-2.9.0 app/services/hyrax/fixity_check_failure_service.rb
hyrax-2.8.0 app/services/hyrax/fixity_check_failure_service.rb
hyrax-2.7.2 app/services/hyrax/fixity_check_failure_service.rb
hyrax-2.7.1 app/services/hyrax/fixity_check_failure_service.rb
hyrax-2.7.0 app/services/hyrax/fixity_check_failure_service.rb
hyrax-2.6.0 app/services/hyrax/fixity_check_failure_service.rb
hyrax-2.5.1 app/services/hyrax/fixity_check_failure_service.rb
hyrax-2.5.0 app/services/hyrax/fixity_check_failure_service.rb
hyrax-2.4.1 app/services/hyrax/fixity_check_failure_service.rb
hyrax-2.4.0 app/services/hyrax/fixity_check_failure_service.rb
hyrax-2.3.3 app/services/hyrax/fixity_check_failure_service.rb
hyrax-2.3.2 app/services/hyrax/fixity_check_failure_service.rb
hyrax-2.3.1 app/services/hyrax/fixity_check_failure_service.rb
hyrax-2.3.0 app/services/hyrax/fixity_check_failure_service.rb