module Shrine::Plugins::Signature

  1. lib/shrine/plugins/signature.rb

Documentation can be found on shrinerb.com/docs/plugins/signature

Methods

Public Class

  1. configure

Constants

LOG_SUBSCRIBER = -> (event) do Shrine.logger.info "Signature (#{event.duration}ms) – #{{ io: event[:io].class, algorithm: event[:algorithm], format: event[:format], uploader: event[:uploader], }.inspect}" end  
SUPPORTED_ALGORITHMS = SignatureCalculator::SUPPORTED_ALGORITHMS  
SUPPORTED_FORMATS = SignatureCalculator::SUPPORTED_FORMATS  

Public Class methods

configure(uploader, log_subscriber: LOG_SUBSCRIBER)
[show source]
   # File lib/shrine/plugins/signature.rb
16 def self.configure(uploader, log_subscriber: LOG_SUBSCRIBER)
17   # instrumentation plugin integration
18   uploader.subscribe(:signature, &log_subscriber) if uploader.respond_to?(:subscribe)
19 end