elasticgraph-schema_artifacts 0.18.0.4 → 0.19.0.0.rc1

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: 761f484e79b51dc0768d704c264660df55c75f71f41b576795a4efcbd66ef02c
4
- data.tar.gz: 056541ad942396bedf1f7543986cbcb0d03d60ce204a10fcd10ab6fc6afcabf7
3
+ metadata.gz: 4ab89f4cbbdf4325ab7823316b2c8c3b257c2c1cb7ee94c092065e07623e29bc
4
+ data.tar.gz: c8b85f5c3dd1bb4fed903bb24b57e4ef8b70f8b6c176eab25caf8028d0ca626d
5
5
  SHA512:
6
- metadata.gz: 35dcc13853e2d5a00fdcbe198513ce4e9e274badee64712fabc3a5632ada4af7abf213947e0af42caaa48e8b49fa979e6adb705d27a0ba862aec69098d4f6469
7
- data.tar.gz: d8aad5e252ca573367b7ca08c70a99e3139339794ea46a289b401bb15816a8b9c1824df0137ea4e0531d0b6eb38adbdb380a4a0daf853cead840b4c07516cb38
6
+ metadata.gz: 6a7549140dfe21f543e520ca0a5ba2ddd8b4328dd381cf34ab8d65ee7fea4f8f6041d9b8525a032ca135e7f270956a2e16a23a35983cf16215c1f44857d2f849
7
+ data.tar.gz: 93bb4104f3228bb633fd4e8b512055f6fb85ad14f8aa66193d6aba2997c6d3f29397fa7dfbaceda47c1b97baf754f536ed45fb6bc1bfbe30469ffc311b938d63
@@ -7,7 +7,7 @@
7
7
  # frozen_string_literal: true
8
8
 
9
9
  require "elastic_graph/constants"
10
- require "elastic_graph/error"
10
+ require "elastic_graph/errors"
11
11
  require "elastic_graph/schema_artifacts/artifacts_helper_methods"
12
12
  require "elastic_graph/schema_artifacts/runtime_metadata/schema"
13
13
  require "elastic_graph/support/hash_util"
@@ -19,15 +19,15 @@ module ElasticGraph
19
19
  # Builds a `SchemaArtifacts::FromDisk` instance using the provided YAML settings.
20
20
  def self.from_parsed_yaml(parsed_yaml, for_context:)
21
21
  schema_artifacts = parsed_yaml.fetch("schema_artifacts") do
22
- raise ConfigError, "Config is missing required key `schema_artifacts`."
22
+ raise Errors::ConfigError, "Config is missing required key `schema_artifacts`."
23
23
  end
24
24
 
25
25
  if (extra_keys = schema_artifacts.keys - ["directory"]).any?
26
- raise ConfigError, "Config has extra `schema_artifacts` keys: #{extra_keys}"
26
+ raise Errors::ConfigError, "Config has extra `schema_artifacts` keys: #{extra_keys}"
27
27
  end
28
28
 
29
29
  directory = schema_artifacts.fetch("directory") do
30
- raise ConfigError, "Config is missing required key `schema_artifacts.directory`."
30
+ raise Errors::ConfigError, "Config is missing required key `schema_artifacts.directory`."
31
31
  end
32
32
 
33
33
  FromDisk.new(directory, for_context)
@@ -43,7 +43,7 @@ module ElasticGraph
43
43
 
44
44
  def json_schemas_for(version)
45
45
  unless available_json_schema_versions.include?(version)
46
- raise MissingSchemaArtifactError, "The requested json schema version (#{version}) is not available. " \
46
+ raise Errors::MissingSchemaArtifactError, "The requested json schema version (#{version}) is not available. " \
47
47
  "Available versions: #{available_json_schema_versions.sort.join(", ")}."
48
48
  end
49
49
 
@@ -63,7 +63,7 @@ module ElasticGraph
63
63
 
64
64
  def latest_json_schema_version
65
65
  @latest_json_schema_version ||= available_json_schema_versions.max || raise(
66
- MissingSchemaArtifactError,
66
+ Errors::MissingSchemaArtifactError,
67
67
  "The directory for versioned JSON schemas (#{::File.join(artifacts_dir, JSON_SCHEMAS_BY_VERSION_DIRECTORY)}) could not be found. " \
68
68
  "Either the schema artifacts haven't been dumped yet or the schema artifacts directory (#{artifacts_dir}) is misconfigured."
69
69
  )
@@ -88,7 +88,7 @@ module ElasticGraph
88
88
  if ::File.exist?(file_name)
89
89
  ::File.read(file_name)
90
90
  else
91
- raise MissingSchemaArtifactError, "Schema artifact `#{artifact_name}` could not be found. " \
91
+ raise Errors::MissingSchemaArtifactError, "Schema artifact `#{artifact_name}` could not be found. " \
92
92
  "Either the schema artifacts haven't been dumped yet or the schema artifacts directory (#{artifacts_dir}) is misconfigured."
93
93
  end
94
94
  end
@@ -6,7 +6,7 @@
6
6
  #
7
7
  # frozen_string_literal: true
8
8
 
9
- require "elastic_graph/error"
9
+ require "elastic_graph/errors"
10
10
  require "elastic_graph/schema_artifacts/runtime_metadata/extension"
11
11
 
12
12
  module ElasticGraph
@@ -32,7 +32,7 @@ module ElasticGraph
32
32
  def load(constant_name, from:, config:)
33
33
  (@loaded_by_name[constant_name] ||= load_extension(constant_name, from)).tap do |extension|
34
34
  if extension.require_path != from
35
- raise InvalidExtensionError, "Extension `#{constant_name}` cannot be loaded from `#{from}`, " \
35
+ raise Errors::InvalidExtensionError, "Extension `#{constant_name}` cannot be loaded from `#{from}`, " \
36
36
  "since it has already been loaded from `#{extension.require_path}`."
37
37
  end
38
38
  end.with(extension_config: config)
@@ -64,7 +64,7 @@ module ElasticGraph
64
64
  end
65
65
 
66
66
  if problems.any?
67
- raise InvalidExtensionError,
67
+ raise Errors::InvalidExtensionError,
68
68
  "Extension `#{constant_name}` does not implement the expected interface correctly. Problems:\n\n" \
69
69
  "#{problems.join("\n")}"
70
70
  end
@@ -7,7 +7,7 @@
7
7
  # frozen_string_literal: true
8
8
 
9
9
  require "elastic_graph/constants"
10
- require "elastic_graph/error"
10
+ require "elastic_graph/errors"
11
11
 
12
12
  module ElasticGraph
13
13
  module SchemaArtifacts
@@ -20,14 +20,14 @@ module ElasticGraph
20
20
 
21
21
  define_method :initialize do |form:, overrides: {}|
22
22
  extend(CONVERTERS.fetch(form.to_s) do
23
- raise SchemaError,
23
+ raise Errors::SchemaError,
24
24
  "Invalid schema element name form: #{form.inspect}. " \
25
25
  "Only valid values are: #{CONVERTERS.keys.inspect}."
26
26
  end)
27
27
 
28
28
  unused_keys = overrides.keys.map(&:to_s) - element_names.map(&:to_s)
29
29
  if unused_keys.any?
30
- raise SchemaError,
30
+ raise Errors::SchemaError,
31
31
  "`overrides` contains entries that do not match any schema " \
32
32
  "elements: #{unused_keys.to_a.inspect}. Are any misspelled?"
33
33
  end
@@ -98,7 +98,7 @@ module ElasticGraph
98
98
  "#{canonical_names.inspect} all map to the same exposed name: #{duplicate_exposed_name}"
99
99
  end.join(" and ")
100
100
 
101
- raise SchemaError, collisions
101
+ raise Errors::SchemaError, collisions
102
102
  end
103
103
  # standard:enable Lint/NestedMethodDefinition
104
104
  end
@@ -6,7 +6,7 @@
6
6
  #
7
7
  # frozen_string_literal: true
8
8
 
9
- require "elastic_graph/error"
9
+ require "elastic_graph/errors"
10
10
 
11
11
  module ElasticGraph
12
12
  module SchemaArtifacts
@@ -14,7 +14,7 @@ module ElasticGraph
14
14
  class SortField < ::Data.define(:field_path, :direction)
15
15
  def initialize(field_path:, direction:)
16
16
  unless direction == :asc || direction == :desc
17
- raise SchemaError, "Sort direction `#{direction.inspect}` is invalid; it must be `:asc` or `:desc`"
17
+ raise Errors::SchemaError, "Sort direction `#{direction.inspect}` is invalid; it must be `:asc` or `:desc`"
18
18
  end
19
19
 
20
20
  super(field_path: field_path, direction: direction)
metadata CHANGED
@@ -1,14 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elasticgraph-schema_artifacts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0.4
4
+ version: 0.19.0.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Myron Marston
8
+ - Ben VandenBos
9
+ - Block Engineering
8
10
  autorequire:
9
11
  bindir: exe
10
12
  cert_chain: []
11
- date: 2024-09-06 00:00:00.000000000 Z
13
+ date: 2024-12-03 00:00:00.000000000 Z
12
14
  dependencies:
13
15
  - !ruby/object:Gem::Dependency
14
16
  name: rubocop-factory_bot
@@ -44,42 +46,42 @@ dependencies:
44
46
  requirements:
45
47
  - - "~>"
46
48
  - !ruby/object:Gem::Version
47
- version: '3.0'
49
+ version: '3.1'
48
50
  type: :development
49
51
  prerelease: false
50
52
  version_requirements: !ruby/object:Gem::Requirement
51
53
  requirements:
52
54
  - - "~>"
53
55
  - !ruby/object:Gem::Version
54
- version: '3.0'
56
+ version: '3.1'
55
57
  - !ruby/object:Gem::Dependency
56
58
  name: standard
57
59
  requirement: !ruby/object:Gem::Requirement
58
60
  requirements:
59
61
  - - "~>"
60
62
  - !ruby/object:Gem::Version
61
- version: 1.40.0
63
+ version: 1.41.0
62
64
  type: :development
63
65
  prerelease: false
64
66
  version_requirements: !ruby/object:Gem::Requirement
65
67
  requirements:
66
68
  - - "~>"
67
69
  - !ruby/object:Gem::Version
68
- version: 1.40.0
70
+ version: 1.41.0
69
71
  - !ruby/object:Gem::Dependency
70
72
  name: steep
71
73
  requirement: !ruby/object:Gem::Requirement
72
74
  requirements:
73
75
  - - "~>"
74
76
  - !ruby/object:Gem::Version
75
- version: '1.7'
77
+ version: '1.8'
76
78
  type: :development
77
79
  prerelease: false
78
80
  version_requirements: !ruby/object:Gem::Requirement
79
81
  requirements:
80
82
  - - "~>"
81
83
  - !ruby/object:Gem::Version
82
- version: '1.7'
84
+ version: '1.8'
83
85
  - !ruby/object:Gem::Dependency
84
86
  name: coderay
85
87
  requirement: !ruby/object:Gem::Requirement
@@ -134,14 +136,14 @@ dependencies:
134
136
  requirements:
135
137
  - - "~>"
136
138
  - !ruby/object:Gem::Version
137
- version: '0.12'
139
+ version: '0.13'
138
140
  type: :development
139
141
  prerelease: false
140
142
  version_requirements: !ruby/object:Gem::Requirement
141
143
  requirements:
142
144
  - - "~>"
143
145
  - !ruby/object:Gem::Version
144
- version: '0.12'
146
+ version: '0.13'
145
147
  - !ruby/object:Gem::Dependency
146
148
  name: simplecov
147
149
  requirement: !ruby/object:Gem::Requirement
@@ -176,42 +178,42 @@ dependencies:
176
178
  requirements:
177
179
  - - '='
178
180
  - !ruby/object:Gem::Version
179
- version: 0.18.0.4
181
+ version: 0.19.0.0.rc1
180
182
  type: :runtime
181
183
  prerelease: false
182
184
  version_requirements: !ruby/object:Gem::Requirement
183
185
  requirements:
184
186
  - - '='
185
187
  - !ruby/object:Gem::Version
186
- version: 0.18.0.4
188
+ version: 0.19.0.0.rc1
187
189
  - !ruby/object:Gem::Dependency
188
190
  name: elasticgraph-graphql
189
191
  requirement: !ruby/object:Gem::Requirement
190
192
  requirements:
191
193
  - - '='
192
194
  - !ruby/object:Gem::Version
193
- version: 0.18.0.4
195
+ version: 0.19.0.0.rc1
194
196
  type: :development
195
197
  prerelease: false
196
198
  version_requirements: !ruby/object:Gem::Requirement
197
199
  requirements:
198
200
  - - '='
199
201
  - !ruby/object:Gem::Version
200
- version: 0.18.0.4
202
+ version: 0.19.0.0.rc1
201
203
  - !ruby/object:Gem::Dependency
202
204
  name: elasticgraph-indexer
203
205
  requirement: !ruby/object:Gem::Requirement
204
206
  requirements:
205
207
  - - '='
206
208
  - !ruby/object:Gem::Version
207
- version: 0.18.0.4
209
+ version: 0.19.0.0.rc1
208
210
  type: :development
209
211
  prerelease: false
210
212
  version_requirements: !ruby/object:Gem::Requirement
211
213
  requirements:
212
214
  - - '='
213
215
  - !ruby/object:Gem::Version
214
- version: 0.18.0.4
216
+ version: 0.19.0.0.rc1
215
217
  description:
216
218
  email:
217
219
  - myron@squareup.com
@@ -240,10 +242,15 @@ files:
240
242
  - lib/elastic_graph/schema_artifacts/runtime_metadata/schema_element_names.rb
241
243
  - lib/elastic_graph/schema_artifacts/runtime_metadata/sort_field.rb
242
244
  - lib/elastic_graph/schema_artifacts/runtime_metadata/update_target.rb
243
- homepage:
245
+ homepage: https://block.github.io/elasticgraph/
244
246
  licenses:
245
247
  - MIT
246
248
  metadata:
249
+ bug_tracker_uri: https://github.com/block/elasticgraph/issues
250
+ changelog_uri: https://github.com/block/elasticgraph/releases/tag/v0.19.0.0.rc1
251
+ documentation_uri: https://block.github.io/elasticgraph/docs/main/
252
+ homepage_uri: https://block.github.io/elasticgraph/
253
+ source_code_uri: https://github.com/block/elasticgraph/tree/v0.19.0.0.rc1/elasticgraph-schema_artifacts
247
254
  gem_category: core
248
255
  post_install_message:
249
256
  rdoc_options: []