Class: Fog::AWS::CDN::Mock
- Inherits:
-
Object
- Object
- Fog::AWS::CDN::Mock
- Defined in:
- lib/fog/cdn/requests/aws/get_distribution.rb,
lib/fog/cdn/aws.rb,
lib/fog/cdn/requests/aws/post_distribution.rb,
lib/fog/cdn/requests/aws/post_invalidation.rb,
lib/fog/cdn/requests/aws/delete_distribution.rb,
lib/fog/cdn/requests/aws/get_distribution_list.rb,
lib/fog/cdn/requests/aws/put_distribution_config.rb
Overview
:nodoc:all
Class Method Summary collapse
Instance Method Summary collapse
- #delete_distribution(distribution_id, etag) ⇒ Object
- #get_distribution(distribution_id) ⇒ Object
- #get_distribution_list(options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ Mock
constructor
A new instance of Mock.
- #post_distribution(options = {}) ⇒ Object
- #post_invalidation(distribution_id, paths, caller_reference = Time.now.to_i.to_s) ⇒ Object
- #put_distribution_config(distribution_id, etag, options = {}) ⇒ Object
- #signature(params) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Mock
Returns a new instance of Mock.
37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/fog/cdn/aws.rb', line 37 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] @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 |
.reset_data(keys = data.keys) ⇒ Object
31 32 33 34 35 |
# File 'lib/fog/cdn/aws.rb', line 31 def self.reset_data(keys=data.keys) for key in [*keys] data.delete(key) end end |
Instance Method Details
#delete_distribution(distribution_id, etag) ⇒ Object
29 30 31 |
# File 'lib/fog/cdn/requests/aws/delete_distribution.rb', line 29 def delete_distribution(distribution_id, etag) Fog::Mock.not_implemented end |
#get_distribution(distribution_id) ⇒ Object
58 59 60 |
# File 'lib/fog/cdn/requests/aws/get_distribution.rb', line 58 def get_distribution(distribution_id) Fog::Mock.not_implemented end |
#get_distribution_list(options = {}) ⇒ Object
60 61 62 |
# File 'lib/fog/cdn/requests/aws/get_distribution_list.rb', line 60 def get_distribution_list( = {}) Fog::Mock.not_implemented end |
#post_distribution(options = {}) ⇒ Object
92 93 94 |
# File 'lib/fog/cdn/requests/aws/post_distribution.rb', line 92 def post_distribution( = {}) Fog::Mock.not_implemented end |
#post_invalidation(distribution_id, paths, caller_reference = Time.now.to_i.to_s) ⇒ Object
52 53 54 |
# File 'lib/fog/cdn/requests/aws/post_invalidation.rb', line 52 def post_invalidation(distribution_id, paths, caller_reference = Time.now.to_i.to_s) Fog::Mock.not_implemented end |
#put_distribution_config(distribution_id, etag, options = {}) ⇒ Object
95 96 97 |
# File 'lib/fog/cdn/requests/aws/put_distribution_config.rb', line 95 def put_distribution_config(distribution_id, etag, = {}) Fog::Mock.not_implemented end |
#signature(params) ⇒ Object
50 51 52 |
# File 'lib/fog/cdn/aws.rb', line 50 def signature(params) "foo" end |