Sha256: 79cab434462160ec5d8d17a8921c00ac59fb23a94f65322140e8e5840f3f175c

Contents?: true

Size: 406 Bytes

Versions: 6

Compression:

Stored size: 406 Bytes

Contents

# Undesirable monkey patch we don't want to do.
require 'hyrax/derivative_path'
module Hyrax
  class DerivativePath
    def extension
      case destination_name
      when 'thumbnail'
        ".#{MIME::Types.type_for('jpg').first.extensions.first}"
      when 'display_raster'
        '.tif'
      when 'display_vector'
        '.zip'
      else
        ".#{destination_name}"
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
geo_works-0.2.0 lib/generators/geo_works/templates/config/initializers/hyrax_derivative_path_monkey_patch.rb
geo_works-0.1.4 lib/generators/geo_works/templates/config/initializers/hyrax_derivative_path_monkey_patch.rb
geo_works-0.1.3 lib/generators/geo_works/templates/config/initializers/hyrax_derivative_path_monkey_patch.rb
geo_works-0.1.2 lib/generators/geo_works/templates/config/initializers/hyrax_derivative_path_monkey_patch.rb
geo_works-0.1.1 lib/generators/geo_works/templates/config/initializers/hyrax_derivative_path_monkey_patch.rb
geo_works-0.1.0 lib/generators/geo_works/templates/config/initializers/hyrax_derivative_path_monkey_patch.rb