Sha256: 369aef104977d387a38c76660fa424d199082fe012e45274296e8514b50073cf

Contents?: true

Size: 513 Bytes

Versions: 81

Compression:

Stored size: 513 Bytes

Contents

# frozen_string_literal: true

module Spotlight
  # Used by RIIIF to find files uploaded by carrierwave
  class CarrierwaveFileResolver < Riiif::AbstractFileSystemResolver
    # Override initialzer to avoid deprecation about not providing base path
    def initialize
      # nop
    end

    def pattern(id)
      uploaded_file = Spotlight::FeaturedImage.find(id).image.file
      raise Riiif::ImageNotFoundError, "unable to find file for #{id}" if uploaded_file.nil?

      uploaded_file.file
    end
  end
end

Version data entries

81 entries across 81 versions & 1 rubygems

Version Path
blacklight-spotlight-4.7.0 app/services/spotlight/carrierwave_file_resolver.rb
blacklight-spotlight-4.6.1 app/services/spotlight/carrierwave_file_resolver.rb
blacklight-spotlight-4.6.0 app/services/spotlight/carrierwave_file_resolver.rb
blacklight-spotlight-4.5.0 app/services/spotlight/carrierwave_file_resolver.rb
blacklight-spotlight-4.4.0 app/services/spotlight/carrierwave_file_resolver.rb
blacklight-spotlight-4.3.6 app/services/spotlight/carrierwave_file_resolver.rb
blacklight-spotlight-4.3.5 app/services/spotlight/carrierwave_file_resolver.rb
blacklight-spotlight-4.3.4 app/services/spotlight/carrierwave_file_resolver.rb
blacklight-spotlight-4.3.3 app/services/spotlight/carrierwave_file_resolver.rb
blacklight-spotlight-4.3.2 app/services/spotlight/carrierwave_file_resolver.rb
blacklight-spotlight-4.3.1 app/services/spotlight/carrierwave_file_resolver.rb
blacklight-spotlight-4.3.0 app/services/spotlight/carrierwave_file_resolver.rb
blacklight-spotlight-4.2.0 app/services/spotlight/carrierwave_file_resolver.rb
blacklight-spotlight-4.1.2 app/services/spotlight/carrierwave_file_resolver.rb
blacklight-spotlight-4.1.1 app/services/spotlight/carrierwave_file_resolver.rb
blacklight-spotlight-4.1.0 app/services/spotlight/carrierwave_file_resolver.rb
blacklight-spotlight-4.0.3 app/services/spotlight/carrierwave_file_resolver.rb
blacklight-spotlight-4.0.2 app/services/spotlight/carrierwave_file_resolver.rb
blacklight-spotlight-4.0.1 app/services/spotlight/carrierwave_file_resolver.rb
blacklight-spotlight-4.0.0 app/services/spotlight/carrierwave_file_resolver.rb