https://github.com/takeyuweb/paperclip-atompub
Adds Atompub Media Resource strage support for the Paperclip
https://github.com/takeyuweb/paperclip-atompub
Last synced: about 1 year ago
JSON representation
Adds Atompub Media Resource strage support for the Paperclip
- Host: GitHub
- URL: https://github.com/takeyuweb/paperclip-atompub
- Owner: takeyuweb
- License: mit
- Created: 2012-11-08T07:49:37.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2024-11-01T08:47:44.000Z (over 1 year ago)
- Last Synced: 2025-05-11T04:46:48.702Z (about 1 year ago)
- Language: Ruby
- Size: 33.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
- License: MIT-LICENSE
Awesome Lists containing this project
README
= Paperclip Atompub Storage
(Atompub Media Resource only.)
== Installation
gem 'paperclip-atompub', '~> 0.0.1'
bundle exec rake paperclip_atompub:install:migrations
bundle exec rake db:migrate
== Usage
=== Simple
class User < ActiveRecord::Base
attr_accessible :name, :avatar
has_attached_file :avatar,
:storage => :atompub,
:atompub_config => {
:service_uri => 'http://atompub.host/atomsvc',
:media_collection_uri => 'http://atompub.host/resources'
},
:atompub_credentials => {
:username => 'USERNAME',
:password => 'PASSWORD'
},
:styles => { :medium => "300x300>", :thumb => "100x100>" }
end
=== Dynamic Credentials
:atompub_credentials => lambda { |attachment|
user = attachment.instance # => #
{ :username => user.atompub_username, :password => user.atompub_password }
},
== Contributing to paperclip-atompub
Fork, fix, then send me a pull request.
== Copyright
Copyright(c) 2012 Yuichi Takeuchi, released under the MIT license