Changelog History
Page 1
-
v3.4.0 Changes
June 14, 2021๐
base
โ Fix passing options toShrine.Attachment
on Ruby 3.0 (@lucianghinda)determine_mime_type
โ Return correctimage/svg+xml
MIME type for SVGs with:fastimage
analyzer (@Bandes)โ
activerecord
โ Fix keyword argument warning when adding errors with options (@janko)entity
โ MakeAttacher#read
method public (@janko)entity
โ Reset attachment dirty tracking inAttacher#reload
(@janko)activerecord
โ Don't load the attacher onActiveRecord::Base#reload
if it hasn't yet been initialized (@janko)sequel
โ Don't load the attacher onSequel::Model#reload
if it hasn't yet been initialized (@janko)
-
v3.3.0 Changes
October 04, 2020๐
s3
- Support newAws::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
โ CallAttacher#reload
inSequel::Model#reload
, which keeps rest of attacher state (@janko, @jrochkind)activerecord
โ CallAttacher#reload
inActiveRecord::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
โ Applyversion
URL option in derivation endpoint (@janko)๐
remove_attachment
โ Delete removed file if a new file was attached right after removal (@janko)upload_endpoint
โ FixShrine.upload_response
not working in a Rails controller (@pldavid2)presign_endpoint
โ AddOPTIONS
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
โ EnsureMemory#open
returns content in original encoding (@jrochkind)
-
v3.2.2 Changes
August 05, 2020s3
โ FixS3#open
not working on aws-sdk-core 3.104 and above (@janko)
-
v3.2.1 Changes
January 12, 2020derivation_endpoint
โ UseRack::Files
constant on Rack >= 2.1 (@janko)๐ Fix Ruby 2.7 warnings regarding separation of positional and keyword arguments (@janko)
s3
โ MakeS3#open
handle empty S3 objects (@janko)
-
v3.2.0 Changes
December 17, 2019validation
โ Run validation onAttacher#attach
&Attacher#attach_cached
instead ofAttacher#change
(@janko)๐
remove_invalid
โ Activate also whenAttacher#validate
is run manually (@janko)๐
remove_invalid
โ Fix incompatibility withderivatives
plugin (@janko)๐
type_predicates
โ Add new plugin with convenientUploadedFile
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, 2019default_storage
โ Coerce storage key to symbol inAttacher#cache_key
&Attacher#store_key
(@janko)core
โ Coerce storage key to symbol inAttacher#cache_key
&Attacher#store_key
(@janko)๐
add_metadata
โ Define metadata methods only for the target uploader class (@janko)derivatives
โ Add:storage
option toAttacher#create_derivatives
(@janko)๐
store_dimensions
โ Propagate exceptions on loadingruby-vips
in:vips
analyzer (@janko)signature
โ Allow skipping rewinding by passingrewind: false
toShrine.signature
(@janko)derivatives
โ AddAttacher.derivatives
alias forAttacher.derivatives_processor
(@janko)
-
v3.0.1 Changes
October 17, 2019๐
metadata_attributes
โ Fix exception being raised when there is no attached file (@janko)core
โ SimplifyUploadedFile#inspect
output (@janko)
-
v3.0.0 Changes
October 14, 2019derivation_endpoint
โ Passaction: :derivation
when uploading derivation results (@janko)core
โ AddShrine::Attachment[]
shorthand forShrine::Attachment.new
(@janko)๐
core
โ AddStorage#delete_prefixed
method for deleting all files in specified directory (@jrochkind)๐
linter
โ Returntrue
inStorage::Linter#call
so that it can be used withassert
(@jrochkind)๐
linter
โ AllowStorage::Linter
to accept a key that will be used for testing nonexistent file (@janko)๐
core
โ Infer file extension fromfilename
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-openingFile
objects returned in derivation result (@janko)derivation_endpoint
โ Allow onlyFile
orTempfile
object as derivation result (@janko)download_endpoint
โ AddShrine.download_response
for calling in controller (@janko)core
โ Fetch storage object lazily inShrine
instance (@janko)๐
mirroring
โ Add new plugin for replicating uploads and deletes to other storages (@janko)sequel
โ Rename:callbacks
option to:hooks
(@janko)model
โ AddAttacher#set_model
for setting model without loading attachment (@janko)entity
โ AddAttacher#set_entity
for setting entity without loading attachment (@janko)entity
โ Define#<name>_attacher
class method when includingShrine::Attachment
(@janko)๐ฐ
derivation_endpoint
โ Send only:derivation
in the instrumentation event payload (@janko)0๏ธโฃ
default_storage
โ AddAttacher.default_cache
andAttacher.default_store
for settings (@janko)๐
default_storage
โ Deprecaterecord
&name
arguments to storage block (@janko)0๏ธโฃ
default_storage
โ Evaluate storage block in context ofAttacher
instance (@janko)๐ Unify persistence plugin interface (@janko)
upload_options
โ KeepShrine#_upload
private (@janko)infer_extension
โ KeepShrine#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 toDerivation#upload
(@janko)derivation_endpoint
โ Accept additional uploader options inDerivation#upload
(@janko)derivation_endpoint
โ Close the uploaded file inDerivation#upload
(@janko)core
โ Stop rescuingIO#close
exceptions inShrine#upload
(@janko)core
โ Add:delete
option toShrine#upload
for deleting uploaded file (@janko)s3
โ Stop returning:object
inDown::ChunkedIO#data
inS3#open
(@janko)s3
โ Eliminate#head_object
request inS3#open
(@janko)๐
download_endpoint
โ Remove extraStorage#exists?
check (@janko)derivation_endpoint
โ AddDerivation#opened
for retrieving an opened derivation result (@janko)๐
derivation_endpoint
โ Remove extraStorage#exists?
check when:upload
is enabled but not:upload_redirect
(@janko)derivation_endpoint
- Don't pass sourceUploadedFile
object when:download
isfalse
(@janko)๐
derivation_endpoint
โ Remove:include_uploaded_file
option (@janko)derivation_endpoint
โ Evaluate derivation block in context ofShrine::Derivation
(@janko)๐
derivation_endpoint
โ Remove:download_errors
option (@janko)memory
โ RaiseShrine::FileNotFound
on nonexistent file inMemory#open
(@janko)file_system
โ RaiseShrine::FileNotFound
on nonexistent file inFileSystem#open
(@janko)s3
โ RaiseShrine::FileNotFound
on nonexistent object inS3#open
(@janko)๐ป
core
โ AddShrine::FileNotFound
exception and require storages to raise it onStorage#open
(janko)๐
instrumentation
โ Remove:metadata
from:options
inmetadata.shrine
event (@janko)๐
instrumentation
โ Remove:location
,:upload_options
and:metadata
from:options
inupload.shrine
event (@janko)๐
instrumentation
โ Add:metadata
to theupload.shrine
event (@janko)๐
download_endpoint
โ Drop support for legacy/:storage/:id
URLs (@janko)core
โ InUploadedFile#==
require files to be of the same class (@janko)core
โ Add:close
option toShrine#upload
for preventing closing file after upload (@janko)memory
โ AddShrine::Storage::Memory
fromshrine-memory
gem (@janko)default_url_options
โ Rename to justurl_options
(@janko)๐
delete_raw
โ Deprecate plugin in favour ofderivatives
(@janko)๐
recache
โ Deprecate plugin in favour ofderivatives
(@janko)๐
processing
โ Deprecate plugin in favour ofderivatives
(@janko)๐
versions
โ Deprecate plugin in favour ofderivatives
(@janko)๐
derivatives
โ Add new plugin for storing processed files (@janko)derivation_endpoint
โ Allow using symbol and string derivation names interchangeably (@janko)๐
dynamic_storage
โ RemoveShrine.dynamic_storages
method (@janko)core
โ Deep duplicateShrine.opts
on subclassing (@janko)core
โ AddAttacher#file!
which asserts that a file is attached (@janko)core
โ ChangeShrine.uploaded_file
to raiseArgumentError
on invalid input (@janko)๐
module_include
โ Deprecate plugin over overriding core classes directly (@janko)core
โ AddAttacher#cache_key
andAttacher#store_key
which return storage identifiers (@janko)๐
linter
โ CallStorage#open
with options as second argument (@janko)core
โ Allow data hash passed toUploadedFile.new
to have symbol keys (@janko)core
โ Change howShrine::UploadedFile
sets its state from the given data hash (@janko)๐
core
โ DeprecateStorage#open
not accepting additional options (@janko)๐
refresh_metadata
โ AddAttacher#refresh_metadata!
method which integrates withmodel
plugin (@janko)instrumentation
โ Instrument anyStorage#open
calls in a newopen.shrine
event (@janko)restore_cached_data
โ Forward options passed toAttacher#attach_cached
to metadata extraction (@janko)validation
โ Allow skipping validations on attaching by passingvalidate: false
(@janko)validation
โ Add:validate
option toAttacher#assign
orAttacher#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 passingRack::Request
object to the uploader (@janko)๐
remote_url
โ Require custom downloaders to raiseShrine::Plugins::RemoteUrl::DownloadError
for conversion into a validation error (@janko)infer_extension
โ Fix compatibility with thepretty_location
plugin (@janko)๐
presign_endpoint
โ Remove deprecatedShrine::Plugins::PresignEndpoint::App
constant (@janko)๐
keep_files
โ Remove the ability to choose whether to keep only destroyed or only replaced files (@janko)๐
infer_extension
โ RemoveShrine#infer_extension
method (@janko)default_url_options
โ Allow overriding passed URL options by deleting them inside the block (@janko)cached_attachment_data
โ RenameAttacher#read_cached
toAttacher#cached_data
(@janko)sequel
โ AddAttacher#atomic_promote
andAttacher#atomic_persist
(@janko)๐
sequel
โ Remove persistence fromAttacher#promote
(@janko)๐
activerecord
โ Remove persistence fromAttacher#promote
(@janko)๐
atomic_helpers
โ Add new plugin with helper methods for atomic promotion and persistence (@janko)backgrounding
โ AddAttacher#promote_block
&Attacher#destroy_block
for overriding class level blocks (@janko)backgrounding
โ AddAttacher.promote_block
&Attacher.destroy_block
on class level (@janko)๐
backgrounding
โ Remove overridingAttacher#swap
with atomic promotion (@janko)๐
backgrounding
โ RemoveAttacher.promote
,Attacher.delete
,Attacher.dump
,Attacher#dump
,Attacher.load
,Attacher.load_record
(@janko)model
โ Allow disabling caching to temporary storage on assignment (@janko)model
โ AddAttacher.from_model
,Attacher#write
(@janko)๐
model
โ Add new plugin for integrating with mutable structs (@janko)entity
โ AddAttacher.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 defaultJSON
library (@janko)column
โ AddAttacher#column_data
andAttacher.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 toShrine#upload
to have symbol keys (@janko)core
โ ChangeShrine.uploaded_file
not to yield files anymore (@janko)core
โ AllowShrine.uploaded_file
to accept file data hashes with symbol keys (@janko)๐
core
โ RemoveShrine#uploaded?
๐
core
โ RemoveShrine#delete
,Shrine#_delete
,Shrine#remove
(@janko)๐
core
โ RemoveShrine#store
,Shrine#_store
,Shrine#put
,Shrine#copy
(@janko)๐
core
โ RemoveShrine#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
โ AddAttacher#data
andAttacher.from_data
for dumping to and loading from a Hash (@janko)๐ป
core
โ ChangeAttacher#assign
to raise exception when non-cached file is assigned (@janko)core
โ EnableAttacher#assign
to accept cached file data as a Hash (@janko)core
โ AddAttacher#file
alias forAttacher#get
(@janko)core
โ ChangeAttacher#attached?
to return whether a file is attached (@janko)core
โ ChangeAttacher#promote
to always only save promoted file in memory (@janko)core
โ RenameAttacher#replace
toAttacher#destroy_previous
(@janko)core
โ RemoveAttacher#_promote
andAttacher#_delete
, addAttacher#promote_cached
andAttacher#destroy_attached
(@janko)core
โ RenameAttacher#set
andAttacher#_set
toAttacher#change
andAttacher#set
(@janko)๐
core
โ RemoveAttacher#cache!
andAttacher#store!
, addAttacher#upload
(@janko)core
โ RenameAttacher#validate_block
toAttacher#_validate
(@janko)core
โ AddAttacher#attach
,Attacher#attach_cached
, extracted fromAttacher#assign
(@janko)core
โ RemoveAttacher#swap
,Attacher#update
,Attacher#read
,Attacher#write
,Attacher#data_attribute
,Attacher#convert_to_data
,Attacher#convert_before_write
, andAttacher#convert_after_read
(@janko)core
โ ChangeAttacher.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 deprecatedShrine::IO_METHODS
constant (@janko)๐
s3
โ Replace source object metadata when copying a file from S3 (@janko)core
โ ChangeUploadedFile#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
andShrine.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 onUploadedFile
(@janko)๐
validation_helpers
โ Fail dimensions validations whenwidth
orheight
metadata is missing (@janko)๐
upload_endpoint
โ Remove deprecatedShrine::Plugins::UploadEndpoint::App
constant (@janko)determine_mime_type
โ RemoveShrine#mime_type_analyzers
method (@janko)๐
store_dimensions
โ RemoveShrine#extract_dimensions
andShrine#dimensions_analyzers
methods (@janko)๐
rack_file
โ Remove deprecatedShrine::Plugins::RackFile::UploadedFile
constant (@janko)๐
rack_file
โ Drop support for passing file hash toShrine#upload
andShrine#store
(@janko)๐
download_endpoint
โ MoveShrine::Plugins::DownloadEndpoint::App
intoShrine::DownloadEndpoint
(@janko)๐
download_endpoint
โ Remove deprecatedShrine::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 deprecatedShrine::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 inFileSystem#clear!
(@janko)file_system
โ Don't accept a block anymore inFileSystem#open
(@janko)๐
file_system
โ Remove deprecatedFileSystem#download
method (@janko)๐
file_system
โ MakeFileSystem#movable?
andFileSystem#move
methods private (@janko)๐
file_system
โ Remove deprecation warning on unrecognized options inFileSystem#upload
(@janko)๐
file_system
โ Remove deprecated:host
option forFileSystem#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 deprecatedS3#download
method (@janko)๐
s3
โ Remove deprecatedS3#stream
method (@janko)๐
presign_endpoint
โ Drop support for presign objects that don't respond to#to_h
(@janko)s3
โ Return a Hash inS3#presign
when method is POST (@janko)๐
s3
โ Remove:download
option inS3#url
(@janko)๐
s3
โ Remove support for non URI-escaped content disposition values (@janko)๐
s3
โ RemoveS3#s3
method (@janko)๐
s3
โ Remove support for specifying:multipart_threshold
as an integer (@janko)๐
s3
โ Remove:host
option onS3#initialize
(@janko)๐
s3
โ Drop support foraws-sdk-s3
versions lower than 1.14 (@janko)๐
s3
โ Drop support foraws-sdk
2.x (@janko)
-
v3.0.0.rc
September 28, 2019 -
v3.0.0.beta3
September 25, 2019