Class: FogSite

Inherits:
Object
  • Object
show all
Defined in:
lib/fog_site.rb

Overview

A FogSite represents a site to be deployed to S3 and CloudFront. This object is a simple data structure, which is deployed with a ‘FogSite::Deployer`

Defined Under Namespace

Classes: Deployer

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(domain_name, attributes_map = {}) ⇒ FogSite

Returns a new instance of FogSite.



13
14
15
16
17
18
19
# File 'lib/fog_site.rb', line 13

def initialize( domain_name, attributes_map = {})
  @domain_name = domain_name
  attributes_map.each do |name, val|
    setter = (name.to_s + "=").to_sym
    self.send(setter, val)
  end
end

Instance Attribute Details

#access_key_idObject



25
26
27
# File 'lib/fog_site.rb', line 25

def access_key_id
  @access_key_id || ENV["AWSAccessKeyId"]
end

#destroy_old_filesObject

Returns the value of attribute destroy_old_files.



11
12
13
# File 'lib/fog_site.rb', line 11

def destroy_old_files
  @destroy_old_files
end

#distribution_idObject

Returns the value of attribute distribution_id.



11
12
13
# File 'lib/fog_site.rb', line 11

def distribution_id
  @distribution_id
end

#domain_nameObject (readonly)

Returns the value of attribute domain_name.



9
10
11
# File 'lib/fog_site.rb', line 9

def domain_name
  @domain_name
end

#fog_optionsObject



21
22
23
# File 'lib/fog_site.rb', line 21

def fog_options
  @fog_options || {}
end

#pathObject

Returns the value of attribute path.



11
12
13
# File 'lib/fog_site.rb', line 11

def path
  @path
end

#secret_keyObject



29
30
31
# File 'lib/fog_site.rb', line 29

def secret_key
  @secret_key || ENV["AWSSecretKey"]
end

Instance Method Details

#deploy!Object



33
34
35
# File 'lib/fog_site.rb', line 33

def deploy!
  Deployer.run(self)
end