Update: This has mostly been superseded by my full-on s33r project, hosted on RubyForge. It contains a Rails application as an example, but far more functionality than this early effort. I'd go so far as to say it outstrips the Amazon Ruby sample code for S3, as it provides object wrappers around the bucket listing, logging and acl functionality, making it much easier to utilise them than it is with the Amazon samples. Give it a try, why don't you?
There's no support for resource prefixes, so the storage is fairly flat at the moment.
It incorporates the S3 sample Ruby code from Amazon, the HMAC-SHA1 library, and the MIME::Types libraries. I haven't included the licences, but believe they are all under MIT. My S3 code is a Rails plugin in vendor/plugins/S3Client. The Rails code is hastily hacked together and badly organised, but I got carried away. I haven't frozen the Rails gems in, but for reference I used Rails 1.0.
If you want to try installing it, the package is attached to the end of this blog entry. Untar and install as you would any other Rails app.. You will need to fix the shebang lines (they point at one of my many custom Rails environments!). Then you will need an S3 account. Once you have this, edit config/s3_config.yaml with your AWS access key details. Change bucket_prefix to something sensible for you. Then start it up (WEBrick or Lighttpd), browse to localhost (port 3333 if you use the included Lighttpd config.), and away you go!
There is a SQLite database attached to the app., but it isn't used at present. Not sure if this will break if you try to use the package without SQLite being installed. I tested under Lighttpd, and there's a Lighttpd config. file in the config. directory if you want to use that.
The whole thing will be released under the MIT Licence eventually, and I will put it up on RubyForge once I get a minute. But I was too excited to wait before releasing it :) Any feedback would be great.
This software comes with no warranty. I am happy to answer informal queries, though.