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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4fae82bf67967306afbb6bfb0f2f321b8993fa364710b24dc7b3860f2bb6ace0
4
- data.tar.gz: a060faa2ea3b06233dc132b65df0e4c2bc18ab51ea5cfe92eadd96aaa7c8ddbf
3
+ metadata.gz: 13b47e860cb15b650dc2606d10f0015143acc46cbcfb4c68cd5d6804cc3d58e9
4
+ data.tar.gz: 4337cdb4ce7a4a16613bcc405bccd3a8696ff2607483bde201e721a201830223
5
5
  SHA512:
6
- metadata.gz: 15aa25cab455dfadead099deb59594580f9c09f71476818f28d483a7d7e8cb3decfd7c4126ecfaf438b92ed19ded8edfe01566d4cffcd1a03394608b66db9ebb
7
- data.tar.gz: 3a57bc2cecc98641c32f33c688576c7c808482bde3e3f9901590c7241102ef8a01d22f1dd875bd56d60c32fc9d38d4f97fd95e2f54249ccb2699c1ddc35a1e06
6
+ metadata.gz: c000a69bd76414b6acf4853e246c6696dafea7a022838e207766b3c97cce343b44b3d8e4a8dcdcea2902c2886bf0257838aa8055e3d37218e62d2329b2779234
7
+ data.tar.gz: f65e33592aeaffecaa5cb247cdebb4cc087d3e5e9b741b09bd65507300e244ed0d538bcfbf90e19acf43f2c5871928458fc99b347015cc3529db11f57c8e7e99
data/.travis.yml CHANGED
@@ -7,7 +7,9 @@ env:
7
7
  - ES_IMAGE=docker.elastic.co/elasticsearch/elasticsearch:7.0.0
8
8
  - ES_IMAGE=docker.elastic.co/elasticsearch/elasticsearch:7.6.0
9
9
  rvm:
10
+ - ruby-2.5.3
10
11
  - ruby-2.6.2
12
+ - ruby-2.7.1
11
13
  before_install:
12
14
  - docker-compose up -d
13
15
  - sleep 10
data/lib/search_flip.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require "ruby2_keywords"
1
2
  require "forwardable"
2
3
  require "http"
3
4
  require "hashie"
@@ -112,6 +112,8 @@ module SearchFlip
112
112
  end
113
113
  end
114
114
 
115
+ ruby2_keywords :method_missing
116
+
115
117
  # @api private
116
118
  #
117
119
  # Simply dups the object for api compatability.
@@ -77,7 +77,7 @@ module SearchFlip
77
77
  # and versioning
78
78
 
79
79
  def index(id, object, options = {})
80
- perform :index, id, SearchFlip::JSON.generate(object), options
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 :create, id, SearchFlip::JSON.generate(object), options
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 :update, id, SearchFlip::JSON.generate(object), options
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 :delete, id, nil, options
128
+ perform(:delete, id, nil, options)
129
129
  end
130
130
 
131
131
  private
@@ -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 method do |*args|
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?
@@ -498,7 +498,7 @@ module SearchFlip
498
498
  #
499
499
  # @see #index See #index for more details
500
500
 
501
- def import(*args)
501
+ ruby2_keywords def import(*args)
502
502
  index(*args)
503
503
  end
504
504
 
@@ -222,7 +222,7 @@ module SearchFlip
222
222
  #
223
223
  # @return [Array] An array of database records
224
224
 
225
- def records(options = {})
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
 
@@ -1,3 +1,3 @@
1
1
  module SearchFlip
2
- VERSION = "3.0.0.beta5"
2
+ VERSION = "3.0.0.beta6"
3
3
  end
data/search_flip.gemspec CHANGED
@@ -37,4 +37,5 @@ Gem::Specification.new do |spec|
37
37
  spec.add_dependency "hashie"
38
38
  spec.add_dependency "http"
39
39
  spec.add_dependency "oj"
40
+ spec.add_dependency "ruby2_keywords"
40
41
  end
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.beta5
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 00:00:00.000000000 Z
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