Permalink
Browse files

Wrote a real README

  • Loading branch information...
1 parent b2008eb commit acd9134525550c4c1e1ec9c80e8bcda9d1395d11 @bloudermilk committed Oct 22, 2011
Showing with 91 additions and 19 deletions.
  1. +4 −17 LICENSE
  2. +87 −2 README.md
View
21 LICENSE
@@ -1,20 +1,7 @@
-Copyright (c) Brendan Loudermilk
+Copyright (c) 2011 Brendan Loudermilk
-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:
+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 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.
+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.
View
@@ -1,3 +1,88 @@
-# Async Record!
+# ActsAsAsync
-It's pretty cool
+## Description
+
+ActsAsAsync is an ActiveRecord extension that provides your models with
+easy-to-use Resque helpers.
+
+
+## Installation
+
+Installing ActsAsAsync is as simple as adding it to your Gemfile:
+
+ $ cat Gemfile
+ ...
+ gem "acts_as_async"
+ ...
+
+
+## Usage
+
+### Setup
+
+ActsAsAsync aims to be as simple as possible to use. Including it in your model
+is as easy as:
+
+ class Post < ActiveRecord::Base
+ acts_as_async
+
+ def self.author_lazy_post
+ Post.create(:body => "Lorem ipsum " * 10)
+ end
+
+ def self_destruct
+ destroy
+ end
+ end
+
+### Basic usage
+
+You can use any of the three `async` methods to enqueue the execution
+of any methods on your class:
+
+ post = Post.create(:body => "Wow, acts_as_async is neat!")
+
+ # Enqueue the method right away
+ post.async(:self_destruct)
+
+ # Enqueue the method at a specific time
+ post.async_at(1.day.from_now, :self_destruct)
+
+ # Enqueue the method some time from now
+ post.async_in(10.minutes, :self_destuct)
+
+### Class methods
+
+Feel free to async class methods as well:
+
+ lunch_break = 2.hours.from_now
+ Post.async_at(lunch_break, :author_lazy_post)
+
+### Dynamic async methods
+
+Coming soon...
+
+
+## Everything else...
+
+ActsAsAsync is simply a thin layer on top of [Resque][resque] and
+[Resque-scheduler][resque_scheduler]. To learn how to configure your redis
+connection, run workers, view the web interface and more visit their home pages.
+
+[build_status]: https://secure.travis-ci.org/bloudermilk/acts_as_async.png?branch=master&.png
+[resque]: https://github.com/defunkt/resque
+[reque_scheduler]: https://github.com/bvandenbos/resque-scheduler
+
+
+## Compatibility
+
+ActsAsAsync is tested against Ruby 1.8.7, 1.9.2, 1.9.3, REE, Rubinius, and JRuby.
+
+![Build Status][build_status]
+
+[Build History](http://travis-ci.org/mongoid/mongoid)
+
+
+## License
+
+ActsAsAsync is released under the MIT License. See the LICENSE file for more info.

0 comments on commit acd9134

Please sign in to comment.