3 Star 0 Fork 0

Gitee 极速下载 / ruby-dragonfly

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/markevans/dragonfly
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Dragonfly

Build Status

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#').url if @user.photo_stored? # 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

Installation

gem install dragonfly

or in your Gemfile

gem 'dragonfly', '~> 1.4.0'

Require with

require 'dragonfly'

Articles

See the Articles wiki for articles and tutorials.

Please feel free to contribute!!

Examples

See the Wiki and see the pages list for examples.

Please feel free to contribute!!

Plugins / add-ons

See the Add-ons wiki.

Please feel free to contribute!!

Security notice!

If you have set verify_urls to false (which is not recommended) then you should upgrade to version 1.4.x for a security fix (CVE-2021-33564).

Issues

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

Known Issues

There are known issues when using with json gem version 1.5.2 which can potentially cause an "incorrect sha" error for files with non-ascii characters in the name. Please see https://github.com/markevans/dragonfly/issues/387 for more information.

Suggestions/Questions

Google group dragonfly-users

Ruby Versions

See Travis-CI for tested versions.

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.

Credits

Mark Evans (author) with awesome contributions from these guys

Copyright (c) 2009-2013 Mark Evans Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
Ruby 等 2 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/mirrors/ruby-dragonfly.git
git@gitee.com:mirrors/ruby-dragonfly.git
mirrors
ruby-dragonfly
ruby-dragonfly
master

搜索帮助