summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanielsdeleo <dan@getchef.com>2015-05-13 15:43:21 -0700
committerdanielsdeleo <dan@getchef.com>2015-05-20 15:13:56 -0700
commit12a608c962d2eaa6c8b410794530fb104167162c (patch)
treec0ed71585eacc4dd2d9cf5137a22e45cfa6a74d7
parent0e4e6032f6f46261a2db37815345e46bf8cf1c46 (diff)
downloadchef-12a608c962d2eaa6c8b410794530fb104167162c.tar.gz
Move Win2003 dependent config into chef core
-rw-r--r--chef-config/lib/chef-config/config.rb7
-rw-r--r--lib/chef/config.rb20
2 files changed, 20 insertions, 7 deletions
diff --git a/chef-config/lib/chef-config/config.rb b/chef-config/lib/chef-config/config.rb
index 549fac5cbf..800e8065de 100644
--- a/chef-config/lib/chef-config/config.rb
+++ b/chef-config/lib/chef-config/config.rb
@@ -481,13 +481,6 @@ module ChefConfig
default :event_handlers, []
default :disable_event_loggers, false
- default :event_loggers do
- evt_loggers = []
- if ChefConfig::windows? and not ChefConfig::windows_server_2003?
- evt_loggers << :win_evt
- end
- evt_loggers
- end
# Exception Handlers
default :exception_handlers, []
diff --git a/lib/chef/config.rb b/lib/chef/config.rb
index 28c415aec8..629553c8ab 100644
--- a/lib/chef/config.rb
+++ b/lib/chef/config.rb
@@ -29,6 +29,26 @@ ChefConfig.logger = Chef::Log
require 'chef-config/config'
+require 'chef/platform/query_helpers'
+
class Chef
Config = ChefConfig::Config
+
+ # We re-open ChefConfig::Config to add additional settings. Generally,
+ # everything should go in chef-config so it's shared with whoever uses that.
+ # We make execeptions to that rule when:
+ # * The functionality isn't likely to be useful outside of Chef
+ # * The functionality makes use of a dependency we don't want to add to chef-config
+ class Config
+
+ default :event_loggers do
+ evt_loggers = []
+ if ChefConfig.windows? and not Chef::Platform.windows_server_2003?
+ evt_loggers << :win_evt
+ end
+ evt_loggers
+ end
+
+ end
end
+