cheffish 14.0.0 → 14.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -7
- data/Rakefile +1 -2
- data/cheffish.gemspec +1 -1
- data/lib/cheffish/merged_config.rb +3 -2
- data/lib/cheffish/version.rb +1 -1
- data/spec/functional/merged_config_spec.rb +11 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b322f6c35d8de419ca2d82d4b6314d6611ea8fc1f3713a0dd2a226d805f9cf32
|
4
|
+
data.tar.gz: e9f224665c4aa7c477310f58873db64f785c2ea57550cd0c2a78b1ac9239c9cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79ff38ae7d3a5739e5a8d1464758899156c6d8282713d6c5a22cb18e3fd0229a58f69c3db4d7588b2f57585b0ab555a2314850f9b0f61fa868f4ec2426266bd7
|
7
|
+
data.tar.gz: fbaf1722dd64857f8da5946f4b61a7249370113f34b98cf63802513dd6f30bf12d37e27ebe777cf78d428402043fa0a01281487b9daf57de4e857d7348258dc9
|
data/Gemfile
CHANGED
@@ -2,12 +2,8 @@ source "https://rubygems.org"
|
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
-
group :changelog do
|
6
|
-
gem "github_changelog_generator", git: "https://github.com/tduffield/github-changelog-generator", branch: "adjust-tag-section-mapping"
|
7
|
-
end
|
8
|
-
|
9
5
|
group :development do
|
10
|
-
gem "chefstyle"
|
6
|
+
gem "chefstyle", "= 0.6.0"
|
11
7
|
gem "rake"
|
12
8
|
gem "rspec", "~> 3.0"
|
13
9
|
end
|
@@ -18,7 +14,7 @@ if ENV["GEMFILE_MOD"]
|
|
18
14
|
instance_eval(ENV["GEMFILE_MOD"])
|
19
15
|
else
|
20
16
|
group :development do
|
21
|
-
gem "chef",
|
22
|
-
gem "ohai",
|
17
|
+
gem "chef", "~> 14"
|
18
|
+
gem "ohai", "~> 14"
|
23
19
|
end
|
24
20
|
end
|
data/Rakefile
CHANGED
@@ -31,8 +31,7 @@ begin
|
|
31
31
|
config.enhancement_labels = "enhancement,Enhancement,Improvement,New Feature,Feature".split(",")
|
32
32
|
config.bug_labels = "bug,Bug,Upstream Bug".split(",")
|
33
33
|
config.exclude_labels = "duplicate,question,invalid,wontfix,no_changelog,Exclude From Changelog,Question,Discussion".split(",")
|
34
|
-
config.
|
35
|
-
config.add_issues_wo_labels = false
|
34
|
+
config.issues = false
|
36
35
|
end
|
37
36
|
rescue LoadError
|
38
37
|
end
|
data/cheffish.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.email = "jkeiser@chef.io"
|
13
13
|
s.homepage = "http://github.com/chef/cheffish"
|
14
14
|
|
15
|
-
s.required_ruby_version = ">= 2.
|
15
|
+
s.required_ruby_version = ">= 2.4.0"
|
16
16
|
|
17
17
|
s.add_dependency "chef-zero", "~> 14.0"
|
18
18
|
s.add_dependency "net-ssh"
|
@@ -3,8 +3,8 @@ require "chef/mash"
|
|
3
3
|
module Cheffish
|
4
4
|
class MergedConfig
|
5
5
|
def initialize(*configs)
|
6
|
-
@configs = configs.map { |config|
|
7
|
-
@merge_arrays =
|
6
|
+
@configs = configs.map { |config| Mash.from_hash config.to_hash }
|
7
|
+
@merge_arrays = Mash.new
|
8
8
|
end
|
9
9
|
|
10
10
|
include Enumerable
|
@@ -48,6 +48,7 @@ module Cheffish
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def method_missing(name, *args)
|
51
|
+
$stderr.puts "WARN: deprecated use of method_missing on a Cheffish::MergedConfig object at #{caller[0]}"
|
51
52
|
if args.count > 0
|
52
53
|
raise NoMethodError, "Unexpected method #{name} for MergedConfig with arguments #{args}"
|
53
54
|
else
|
data/lib/cheffish/version.rb
CHANGED
@@ -24,6 +24,13 @@ describe "merged_config" do
|
|
24
24
|
Cheffish::MergedConfig.new(c1, c2)
|
25
25
|
end
|
26
26
|
|
27
|
+
let(:nested_config) do
|
28
|
+
c1 = { :test => { :test => "val" } }
|
29
|
+
c2 = { :test => { :test2 => "val2" } }
|
30
|
+
mc = Cheffish::MergedConfig.new(c2)
|
31
|
+
Cheffish::MergedConfig.new(c1, mc)
|
32
|
+
end
|
33
|
+
|
27
34
|
it "returns value in config" do
|
28
35
|
expect(config.test).to eq("val")
|
29
36
|
end
|
@@ -57,4 +64,8 @@ describe "merged_config" do
|
|
57
64
|
it "merges values when they're hashes" do
|
58
65
|
expect(config_hashes[:test].keys).to eq(%w{test test2})
|
59
66
|
end
|
67
|
+
|
68
|
+
it "supports nested merged configs" do
|
69
|
+
expect(nested_config[:test].keys).to eq(%w{test test2})
|
70
|
+
end
|
60
71
|
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: 14.0.
|
4
|
+
version: 14.0.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: 2018-
|
11
|
+
date: 2018-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-zero
|
@@ -122,7 +122,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
122
122
|
requirements:
|
123
123
|
- - ">="
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: 2.
|
125
|
+
version: 2.4.0
|
126
126
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - ">="
|
@@ -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.7.
|
133
|
+
rubygems_version: 2.7.6
|
134
134
|
signing_key:
|
135
135
|
specification_version: 4
|
136
136
|
summary: A library to manipulate Chef in Chef.
|