Class: Promote::Config

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Config

Returns a new instance of Config.



3
4
5
6
7
8
9
10
11
12
# File 'lib/promote/config.rb', line 3

def initialize(options = {})
  options.each do |k, v|
  	self.send("#{k}=", v) if self.respond_to?(k) 
  end
  self.repo_root ||= Dir.pwd
  self.cookbook_directory ||= File.join(repo_root, "cookbooks")
  self.environment_directory ||= File.join(repo_root, "environments")
  self.data_bag_directory ||= File.join(repo_root, "data_bags")
  self.temp_directory ||= "/tmp/promote"
end

Instance Attribute Details

#chef_server_urlObject

Returns the value of attribute chef_server_url.



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

def chef_server_url
  @chef_server_url
end

#client_keyObject

Returns the value of attribute client_key.



20
21
22
# File 'lib/promote/config.rb', line 20

def client_key
  @client_key
end

#cookbook_directoryObject

Returns the value of attribute cookbook_directory.



15
16
17
# File 'lib/promote/config.rb', line 15

def cookbook_directory
  @cookbook_directory
end

#data_bag_directoryObject

Returns the value of attribute data_bag_directory.



17
18
19
# File 'lib/promote/config.rb', line 17

def data_bag_directory
  @data_bag_directory
end

#environment_directoryObject

Returns the value of attribute environment_directory.



16
17
18
# File 'lib/promote/config.rb', line 16

def environment_directory
  @environment_directory
end

#node_nameObject

Returns the value of attribute node_name.



19
20
21
# File 'lib/promote/config.rb', line 19

def node_name
  @node_name
end

#repo_rootObject

Returns the value of attribute repo_root.



14
15
16
# File 'lib/promote/config.rb', line 14

def repo_root
  @repo_root
end

#temp_directoryObject

Returns the value of attribute temp_directory.



18
19
20
# File 'lib/promote/config.rb', line 18

def temp_directory
  @temp_directory
end