Skip to content

Commit 5260daa

Browse files
authored
Merge pull request #792 from block/myron/json-schema-config-rename
Move `ElasticGraph::Config` to `ElasticGraph::Support::Config`.
2 parents 40b5675 + a42555d commit 5260daa

24 files changed

Lines changed: 587 additions & 581 deletions

File tree

‎config/site/Rakefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ module ElasticGraph
529529
# https://github.com/lsegal/yard/issues/1477#issuecomment-1399339983
530530
"Undocumentable superclass" =>
531531
# https://rubular.com/r/lecYmbp981T4LY
532-
/^\[warn\]: in YARD::Handlers::Ruby::ClassHandler: Undocumentable superclass \(class was added without superclass\)\n\s+in file[^\n]+\n\n\s+\d+:[^\n]*?(Data\.define|Struct\.new|ElasticGraph::Config\.define)[^\n]*\n\n/m,
532+
/^\[warn\]: in YARD::Handlers::Ruby::ClassHandler: Undocumentable superclass \(class was added without superclass\)\n\s+in file[^\n]+\n\n\s+\d+:[^\n]*?(Data\.define|Struct\.new|Support::Config\.define)[^\n]*\n\n/m,
533533

534534
# We sometimes include/extend/prepend a mixin that is a dynamic module
535535
# (e.g. `include Mixins::HasReadableToSAndInspect.new`) and YARD isn't able to understand this.

‎elasticgraph-datastore_core/lib/elastic_graph/datastore_core/config.rb‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
#
77
# frozen_string_literal: true
88

9-
require "elastic_graph/config"
9+
require "elastic_graph/support/config"
1010
require "elastic_graph/datastore_core/configuration/cluster_definition"
1111
require "elastic_graph/datastore_core/configuration/index_definition"
1212
require "elastic_graph/errors"
1313

1414
module ElasticGraph
1515
class DatastoreCore
1616
# Defines the configuration related to datastores.
17-
class Config < ElasticGraph::Config.define(:client_faraday_adapter, :clusters, :index_definitions, :log_traffic, :max_client_retries)
17+
class Config < Support::Config.define(:client_faraday_adapter, :clusters, :index_definitions, :log_traffic, :max_client_retries)
1818
all_json_schema_types = ["array", "string", "number", "boolean", "object", "null"]
1919

2020
json_schema at: "datastore",

‎elasticgraph-datastore_core/sig/elastic_graph/datastore_core/config.rbs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module ElasticGraph
22
class DatastoreCore
33
class ConfigSupertype
4-
extend ::ElasticGraph::Config::ClassMethods[Config]
4+
extend Support::Config::ClassMethods[Config]
55

66
attr_reader client_faraday_adapter: Configuration::ClientFaradayAdapter
77
attr_reader clusters: ::Hash[::String, Configuration::ClusterDefinition]

‎elasticgraph-graphql/lib/elastic_graph/graphql/config.rb‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
#
77
# frozen_string_literal: true
88

9-
require "elastic_graph/config"
9+
require "elastic_graph/support/config"
1010
require "elastic_graph/errors"
1111
require "elastic_graph/graphql/client"
1212
require "elastic_graph/schema_artifacts/runtime_metadata/extension_loader"
1313

1414
module ElasticGraph
1515
class GraphQL
16-
class Config < ElasticGraph::Config.define(
16+
class Config < Support::Config.define(
1717
:default_page_size,
1818
:max_page_size,
1919
:slow_query_latency_warning_threshold_in_ms,

‎elasticgraph-graphql/sig/elastic_graph/graphql/config.rbs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module ElasticGraph
22
class GraphQL
33
class ConfigSupertype
4-
extend ::ElasticGraph::Config::ClassMethods[Config]
4+
extend Support::Config::ClassMethods[Config]
55

66
attr_reader default_page_size: ::Integer
77
attr_reader max_page_size: ::Integer

‎elasticgraph-health_check/lib/elastic_graph/health_check/config.rb‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
#
77
# frozen_string_literal: true
88

9-
require "elastic_graph/config"
9+
require "elastic_graph/support/config"
1010

1111
module ElasticGraph
1212
module HealthCheck
13-
class Config < ElasticGraph::Config.define(:clusters_to_consider, :data_recency_checks)
13+
class Config < Support::Config.define(:clusters_to_consider, :data_recency_checks)
1414
json_schema at: "health_check",
1515
properties: {
1616
clusters_to_consider: {

‎elasticgraph-health_check/sig/elastic_graph/health_check/config.rbs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module ElasticGraph
33
type dataRecencyCheckHash = ::Hash[::String, untyped]
44

55
class ConfigSupertype
6-
extend ::ElasticGraph::Config::ClassMethods[Config]
6+
extend Support::Config::ClassMethods[Config]
77

88
attr_reader clusters_to_consider: ::Array[::String]
99
attr_reader data_recency_checks: ::Hash[::String, Config::DataRecencyCheck]

‎elasticgraph-indexer/lib/elastic_graph/indexer/config.rb‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
#
77
# frozen_string_literal: true
88

9-
require "elastic_graph/config"
9+
require "elastic_graph/support/config"
1010
require "elastic_graph/errors"
1111

1212
module ElasticGraph
1313
class Indexer
14-
class Config < ElasticGraph::Config.define(:latency_slo_thresholds_by_timestamp_in_ms, :skip_derived_indexing_type_updates)
14+
class Config < Support::Config.define(:latency_slo_thresholds_by_timestamp_in_ms, :skip_derived_indexing_type_updates)
1515
json_schema at: "indexer",
1616
properties: {
1717
latency_slo_thresholds_by_timestamp_in_ms: {

‎elasticgraph-indexer/sig/elastic_graph/indexer/config.rbs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module ElasticGraph
22
class Indexer
33
class ConfigSupertype
4-
extend ::ElasticGraph::Config::ClassMethods[Config]
4+
extend Support::Config::ClassMethods[Config]
55

66
attr_reader latency_slo_thresholds_by_timestamp_in_ms: ::Hash[::String, ::Integer]
77
attr_reader skip_derived_indexing_type_updates: ::Hash[::String, ::Set[::String]]

‎elasticgraph-query_interceptor/lib/elastic_graph/query_interceptor/config.rb‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
#
77
# frozen_string_literal: true
88

9-
require "elastic_graph/config"
9+
require "elastic_graph/support/config"
1010
require "elastic_graph/schema_artifacts/runtime_metadata/extension_loader"
1111

1212
module ElasticGraph
1313
module QueryInterceptor
1414
# Defines configuration for elasticgraph-query_interceptor
15-
class Config < ElasticGraph::Config.define(:interceptors)
15+
class Config < Support::Config.define(:interceptors)
1616
json_schema at: "query_interceptor",
1717
properties: {
1818
interceptors: {

0 commit comments

Comments
 (0)