diff options
author | John Keiser <jkeiser@opscode.com> | 2013-09-11 15:18:27 -0700 |
---|---|---|
committer | John Keiser <jkeiser@opscode.com> | 2013-09-11 15:18:27 -0700 |
commit | 13130fcb88ed3e1e944d3139927e7ee4d70b02f3 (patch) | |
tree | 850c51998d3ea738ea6d7822c75cfa958716bf2b | |
parent | f7f2fd58d65dc1954a5489130bc29f0a8715cfb9 (diff) | |
download | mixlib-config-13130fcb88ed3e1e944d3139927e7ee4d70b02f3.tar.gz |
Change config_strict_mode default back to false
-rw-r--r-- | lib/mixlib/config.rb | 4 | ||||
-rw-r--r-- | spec/mixlib/config_spec.rb | 9 |
2 files changed, 6 insertions, 7 deletions
diff --git a/lib/mixlib/config.rb b/lib/mixlib/config.rb index c55e0bb..d17b60b 100644 --- a/lib/mixlib/config.rb +++ b/lib/mixlib/config.rb @@ -31,7 +31,7 @@ module Mixlib base.configuration = Hash.new base.configurables = Hash.new base.config_contexts = Array.new - base.config_strict_mode true + base.config_strict_mode false end # Loads a given ruby file, and runs instance_eval against it in the context of the current @@ -238,7 +238,7 @@ module Mixlib # def config_strict_mode(value = NOT_PASSED) if value == NOT_PASSED - @config_strict_mode.nil? ? true : @config_strict_mode + @config_strict_mode else self.config_strict_mode = value end diff --git a/spec/mixlib/config_spec.rb b/spec/mixlib/config_spec.rb index 84ee931..1e570f3 100644 --- a/spec/mixlib/config_spec.rb +++ b/spec/mixlib/config_spec.rb @@ -20,7 +20,6 @@ require File.expand_path(File.join(File.dirname(__FILE__), "..", "spec_helper")) class ConfigIt extend ::Mixlib::Config - config_strict_mode false end @@ -84,6 +83,7 @@ describe Mixlib::Config do describe "when strict mode is on" do class StrictClass extend ::Mixlib::Config + config_strict_mode true default :x, 1 end @@ -420,8 +420,8 @@ describe Mixlib::Config do describe "When a nested context has strict mode on" do class StrictClass2 extend ::Mixlib::Config - config_strict_mode false config_context :c do + config_strict_mode true default :x, 1 end end @@ -438,10 +438,9 @@ describe Mixlib::Config do describe "When strict mode is on but a nested context has strict mode unspecified" do class StrictClass3 extend ::Mixlib::Config + config_strict_mode true default :x, 1 - config_context :c do - config_strict_mode false - end + config_context :c end it "The parent class does not allow you to set arbitrary config options" do |