Sha256: 337246fdc50141af083f1fa0846be4713f96c1f8345df060daa8d27071f51204

Contents?: true

Size: 756 Bytes

Versions: 21

Compression:

Stored size: 756 Bytes

Contents

# frozen_string_literal: true
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
      I18n.t('hyrax.notifications.fixity_check_failure.message', log_date: log_date, file_title: file_title, uri: uri)
    end

    def subject
      I18n.t('hyrax.notifications.fixity_check_failure.subject')
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
hyrax-5.0.0.rc1 app/services/hyrax/fixity_check_failure_service.rb
hyrax-3.6.0 app/services/hyrax/fixity_check_failure_service.rb
hyrax-4.0.0 app/services/hyrax/fixity_check_failure_service.rb
hyrax-4.0.0.rc3 app/services/hyrax/fixity_check_failure_service.rb
hyrax-4.0.0.rc2 app/services/hyrax/fixity_check_failure_service.rb
hyrax-4.0.0.rc1 app/services/hyrax/fixity_check_failure_service.rb
hyrax-3.5.0 app/services/hyrax/fixity_check_failure_service.rb
hyrax-4.0.0.beta2 app/services/hyrax/fixity_check_failure_service.rb
hyrax-3.4.2 app/services/hyrax/fixity_check_failure_service.rb
hyrax-4.0.0.beta1 app/services/hyrax/fixity_check_failure_service.rb
hyrax-3.4.1 app/services/hyrax/fixity_check_failure_service.rb
hyrax-3.4.0 app/services/hyrax/fixity_check_failure_service.rb
hyrax-3.3.0 app/services/hyrax/fixity_check_failure_service.rb
hyrax-3.2.0 app/services/hyrax/fixity_check_failure_service.rb
hyrax-3.1.0 app/services/hyrax/fixity_check_failure_service.rb
hyrax-3.0.2 app/services/hyrax/fixity_check_failure_service.rb
hyrax-3.0.1 app/services/hyrax/fixity_check_failure_service.rb
hyrax-3.0.0 app/services/hyrax/fixity_check_failure_service.rb
hyrax-3.0.0.pre.rc4 app/services/hyrax/fixity_check_failure_service.rb
hyrax-3.0.0.pre.rc3 app/services/hyrax/fixity_check_failure_service.rb