All Versions
45
Latest Version
Avg Release Cycle
65 days
Latest Release
1018 days ago

Changelog History
Page 1

  • v3.4.0 Changes

    June 14, 2021
    • ๐Ÿ’Ž base โ€“ Fix passing options to Shrine.Attachment on Ruby 3.0 (@lucianghinda)

    • determine_mime_type โ€“ Return correct image/svg+xml MIME type for SVGs with :fastimage analyzer (@Bandes)

    • โš  activerecord โ€“ Fix keyword argument warning when adding errors with options (@janko)

    • entity โ€“ Make Attacher#read method public (@janko)

    • entity โ€“ Reset attachment dirty tracking in Attacher#reload (@janko)

    • activerecord โ€“ Don't load the attacher on ActiveRecord::Base#reload if it hasn't yet been initialized (@janko)

    • sequel โ€“ Don't load the attacher on Sequel::Model#reload if it hasn't yet been initialized (@janko)

  • v3.3.0 Changes

    October 04, 2020
    • ๐Ÿ‘ s3 - Support new Aws::S3::EncryptionV2::Client for client-side encryption (@janko)

    • derivation_endpoint โ€“ Reduce possibility of timing attacks when comparing signatures (@esparta)

    • 0๏ธโƒฃ derivatives โ€“ Avoid downloading the attached file when calling default no-op processor (@janko)

    • derivatives โ€“ Add :download processor setting for skipping downloading source file (@jrochkind, @janko)

    • derivatives โ€“ Copy non-file source IO objects into local file before passing them to the processor (@jrochkind)

    • sequel โ€“ Call Attacher#reload in Sequel::Model#reload, which keeps rest of attacher state (@janko, @jrochkind)

    • activerecord โ€“ Call Attacher#reload in ActiveRecord::Base#reload, which keeps rest of attacher state (@janko, @jrochkind)

    • ๐Ÿ“‡ add_metadata โ€“ Add :skip_nil option for excluding metadata keys whose values are nil (@renchap)

    • store_dimensions โ€“ Add :auto_extraction option for disabling automatically extracting dimensions on upload (@renchap)

    • mirroring โ€“ Forward original upload options when mirroring upload (@corneverbruggen)

    • derivation_endpoint โ€“ Apply version URL option in derivation endpoint (@janko)

    • ๐Ÿšš remove_attachment โ€“ Delete removed file if a new file was attached right after removal (@janko)

    • upload_endpoint โ€“ Fix Shrine.upload_response not working in a Rails controller (@pldavid2)

    • presign_endpoint โ€“ Add OPTIONS route that newer versions of Uppy check (@janko)

    • derivatives โ€“ Add :create_on_promote option for auto-creating derivatives on promotion (@janko)

    • ๐Ÿ‘ s3 โ€“ Add back support for client-side encryption (@janko)

    • memory โ€“ Ensure Memory#open returns content in original encoding (@jrochkind)

  • v3.2.2 Changes

    August 05, 2020
    • s3 โ€“ Fix S3#open not working on aws-sdk-core 3.104 and above (@janko)
  • v3.2.1 Changes

    January 12, 2020
    • derivation_endpoint โ€“ Use Rack::Files constant on Rack >= 2.1 (@janko)

    • ๐Ÿ›  Fix Ruby 2.7 warnings regarding separation of positional and keyword arguments (@janko)

    • s3 โ€“ Make S3#open handle empty S3 objects (@janko)

  • v3.2.0 Changes

    December 17, 2019
    • validation โ€“ Run validation on Attacher#attach & Attacher#attach_cached instead of Attacher#change (@janko)

    • ๐Ÿšš remove_invalid โ€“ Activate also when Attacher#validate is run manually (@janko)

    • ๐Ÿšš remove_invalid โ€“ Fix incompatibility with derivatives plugin (@janko)

    • ๐Ÿ”Œ type_predicates โ€“ Add new plugin with convenient UploadedFile predicate methods based on MIME type (@janko)

    • core โ€“ Allow assigning back current attached file data (@janko)

    • derivatives โ€“ Fix :derivative value inconsistency when derivatives are being promoted (@janko)

    • ๐Ÿ“‡ add_metadata โ€“ Add #add_metadata method for adding metadata to uploaded files (@janko)

    • ๐Ÿ›ฐ derivatives โ€“ Add :io and :attacher values to instrumentation event payload (@janko)

  • v3.1.0 Changes

    November 15, 2019
    • default_storage โ€“ Coerce storage key to symbol in Attacher#cache_key & Attacher#store_key (@janko)

    • core โ€“ Coerce storage key to symbol in Attacher#cache_key & Attacher#store_key (@janko)

    • ๐Ÿ“‡ add_metadata โ€“ Define metadata methods only for the target uploader class (@janko)

    • derivatives โ€“ Add :storage option to Attacher#create_derivatives (@janko)

    • ๐Ÿ’Ž store_dimensions โ€“ Propagate exceptions on loading ruby-vips in :vips analyzer (@janko)

    • signature โ€“ Allow skipping rewinding by passing rewind: false to Shrine.signature (@janko)

    • derivatives โ€“ Add Attacher.derivatives alias for Attacher.derivatives_processor (@janko)

  • v3.0.1 Changes

    October 17, 2019
    • ๐Ÿ“‡ metadata_attributes โ€“ Fix exception being raised when there is no attached file (@janko)

    • core โ€“ Simplify UploadedFile#inspect output (@janko)

  • v3.0.0 Changes

    October 14, 2019
    • derivation_endpoint โ€“ Pass action: :derivation when uploading derivation results (@janko)

    • core โ€“ Add Shrine::Attachment[] shorthand for Shrine::Attachment.new (@janko)

    • ๐Ÿ›  core โ€“ Add Storage#delete_prefixed method for deleting all files in specified directory (@jrochkind)

    • ๐Ÿ‘• linter โ€“ Return true in Storage::Linter#call so that it can be used with assert (@jrochkind)

    • ๐Ÿ‘• linter โ€“ Allow Storage::Linter to accept a key that will be used for testing nonexistent file (@janko)

    • ๐Ÿ“‡ core โ€“ Infer file extension from filename metadata (@janko)

    • pretty_location โ€“ Add :class_underscore option for underscoring class name (@Uysim)

    • โšก๏ธ Update down dependency to ~> 5.0 (@janko)

    • ๐Ÿ”Œ multi_cache โ€“ Add new plugin for whitelisting additional temporary storages (@janko, @jrochkind)

    • sequel โ€“ Extract callback code into attacher methods that can be overridden (@janko)

    • activerecord โ€“ Extract callback code into attacher methods that can be overridden (@janko)

    • derivation_endpoint โ€“ Stop re-opening File objects returned in derivation result (@janko)

    • derivation_endpoint โ€“ Allow only File or Tempfile object as derivation result (@janko)

    • download_endpoint โ€“ Add Shrine.download_response for calling in controller (@janko)

    • core โ€“ Fetch storage object lazily in Shrine instance (@janko)

    • ๐Ÿ”Œ mirroring โ€“ Add new plugin for replicating uploads and deletes to other storages (@janko)

    • sequel โ€“ Rename :callbacks option to :hooks (@janko)

    • model โ€“ Add Attacher#set_model for setting model without loading attachment (@janko)

    • entity โ€“ Add Attacher#set_entity for setting entity without loading attachment (@janko)

    • entity โ€“ Define #<name>_attacher class method when including Shrine::Attachment (@janko)

    • ๐Ÿ›ฐ derivation_endpoint โ€“ Send only :derivation in the instrumentation event payload (@janko)

    • 0๏ธโƒฃ default_storage โ€“ Add Attacher.default_cache and Attacher.default_store for settings (@janko)

    • ๐Ÿ—„ default_storage โ€“ Deprecate record & name arguments to storage block (@janko)

    • 0๏ธโƒฃ default_storage โ€“ Evaluate storage block in context of Attacher instance (@janko)

    • ๐Ÿ”Œ Unify persistence plugin interface (@janko)

    • upload_options โ€“ Keep Shrine#_upload private (@janko)

    • infer_extension โ€“ Keep Shrine#basic_location private (@janko)

    • model โ€“ Add #<name>_changed? method to attachment module (@janko)

    • ๐Ÿ”Œ Make it easier for plugins to define entity and model attachment methods (@janko)

    • ๐Ÿ”Œ form_assign โ€“ Add new plugin for assigning attachment from form params without a form object (@janko)

    • derivation_endpoint โ€“ Allow passing generic IO objects to Derivation#upload (@janko)

    • derivation_endpoint โ€“ Accept additional uploader options in Derivation#upload (@janko)

    • derivation_endpoint โ€“ Close the uploaded file in Derivation#upload (@janko)

    • core โ€“ Stop rescuing IO#close exceptions in Shrine#upload (@janko)

    • core โ€“ Add :delete option to Shrine#upload for deleting uploaded file (@janko)

    • s3 โ€“ Stop returning :object in Down::ChunkedIO#data in S3#open (@janko)

    • s3 โ€“ Eliminate #head_object request in S3#open (@janko)

    • ๐Ÿšš download_endpoint โ€“ Remove extra Storage#exists? check (@janko)

    • derivation_endpoint โ€“ Add Derivation#opened for retrieving an opened derivation result (@janko)

    • ๐Ÿšš derivation_endpoint โ€“ Remove extra Storage#exists? check when :upload is enabled but not :upload_redirect (@janko)

    • derivation_endpoint - Don't pass source UploadedFile object when :download is false (@janko)

    • ๐Ÿšš derivation_endpoint โ€“ Remove :include_uploaded_file option (@janko)

    • derivation_endpoint โ€“ Evaluate derivation block in context of Shrine::Derivation (@janko)

    • ๐Ÿšš derivation_endpoint โ€“ Remove :download_errors option (@janko)

    • memory โ€“ Raise Shrine::FileNotFound on nonexistent file in Memory#open (@janko)

    • file_system โ€“ Raise Shrine::FileNotFound on nonexistent file in FileSystem#open (@janko)

    • s3 โ€“ Raise Shrine::FileNotFound on nonexistent object in S3#open (@janko)

    • ๐Ÿ‘ป core โ€“ Add Shrine::FileNotFound exception and require storages to raise it on Storage#open (janko)

    • ๐Ÿ“‡ instrumentation โ€“ Remove :metadata from :options in metadata.shrine event (@janko)

    • ๐Ÿ“‡ instrumentation โ€“ Remove :location, :upload_options and :metadata from :options in upload.shrine event (@janko)

    • ๐Ÿ“‡ instrumentation โ€“ Add :metadata to the upload.shrine event (@janko)

    • ๐Ÿ‘ download_endpoint โ€“ Drop support for legacy /:storage/:id URLs (@janko)

    • core โ€“ In UploadedFile#== require files to be of the same class (@janko)

    • core โ€“ Add :close option to Shrine#upload for preventing closing file after upload (@janko)

    • memory โ€“ Add Shrine::Storage::Memory from shrine-memory gem (@janko)

    • default_url_options โ€“ Rename to just url_options (@janko)

    • ๐Ÿ—„ delete_raw โ€“ Deprecate plugin in favour of derivatives (@janko)

    • ๐Ÿ—„ recache โ€“ Deprecate plugin in favour of derivatives (@janko)

    • ๐Ÿ—„ processing โ€“ Deprecate plugin in favour of derivatives (@janko)

    • ๐Ÿ—„ versions โ€“ Deprecate plugin in favour of derivatives (@janko)

    • ๐Ÿ”Œ derivatives โ€“ Add new plugin for storing processed files (@janko)

    • derivation_endpoint โ€“ Allow using symbol and string derivation names interchangeably (@janko)

    • ๐Ÿšš dynamic_storage โ€“ Remove Shrine.dynamic_storages method (@janko)

    • core โ€“ Deep duplicate Shrine.opts on subclassing (@janko)

    • core โ€“ Add Attacher#file! which asserts that a file is attached (@janko)

    • core โ€“ Change Shrine.uploaded_file to raise ArgumentError on invalid input (@janko)

    • ๐Ÿ—„ module_include โ€“ Deprecate plugin over overriding core classes directly (@janko)

    • core โ€“ Add Attacher#cache_key and Attacher#store_key which return storage identifiers (@janko)

    • ๐Ÿ‘• linter โ€“ Call Storage#open with options as second argument (@janko)

    • core โ€“ Allow data hash passed to UploadedFile.new to have symbol keys (@janko)

    • core โ€“ Change how Shrine::UploadedFile sets its state from the given data hash (@janko)

    • ๐Ÿ—„ core โ€“ Deprecate Storage#open not accepting additional options (@janko)

    • ๐Ÿ“‡ refresh_metadata โ€“ Add Attacher#refresh_metadata! method which integrates with model plugin (@janko)

    • instrumentation โ€“ Instrument any Storage#open calls in a new open.shrine event (@janko)

    • restore_cached_data โ€“ Forward options passed to Attacher#attach_cached to metadata extraction (@janko)

    • validation โ€“ Allow skipping validations on attaching by passing validate: false (@janko)

    • validation โ€“ Add :validate option to Attacher#assign or Attacher#attach for passing options to validation block (@janko)

    • ๐Ÿ”Œ validation โ€“ Extract validation functionality into the new plugin (@janko)

    • ๐Ÿ”€ upload_options โ€“ Upload options from the block are now merged with passed options instead of replaced (@janko)

    • upload_endpoint โ€“ Stop passing Rack::Request object to the uploader (@janko)

    • ๐Ÿ”Œ remote_url โ€“ Require custom downloaders to raise Shrine::Plugins::RemoteUrl::DownloadError for conversion into a validation error (@janko)

    • infer_extension โ€“ Fix compatibility with the pretty_location plugin (@janko)

    • ๐Ÿšš presign_endpoint โ€“ Remove deprecated Shrine::Plugins::PresignEndpoint::App constant (@janko)

    • ๐Ÿšš keep_files โ€“ Remove the ability to choose whether to keep only destroyed or only replaced files (@janko)

    • ๐Ÿšš infer_extension โ€“ Remove Shrine#infer_extension method (@janko)

    • default_url_options โ€“ Allow overriding passed URL options by deleting them inside the block (@janko)

    • cached_attachment_data โ€“ Rename Attacher#read_cached to Attacher#cached_data (@janko)

    • sequel โ€“ Add Attacher#atomic_promote and Attacher#atomic_persist (@janko)

    • ๐Ÿšš sequel โ€“ Remove persistence from Attacher#promote (@janko)

    • ๐Ÿšš activerecord โ€“ Remove persistence from Attacher#promote (@janko)

    • ๐Ÿ”Œ atomic_helpers โ€“ Add new plugin with helper methods for atomic promotion and persistence (@janko)

    • backgrounding โ€“ Add Attacher#promote_block & Attacher#destroy_block for overriding class level blocks (@janko)

    • backgrounding โ€“ Add Attacher.promote_block & Attacher.destroy_block on class level (@janko)

    • ๐Ÿšš backgrounding โ€“ Remove overriding Attacher#swap with atomic promotion (@janko)

    • ๐Ÿšš backgrounding โ€“ Remove Attacher.promote, Attacher.delete, Attacher.dump, Attacher#dump, Attacher.load, Attacher.load_record (@janko)

    • model โ€“ Allow disabling caching to temporary storage on assignment (@janko)

    • model โ€“ Add Attacher.from_model, Attacher#write (@janko)

    • ๐Ÿ”Œ model โ€“ Add new plugin for integrating with mutable structs (@janko)

    • entity โ€“ Add Attacher.from_entity, Attacher#reload, Attacher#column_values, Attacher#attribute (@janko)

    • ๐Ÿ”Œ entity โ€“ Add new plugin for integrating with immutable structs (@janko)

    • 0๏ธโƒฃ column โ€“ Allow changing column serializer from default JSON library (@janko)

    • column โ€“ Add Attacher#column_data and Attacher.from_column methods (@janko)

    • ๐Ÿ”Œ column โ€“ Add new plugin for (de)serializing attacher data (@janko)

    • ๐Ÿšš attachment โ€“ Removed any default attachment methods (@janko)

    • core โ€“ Require context hash passed as second argument to Shrine#upload to have symbol keys (@janko)

    • core โ€“ Change Shrine.uploaded_file not to yield files anymore (@janko)

    • core โ€“ Allow Shrine.uploaded_file to accept file data hashes with symbol keys (@janko)

    • ๐Ÿšš core โ€“ Remove Shrine#uploaded?

    • ๐Ÿšš core โ€“ Remove Shrine#delete, Shrine#_delete, Shrine#remove (@janko)

    • ๐Ÿšš core โ€“ Remove Shrine#store, Shrine#_store, Shrine#put, Shrine#copy (@janko)

    • ๐Ÿšš core โ€“ Remove Shrine#processed, Shrine#process (@janko)

    • core โ€“ Don't pass :phase anymore on uploads (@janko)

    • core โ€“ Read attachment from the record attribute only on initialization (@janko)

    • core โ€“ Don't require a temporary storage (@janko)

    • core โ€“ Add Attacher#data and Attacher.from_data for dumping to and loading from a Hash (@janko)

    • ๐Ÿ‘ป core โ€“ Change Attacher#assign to raise exception when non-cached file is assigned (@janko)

    • core โ€“ Enable Attacher#assign to accept cached file data as a Hash (@janko)

    • core โ€“ Add Attacher#file alias for Attacher#get (@janko)

    • core โ€“ Change Attacher#attached? to return whether a file is attached (@janko)

    • core โ€“ Change Attacher#promote to always only save promoted file in memory (@janko)

    • core โ€“ Rename Attacher#replace to Attacher#destroy_previous (@janko)

    • core โ€“ Remove Attacher#_promote and Attacher#_delete, add Attacher#promote_cached and Attacher#destroy_attached (@janko)

    • core โ€“ Rename Attacher#set and Attacher#_set to Attacher#change and Attacher#set (@janko)

    • ๐Ÿšš core โ€“ Remove Attacher#cache! and Attacher#store!, add Attacher#upload (@janko)

    • core โ€“ Rename Attacher#validate_block to Attacher#_validate (@janko)

    • core โ€“ Add Attacher#attach, Attacher#attach_cached, extracted from Attacher#assign (@janko)

    • core โ€“ Remove Attacher#swap, Attacher#update, Attacher#read, Attacher#write, Attacher#data_attribute, Attacher#convert_to_data, Attacher#convert_before_write, and Attacher#convert_after_read (@janko)

    • core โ€“ Change Attacher.new to not accept a model anymore (@janko)

    • ๐Ÿšš delete_promoted โ€“ Remove plugin (@janko)

    • ๐Ÿšš parsed_json โ€“ Remove plugin (@janko)

    • ๐Ÿšš parallelize โ€“ Remove plugin (@janko)

    • ๐Ÿšš hooks โ€“ Remove plugin (@janko)

    • ๐Ÿšš core โ€“ Remove deprecated Shrine::IO_METHODS constant (@janko)

    • ๐Ÿ“‡ s3 โ€“ Replace source object metadata when copying a file from S3 (@janko)

    • core โ€“ Change UploadedFile#storage_key to return a Symbol instead of a String (@janko)

    • infer_extension โ€“ Make :mini_mime the default analyzer (@janko)

    • ๐Ÿ’Ž Bring back Ruby 2.3 support (@janko)

    • versions โ€“ Remove deprecated :version_names, Shrine.version_names and Shrine.version? (@janko)

    • ๐Ÿšš validation_helpers โ€“ Remove support for regexes in MIME type or extension validations (@janko)

    • validation_helpers โ€“ Don't require #width and #height methods to be defined on UploadedFile (@janko)

    • ๐Ÿ“‡ validation_helpers โ€“ Fail dimensions validations when width or height metadata is missing (@janko)

    • ๐Ÿšš upload_endpoint โ€“ Remove deprecated Shrine::Plugins::UploadEndpoint::App constant (@janko)

    • determine_mime_type โ€“ Remove Shrine#mime_type_analyzers method (@janko)

    • ๐Ÿšš store_dimensions โ€“ Remove Shrine#extract_dimensions and Shrine#dimensions_analyzers methods (@janko)

    • ๐Ÿšš rack_file โ€“ Remove deprecated Shrine::Plugins::RackFile::UploadedFile constant (@janko)

    • ๐Ÿ‘ rack_file โ€“ Drop support for passing file hash to Shrine#upload and Shrine#store (@janko)

    • ๐Ÿšš download_endpoint โ€“ Move Shrine::Plugins::DownloadEndpoint::App into Shrine::DownloadEndpoint (@janko)

    • ๐Ÿšš download_endpoint โ€“ Remove deprecated Shrine::DownloadEndpoint constant (@janko)

    • ๐Ÿšš download_endpoint โ€“ Remove deprecated :storages option (@janko)

    • determine_mime_type โ€“ Remove deprecated :default analyzer alias (@janko)

    • ๐Ÿšš default_url โ€“ Remove deprecated block argument when loading the plugin (@janko)

    • ๐Ÿšš data_uri โ€“ Remove deprecated Shrine::Plugins::DataUri::DataFile constant (@janko)

    • ๐Ÿšš data_uri โ€“ Remove deprecated :filename plugin option (@janko)

    • cached_attachment_data โ€“ Remove deprecated model setter (@janko)

    • ๐Ÿšš file_system โ€“ Remove deprecated :older_than option in FileSystem#clear! (@janko)

    • file_system โ€“ Don't accept a block anymore in FileSystem#open (@janko)

    • ๐Ÿšš file_system โ€“ Remove deprecated FileSystem#download method (@janko)

    • ๐Ÿšš file_system โ€“ Make FileSystem#movable? and FileSystem#move methods private (@janko)

    • ๐Ÿšš file_system โ€“ Remove deprecation warning on unrecognized options in FileSystem#upload (@janko)

    • ๐Ÿšš file_system โ€“ Remove deprecated :host option for FileSystem#initialize (@janko)

    • ๐Ÿšš moving โ€“ Remove deprecated plugin (@janko)

    • ๐Ÿšš multi_delete โ€“ Remove deprecated plugin (@janko)

    • ๐Ÿšš direct_upload โ€“ Remove deprecated plugin (@janko)

    • ๐Ÿšš backup โ€“ Remove deprecated plugin (@janko)

    • ๐Ÿšš background_helpers โ€“ Remove deprecated plugin (@janko)

    • ๐Ÿšš migration_helpers โ€“ Remove deprecated plugin (@janko)

    • ๐Ÿšš copy โ€“ Remove deprecated plugin (@janko)

    • ๐Ÿšš logging โ€“ Remove deprecated plugin (@janko)

    • ๐Ÿšš s3 โ€“ Remove deprecated S3#download method (@janko)

    • ๐Ÿšš s3 โ€“ Remove deprecated S3#stream method (@janko)

    • ๐Ÿ‘ presign_endpoint โ€“ Drop support for presign objects that don't respond to #to_h (@janko)

    • s3 โ€“ Return a Hash in S3#presign when method is POST (@janko)

    • ๐Ÿšš s3 โ€“ Remove :download option in S3#url (@janko)

    • ๐Ÿšš s3 โ€“ Remove support for non URI-escaped content disposition values (@janko)

    • ๐Ÿšš s3 โ€“ Remove S3#s3 method (@janko)

    • ๐Ÿšš s3 โ€“ Remove support for specifying :multipart_threshold as an integer (@janko)

    • ๐Ÿšš s3 โ€“ Remove :host option on S3#initialize (@janko)

    • ๐Ÿ‘ s3 โ€“ Drop support for aws-sdk-s3 versions lower than 1.14 (@janko)

    • ๐Ÿ‘ s3 โ€“ Drop support for aws-sdk 2.x (@janko)

  • v3.0.0.rc

    September 28, 2019
  • v3.0.0.beta3

    September 25, 2019