DragonFly v1.0.0 Release Notes

Release Date: 2013-11-24 // over 10 years ago
  • ๐Ÿ”„ Changes

    • ๐Ÿ”ง configuration
      • Dragonfly[:images] -> Dragonfly.app and Dragonfly.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 a Content, not a TempObject (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. -> single dragonfly_accessor
      • user needs to extend Dragonfly::Model::Validations manually to use dragonfly validations
    • 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 and allow_fetch_url in favour of more fine-control with fetch_file_whitelist and fetch_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 and thumb processors take a 'frame' option
    • thumb takes a 'format' option
    • fetch_file and model.attachment_url= accept a data uri string
    • Attachment#xxx_stored, e.g. my_model.my_attachment_stored? (my_attachment here being the attachment name)
    • ๐Ÿ‘ท define for creating custom methods on Job/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 pdfs
    • fetch_url raises more useful ErrorResponse on error
    • โš  shell commands don't print warnings to stderr
    • ๐Ÿ‘ท ability to assign attachment/job from other app