Class: Promote::Config
- Inherits:
-
Object
- Object
- Promote::Config
- Defined in:
- lib/promote/config.rb
Instance Attribute Summary collapse
-
#chef_server_url ⇒ Object
Returns the value of attribute chef_server_url.
-
#client_key ⇒ Object
Returns the value of attribute client_key.
-
#cookbook_directory ⇒ Object
Returns the value of attribute cookbook_directory.
-
#data_bag_directory ⇒ Object
Returns the value of attribute data_bag_directory.
-
#environment_directory ⇒ Object
Returns the value of attribute environment_directory.
-
#node_name ⇒ Object
Returns the value of attribute node_name.
-
#repo_root ⇒ Object
Returns the value of attribute repo_root.
-
#temp_directory ⇒ Object
Returns the value of attribute temp_directory.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Config
constructor
A new instance of Config.
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( = {}) .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_url ⇒ Object
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_key ⇒ Object
Returns the value of attribute client_key.
20 21 22 |
# File 'lib/promote/config.rb', line 20 def client_key @client_key end |
#cookbook_directory ⇒ Object
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_directory ⇒ Object
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_directory ⇒ Object
Returns the value of attribute environment_directory.
16 17 18 |
# File 'lib/promote/config.rb', line 16 def environment_directory @environment_directory end |
#node_name ⇒ Object
Returns the value of attribute node_name.
19 20 21 |
# File 'lib/promote/config.rb', line 19 def node_name @node_name end |
#repo_root ⇒ Object
Returns the value of attribute repo_root.
14 15 16 |
# File 'lib/promote/config.rb', line 14 def repo_root @repo_root end |
#temp_directory ⇒ Object
Returns the value of attribute temp_directory.
18 19 20 |
# File 'lib/promote/config.rb', line 18 def temp_directory @temp_directory end |