search_flip 3.0.0.beta5 → 3.0.0.beta6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/lib/search_flip.rb +1 -0
- data/lib/search_flip/aggregation.rb +2 -0
- data/lib/search_flip/bulk.rb +5 -5
- data/lib/search_flip/criteria.rb +3 -1
- data/lib/search_flip/http_client.rb +6 -2
- data/lib/search_flip/index.rb +1 -1
- data/lib/search_flip/response.rb +1 -1
- data/lib/search_flip/version.rb +1 -1
- data/search_flip.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13b47e860cb15b650dc2606d10f0015143acc46cbcfb4c68cd5d6804cc3d58e9
|
4
|
+
data.tar.gz: 4337cdb4ce7a4a16613bcc405bccd3a8696ff2607483bde201e721a201830223
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c000a69bd76414b6acf4853e246c6696dafea7a022838e207766b3c97cce343b44b3d8e4a8dcdcea2902c2886bf0257838aa8055e3d37218e62d2329b2779234
|
7
|
+
data.tar.gz: f65e33592aeaffecaa5cb247cdebb4cc087d3e5e9b741b09bd65507300e244ed0d538bcfbf90e19acf43f2c5871928458fc99b347015cc3529db11f57c8e7e99
|
data/.travis.yml
CHANGED
data/lib/search_flip.rb
CHANGED
data/lib/search_flip/bulk.rb
CHANGED
@@ -77,7 +77,7 @@ module SearchFlip
|
|
77
77
|
# and versioning
|
78
78
|
|
79
79
|
def index(id, object, options = {})
|
80
|
-
perform
|
80
|
+
perform(:index, id, SearchFlip::JSON.generate(object), options)
|
81
81
|
end
|
82
82
|
|
83
83
|
# @api private
|
@@ -86,7 +86,7 @@ module SearchFlip
|
|
86
86
|
#
|
87
87
|
# @see #index
|
88
88
|
|
89
|
-
def import(*args)
|
89
|
+
ruby2_keywords def import(*args)
|
90
90
|
index(*args)
|
91
91
|
end
|
92
92
|
|
@@ -100,7 +100,7 @@ module SearchFlip
|
|
100
100
|
# and versioning
|
101
101
|
|
102
102
|
def create(id, object, options = {})
|
103
|
-
perform
|
103
|
+
perform(:create, id, SearchFlip::JSON.generate(object), options)
|
104
104
|
end
|
105
105
|
|
106
106
|
# @api private
|
@@ -113,7 +113,7 @@ module SearchFlip
|
|
113
113
|
# and versioning
|
114
114
|
|
115
115
|
def update(id, object, options = {})
|
116
|
-
perform
|
116
|
+
perform(:update, id, SearchFlip::JSON.generate(object), options)
|
117
117
|
end
|
118
118
|
|
119
119
|
# @api private
|
@@ -125,7 +125,7 @@ module SearchFlip
|
|
125
125
|
# and versioning
|
126
126
|
|
127
127
|
def delete(id, options = {})
|
128
|
-
perform
|
128
|
+
perform(:delete, id, nil, options)
|
129
129
|
end
|
130
130
|
|
131
131
|
private
|
data/lib/search_flip/criteria.rb
CHANGED
@@ -206,7 +206,7 @@ module SearchFlip
|
|
206
206
|
#
|
207
207
|
# @return [SearchFlip::Criteria] Simply returns self
|
208
208
|
|
209
|
-
def with_settings(*args)
|
209
|
+
ruby2_keywords def with_settings(*args)
|
210
210
|
fresh.tap do |criteria|
|
211
211
|
criteria.target = target.with_settings(*args)
|
212
212
|
end
|
@@ -587,6 +587,8 @@ module SearchFlip
|
|
587
587
|
end
|
588
588
|
end
|
589
589
|
|
590
|
+
ruby2_keywords :method_missing
|
591
|
+
|
590
592
|
def_delegators :response, :total_entries, :total_count, :current_page, :previous_page,
|
591
593
|
:prev_page, :next_page, :first_page?, :last_page?, :out_of_range?, :total_pages,
|
592
594
|
:hits, :ids, :count, :size, :length, :took, :aggregations, :suggestions,
|
@@ -25,17 +25,21 @@ module SearchFlip
|
|
25
25
|
client.request = request.send(method, *args)
|
26
26
|
end
|
27
27
|
end
|
28
|
+
|
29
|
+
ruby2_keywords method
|
28
30
|
end
|
29
31
|
|
30
32
|
[:get, :post, :put, :delete, :head].each do |method|
|
31
|
-
define_method
|
33
|
+
define_method(method) do |*args|
|
32
34
|
execute(method, *args)
|
33
35
|
end
|
36
|
+
|
37
|
+
ruby2_keywords method
|
34
38
|
end
|
35
39
|
|
36
40
|
private
|
37
41
|
|
38
|
-
def execute(method, *args)
|
42
|
+
ruby2_keywords def execute(method, *args)
|
39
43
|
response = request.send(method, *args)
|
40
44
|
|
41
45
|
raise SearchFlip::ResponseError.new(code: response.code, body: response.body.to_s) unless response.status.success?
|
data/lib/search_flip/index.rb
CHANGED
data/lib/search_flip/response.rb
CHANGED
@@ -222,7 +222,7 @@ module SearchFlip
|
|
222
222
|
#
|
223
223
|
# @return [Array] An array of database records
|
224
224
|
|
225
|
-
def records
|
225
|
+
def records
|
226
226
|
@records ||= begin
|
227
227
|
sort_map = ids.each_with_index.each_with_object({}) { |(id, index), hash| hash[id.to_s] = index }
|
228
228
|
|
data/lib/search_flip/version.rb
CHANGED
data/search_flip.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: search_flip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.
|
4
|
+
version: 3.0.0.beta6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin Vetter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -178,6 +178,20 @@ dependencies:
|
|
178
178
|
- - ">="
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: ruby2_keywords
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :runtime
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
181
195
|
description: Full-Featured Elasticsearch Ruby Client with a Chainable DSL
|
182
196
|
email:
|
183
197
|
- vetter@flakks.com
|