lib/ridley/resources/node_resource.rb in ridley-0.12.2 vs lib/ridley/resources/node_resource.rb in ridley-0.12.3

- old
+ new

@@ -159,14 +159,18 @@ # @option options [Array] :run_list # run list items to merge # @option options [Hash] :attributes # attributes of normal precedence to merge # - # @raise [Errors::HTTPNotFound] + # @raise [Errors::ResourceNotFound] # if the target node is not found # # @return [Ridley::NodeResource] def merge_data(target, options = {}) - find(target).merge_data(options) + unless node = find(target) + abort Errors::ResourceNotFound.new + end + + update(node.merge_data(options)) end end end