Permalink
Browse files

License and readme formatting

  • Loading branch information...
1 parent ddff0ea commit 6c19ae43c470a1726748e1a4773096d5fbcfe0e9 @jstorimer jstorimer committed Jan 26, 2010
Showing with 28 additions and 3 deletions.
  1. +20 −0 LICENSE
  2. +8 −3 README.textile
View
20 LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2010 Jesse Storimer
+
+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 PURPOa AND
+NONINFRINGEMENT. IN NO EVENT SaALL 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.
View
@@ -2,19 +2,20 @@ h1. Delayed::Paperclip
*Warning: ATM this is alpha software and has not been tested in a production environment*
-delayed_paperclip lets you process your "Paperclip":http://github.com/thoughtbot/paperclip attachments in a background task with "delayed_job":http://github.com/tobi/delayed_job.
+Delayed_paperclip lets you process your "Paperclip":http://github.com/thoughtbot/paperclip attachments in a background task with "delayed_job":http://github.com/tobi/delayed_job.
h2. Why?
The most common use case for Paperclip is to easily attach image files to ActiveRecord models. Most of the time these image files will have multiple styles and will need to be resized when they are created. This is usually a pretty "slow operation":http://www.jstorimer.com/ruby/2010/01/05/speep-up-your-paperclip-tests.html and should be handled in a background task.
-That's where this gem comes in.
+That's where delayed_paperclip comes in.
h2. Usage
Make sure that you have "DJ":http://github.com/tobi/delayed_job up and running.
In your model:
+<notextile>
<pre><code>
class User < ActiveRecord::Base
# Paperclip
@@ -24,14 +25,15 @@ In your model:
process_in_background :avatar
end
</code></pre>
+</notextile>
In a migration (optional):
<pre><code>
class AddProcessingColumnToUser < ActiveRecord::Migration
def self.up
add_column :users, :avatar_processing, :boolean
end
-
+
def self.down
remove_column :users, :avatar_processing
end
@@ -58,3 +60,6 @@ h2. Does it work with s3?
Yes.
+h2. Inspirations
+
+"http://blog.madeofcode.com/post/201282903/paperclip-s3-delayed-job-in-rails":http://blog.madeofcode.com/post/201282903/paperclip-s3-delayed-job-in-rails

0 comments on commit 6c19ae4

Please sign in to comment.