Class: CryptKeeper::Connection

Inherits:
Object
  • Object
show all
Includes:
Buckets
Defined in:
lib/crypt_keeper.rb

Overview

For example: keeper = CryptKeeper::Connection.new(=> ‘your_access_key’, :secret_key => ‘your_secret_key’)

Constant Summary collapse

@@http_instance =
nil

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Buckets

#bucket_meta_objects, #buckets, #connection, #create_bucket, #find_buckets

Constructor Details

#initialize(*args) ⇒ Connection

Returns a new instance of Connection.



23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/crypt_keeper.rb', line 23

def initialize(*args)
  options = {
      :signature_identifier => "GOOG1",
      :host                 => "commondatastorage.googleapis.com",
      :port                 => "80"
  }

  options.merge!(args.pop) if args.last.kind_of? Hash
  @host = options[:host]
  @access_key = options[:access_key]
  @secret_key = options[:secret_key]
  @signature_id = options[:signature_identifier]
  @@http_instance = CryptKeeperHttp.new(@host, @access_key, @secret_key, @signature_id)
end

Class Method Details

.http_instanceObject



20
21
22
# File 'lib/crypt_keeper.rb', line 20

def self.http_instance
  @@http_instance
end