Class: Cloudify::Config

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Validations
Defined in:
lib/cloudify/config.rb

Constant Summary collapse

DYNAMIC_SERVICES =
[:provider, 
:google_storage_secret_access_key, :google_storage_access_key_id,
:aws_secret_access_key, :aws_access_key_id, 
:rackspace_username,    :rackspace_api_key, :rackspace_european_cloud,
:rackspace_auth_url, :rackspace_servicenet, :rackspace_cdn_ssl,
:ninefold_storage_token,:ninefold_storage_secret,
:endpoint, :region, :host, :path, :port, :scheme, :persistent]
PROVIDERS =
["aws", "google", "rackspace", "ninefold"]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



23
24
25
26
# File 'lib/cloudify/config.rb', line 23

def initialize
  self.force_deletion_sync = false
  self.credentials = {}
end

Instance Attribute Details

#assets_directoryObject

Returns the value of attribute assets_directory.



13
14
15
# File 'lib/cloudify/config.rb', line 13

def assets_directory
  @assets_directory
end

#config_pathObject

Returns the value of attribute config_path.



13
14
15
# File 'lib/cloudify/config.rb', line 13

def config_path
  @config_path
end

#credentialsObject

Returns the value of attribute credentials.



13
14
15
# File 'lib/cloudify/config.rb', line 13

def credentials
  @credentials
end

#distribution_idObject

Returns the value of attribute distribution_id.



13
14
15
# File 'lib/cloudify/config.rb', line 13

def distribution_id
  @distribution_id
end

#force_deletion_syncObject

Returns the value of attribute force_deletion_sync.



13
14
15
# File 'lib/cloudify/config.rb', line 13

def force_deletion_sync
  @force_deletion_sync
end

#providerObject

Returns the value of attribute provider.



13
14
15
# File 'lib/cloudify/config.rb', line 13

def provider
  @provider
end

Instance Method Details

#force_deletion_sync?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/cloudify/config.rb', line 28

def force_deletion_sync?
  self.force_deletion_sync == true
end

#initializer_exists?Boolean

Returns:

  • (Boolean)


32
33
34
35
# File 'lib/cloudify/config.rb', line 32

def initializer_exists?
  path = File.join(config_path, "initializers", "cloud_storage_sync.rb")
  File.exists? path
end

#optionsObject



37
38
39
# File 'lib/cloudify/config.rb', line 37

def options
  { :assets_directory => assets_directory, :force_deletion_sync => force_deletion_sync }
end