cheffish 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chef/provider/chef_data_bag_item.rb +1 -1
- data/lib/cheffish/chef_provider_base.rb +5 -1
- data/lib/cheffish/recipe_dsl.rb +10 -2
- data/lib/cheffish/version.rb +1 -1
- data/spec/integration/chef_node_spec.rb +14 -0
- metadata +12 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d87a0c1a1ae6b0add50c5a3acbbba29b51f013f
|
4
|
+
data.tar.gz: 085e01de9f5f36232031015b9fd961b16e4b5c4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c83499b0c969323e430b31376722f12b4645ad5cc8d0b1192507cd5e537cab747f8338fb5cbbd986c4f5ce13b55c8c7bc16ad258af2190be2a2c48b170bf4186
|
7
|
+
data.tar.gz: d4455ba139415aa2d1ec32e6d9d244372b76ec1910cbee0abf38691b953b4114946295876812f99487ac000ce0512882a21499c625f2657fdfef9ac93a6ba584
|
@@ -170,7 +170,7 @@ class Chef::Provider::ChefDataBagItem < Cheffish::ChefProviderBase
|
|
170
170
|
result = current_decrypted.merge(new_resource.raw_data || {})
|
171
171
|
end
|
172
172
|
result['id'] = new_resource.id
|
173
|
-
apply_modifiers(new_resource.raw_data_modifiers, result)
|
173
|
+
result = apply_modifiers(new_resource.raw_data_modifiers, result)
|
174
174
|
end
|
175
175
|
end
|
176
176
|
|
data/lib/cheffish/recipe_dsl.rb
CHANGED
@@ -72,14 +72,22 @@ class Chef
|
|
72
72
|
|
73
73
|
# Ensure all paths are given
|
74
74
|
%w(acl client cookbook container data_bag environment group node role).each do |type|
|
75
|
-
|
75
|
+
# Set the options as symbol keys and then copy to string keys
|
76
|
+
string_key = "#{type}_path"
|
77
|
+
symbol_key = "#{type}_path".to_sym
|
78
|
+
|
79
|
+
options[symbol_key] ||= begin
|
76
80
|
if options[:chef_repo_path].kind_of?(String)
|
77
81
|
Chef::Util::PathHelper.join(options[:chef_repo_path], "#{type}s")
|
78
82
|
else
|
79
83
|
options[:chef_repo_path].map { |path| Chef::Util::PathHelper.join(path, "#{type}s")}
|
80
84
|
end
|
81
85
|
end
|
82
|
-
|
86
|
+
|
87
|
+
# Copy over to string keys for things that use string keys (ChefFS)...
|
88
|
+
# TODO: Fix ChefFS to take symbols or use something that is insensitive to the difference
|
89
|
+
options[string_key] = options[symbol_key]
|
90
|
+
end
|
83
91
|
|
84
92
|
chef_fs = Chef::ChefFS::Config.new(options).local_fs
|
85
93
|
chef_fs.write_pretty_json = true
|
data/lib/cheffish/version.rb
CHANGED
@@ -445,6 +445,20 @@ describe Chef::Resource::ChefNode do
|
|
445
445
|
'chef_environment' => 'desert'
|
446
446
|
)
|
447
447
|
end
|
448
|
+
|
449
|
+
it 'chef_node with attribute [], {} clears all attributes' do
|
450
|
+
run_recipe do
|
451
|
+
chef_node 'blah' do
|
452
|
+
attribute([], {})
|
453
|
+
end
|
454
|
+
end
|
455
|
+
expect(chef_run).to have_updated('chef_node[blah]', :create)
|
456
|
+
expect(get('nodes/blah')).to include(
|
457
|
+
'normal' => { },
|
458
|
+
'automatic' => { 'x' => 'y' },
|
459
|
+
'chef_environment' => 'desert'
|
460
|
+
)
|
461
|
+
end
|
448
462
|
end
|
449
463
|
|
450
464
|
context 'delete' do
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cheffish
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Keiser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '11.8'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '11.8'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: chef-zero
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '3.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3.0'
|
69
69
|
description: A library to manipulate Chef in Chef.
|
@@ -144,12 +144,12 @@ require_paths:
|
|
144
144
|
- lib
|
145
145
|
required_ruby_version: !ruby/object:Gem::Requirement
|
146
146
|
requirements:
|
147
|
-
- -
|
147
|
+
- - '>='
|
148
148
|
- !ruby/object:Gem::Version
|
149
149
|
version: '0'
|
150
150
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
151
151
|
requirements:
|
152
|
-
- -
|
152
|
+
- - '>='
|
153
153
|
- !ruby/object:Gem::Version
|
154
154
|
version: '0'
|
155
155
|
requirements: []
|
@@ -159,4 +159,3 @@ signing_key:
|
|
159
159
|
specification_version: 4
|
160
160
|
summary: A library to manipulate Chef in Chef.
|
161
161
|
test_files: []
|
162
|
-
has_rdoc:
|