Class: Fog::AWS::CDN::Mock
- Inherits:
-
Object
- Object
- Fog::AWS::CDN::Mock
- Defined in:
- lib/fog/cdn/aws.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Mock
constructor
A new instance of Mock.
- #reset_data ⇒ Object
- #signature(params) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Mock
Returns a new instance of Mock.
31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/fog/cdn/aws.rb', line 31 def initialize(={}) unless .delete(:provider) location = caller.first warning = "[yellow][WARN] Fog::AWS::CDN.new is deprecated, use Fog::CDN.new(:provider => 'AWS') instead[/]" warning << " [light_black](" << location << ")[/] " Formatador.display_line(warning) end require 'mime/types' @aws_access_key_id = [:aws_access_key_id] @region = [:region] @data = self.class.data[@region][@aws_access_key_id] end |
Class Method Details
.data ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/fog/cdn/aws.rb', line 21 def self.data @data ||= Hash.new do |hash, region| hash[region] = Hash.new do |region_hash, key| region_hash[key] = { :buckets => {} } end end end |
Instance Method Details
#reset_data ⇒ Object
45 46 47 48 |
# File 'lib/fog/cdn/aws.rb', line 45 def reset_data self.class.data[@region].delete(@aws_access_key_id) @data = self.class.data[@region][@aws_access_key_id] end |
#signature(params) ⇒ Object
50 51 52 |
# File 'lib/fog/cdn/aws.rb', line 50 def signature(params) "foo" end |