mixlib-config 2.2.10 → 2.2.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 892bd326a41b304ef7ca855f8dd070ec1ae7810ff265a938f5f16c4fce655858
4
- data.tar.gz: 542afb3d0f64d556fe7b80f6ce2ab00b30f533a9f300c5d0ca4026af2ade2d8a
3
+ metadata.gz: c764853ffe7576f6b9568775541cc9358cc6a392a26997af52ae0c9dcde1611e
4
+ data.tar.gz: 19713a0e41d1c407510483d11df8f6ac83e8645d5607890b5b7181fcf0e51689
5
5
  SHA512:
6
- metadata.gz: 67b63d216471aad6980910b820841bdc3053b8e8aec165995a936ed35c635b83ecafb975bb7940c0bde0670583eee2e294e7b1560822d6aea366ffd24c4c4822
7
- data.tar.gz: 07a5aee20fb6e06ee9a0cdbbcc581cfb87956668bcab76c8d607a147ec99dfb0918036d1cad2593ba361854c54ae14e55682459eb29239e1be8ea7de921febc3
6
+ metadata.gz: 99c7c6639a2f2a1de69db7970d99ea5ca2a54fba04ac544967aba9a1552f3541a856b4d447098ee73364ac1094da33e7d5bdda92a87296e19d1d2dbbc5656ae2
7
+ data.tar.gz: 95be61fa365942dc7a0a7a1d1bcc5b0eff1e9a362ed9207a138e1dc362a7051c8a546d6b1bc1c2a40113bf93d83571a2fde96473ae1fe576e013faa0bdc3c78e
@@ -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-2016 Chef Software, Inc.
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.10"
22
+ VERSION = "2.2.11"
23
23
 
24
24
  end
25
25
  end
@@ -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
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.2.10
4
+ version: 2.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chef Software, Inc.