elasticsearch-model 8.0.0.pre → 8.0.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0c760a3ffa71e37511564ccafa368fbaf6c7bb8329c0a472c9e1ef9b26739740
4
- data.tar.gz: 1ded565b299e1a95f35315bdff3645b564d401f2970943ad8c5445d6ee39e1ea
3
+ metadata.gz: fba64e154ffd6f7b9034425776e8561facf2531fc956f26a631f7276d3843c50
4
+ data.tar.gz: 402b7a8c27d9e31410389a27fdfae76d84cce11f8573641c11cf5b931cf18fb4
5
5
  SHA512:
6
- metadata.gz: a5fca8875b77ac7c26a9bb42802bca17bc88837c356a9ae83ca4404ea4779ad8bd2dc3c039332075a68a17cbfb5f815a34eacc93648dc70f50a42c12aea9026d
7
- data.tar.gz: 1d56f2c15d073532f89c31b78ccdeabc84ec1dc7dc501728770eea544f9ceb4e8d126570c8593e23dfb381f5249645de6ed0cecb288dbdf67de886e4ad200f45
6
+ metadata.gz: 93c0029741b499d5b541036ca2aa9b72b9d4b9c1ba2a28e7a04ced39f42f7c6d39da90cd6b8e99d75fa19ddc341ab817893e2759981a39be5f3506064957665b
7
+ data.tar.gz: 31128b194ed81977244d9d553904ab01bd1b698bf893c5d8fa342afd1583b3cbbe06cb8e495361bec917a477d50e842766ab7faf882c42993526b9281fdb0584
data/README.md CHANGED
@@ -8,7 +8,7 @@ It aims to simplify integration of Ruby classes ("models"), commonly found e.g.
8
8
 
9
9
  This library is compatible with Ruby 3 and higher.
10
10
 
11
- The version numbers follow the Elasticsearch major versions. Currently the `main` branch is compatible with version `7.x` of the Elasticsearch stack. **We haven't tested and updated the code for Elasticsearch `8.0` yet**.
11
+ The version numbers follow the Elasticsearch major versions. Currently the `main` branch is compatible with version `8.x` of the Elasticsearch stack.
12
12
 
13
13
  | Rubygem | | Elasticsearch |
14
14
  |:-------:|:-:|:-------------:|
@@ -141,7 +141,7 @@ Elasticsearch::Model.client = Elasticsearch::Client.new log: true
141
141
  You might want to do this during your application bootstrap process, e.g. in a Rails initializer.
142
142
 
143
143
  Please refer to the
144
- [`elasticsearch-transport`](https://github.com/elastic/elasticsearch-ruby/tree/main/elasticsearch-transport)
144
+ [`elastic-transport`](https://github.com/elastic/elastic-transport-ruby/)
145
145
  library documentation for all the configuration options, and to the
146
146
  [`elasticsearch-api`](http://rubydoc.info/gems/elasticsearch-api) library documentation
147
147
  for information about the Ruby client API.
@@ -63,6 +63,6 @@ Gem::Specification.new do |s|
63
63
  unless defined?(JRUBY_VERSION)
64
64
  s.add_development_dependency 'oj'
65
65
  s.add_development_dependency 'ruby-prof'
66
- s.add_development_dependency 'sqlite3'
66
+ s.add_development_dependency 'sqlite3', '~> 1.4'
67
67
  end
68
68
  end
data/gemfiles/6.1.gemfile CHANGED
@@ -26,7 +26,7 @@ gemspec path: '../'
26
26
 
27
27
  gem 'activemodel', '6.1'
28
28
  gem 'activerecord', '6.1'
29
- gem 'sqlite3' unless defined?(JRUBY_VERSION)
29
+ gem 'sqlite3', '~> 1.4' unless defined?(JRUBY_VERSION)
30
30
  # gem 'mongoid', '~> 6'
31
31
 
32
32
  group :development, :testing do
data/gemfiles/7.0.gemfile CHANGED
@@ -26,7 +26,7 @@ gemspec path: '../'
26
26
 
27
27
  gem 'activemodel', '~> 7'
28
28
  gem 'activerecord', '~> 7'
29
- gem 'sqlite3' unless defined?(JRUBY_VERSION)
29
+ gem 'sqlite3', '~> 1.4' unless defined?(JRUBY_VERSION)
30
30
  # gem 'mongoid', '~> 6'
31
31
 
32
32
  group :development, :testing do
data/gemfiles/7.1.gemfile CHANGED
@@ -26,7 +26,7 @@ gemspec path: '../'
26
26
 
27
27
  gem 'activemodel', '~> 7.1'
28
28
  gem 'activerecord', '~> 7.1'
29
- gem 'sqlite3' unless defined?(JRUBY_VERSION)
29
+ gem 'sqlite3', '~> 1.4' unless defined?(JRUBY_VERSION)
30
30
  # gem 'mongoid', '~> 6'
31
31
 
32
32
  group :development, :testing do
@@ -22,7 +22,7 @@ module Elasticsearch
22
22
  class Aggregations < HashWrapper
23
23
  disable_warnings if respond_to?(:disable_warnings)
24
24
 
25
- def initialize(attributes={})
25
+ def initialize(attributes={}, options= {})
26
26
  __redefine_enumerable_methods super(attributes)
27
27
  end
28
28
 
@@ -17,6 +17,6 @@
17
17
 
18
18
  module Elasticsearch
19
19
  module Model
20
- VERSION = '8.0.0.pre'.freeze
20
+ VERSION = '8.0.1'.freeze
21
21
  end
22
22
  end
@@ -112,6 +112,11 @@ module Elasticsearch
112
112
  METHODS.each do |method|
113
113
  delegate method, to: :__elasticsearch__ unless self.public_instance_methods.include?(method)
114
114
  end
115
+
116
+ def inherited(subclass)
117
+ super
118
+ Registry.add(subclass) if subclass.is_a?(Class)
119
+ end
115
120
  end
116
121
  end
117
122
 
@@ -80,4 +80,11 @@ describe Elasticsearch::Model::Response::Aggregations do
80
80
  expect(aggregations.price.max.value).to eq(99)
81
81
  end
82
82
  end
83
+
84
+ describe '#dup' do
85
+
86
+ it 'creates a copy of the aggregation' do
87
+ expect(aggregations.dup).to eq(aggregations)
88
+ end
89
+ end
83
90
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elasticsearch-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.0.pre
4
+ version: 8.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic Client Library Maintainers
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-04-16 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: activesupport
@@ -294,24 +293,24 @@ dependencies:
294
293
  name: sqlite3
295
294
  requirement: !ruby/object:Gem::Requirement
296
295
  requirements:
297
- - - ">="
296
+ - - "~>"
298
297
  - !ruby/object:Gem::Version
299
- version: '0'
298
+ version: '1.4'
300
299
  type: :development
301
300
  prerelease: false
302
301
  version_requirements: !ruby/object:Gem::Requirement
303
302
  requirements:
304
- - - ">="
303
+ - - "~>"
305
304
  - !ruby/object:Gem::Version
306
- version: '0'
305
+ version: '1.4'
307
306
  description: ActiveModel/Record integrations for Elasticsearch.
308
307
  email:
309
308
  - client-libs@elastic.co
310
309
  executables: []
311
310
  extensions: []
312
311
  extra_rdoc_files:
313
- - README.md
314
312
  - LICENSE.txt
313
+ - README.md
315
314
  files:
316
315
  - ".gitignore"
317
316
  - CHANGELOG.md
@@ -425,7 +424,6 @@ homepage: https://github.com/elasticsearch/elasticsearch-rails/
425
424
  licenses:
426
425
  - Apache 2
427
426
  metadata: {}
428
- post_install_message:
429
427
  rdoc_options:
430
428
  - "--charset=UTF-8"
431
429
  require_paths:
@@ -441,8 +439,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
441
439
  - !ruby/object:Gem::Version
442
440
  version: '0'
443
441
  requirements: []
444
- rubygems_version: 3.5.3
445
- signing_key:
442
+ rubygems_version: 3.7.1
446
443
  specification_version: 4
447
444
  summary: ActiveModel/Record integrations for Elasticsearch.
448
445
  test_files: