Permalink
Browse files

rename simpledb to s3

  • Loading branch information...
1 parent f525c4b commit dde7e6ff982c8d8a8c110bc4e7dd221c612b1298 @paul committed Oct 5, 2008
View
@@ -1,3 +1,32 @@
-Nothing to see here (yet)
+= DM-S3-Adapter
+
+This is (or will be) a DataMapper Adapter for use with Amazon's Simple Storage Service (S3).
+
+What works:
+
+ * Authenticating (most) requests
+ * Saving a model
+ * Getting a single model
+
+ Example:
+
+ DataMapper.setup(:default, :adapter => 's3'
+ :aws_access_key => YOUR_KEY,
+ :aws_secret_key => YOUR_SECRET_KEY,
+ :aws_bucket => 'dm-s3-bucket')
+
+ class Article
+ include DataMapper::Resource
+
+ property :id, UUID, :key => true, :default => lambda { ::UUID.random_create }
+ property :title, String
+ property :text, Text
+ end
+
+ a = Article.new(:title => "test", :text => "test")
+ a.save
+
+ a = Article.get(a.id)
+
@@ -3,11 +3,11 @@
require 'dm-serializer'
require 'pp'
-require File.dirname(__FILE__) + "/dm-simpledb-adapter/aws_authenticator"
+require File.dirname(__FILE__) + "/dm-s3-adapter/aws_authenticator"
module DataMapper
module Adapters
- class SimpledbAdapter < AbstractAdapter
+ class S3Adapter < AbstractAdapter
def initialize(name, uri_or_options)
super

0 comments on commit dde7e6f

Please sign in to comment.