Skip to content

A Ruby gem for on-the-fly processing - suitable for image uploading in Rails, Sinatra and much more!

License

Notifications You must be signed in to change notification settings

joerichsen/dragonfly

This branch is 183 commits behind markevans/dragonfly:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Mark Evans
Aug 26, 2014
8d84e11 · Aug 26, 2014
Jul 2, 2014
Aug 26, 2014
Nov 23, 2013
Aug 26, 2014
Sep 6, 2011
Nov 25, 2013
Feb 17, 2011
Dec 5, 2013
Aug 22, 2014
Aug 26, 2014
Nov 24, 2013
Aug 26, 2014
Nov 27, 2013
Jul 2, 2014

Repository files navigation

Dragonfly

Hello!! Dragonfly is a highly customizable ruby gem for handling images and other attachments and is already in use on thousands of websites.

If you want to generate image thumbnails in Rails ...

class User < ActiveRecord::Base  # model
  dragonfly_accessor :photo
end
<%= image_tag @user.photo.thumb('300x200#')  # view  %>

... or generate text images on-demand in Sinatra ...

get "/:text" do |text|
  Dragonfly.app.generate(:text, text, "font-size" => 32).to_response(env)
end

... or just generally manage attachments in your web app ...

wav = Dragonfly.app.fetch_url("http://free.music/lard.wav")  # GET from t'interwebs
mp3 = wav.to_mp3  # to_mp3 is a custom processor
uid = mp3.store   # store in the configured datastore, e.g. S3

url = Dragonfly.app.remote_url_for(uid)  # ===> http://s3.amazon.com/my-stuff/lard.mp3

... then Dragonfly is for you! See the documentation to get started!

Documentation

THE MAIN DOCUMENTATION IS HERE!!!

RDoc documentation is here

Upgrading from v0.9 to v1.0

Dragonfly has changed somewhat since version 0.9. See the Upgrading wiki for notes on changes, and feel free to add anything you come across while upgrading!

Changes are listed in History.md

If for whatever reason you can't upgrade, then the docs for version 0.9.x are here.

Installation

gem install dragonfly

or in your Gemfile

gem 'dragonfly', '~> 1.0.7'

Require with

require 'dragonfly'

Ruby Versions

Dragonfly has been tested with ruby versions 1.8.7, 1.9.2, 1.9.3, 2.0.0, jruby 1.7.8 and rubinius 2.2.

Plugins / add-ons

See the Add-ons wiki.

Please feel free to contribute!!

Issues

Please use the github issue tracker if you have any issues.

Suggestions/Questions

Google group dragonfly-users

Credits

Mark Evans (author) with awesome contributions from these guys

About

A Ruby gem for on-the-fly processing - suitable for image uploading in Rails, Sinatra and much more!

Resources

License

Stars

Watchers

Forks

Packages

No packages published