DragonFly v1.1.0 Release Notes
Release Date: 2016-10-24 // over 7 years ago-
๐ Fixes
- Fetch a URL with basic auth if it's present in the URI (Ben Pickles)
- ๐ Fix rack version problem for older rubies (rack 2.0 only works for ruby >= 2.2.2)
- โก๏ธ Updated deprecated syntax in tests for WebMock, RSpec
๐ Changes
- โฌ๏ธ Dropped official support for Ruby <= 1.9.2 and Rubinius
# 1.0.12 (2015-09-16)
Features
- Made thumb processor args for a specific geometry publicly accesible
# 1.0.11 (2015-09-04)
Fixes
- ๐ Make sure tempfiles are created with paths matching the meta name
# 1.0.10 (2015-05-14)
Features
- ๐ Allow method signified by symbol in storage_options to take an attachment object
- ๐ Allow passing in "input_args" to convert processor Fixes
- correct Rack version
# 1.0.9 (2015-04-29)
Fixes
- โ Remove sha parameter being echoed back on error for better security
# 1.0.8 (2015-04-23)
Fixes
- ๐ Job#close re-added, so that tempfiles are immediately removed after each request
- Specs passing for 1.8.7, 1.9.2 (i18n gem version specified)
# 1.0.7 (2014-08-26)
Changes
- ๐ท Job#sha uses better algorithm
- renamed
protect_from_dos_attacks
->verify_urls
and turn on by default
# 1.0.6 (2014-08-22)
Features
- env can be accessed by routed endpoint blocks
๐ Fixes
- analyser cache doesn't get stored in meta for a given piece of meta - can mess with stringifying analyser return values
- โ removed default secret, forcing user to specify one explicitly
- deal with "[" character problems in urls https://github.com/markevans/dragonfly/pull/337
# 1.0.5 (2014-05-15)
Fixes
- ๐ fetch_url wasn't correctly getting https endpoints on Ruby approx < 2
# 1.0.4 (2014-04-11)
Fixes
- fetch_url is more forgiving - assume escaped, if not escape
# 1.0.3 (2014-01-28)
Fixes
- ๐ท changing meta on a job (e.g.
fetch('blah').encode('jpg')
) was interfering with meta on its parent job (e.g.fetch('blah')
)
# 1.0.2 (2013-12-20)
Fixes
- ๐ more secure generation of secret in rails generator
- ensure popen3 doesn't hang
# 1.0.1 (2013-11-28)
Changes
- FileDataStore doesn't use hours_minutes_seconds in its path - it uses a random string instead (12_15_59_saf4fs_file.png -> sdf4c2G_file.png)
๐ Features
- model attribute
xxx_changed?
method (useful e.g. in validations)
๐ Fixes
- ๐ proper support for Ruby 1.8.7 and JRuby (version 1.7.8)
- ๐ท routed endpoints can deal with returned
Attachment
objects (rather than returnedJob
objects) and return 404 if the endpoint proc returns nil - 0๏ธโฃ default Content-Disposition header doesn't url-encode filename unless the request is from IE
fetch_url
deals with urls that redirect to https (previously was blowing up)
# 1.0.0 (2013-11-24)
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
# 0.9.15 (2013-05-04)
Features
- ๐ Allow turning off support of legacy urls
๐ Fixes
- More conservative URL escaping - back to Rack::Utils.escape_path
- Don't check for malicious strings when deserializing from datastores (they're to be trusted)
# 0.9.14 (2013-02-13)
Features
- Attachment#b64_data
๐ Fixes
- ๐ Fix '+' character being converted to ' ' (revert to URI.escape instead of Rack::Utils.escape)
- ๐ Support old-style deprecated urls (with a check for malicious ones)
- ๐ Handle case where uid is an empty string
# 0.9.13 (2013-01-30)
Changes
- URLS are encoded/decoded with JSON, not with Marshal
# 0.9.12 (2012-04-08)
Features
- ๐ Allow using a mongo replica set with mongo datastore
๐ Fixes
define_macro_on_include
was giving a stack error with multiple accessors on same app
# 0.9.11 (2012-03-12)
Features
- ๐ Allow the S3 base URL to be customised with
url_host
(or per-request) - โ Added App#name (name as per
Dragonfly[:app_name]
)
๐ Changes
- ๐ Better inspect for App, Processor, Analyser, Encoder, Generator, Job, TempObject, RoutedEndpoint, JobEndpoint
๐ Fixes
- ๐ Rescue from Excon::Errors::Conflict which apparently gets raised sometimes (don't know why - see https://github.com/markevans/dragonfly/issues/167)
- Alias portrait and landscape without question marks, so magic_attributes can be used with them
- Fixed stack error when using
define_macro_on_include
twice - ๐ Use fog's
sync_clock
to overcome potential S3 time skew problems - Using :name in urls was causing problems when filenames had dashes in them
# 0.9.10 (2012-01-11)
Fixes
- FileDataStore was causing errors when the storage path was flat (not in a directory structure)
# 0.9.9 (2011-12-30)
Features
- Created tempfiles use the original file extension if known
- Added
:case_sensitive
option tovalidates_property
for dealing with upper-case extensions and mime-types. - Github Markup syntax on readme for code highlighting
- ๐ง S3DataStore can use https for remote urls (either configurable or per-url)
to_file
can take:mode
option for setting custom permissions- 0๏ธโฃ
to_file
creates intermediate subdirs by default, can be turned off with:mkdirs => false
option - โ Added some more S3 regions
๐ Changes
- Datastores now use
temp_object.meta
, not the second arg passed in tostore
- ๐ท
meta
,name
, etc. now lazily load the job on an attachment - previously you'd have to callapply
to get the meta from the datastore - When assigning an image via the activemodel extensions, mark that uid attribute will change
- ๐
validates_property
uses Rails 3 validators - ๐ง Deprecated saved 'heroku' config, in favour of configuring S3 explicitly
๐ Fixes
- ๐ท Model attachment urls are consistent now - the name is appended to the url (with format "/:job/:name") ONLY if it has the "name" magic attribute
identify
wasn't working properly for files with capital letter extensions- 0๏ธโฃ S3 datastore sets content mime_type by default
- File extensions with numbers like JP2 weren't being processed/analysed properly
- Protect against object_ids being recycled and messing with analyser cache
- All url segments are correctly url-escaped now
- ๐ Fixed TempObject File.open mode
- S3DataStore was breaking on bucket_exists? when using AWS IAM
- Put CookieMonster before ActionDispatch::Cookies in rack middleware stack - that way Rack::Cache won't come between them and mess things up
# 0.9.8 (2011-09-08)
Fixes
- ๐ Regenerated gemspec again with ruby 1.8.7 - didn't seem to be fixed
# 0.9.7 (2011-09-08)
Fixes
- ๐ Regenerated gemspec to overcome annoying yaml issue (http://blog.rubygems.org/2011/08/31/shaving-the-yaml-yacc.html)
# 0.9.6 (2011-09-06)
Features
- ๐ Allow setting
content_type
when storing in Mongo GridFS
๐ Changes
- โ Tests use Rails 3.1
๐ Fixes
- Moved from fog's deprecated
get_object_url
toget_object_https_url
- ๐ Allow initializing a TempObject with Rack::Test::UploadedFile
- ๐ Tests working in Windows (except feature that uses FileCommandAnalyser)
- ๐ Better shell quoting
# 0.9.5 (2011-07-27)
Features
- โ Added reflection method
app.analyser_methods
๐ Fixes
- ๐ Fixed
convert
andidentify
for files with spaces - ๐ Fixed size validations for Rails 3.0.7
# 0.9.4 (2011-06-10)
Fixes
- Made use of Rack calling
close
on the response body to clean up tempfiles. The response body is now the job, which delegateseach
to the temp_object.
# 0.9.3 (2011-06-03)
Fixes
- TempObject#to_file sets file permissions 644 - copying wasn't previously guaranteeing this
- โ Added TempObject#close and closed?, which Rack uses to clean up tempfiles
- replaced '/' characters with '~' in base64 encoded urls (they were confusing url recognition)
# 0.9.2 (2011-05-19)
Features
- โ Added env['dragonfly.job'] for use in other Rack middlewares
- โ Added CookieMonster middleware for removing 'Set-Cookie' headers
๐ Fixes
- โ Remove 'Set-Cookie' header from any requests coming from a rails route
# 0.9.1 (2011-05-11)
Features
- Added reflection methods
app.processor_methods
,app.generator_methods
andapp.job_methods
๐ Fixes
- Improved performance of
resize_and_crop
method, using imagemagick built-in '' operator - ๐ Improved server security validations
- Deal with Excon::Errors::SocketError: EOFError errors which get thrown sometimes from S3 connection
- ๐ Allow files with '..' (but not '../') in the middle of their name in file data store
# 0.9.0 (2011-04-27)
Features
- ๐ง Model accessors are configurable
- added
after_assign
callback - added
after_unassign
callback - added
copy_to
for e.g. up-front thumbnailing - added
storage_opts
andstorage_xxx
- added
- โ Added model
remove_xxxxx
for using with checkboxes - โ Added model
xxxx_url
for assigning content from a url - โ Added job step
fetch_url
- โ Added
retain!
and modelretained_xxxxx
for avoiding multiple uploads when validations fail - โ Added
image?
to imagemagick analyser - โ Added imagemagick
plain
generator - โ Added
strip
to imagemagick processor - โ Added CouchDataStore that uses a CouchDB as a data storage engine
- โ Added
before_serve
callback - ๐ Allowed for configurable response headers
- Made url re-definable with
define_url
validates_property
can take a proc for the message- ๐พ Saved configs can be registered now so they can be used with
configure_with(:symbol)
- ๐ง Configurable objects can fallback to a parent configuration, so e.g. the server can be configured through the parent app's configure block.
- ๐ Allowed initializing data by using a pathname
convert_command
andidentify_command
can be configured on a per-app basis- โ Added
remote_url
and ability for datastores to form urls- Added for File, Couch and S3 datastores
- Models automatically copy magic attributes into meta
- ๐ง S3DataStore configurable headers
- ๐
'dragonfly/rails/images' slightly smarter and added
file_accessor
for more semantic use of non-image attachments - ๐ง Made dragonfly response configurable
- Mongo datastore can reuse an existing connection/db
- ๐ง FileDataStore can be configured not to store meta (save on extra file)
๐ Changes
- Removed
url_path_prefix
andurl_suffix
in favour ofurl_format
- Middleware doesn't need mount point argument now
- โ Removed support for rails 2.3
- โ Removed RMagick support (and extracted into a plugin)
- ๐ ImageMagick processors etc. moved into the ImageMagick namespace
- ๐ moved from aws/s3 -> fog for S3 support
- ๐ Renamed SimpleEndpoint -> Server
- ๐ moved name and meta into Job, simplified, and now they don't cause the job to be applied
- ๐ FileDataStore stores metadata in xxx.meta now, not xxx.extra
- removed Job methods
uid_basename
,uid_extname
,encoded_format
andencoded_extname
as they are now unnecessary
๐ Fixes
- ๐ Performance tweaks regarding temp_objects model accessors and job objects
# 0.8.5 (2011-05-11)
Fixes
- ๐ Allow filenames that have '..' in them (but not '../') in the filedatastore
- ๐ Better security for server
# 0.8.4 (2011-04-27)
Fixes
- ๐ Security fix for file data store
# 0.8.2 (2011-01-11)
Fixes
- ๐ Renamed ActiveModel methods like 'attachments' to avoid name clashes
- Respond properly to HEAD, POST, PUT and DELETE requests
- ๐ Got it working with jRuby and Rubinius
- Made DOS protection SHA (and ETag) consistent
# 0.8.1 (2010-11-22)
Fixes
โ Removed runtime dependencies that Jeweler automatically takes from the Gemfile