Class Moneta::S3
In: lib/moneta/s3.rb
Parent: Object

An S3 implementation of Moneta

Example usage:

  require 'rubygems'
  require 'moneta'
  require 'moneta/s3'

  store = Moneta::S3.new(
    :access_key_id => 'ACCESS_KEY_ID',
    :secret_access_key => 'SECRET_ACCESS_KEY',
    :bucket => 'a_bucket'
  )
  store['somefile']

Methods

[]   []=   clear   delete   has_key?   key?   logger   new   store   update_key  

Public Class methods

Initialize the Moneta::S3 store.

Required values passed in the options hash:

  • :access_key_id: The access id key
  • :secret_access_key: The secret key
  • :bucket: The name of bucket. Will be created if it doesn‘t

exist.

  • :multi_thread: Set to true if using threading

Public Instance methods

has_key?(key)

Alias for key?

Store the key/value pair.

Options: *:meta_headers: Meta headers passed to S3 *:perms: Permissions passed to S3 *:headers: Headers sent as part of the PUT request *:expires_in: Number of seconds until expiration

Protected Instance methods

[Validate]