Project

has_bucket

0.0
No commit activity in last 3 years
No release in over 3 years
Simple wrapper around single-bucket S3 storage
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
~> 10.0
~> 3.1.0
~> 0.27.0
~> 2.9.3
~> 1.20.3

Runtime

 Project Readme

I Has a Bucket

Build Status

I Has a Bucket

Simple wrapper around single-bucket S3 storage.

Installation

Add this line to your application's Gemfile:

gem 'has_bucket'

And then execute:

$ bundle

Or install it yourself as:

$ gem install has_bucket

With ruby 1.8

has_bucket should work with ruby 1.8, but you'll need to ensure your bundle includes a compatible version of the mime-types gem (< 2).

Usage

s3 = HasBucket.of("https://AWS_ACCESS_KEY:AWS_SECRET_ACCESS_KEY@s3.amazonaws.com/BUCKET_NAME")

s3.include?("key") # => false
s3["key"] = "value"
s3["key"] # => "value"
s3.include?("key") # => true
s3.delete("key")
s3.include?("key") # => false
s3.url_for("key") # => authenticated URL to object

TODO

  • select region based on hostname

Contributing

  1. Fork it ( https://github.com/JonathonMA/has_bucket/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request