elasticgraph-support 0.19.2.2 → 1.0.0.rc1

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: 140632fdad7b52efe6f9665ce325b2f1ccaf1695708f0f225a56c23d066283f4
4
- data.tar.gz: 7b6a74834ab4f1dc10d8bb0875271a8d479543e77bbe41e6e2f205dbc73866cb
3
+ metadata.gz: 1fa7e2caaac86c42c1b4d1a1dab5fa2b72228dfb80f9449d17c9d292d1153347
4
+ data.tar.gz: 7e39480070b038040aa796b6e9f196d2be2d461c354f5ff5f9c1989cf5caa8bb
5
5
  SHA512:
6
- metadata.gz: bae548702afe614253aa841c7ca5fc8b50b9ff61a1db8c29f228c662a6aabb465e1da05943a32082da4c9a6055cd8a6ad0329437cf8993d32a50a1523b4da518
7
- data.tar.gz: f784b38871630b1951762eb8c79bfc2c1a20f9c85fffb56d64002c43cca44b2cf5c9def90ca88c789da73cf0ed42cc8e7d3beeacd05cabe5479e5de3b83dfd26
6
+ metadata.gz: fbc2e99b97a1aaad4a9504c41d7a3df7e32ed6864c4c5ac883c60abcdf0cdbe599dad63b5f15bfd18eb0cba981eab8fa53ce9e04e6980b04399c1faf1a8d7392
7
+ data.tar.gz: '0902eb343c035cad60cc3f4a20ce65086ce28c84e16674209f8400b24d7ea1637111e846d39570d44a7cfa315b029695c2701e2f92907bd8f8019aa246f7c7cd'
@@ -125,15 +125,7 @@ module ElasticGraph
125
125
  #
126
126
  # Note: this constant is automatically kept up-to-date by our `schema_artifacts:dump` rake task.
127
127
  # @private
128
- INDEX_DATA_UPDATE_SCRIPT_ID = "update_index_data_38ea36e5b48fc1566d4142e9fc44b12e"
129
-
130
- # The id of the old version of the update data script before ElasticGraph v0.9. For now, we are maintaining
131
- # backwards compatibility with how it recorded event versions, and we have test coverage for that which relies
132
- # upon this id.
133
- #
134
- # TODO: Drop this when we no longer need to maintain backwards-compatibility.
135
- # @private
136
- OLD_INDEX_DATA_UPDATE_SCRIPT_ID = "update_index_data_9b97090d5c97c4adc82dc7f4c2b89bc5"
128
+ INDEX_DATA_UPDATE_SCRIPT_ID = "update_index_data_1fdfaf1c9261c96019decc89b515bd9a"
137
129
 
138
130
  # When an update script has a no-op result we often want to communicate more information about
139
131
  # why it was a no-op back to ElatsicGraph from the script. The only way to do that is to throw
@@ -51,7 +51,7 @@ module ElasticGraph
51
51
  # It's useful for the caller to be define `initialize` in order to provide field defaults, as
52
52
  # shown in the `Data` docs:
53
53
  #
54
- # https://rubyapi.org/3.2/o/data
54
+ # https://rubyapi.org/3.4/o/data
55
55
  #
56
56
  # However, to make that work, we need the `initialize` definition to be included in the data class,
57
57
  # rather than in our `DelegateClass` wrapper.
@@ -100,15 +100,15 @@ module ElasticGraph
100
100
  # Since `DelegateClass` delegates all methods to the wrapped object, `with` will return an instance of the
101
101
  # data class and not our wrapper. To overcome that, we redefine it here so that the new instance is re-wrapped.
102
102
  def with(**updates)
103
- # Note: we intentionally do _not_ `super` to the `Date#with` method here, because in Ruby 3.2 it has a bug that
104
- # impacts us: `with` does not call `initialize` as it should. Some of our value classes (based on the old `values` gem)
105
- # depend on this behavior, so here we work around it by delegating to `new` after merging the attributes.
106
- #
107
- # This bug is fixed in Ruby 3.3 so we should be able to revert back to an implementation that delegates with `super`
108
- # after we are on Ruby 3.3. For more info, see:
109
- # - https://bugs.ruby-lang.org/issues/19259
110
- # - https://github.com/ruby/ruby/pull/7031
111
- self.class.new(**to_h.merge(updates))
103
+ data_instance = super(**updates)
104
+
105
+ # Here we re-implement `new` because (1) we override `new` and (2) `initialize` may be overridden.
106
+ self.class.allocate.instance_eval do
107
+ # Match `__setobj__` behavior: https://github.com/ruby/ruby/blob/v3_4_2/lib/delegate.rb#L411
108
+ @delegate_dc_obj = data_instance
109
+ after_initialize
110
+ self
111
+ end
112
112
  end
113
113
  end
114
114
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  module ElasticGraph
10
10
  # The version of all ElasticGraph gems.
11
- VERSION = "0.19.2.2"
11
+ VERSION = "1.0.0.rc1"
12
12
 
13
13
  # Steep weirdly expects this here...
14
14
  # @dynamic self.define_schema
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elasticgraph-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.2.2
4
+ version: 1.0.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Myron Marston
@@ -9,7 +9,7 @@ authors:
9
9
  - Block Engineering
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-05-05 00:00:00.000000000 Z
12
+ date: 1980-01-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: logger
@@ -32,6 +32,9 @@ dependencies:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
34
  version: '2.13'
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: 2.13.1
35
38
  type: :development
36
39
  prerelease: false
37
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -39,6 +42,9 @@ dependencies:
39
42
  - - "~>"
40
43
  - !ruby/object:Gem::Version
41
44
  version: '2.13'
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: 2.13.1
42
48
  - !ruby/object:Gem::Dependency
43
49
  name: rake
44
50
  requirement: !ruby/object:Gem::Requirement
@@ -87,10 +93,10 @@ licenses:
87
93
  - MIT
88
94
  metadata:
89
95
  bug_tracker_uri: https://github.com/block/elasticgraph/issues
90
- changelog_uri: https://github.com/block/elasticgraph/releases/tag/v0.19.2.2
91
- documentation_uri: https://block.github.io/elasticgraph/api-docs/v0.19.2.2/
96
+ changelog_uri: https://github.com/block/elasticgraph/releases/tag/v1.0.0.rc1
97
+ documentation_uri: https://block.github.io/elasticgraph/api-docs/v1.0.0.rc1/
92
98
  homepage_uri: https://block.github.io/elasticgraph/
93
- source_code_uri: https://github.com/block/elasticgraph/tree/v0.19.2.2/elasticgraph-support
99
+ source_code_uri: https://github.com/block/elasticgraph/tree/v1.0.0.rc1/elasticgraph-support
94
100
  gem_category: core
95
101
  rdoc_options: []
96
102
  require_paths:
@@ -99,7 +105,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
99
105
  requirements:
100
106
  - - ">="
101
107
  - !ruby/object:Gem::Version
102
- version: '3.2'
108
+ version: '3.4'
103
109
  - - "<"
104
110
  - !ruby/object:Gem::Version
105
111
  version: '3.5'
@@ -109,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
115
  - !ruby/object:Gem::Version
110
116
  version: '0'
111
117
  requirements: []
112
- rubygems_version: 3.6.2
118
+ rubygems_version: 3.6.7
113
119
  specification_version: 4
114
120
  summary: ElasticGraph gem providing support utilities to the other ElasticGraph gems.
115
121
  test_files: []