Shrine v2.6.0 Release Notes
Release Date: 2017-04-04 // almost 7 years ago-
๐ Make
Shrine::Storage::FileSystem#path
public which returns path to the file as aPathname
object (@janko)Add
Shrine.rack_file
torack_file
plugin for converting Rack uploaded file hash into an IO (@janko)๐ Deprecate passing a Rack file hash to
Shrine#upload
(@janko)Expose
Shrine.extract_dimensions
andShrine.dimensions_analyzers
instore_dimensions
plugin (@janko)โ Add
metadata_attributes
plugin for syncing attachment metadata with additional record attributes (@janko)Remove the undocumented
:magic_header
option fromdetermine_mime_type
plugin (@janko)Expose
Shrine.determine_mime_type
andShrine.mime_type_analyzers
indetermine_mime_type
plugin (@janko)โ Add
signature
plugin for calculating a SHA{1,256,384,512}/MD5/CRC32 hash of a file (@janko)๐ Return the resolved plugin module when calling
Shrine.plugin
(@janko)๐ Accept hash of metadata with symbol keys as well in
add_metadata
block (@janko)โ Add
refresh_metadata
plugin for re-extracting metadata from an uploaded file (@janko)๐ Allow S3 storage to use parallelized multipart upload for files from FileSystem storage as well (@janko)
๐ Improve default multipart copy threshold for S3 storage (@janko)
๐ Allow specifying multipart upload and copy thresholds separately in
Shrine::Storage::S3
(@janko)๐ Fix
Storage::FileSystem#clear!
not deleting old files if there are newer files in the same directory (@janko)๐ Allow media type in the data URI to have additional parameters (@janko)
URI-decode non-base64 data URIs, as such data URIs are URI-encoded according to the specification (@janko)
๐ Improve performance of parsing data URIs by 10x switching from a regex to StringScanner (@janko)
โฌ๏ธ Reduce memory usage of
Shrine.data_uri
andUploadedFile#base64
by at least 2x (@janko)Add
Shrine.data_uri
todata_uri
plugin which parses and converts the given data URI to an IO object (@janko)๐ Make
rack_file
plugin work with HashWithIndifferentAccess-like objects such as Hashie::Mash (@janko)๐ฆ Expose
Aws::S3::Client
viaShrine::Storage::S3#client
, and deprecateShrine::Strorage::S3#s3
(@janko)๐ Modify
delete_raw
plugin to delete any IOs that respond to#path
(@janko)Require the Tempfile standard library in lib/shrine.rb (@janko)
๐ Deprecate dimensions validations passing when a dimension is nil (@janko)
๐ Deprecate passing regexes to type/extension whitelists/blacklists in
validation_helpers
(@janko)0๏ธโฃ Don't include list of blacklisted types and extensions in default
validation_helpers
messages (@janko)๐ Improve default error messages in
validation_helpers
plugin (@janko)๐ Don't require the
benchmark
standard library inlogging
plugin (@janko)Don't dirty the attacher in
Attacher#set
when attachment hasn't changed (@janko)๐ Rename
Attacher#attached?
to a more accurateAttacher#changed?
(@janko)๐ Allow calling
Attacher#finalize
if attachment hasn't changed, instead of raising an error (@janko)๐ Make
Shrine::Storage::S3#object
method public (@janko)Prevent autoloading race conditions in aws-sdk gem by eager loading the S3 service (@janko)
Raise
Shrine::Error
whenShrine#generate_location
returns nil (@janko)