elasticgraph-schema_artifacts 1.0.0 → 1.0.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b105be8d931b4df673e1a49390a0adb267dca88185765eadf56c70017492a14
|
4
|
+
data.tar.gz: 4669ade0c16874dccb59b7d4a7161530e9a5eb477eade264d84f5d1eb5d4832a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec2dc22c0e3420d4427a49d6290081aef2a28982266eb754361148b5f9e69d8aaf0e520fd8086867caaaa87d89b390df90f6fa0d79b51c8604d50ec9496602d3
|
7
|
+
data.tar.gz: dfd05afe70cceaba09e3d214f82cae422807f711d913eb6ed05af59f4c835328b0b62244aab884e19ca8923f7e147a87c04e2c7944306af6c69bb0630da620d9
|
@@ -85,7 +85,7 @@ module ElasticGraph
|
|
85
85
|
@available_json_schema_versions ||= begin
|
86
86
|
versioned_json_schemas_dir = ::File.join(artifacts_dir, JSON_SCHEMAS_BY_VERSION_DIRECTORY)
|
87
87
|
if ::Dir.exist?(versioned_json_schemas_dir)
|
88
|
-
::Dir.entries(versioned_json_schemas_dir).filter_map { |
|
88
|
+
::Dir.entries(versioned_json_schemas_dir).filter_map { |filename| filename[/v(\d+)\.yaml/, 1]&.to_i }.to_set
|
89
89
|
else
|
90
90
|
::Set.new
|
91
91
|
end
|
@@ -137,7 +137,7 @@ module ElasticGraph
|
|
137
137
|
SchemaElementNames = SchemaElementNamesDefinition.new(
|
138
138
|
# Filter arg and operation names:
|
139
139
|
:filter,
|
140
|
-
:equal_to_any_of, :gt, :gte, :lt, :lte, :matches_phrase, :matches_query, :any_of, :all_of, :not,
|
140
|
+
:equal_to_any_of, :gt, :gte, :lt, :lte, :matches_phrase, :matches_query, :matches_query_with_prefix, :any_of, :all_of, :not,
|
141
141
|
:time_of_day, :any_satisfy, :contains, :starts_with, :all_substrings_of, :any_substring_of, :ignore_case, :any_prefix_of,
|
142
142
|
# Directives
|
143
143
|
:eg_latency_slo, :ms,
|
@@ -159,8 +159,8 @@ module ElasticGraph
|
|
159
159
|
:page_info, :start_cursor, :end_cursor, :total_edge_count, :has_previous_page, :has_next_page,
|
160
160
|
# Subfields of `GeoLocation`/`GeoLocationFilterInput`:
|
161
161
|
:latitude, :longitude, :near, :max_distance,
|
162
|
-
# Subfields of `MatchesQueryFilterInput`/`MatchesPhraseFilterInput`
|
163
|
-
:query, :phrase, :allowed_edits_per_term, :require_all_terms,
|
162
|
+
# Subfields of `MatchesQueryFilterInput`/`MatchesPhraseFilterInput`/`MatchesQueryWithPrefixFilterInput`
|
163
|
+
:query, :phrase, :query_with_prefix, :allowed_edits_per_term, :require_all_terms,
|
164
164
|
# Aggregated values field names:
|
165
165
|
:exact_min, :exact_max, :approximate_min, :approximate_max, :approximate_avg, :approximate_sum, :exact_sum,
|
166
166
|
:approximate_distinct_value_count
|
@@ -6,6 +6,7 @@
|
|
6
6
|
#
|
7
7
|
# frozen_string_literal: true
|
8
8
|
|
9
|
+
require "elastic_graph/support/config"
|
9
10
|
require "elastic_graph/errors"
|
10
11
|
require "elastic_graph/schema_artifacts/from_disk"
|
11
12
|
require "elastic_graph/support/from_yaml_file"
|
@@ -22,19 +23,25 @@ module ElasticGraph
|
|
22
23
|
# @param parsed_yaml [Hash<String, Object>] hash parsed from a settings YAML file
|
23
24
|
# @return [FromDisk]
|
24
25
|
def self.from_parsed_yaml(parsed_yaml)
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
if (extra_keys = schema_artifacts.keys - ["directory"]).any?
|
30
|
-
raise Errors::ConfigError, "Config has extra `schema_artifacts` keys: #{extra_keys}"
|
31
|
-
end
|
32
|
-
|
33
|
-
directory = schema_artifacts.fetch("directory") do
|
34
|
-
raise Errors::ConfigError, "Config is missing required key `schema_artifacts.directory`."
|
35
|
-
end
|
26
|
+
config = Config.from_parsed_yaml(parsed_yaml) || Config.new
|
27
|
+
FromDisk.new(config.directory)
|
28
|
+
end
|
36
29
|
|
37
|
-
|
30
|
+
# @private
|
31
|
+
Config = Support::Config.define(:directory) do
|
32
|
+
# @implements Config
|
33
|
+
json_schema at: "schema_artifacts",
|
34
|
+
optional: false,
|
35
|
+
description: "Configuration for schema artifact management used by all parts of ElasticGraph.",
|
36
|
+
properties: {
|
37
|
+
directory: {
|
38
|
+
description: "Path to the directory where schema artifacts are stored.",
|
39
|
+
examples: ["config/schema/artifacts"],
|
40
|
+
default: "config/schema/artifacts",
|
41
|
+
type: "string",
|
42
|
+
minLength: 1
|
43
|
+
}
|
44
|
+
}
|
38
45
|
end
|
39
46
|
end
|
40
47
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elasticgraph-schema_artifacts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Myron Marston
|
@@ -17,42 +17,42 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - '='
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 1.0.
|
20
|
+
version: 1.0.2
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - '='
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 1.0.
|
27
|
+
version: 1.0.2
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: elasticgraph-graphql
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - '='
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 1.0.
|
34
|
+
version: 1.0.2
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - '='
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 1.0.
|
41
|
+
version: 1.0.2
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: elasticgraph-indexer
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - '='
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: 1.0.
|
48
|
+
version: 1.0.2
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - '='
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 1.0.
|
55
|
+
version: 1.0.2
|
56
56
|
email:
|
57
57
|
- myron@squareup.com
|
58
58
|
executables: []
|
@@ -89,10 +89,10 @@ licenses:
|
|
89
89
|
- MIT
|
90
90
|
metadata:
|
91
91
|
bug_tracker_uri: https://github.com/block/elasticgraph/issues
|
92
|
-
changelog_uri: https://github.com/block/elasticgraph/releases/tag/v1.0.
|
93
|
-
documentation_uri: https://block.github.io/elasticgraph/api-docs/v1.0.
|
92
|
+
changelog_uri: https://github.com/block/elasticgraph/releases/tag/v1.0.2
|
93
|
+
documentation_uri: https://block.github.io/elasticgraph/api-docs/v1.0.2/
|
94
94
|
homepage_uri: https://block.github.io/elasticgraph/
|
95
|
-
source_code_uri: https://github.com/block/elasticgraph/tree/v1.0.
|
95
|
+
source_code_uri: https://github.com/block/elasticgraph/tree/v1.0.2/elasticgraph-schema_artifacts
|
96
96
|
gem_category: core
|
97
97
|
rdoc_options: []
|
98
98
|
require_paths:
|