mixlib-config 2.0.0.rc.1 → 2.0.0.rc.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -31,6 +31,7 @@ module Mixlib
31
31
  base.configuration = Hash.new
32
32
  base.configurables = Hash.new
33
33
  base.config_contexts = Array.new
34
+ base.config_strict_mode false
34
35
  end
35
36
 
36
37
  # Loads a given ruby file, and runs instance_eval against it in the context of the current
@@ -237,7 +238,7 @@ module Mixlib
237
238
  #
238
239
  def config_strict_mode(value = NOT_PASSED)
239
240
  if value == NOT_PASSED
240
- @config_strict_mode || false
241
+ @config_strict_mode
241
242
  else
242
243
  self.config_strict_mode = value
243
244
  end
@@ -307,7 +308,7 @@ module Mixlib
307
308
  else
308
309
  if config_strict_mode == :warn
309
310
  Chef::Log.warn("Setting unsupported config value #{method_name}..")
310
- elsif self.config_strict_mode
311
+ elsif config_strict_mode
311
312
  raise UnknownConfigOptionError, "Cannot set unsupported config value #{method_name}."
312
313
  end
313
314
  configuration[method_symbol] = value
@@ -19,7 +19,7 @@
19
19
  module Mixlib
20
20
  module Config
21
21
 
22
- VERSION = "2.0.0.rc.1"
22
+ VERSION = "2.0.0.rc.2"
23
23
 
24
24
  end
25
25
  end
@@ -350,6 +350,7 @@ describe Mixlib::Config do
350
350
  @klass = Class.new
351
351
  @klass.extend(::Mixlib::Config)
352
352
  @klass.class_eval do
353
+ configurable :x
353
354
  config_context(:blah) do
354
355
  default :x, 5
355
356
  end
@@ -389,6 +390,7 @@ describe Mixlib::Config do
389
390
  default :x, 5
390
391
  end
391
392
  end
393
+ configurable :x
392
394
  end
393
395
  end
394
396
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mixlib-config
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.rc.1
4
+ version: 2.0.0.rc.2
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors: