Sha256: abfa3331cd73098ae941524683c80f6e821ed5578e4e78f013e6252806899a61

Contents?: true

Size: 749 Bytes

Versions: 96

Compression:

Stored size: 749 Bytes

Contents

module S3String
  def bucket_objects
    AWS::S3::Bucket.objects(self)
  end
  def bucket_object(key)
    AWS::S3::S3Object.value key, self if bucket_object_exists?(key)
  end
  def bucket_object_exists?(key)
    AWS::S3::S3Object.exists? key, self
  end
  def store_bucket_value(key, data)
    AWS::S3::S3Object.store key, data, self unless bucket_object_exists?(key)
  end
  def delete_bucket_value(key)
    AWS::S3::S3Object.delete(key, self) if bucket_object_exists?(key)
  end
  def bucket_exists?
    begin
      AWS::S3::Bucket.find(self)
      return true
    rescue
      return false
    end        
  end
  def delete_bucket
    AWS::S3::Bucket.delete(self, :force => true) if bucket_exists?
  end
end

class String
  include S3String
end

Version data entries

96 entries across 96 versions & 3 rubygems

Version Path
auser-poolparty-0.2.85 lib/poolparty/modules/s3_string.rb
auser-poolparty-0.2.88 lib/poolparty/modules/s3_string.rb
auser-poolparty-0.2.89 lib/poolparty/modules/s3_string.rb
auser-poolparty-0.2.9 lib/poolparty/modules/s3_string.rb
auser-poolparty-0.2.90 lib/poolparty/modules/s3_string.rb
auser-poolparty-0.2.91 lib/poolparty/modules/s3_string.rb
auser-poolparty-0.2.92 lib/poolparty/modules/s3_string.rb
auser-poolparty-0.2.93 lib/poolparty/modules/s3_string.rb
auser-poolparty-0.2.94 lib/poolparty/modules/s3_string.rb
auser-poolparty-1.0.0 lib/poolparty/modules/s3_string.rb
auser-poolparty-1.1.1 lib/poolparty/modules/s3_string.rb
auser-poolparty-1.1.3 lib/poolparty/modules/s3_string.rb
auser-poolparty-1.1.4 lib/poolparty/modules/s3_string.rb
auser-poolparty-1.1.5 lib/poolparty/modules/s3_string.rb
auser-poolparty-1.1.6 lib/poolparty/modules/s3_string.rb
auser-poolparty-1.1.7 lib/poolparty/modules/s3_string.rb
auser-poolparty-1.2.0 lib/poolparty/modules/s3_string.rb
auser-poolparty-1.2.1 lib/poolparty/modules/s3_string.rb
auser-poolparty-1.2.10 lib/poolparty/modules/s3_string.rb
auser-poolparty-1.2.11 lib/poolparty/modules/s3_string.rb