Class: Fog::CDN::AWS::Mock
- Inherits:
-
Object
- Object
- Fog::CDN::AWS::Mock
- Defined in:
- lib/fog/aws/cdn.rb
Class Method Summary collapse
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(options = {}) ⇒ Mock
constructor
A new instance of Mock.
- #reset_data ⇒ Object
- #setup_credentials(options = {}) ⇒ Object
- #signature(params) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Mock
Returns a new instance of Mock.
44 45 46 47 48 49 |
# File 'lib/fog/aws/cdn.rb', line 44 def initialize(={}) require 'mime/types' @use_iam_profile = [:use_iam_profile] setup_credentials() @region = [:region] end |
Class Method Details
.data ⇒ Object
30 31 32 33 34 35 36 37 38 |
# File 'lib/fog/aws/cdn.rb', line 30 def self.data @data ||= Hash.new do |hash, region| hash[region] = Hash.new do |region_hash, key| region_hash[key] = { :buckets => {} } end end end |
.reset ⇒ Object
40 41 42 |
# File 'lib/fog/aws/cdn.rb', line 40 def self.reset @data = nil end |
Instance Method Details
#data ⇒ Object
51 52 53 |
# File 'lib/fog/aws/cdn.rb', line 51 def data self.class.data[@region][@aws_access_key_id] end |
#reset_data ⇒ Object
55 56 57 |
# File 'lib/fog/aws/cdn.rb', line 55 def reset_data self.class.data[@region].delete(@aws_access_key_id) end |
#setup_credentials(options = {}) ⇒ Object
63 64 65 |
# File 'lib/fog/aws/cdn.rb', line 63 def setup_credentials(={}) @aws_access_key_id = [:aws_access_key_id] end |
#signature(params) ⇒ Object
59 60 61 |
# File 'lib/fog/aws/cdn.rb', line 59 def signature(params) "foo" end |