summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanielsdeleo <dan@getchef.com>2015-05-13 15:43:21 -0700
committerdanielsdeleo <dan@getchef.com>2015-05-20 11:41:52 -0700
commit7bbd08702a609c8a9ff7a39ebe37143f4a3cc035 (patch)
tree5c4994103ccf52e4e2df00963fd834ec5d6c1fe9
parent17a4dd36f055ad756f10384d2359910013b3653d (diff)
downloadchef-7bbd08702a609c8a9ff7a39ebe37143f4a3cc035.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
+