elastic-rails 1.0.2 → 1.0.3

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: e9da2682888e51090d97a0eb180f6c8e0bb77b3079fd75c78935f3fb594f19b0
4
- data.tar.gz: 2ce5060f1350d7111551382d36d2bd7a26d9426ac4efa0118d77ce8f5714dc5e
3
+ metadata.gz: ef1fb50bf5ddbde41f0e1bebb3bbe84ed4c1f415d2b118cadc4f0b2010764e12
4
+ data.tar.gz: f57fc27dca3483ff579b7c92420266ac7bc720feaa96a1a24c4ead5f82023531
5
5
  SHA512:
6
- metadata.gz: bb864146e44eb1839779527e269cd6bf2c31cecd7176ccb164ab9ca9ed5b02eb4dc312c4a0c0b652c1abc31ac46b3ebc335093467cef45649021b68822aa2f9c
7
- data.tar.gz: e884e21c92a22c756091118ec4936e04738bb703d70ff31ea68e7b6ef2a30d9d2fb2e136babed8f9cc846cd7198471d6008254fae3e06972f9477f0382dd12fe
6
+ metadata.gz: e6d15446f42c92f4eade16242ed4e7213326ae1226446ef5ad713a5a24af9079f375519b9d07c4ed063349abfa48eb29546404338f215e12aed2147edd4a0fcf
7
+ data.tar.gz: 8b8dd96307b1e23e3a2dfda088b9f5af04ce3f78e975322c5d99da48701f375340c645fd12f0b467401c6837693fff3b3b40491ca27d41c30c9d7bd38009a90d
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.7
@@ -19,8 +19,8 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_dependency "elasticsearch", "~> 6.3.1"
23
- spec.add_dependency "activesupport"
22
+ spec.add_dependency "elasticsearch", "~> 6.8"
23
+ spec.add_dependency "activesupport", [">= 4.0", "< 8.0"]
24
24
 
25
25
  spec.add_development_dependency "dotenv"
26
26
  spec.add_development_dependency "bundler", "~> 2.0"
@@ -21,7 +21,7 @@ module Elastic::Shims::Concerns
21
21
  private
22
22
 
23
23
  def set_hits_source
24
- child.pick(Elastic::Nodes::Concerns::HitProvider) do |node|
24
+ child.pick_nodes(Elastic::Nodes::Concerns::HitProvider) do |node|
25
25
  node.source = required_source_fields
26
26
  end
27
27
  end
@@ -9,7 +9,7 @@ module Elastic::Shims
9
9
  private
10
10
 
11
11
  def extract_aggregation_chain
12
- child.pick(Elastic::Nodes::Concerns::Aggregable).map do |node|
12
+ child.pick_nodes(Elastic::Nodes::Concerns::Aggregable).map do |node|
13
13
  bucketed = node.aggregations.find { |n| n.is_a? Elastic::Nodes::Concerns::Bucketed }
14
14
  bucketed.try(:name)
15
15
  end.reject(&:nil?)
@@ -20,13 +20,13 @@ module Elastic::Shims
20
20
  private
21
21
 
22
22
  def disable_hits_source
23
- child.pick(Elastic::Nodes::Concerns::HitProvider) do |node|
23
+ child.pick_nodes(Elastic::Nodes::Concerns::HitProvider) do |node|
24
24
  node.source = false
25
25
  end
26
26
  end
27
27
 
28
28
  def populate(_result)
29
- hits = _result.pick(Elastic::Results::Hit).to_a
29
+ hits = _result.pick_nodes(Elastic::Results::Hit).to_a
30
30
 
31
31
  if populate_by_id?
32
32
  ids = hits.map(&:id)
@@ -4,7 +4,7 @@ module Elastic::Support
4
4
  raise NotImplementedError, "every traversable tree must implement 'traverse'"
5
5
  end
6
6
 
7
- def pick(*_types, &_block)
7
+ def pick_nodes(*_types, &_block)
8
8
  if _types.empty?
9
9
  enum = Enumerator.new do |y|
10
10
  traverse { |h| y << h }
@@ -1,3 +1,3 @@
1
1
  module Elastic
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastic-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ignacio Baixas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-07-18 00:00:00.000000000 Z
11
+ date: 2022-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: elasticsearch
@@ -16,28 +16,34 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 6.3.1
19
+ version: '6.8'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 6.3.1
26
+ version: '6.8'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '4.0'
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '8.0'
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
41
  - - ">="
39
42
  - !ruby/object:Gem::Version
40
- version: '0'
43
+ version: '4.0'
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '8.0'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: dotenv
43
49
  requirement: !ruby/object:Gem::Requirement
@@ -194,6 +200,7 @@ files:
194
200
  - ".env"
195
201
  - ".gitignore"
196
202
  - ".rspec"
203
+ - ".ruby-version"
197
204
  - ".travis.yml"
198
205
  - CODE_OF_CONDUCT.md
199
206
  - Gemfile
@@ -330,7 +337,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
330
337
  - !ruby/object:Gem::Version
331
338
  version: '0'
332
339
  requirements: []
333
- rubygems_version: 3.0.4
340
+ rubygems_version: 3.1.6
334
341
  signing_key:
335
342
  specification_version: 4
336
343
  summary: Elasticsearch integration for Ruby on Rails by Platanus