ridley 2.4.1 → 2.4.2
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/CHANGELOG.md +4 -0
- data/README.md +7 -0
- data/lib/ridley/chef_objects/environment_object.rb +1 -1
- data/lib/ridley/version.rb +1 -1
- data/spec/unit/ridley/chef_objects/environment_object_spec.rb +13 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 362b667bff0340e4cba7d750a251c91003811218
|
|
4
|
+
data.tar.gz: 173dd3384ef80483faa2d7f4137e2ffca339a310
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 21d2e559ff5a3dc38a4dbae1fed6b33013aa8612771bac3199442ed7844eeea767fcc5a8affa920df3a2c48f2872b33709b81cab643655d4f9d683105325d215
|
|
7
|
+
data.tar.gz: 07af89b3508d66d6533ac7b8c7353ca015d461fd240a9942b6af6466b6457b85027fffa8067b4e18f4405abc98ef34e614284a5830c55fd8407455c56e934158
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -201,6 +201,13 @@ ridley.role.all #=> [
|
|
|
201
201
|
#<Ridley::RoleObject chef_id:motherbrain_proxy ...>
|
|
202
202
|
]
|
|
203
203
|
```
|
|
204
|
+
Notify: You have to send the #reload message to node objects returned from a full listing. Their attributes aren't automatically populated from the initial search.
|
|
205
|
+
|
|
206
|
+
```ruby
|
|
207
|
+
ridley = Ridley.new(...)
|
|
208
|
+
ridley.role.all.first => #<Ridley::RoleObject chef_id:some_chef_id, attributes:#<VariaModel::Attributes chef_type="role" default_attributes=#<Hashie::Mash> description="" env_run_lists=#<VariaModel::Attributes> json_class="Chef::Role" name="some_chef_id" override_attributes=#<Hashie::Mash> run_list=[]>>
|
|
209
|
+
ridley.role.all.first.reload => #<Ridley::RoleObject chef_id:some_chef_id, attributes:#<VariaModel::Attributes chef_type="role" default_attributes=#<Hashie::Mash SOME ATTRIBUTES> description="Some description" env_run_lists=#<VariaModel::Attributes> json_class="Chef::Role" name="some_chef_id" override_attributes=#<Hashie::Mash> run_list=[ SOME RUN LIST ]>>
|
|
210
|
+
````
|
|
204
211
|
|
|
205
212
|
##### Finding
|
|
206
213
|
|
|
@@ -96,7 +96,7 @@ module Ridley
|
|
|
96
96
|
when :override
|
|
97
97
|
attributes_to_change = self.override_attributes
|
|
98
98
|
end
|
|
99
|
-
leaf_hash = dotted_path.inject(attributes_to_change) { |hash, element| hash[element] }
|
|
99
|
+
leaf_hash = dotted_path.inject(attributes_to_change) { |hash, element| hash[element] unless hash == nil }
|
|
100
100
|
leaf_hash.delete(leaf_key) unless leaf_hash.nil?
|
|
101
101
|
attributes_to_change
|
|
102
102
|
end
|
data/lib/ridley/version.rb
CHANGED
|
@@ -75,6 +75,19 @@ describe Ridley::EnvironmentObject do
|
|
|
75
75
|
expect(subject.default_attributes[:hello][:world]).to be_true
|
|
76
76
|
end
|
|
77
77
|
end
|
|
78
|
+
|
|
79
|
+
context "when an internal hash is nil" do
|
|
80
|
+
let(:delete_default_attribute) { subject.delete_default_attribute("never.not.existing") }
|
|
81
|
+
|
|
82
|
+
before do
|
|
83
|
+
subject.default_attributes = Hash.new
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
it "does not delete anything" do
|
|
87
|
+
delete_default_attribute
|
|
88
|
+
expect(subject.default_attributes).to be_empty
|
|
89
|
+
end
|
|
90
|
+
end
|
|
78
91
|
end
|
|
79
92
|
|
|
80
93
|
describe "#delete_override_attribute" do
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ridley
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.4.
|
|
4
|
+
version: 2.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jamie Winsor
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2014-01-
|
|
12
|
+
date: 2014-01-28 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: addressable
|