ridley 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/lib/ridley/resource.rb +2 -2
- data/lib/ridley/resources/data_bag_item.rb +1 -1
- data/lib/ridley/resources/environment.rb +2 -2
- data/lib/ridley/resources/node.rb +1 -1
- data/lib/ridley/resources/role.rb +2 -2
- data/lib/ridley/version.rb +1 -1
- data/ridley.gemspec +2 -1
- metadata +20 -4
data/.gitignore
CHANGED
data/lib/ridley/resource.rb
CHANGED
@@ -123,7 +123,7 @@ module Ridley
|
|
123
123
|
def create(connection, object)
|
124
124
|
resource = new(connection, object.to_hash)
|
125
125
|
new_attributes = connection.post(self.resource_path, resource.to_json).body
|
126
|
-
resource.attributes = resource.attributes.
|
126
|
+
resource.attributes = resource.attributes.deep_merge(new_attributes)
|
127
127
|
resource
|
128
128
|
end
|
129
129
|
|
@@ -176,7 +176,7 @@ module Ridley
|
|
176
176
|
# @param [Hash] attributes
|
177
177
|
def initialize(connection, attributes = {})
|
178
178
|
@connection = connection
|
179
|
-
self.attributes = self.class.attribute_defaults.
|
179
|
+
self.attributes = self.class.attribute_defaults.deep_merge(attributes)
|
180
180
|
end
|
181
181
|
|
182
182
|
# @param [String, Symbol] key
|
@@ -50,7 +50,7 @@ module Ridley
|
|
50
50
|
end
|
51
51
|
|
52
52
|
new_attributes = connection.post("#{data_bag.class.resource_path}/#{data_bag.name}", resource.to_json).body
|
53
|
-
resource.from_hash(resource.attributes.
|
53
|
+
resource.from_hash(resource.attributes.deep_merge(new_attributes))
|
54
54
|
resource
|
55
55
|
end
|
56
56
|
|
@@ -58,7 +58,7 @@ module Ridley
|
|
58
58
|
# @return [HashWithIndifferentAccess]
|
59
59
|
def set_default_attribute(key, value)
|
60
60
|
attr_hash = HashWithIndifferentAccess.from_dotted_path(key, value)
|
61
|
-
self.default_attributes = self.default_attributes.
|
61
|
+
self.default_attributes = self.default_attributes.deep_merge(attr_hash)
|
62
62
|
end
|
63
63
|
|
64
64
|
# Set an environment level override attribute given the dotted path representation of
|
@@ -76,7 +76,7 @@ module Ridley
|
|
76
76
|
# @return [HashWithIndifferentAccess]
|
77
77
|
def set_override_attribute(key, value)
|
78
78
|
attr_hash = HashWithIndifferentAccess.from_dotted_path(key, value)
|
79
|
-
self.override_attributes = self.override_attributes.
|
79
|
+
self.override_attributes = self.override_attributes.deep_merge(attr_hash)
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
@@ -61,7 +61,7 @@ module Ridley
|
|
61
61
|
# @return [HashWithIndifferentAccess]
|
62
62
|
def set_attribute(key, value)
|
63
63
|
attr_hash = HashWithIndifferentAccess.from_dotted_path(key, value)
|
64
|
-
self.normal = self.normal.
|
64
|
+
self.normal = self.normal.deep_merge(attr_hash)
|
65
65
|
end
|
66
66
|
|
67
67
|
def eucalyptus?
|
@@ -42,7 +42,7 @@ module Ridley
|
|
42
42
|
# @return [HashWithIndifferentAccess]
|
43
43
|
def set_override_attribute(key, value)
|
44
44
|
attr_hash = HashWithIndifferentAccess.from_dotted_path(key, value)
|
45
|
-
self.override_attributes = self.override_attributes.
|
45
|
+
self.override_attributes = self.override_attributes.deep_merge(attr_hash)
|
46
46
|
end
|
47
47
|
|
48
48
|
# Set a role level default attribute given the dotted path representation of the Chef
|
@@ -60,7 +60,7 @@ module Ridley
|
|
60
60
|
# @return [HashWithIndifferentAccess]
|
61
61
|
def set_default_attribute(key, value)
|
62
62
|
attr_hash = HashWithIndifferentAccess.from_dotted_path(key, value)
|
63
|
-
self.default_attributes = self.default_attributes.
|
63
|
+
self.default_attributes = self.default_attributes.deep_merge(attr_hash)
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|
data/lib/ridley/version.rb
CHANGED
data/ridley.gemspec
CHANGED
@@ -23,7 +23,8 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.add_runtime_dependency 'addressable'
|
24
24
|
s.add_runtime_dependency 'faraday'
|
25
25
|
s.add_runtime_dependency 'multi_json', '>= 1.0.4'
|
26
|
-
s.add_runtime_dependency 'activemodel'
|
26
|
+
s.add_runtime_dependency 'activemodel', '>= 3.2.0'
|
27
|
+
s.add_runtime_dependency 'activesupport', '>= 3.2.0'
|
27
28
|
|
28
29
|
s.add_development_dependency 'rake'
|
29
30
|
s.add_development_dependency 'rspec'
|
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: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -130,7 +130,7 @@ dependencies:
|
|
130
130
|
requirements:
|
131
131
|
- - ! '>='
|
132
132
|
- !ruby/object:Gem::Version
|
133
|
-
version:
|
133
|
+
version: 3.2.0
|
134
134
|
type: :runtime
|
135
135
|
prerelease: false
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -138,7 +138,23 @@ dependencies:
|
|
138
138
|
requirements:
|
139
139
|
- - ! '>='
|
140
140
|
- !ruby/object:Gem::Version
|
141
|
-
version:
|
141
|
+
version: 3.2.0
|
142
|
+
- !ruby/object:Gem::Dependency
|
143
|
+
name: activesupport
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
146
|
+
requirements:
|
147
|
+
- - ! '>='
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: 3.2.0
|
150
|
+
type: :runtime
|
151
|
+
prerelease: false
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ! '>='
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: 3.2.0
|
142
158
|
- !ruby/object:Gem::Dependency
|
143
159
|
name: rake
|
144
160
|
requirement: !ruby/object:Gem::Requirement
|
@@ -434,7 +450,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
434
450
|
version: '0'
|
435
451
|
segments:
|
436
452
|
- 0
|
437
|
-
hash:
|
453
|
+
hash: 900476655936176139
|
438
454
|
requirements: []
|
439
455
|
rubyforge_project:
|
440
456
|
rubygems_version: 1.8.23
|