summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NOTICE3
-rwxr-xr-xbin/chef-client2
-rw-r--r--examples/config/cookbooks/fakefile/recipes/default.rb2
-rw-r--r--examples/config/cookbooks/fakefile/templates/default/monkey.erb2
-rw-r--r--lib/chef/node.rb7
-rw-r--r--lib/chef_server/init.rb10
6 files changed, 20 insertions, 6 deletions
diff --git a/NOTICE b/NOTICE
index 097d21e9d1..e2385f99a2 100644
--- a/NOTICE
+++ b/NOTICE
@@ -8,5 +8,4 @@ Contributors and Copyright holders:
* Copyright 2008, Adam Jacob <adam@hjksolutions.com>
* Copyright 2008, Arjuna Christensen <aj@hjksolutions.com>
* Copyright 2008, Ezra Zygmuntowicz <ezra@engineyard.com>
-
-
+ \ No newline at end of file
diff --git a/bin/chef-client b/bin/chef-client
index 7be305f5e6..a80020b0aa 100755
--- a/bin/chef-client
+++ b/bin/chef-client
@@ -27,7 +27,7 @@ require 'rubygems'
require 'facter'
config = {
- :config_file => "/etc/chef/config.rb",
+ :config_file => "/etc/chef/client.rb",
:log_level => :info,
:noop => false
}
diff --git a/examples/config/cookbooks/fakefile/recipes/default.rb b/examples/config/cookbooks/fakefile/recipes/default.rb
index a8a4d9fc38..b7215a6b63 100644
--- a/examples/config/cookbooks/fakefile/recipes/default.rb
+++ b/examples/config/cookbooks/fakefile/recipes/default.rb
@@ -75,7 +75,7 @@ template "/tmp/foo-template" do
:el_che => 'rhymefest',
:white => {
:stripes => "are the best",
- :at => "the sleazy rock thing"
+ :at => "the sleazy rock thing",
}
})
end
diff --git a/examples/config/cookbooks/fakefile/templates/default/monkey.erb b/examples/config/cookbooks/fakefile/templates/default/monkey.erb
index ad8d9080bf..29c2639381 100644
--- a/examples/config/cookbooks/fakefile/templates/default/monkey.erb
+++ b/examples/config/cookbooks/fakefile/templates/default/monkey.erb
@@ -2,4 +2,4 @@ This is a <%= @one %> with <%= @el_che %>
It was rendered on a system with the ipaddress of <%= @node[:ipaddress] %>
-But it's all about the conquest, with <%= @node[:fqdn ] %> \ No newline at end of file
+But it's all about the conquest, with <%= @node[:fqdn ] %>
diff --git a/lib/chef/node.rb b/lib/chef/node.rb
index 4eb72e1856..e440e3a940 100644
--- a/lib/chef/node.rb
+++ b/lib/chef/node.rb
@@ -122,6 +122,13 @@ class Chef
def []=(attrib, value)
@attribute[attrib] = value
end
+
+ # Yield each key to the block
+ def each(&block)
+ @attribute.each_key do |k|
+ yield(k)
+ end
+ end
# Iterates over each attribute, passing the attribute and value to the block.
def each_attribute(&block)
diff --git a/lib/chef_server/init.rb b/lib/chef_server/init.rb
index 2e4e58bb97..991a6f5c8b 100644
--- a/lib/chef_server/init.rb
+++ b/lib/chef_server/init.rb
@@ -82,7 +82,15 @@ Merb.disable :json
# dependencies "RedCloth" => "> 3.0", "ruby-aes-cext" => "= 1.0"
Merb::BootLoader.after_app_loads do
# Add dependencies here that must load after the application loads:
- Chef::Config.from_file(File.join(File.dirname(__FILE__), "..", "..", "config", "chef-server.rb"))
+ if File.exist?(File.dirname(__FILE__), "..", "..", "config", "server.rb")
+ Chef::Config.from_file(
+ File.join(File.dirname(__FILE__), "..", "..", "config", "server.rb")
+ )
+ else
+ Chef::Config.from_file(
+ File.join("etc", "config", "server.rb")
+ )
+ end
Chef::Queue.connect
# create the couch design docs for nodes and openid registrations