DragonFly v1.0.0 Release Notes
Release Date: 2013-11-24 // over 10 years ago-
๐ Changes
- ๐ง configuration
Dragonfly[:images]
->Dragonfly.app
andDragonfly.app(:named_app)
- configuration block DSL overhaul
- Rails is set up using a generator, not by requiring the file "dragonfly/rails/images"
- Rack::Cache is not inserted by Dragonfly - this is up to the user
- data store spec
store
/retrieve
->read
/write
write
takes aContent
, not aTempObject
(though the interface is much the same)- return nil on
read
to signify not found instead of raising
- S3, Couch and Mongo data stores extracted into separate gems
- models
- easier and simpler to include in custom models using
Dragonfly::Model
image_accessor
,asset_accessor
,xxx_accessor
, etc. -> singledragonfly_accessor
- user needs to extend
Dragonfly::Model::Validations
manually to use dragonfly validations
- easier and simpler to include in custom models using
- Custom processors, datastores, generators and analysers are made easier by
Content
object which has convenience methods - โ Removed "encoders" - these are covered by processors now
- โ Removed "job" shortcuts - they are not needed as processors can invoke other processors
- No "smart" determination of mime-type - just use file extension (anything more than that can be done by the user)
- ๐ metadata is required to be serializable to/from JSON
- removed
allow_fetch_file
andallow_fetch_url
in favour of more fine-control withfetch_file_whitelist
andfetch_url_whitelist
- 0๏ธโฃ switch off dealing with legacy urls by default
- proper requires throughout the code instead of autoloading
- simple 500 response for unknown errors
๐ Features
- 0๏ธโฃ model attachment default (by specifying a path to a e.g. a default image)
convert
andthumb
processors take a'frame'
optionthumb
takes a'format'
optionfetch_file
andmodel.attachment_url=
accept a data uri stringAttachment#xxx_stored
, e.g.my_model.my_attachment_stored?
(my_attachment
here being the attachment name)- ๐ท
define
for creating custom methods onJob
/Attachment
objects url_path_prefix
for when mounted in Rack with a "SCRIPT_NAME"- ๐ when customizing response headers, ability to remove headers by setting to
nil
- ๐ better logging
- for each response
- for shell commands
๐ Fixes
- inserting CookieMonster doesn't depend on existence of
ActionDispatch::Cookies
image?
returns false for pdfsfetch_url
raises more usefulErrorResponse
on error- โ shell commands don't print warnings to stderr
- ๐ท ability to assign attachment/job from other app
- ๐ง configuration