mixlib-config 2.2.10 → 2.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/mixlib/config.rb +1 -1
- data/lib/mixlib/config/version.rb +2 -2
- data/spec/mixlib/config_spec.rb +8 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c764853ffe7576f6b9568775541cc9358cc6a392a26997af52ae0c9dcde1611e
|
4
|
+
data.tar.gz: 19713a0e41d1c407510483d11df8f6ac83e8645d5607890b5b7181fcf0e51689
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99c7c6639a2f2a1de69db7970d99ea5ca2a54fba04ac544967aba9a1552f3541a856b4d447098ee73364ac1094da33e7d5bdda92a87296e19d1d2dbbc5656ae2
|
7
|
+
data.tar.gz: 95be61fa365942dc7a0a7a1d1bcc5b0eff1e9a362ed9207a138e1dc362a7051c8a546d6b1bc1c2a40113bf93d83571a2fde96473ae1fe576e013faa0bdc3c78e
|
data/lib/mixlib/config.rb
CHANGED
@@ -153,7 +153,7 @@ module Mixlib
|
|
153
153
|
# <True>:: If the config option exists
|
154
154
|
# <False>:: If the config option does not exist
|
155
155
|
def key?(key)
|
156
|
-
configuration.has_key?(key.to_sym)
|
156
|
+
configuration.has_key?(key.to_sym) || config_contexts.has_key?(key.to_sym)
|
157
157
|
end
|
158
158
|
|
159
159
|
alias_method :has_key?, :key?
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#
|
2
2
|
# Author:: Daniel DeLeo (<dan@chef.io>)
|
3
|
-
# Copyright:: Copyright (c) 2013-
|
3
|
+
# Copyright:: Copyright (c) 2013-2018, Chef Software Inc.
|
4
4
|
# License:: Apache License, Version 2.0
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -19,7 +19,7 @@
|
|
19
19
|
module Mixlib
|
20
20
|
module Config
|
21
21
|
|
22
|
-
VERSION = "2.2.
|
22
|
+
VERSION = "2.2.11"
|
23
23
|
|
24
24
|
end
|
25
25
|
end
|
data/spec/mixlib/config_spec.rb
CHANGED
@@ -935,6 +935,14 @@ describe Mixlib::Config do
|
|
935
935
|
end
|
936
936
|
end
|
937
937
|
|
938
|
+
it "has_key? finds the subcontext" do
|
939
|
+
expect(@klass.has_key?(:blah)).to be true
|
940
|
+
end
|
941
|
+
|
942
|
+
it "key? finds the subcontext" do
|
943
|
+
expect(@klass.key?(:blah)).to be true
|
944
|
+
end
|
945
|
+
|
938
946
|
it "save does not save the hash for the config_context" do
|
939
947
|
expect(@klass.save).to eql({})
|
940
948
|
end
|