Skip to content
Browse files

Added readme

  • Loading branch information...
1 parent 29a1f12 commit cc5b0584a63e3de03de7d7820e9e6bef8815a076 @mattfordham committed Apr 18, 2012
Showing with 33 additions and 0 deletions.
  1. +33 −0 README.md
View
33 README.md
@@ -0,0 +1,33 @@
+export\_to_cloud
+================
+
+export\_to_cloud provides a simple way to export all rows of an ActiveRecord model in Rails to Amazon S3 as a time-stamped single CSV file.
+
+Usage
+=====
+
+### Require the gem
+
+ gem 'export_to_cloud', :git => "git://github.com/mattfordham/export_to_cloud.git"
+
+### Configure
+
+Create an initializer in 'config/initializers' called something like 'export\_to_cloud.rb'. Set the following config variables:
+
+ ExportToCloud.aws_access_key_id = "your_access_id"
+ ExportToCloud.aws_secret_access_key = "your_secret_key"
+ ExportToCloud.s3_bucket = "your_bucket_name"
+ ExportToCloud.path = "path/to/directory/" # set as an empty string if you want the CSV files to end up in the root of the bucket
+
+### Call
+
+Call the method on any of your models, like so...
+
+ Person.export_to_cloud
+
+I usually make this call in a cron job or manually via the console.
+
+To Do
+=====
+
+Add some tests. If anyone has an idea how to pull if off, given the S3 integration, I'm all ears :)

0 comments on commit cc5b058

Please sign in to comment.
Something went wrong with that request. Please try again.