gummi 0.3.8 → 0.3.9
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.
|
@@ -35,6 +35,16 @@ module Gummi
|
|
|
35
35
|
nil
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
+
def update(id, attributes)
|
|
39
|
+
return unless id.present?
|
|
40
|
+
if parent_id_attribute_name && parent_id = self.send(parent_id_attribute_name)
|
|
41
|
+
options = { parent: parent_id }
|
|
42
|
+
else
|
|
43
|
+
options = {}
|
|
44
|
+
end
|
|
45
|
+
response = Hashie::Mash.new client.update options.merge(index: index.name, type: document_type, id: id, body: { doc: attributes })
|
|
46
|
+
response.ok
|
|
47
|
+
end
|
|
38
48
|
|
|
39
49
|
def delete_children_by_query(parent_id, children_query)
|
|
40
50
|
parent_id_query = { term: { _parent: parent_id } }
|
data/lib/gummi/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gummi
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.9
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2014-02-
|
|
12
|
+
date: 2014-02-18 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: virtus
|
|
@@ -274,18 +274,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
274
274
|
- - ! '>='
|
|
275
275
|
- !ruby/object:Gem::Version
|
|
276
276
|
version: '0'
|
|
277
|
-
segments:
|
|
278
|
-
- 0
|
|
279
|
-
hash: 37788337669997294
|
|
280
277
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
281
278
|
none: false
|
|
282
279
|
requirements:
|
|
283
280
|
- - ! '>='
|
|
284
281
|
- !ruby/object:Gem::Version
|
|
285
282
|
version: '0'
|
|
286
|
-
segments:
|
|
287
|
-
- 0
|
|
288
|
-
hash: 37788337669997294
|
|
289
283
|
requirements: []
|
|
290
284
|
rubyforge_project:
|
|
291
285
|
rubygems_version: 1.8.23
|