Sha256: d5a6810eef0e7d2cf4fa1f6926a44ccc9234557424f6ab3165e1aaafd310048c

Contents?: true

Size: 616 Bytes

Versions: 24

Compression:

Stored size: 616 Bytes

Contents

# frozen_string_literal: true
module Hyrax
  ##
  # Provide "simple", paths for the valkyrie disk storage adapter.
  #
  # By default, Valkyrie does bucketed/pairtree style paths. Since some of our
  # older on-disk file storage does not do this, we need this to provide
  # backward compatibility.
  class ValkyrieSimplePathGenerator
    attr_reader :base_path

    def initialize(base_path:)
      @base_path = base_path
    end

    def generate(resource:, file:, original_filename:) # rubocop:disable Lint/UnusedMethodArgument
      Pathname.new(base_path).join(resource.id, original_filename)
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
hyrax-5.1.0.pre.beta1 lib/hyrax/valkyrie_simple_path_generator.rb
hyrax-5.0.4 lib/hyrax/valkyrie_simple_path_generator.rb
hyrax-5.0.3 lib/hyrax/valkyrie_simple_path_generator.rb
hyrax-5.0.2 lib/hyrax/valkyrie_simple_path_generator.rb
hyrax-5.0.1 lib/hyrax/valkyrie_simple_path_generator.rb
hyrax-5.0.0 lib/hyrax/valkyrie_simple_path_generator.rb
hyrax-5.0.0.rc3 lib/hyrax/valkyrie_simple_path_generator.rb
hyrax-5.0.0.rc2 lib/hyrax/valkyrie_simple_path_generator.rb
hyrax-5.0.0.rc1 lib/hyrax/valkyrie_simple_path_generator.rb
hyrax-3.6.0 lib/hyrax/valkyrie_simple_path_generator.rb
hyrax-4.0.0 lib/hyrax/valkyrie_simple_path_generator.rb
hyrax-4.0.0.rc3 lib/hyrax/valkyrie_simple_path_generator.rb
hyrax-4.0.0.rc2 lib/hyrax/valkyrie_simple_path_generator.rb
hyrax-4.0.0.rc1 lib/hyrax/valkyrie_simple_path_generator.rb
hyrax-3.5.0 lib/hyrax/valkyrie_simple_path_generator.rb
hyrax-4.0.0.beta2 lib/hyrax/valkyrie_simple_path_generator.rb
hyrax-3.4.2 lib/hyrax/valkyrie_simple_path_generator.rb
hyrax-4.0.0.beta1 lib/hyrax/valkyrie_simple_path_generator.rb
hyrax-3.4.1 lib/hyrax/valkyrie_simple_path_generator.rb
hyrax-3.4.0 lib/hyrax/valkyrie_simple_path_generator.rb