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 a Pathname object (@janko)

    • Add Shrine.rack_file to rack_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 and Shrine.dimensions_analyzers in store_dimensions plugin (@janko)

    • โž• Add metadata_attributes plugin for syncing attachment metadata with additional record attributes (@janko)

    • Remove the undocumented :magic_header option from determine_mime_type plugin (@janko)

    • Expose Shrine.determine_mime_type and Shrine.mime_type_analyzers in determine_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 and UploadedFile#base64 by at least 2x (@janko)

    • Add Shrine.data_uri to data_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 via Shrine::Storage::S3#client, and deprecate Shrine::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 in logging plugin (@janko)

    • Don't dirty the attacher in Attacher#set when attachment hasn't changed (@janko)

    • ๐Ÿ“‡ Rename Attacher#attached? to a more accurate Attacher#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 when Shrine#generate_location returns nil (@janko)