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 CHANGED
@@ -15,3 +15,4 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ *.sw[op]
@@ -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.merge(new_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.merge(attributes)
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.merge(new_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.merge(attr_hash)
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.merge(attr_hash)
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.merge(attr_hash)
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.merge(attr_hash)
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.merge(attr_hash)
63
+ self.default_attributes = self.default_attributes.deep_merge(attr_hash)
64
64
  end
65
65
  end
66
66
 
@@ -1,3 +1,3 @@
1
1
  module Ridley
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
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.0
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: '0'
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: '0'
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: 3213701153565876278
453
+ hash: 900476655936176139
438
454
  requirements: []
439
455
  rubyforge_project:
440
456
  rubygems_version: 1.8.23