cheffish 4.1.0 → 4.1.1

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
  SHA1:
3
- metadata.gz: e80fab8f974325b02588b59deeceb5ef09f09d93
4
- data.tar.gz: c529cab52c9114b867220a79c57547047621c513
3
+ metadata.gz: 18704ce9d93e9b7f2e0009aec7fae8796e7b890b
4
+ data.tar.gz: 94d26ffa96ea4363482d9c76dd0b734a3b06c15e
5
5
  SHA512:
6
- metadata.gz: 43c6db79856bea2d371c38c6937f3e53d4c1cafa1e053686dca513d943a8882ccaa56821d0db37d249c102e10680135fd658fe9a94cd46d3743e0fa7f2916df2
7
- data.tar.gz: c63bb304439024c4ca4732c05fd12f602b72bbba3cebe0338e24ee18ca16612ac821a5e822c998b668edac62f3e022d0a5c67f0037ffd8056c4b2839db139f32
6
+ metadata.gz: 750e6567aeb409b1f68d692d4a7f41b22592a0cfabd6d1081b43c44fa24a50fc37fc9a73be328e250815a53ac75c13478ebb6372b4c133b4308512c22eb47f90
7
+ data.tar.gz: 21a7ce7717192db9bf36fc18ceccdf10e528fae29bf35417f751b0b88250e7dd33d5f0aed2c4cc13b1d3abd33df9ba132ccf8e06521611e105bdd1e29e16b24c
@@ -1,10 +1,8 @@
1
- require "chef/mash"
2
-
3
1
  module Cheffish
4
2
  class MergedConfig
5
3
  def initialize(*configs)
6
- @configs = configs.map { |config| Chef::Mash.from_hash config }
7
- @merge_arrays = Chef::Mash.new
4
+ @configs = configs
5
+ @merge_arrays = {}
8
6
  end
9
7
 
10
8
  include Enumerable
@@ -1,3 +1,3 @@
1
1
  module Cheffish
2
- VERSION = "4.1.0"
2
+ VERSION = "4.1.1"
3
3
  end
@@ -6,24 +6,6 @@ describe "merged_config" do
6
6
  Cheffish::MergedConfig.new({ :test => "val" })
7
7
  end
8
8
 
9
- let(:collision) do
10
- c1 = { :test1 => "c1.1", "test2" => "c1.2" }
11
- c2 = { "test1" => "c2.1", "test3" => "c2.3" }
12
- Cheffish::MergedConfig.new(c1, c2)
13
- end
14
-
15
- let(:config_mismatch) do
16
- c1 = { :test => { :test => "val" } }
17
- c2 = { :test => [2, 3, 4] }
18
- Cheffish::MergedConfig.new(c1, c2)
19
- end
20
-
21
- let(:config_hashes) do
22
- c1 = { :test => { :test => "val" } }
23
- c2 = { :test => { :test2 => "val2" } }
24
- Cheffish::MergedConfig.new(c1, c2)
25
- end
26
-
27
9
  it "returns value in config" do
28
10
  expect(config.test).to eq("val")
29
11
  end
@@ -33,28 +15,6 @@ describe "merged_config" do
33
15
  end
34
16
 
35
17
  it "has an informative string representation" do
36
- expect("#{config}").to eq("{\"test\"=>\"val\"}")
37
- end
38
-
39
- it "has indifferent str/sym access" do
40
- expect(config["test"]).to eq("val")
41
- end
42
-
43
- it "respects precedence between the different configs" do
44
- expect(collision["test1"]).to eq("c1.1")
45
- expect(collision[:test1]).to eq("c1.1")
46
- end
47
-
48
- it "merges the configs" do
49
- expect(collision[:test2]).to eq("c1.2")
50
- expect(collision[:test3]).to eq("c2.3")
51
- end
52
-
53
- it "handle merged value type mismatch" do
54
- expect(config_mismatch[:test]).to eq("test" => "val")
55
- end
56
-
57
- it "merges values when they're hashes" do
58
- expect(config_hashes[:test].keys).to eq(%w{test test2})
18
+ expect("#{config}").to eq("{:test=>\"val\"}")
59
19
  end
60
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cheffish
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0
4
+ version: 4.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Keiser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-18 00:00:00.000000000 Z
11
+ date: 2017-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef-zero
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
130
  version: '0'
131
131
  requirements: []
132
132
  rubyforge_project:
133
- rubygems_version: 2.5.1
133
+ rubygems_version: 2.6.9
134
134
  signing_key:
135
135
  specification_version: 4
136
136
  summary: A library to manipulate Chef in Chef.