Module: Gitlab::CloudConnector::Configuration
- Defined in:
- lib/gitlab/cloud_connector/configuration.rb
Constant Summary collapse
- DEFAULT_DATA_LOADER_CLASS =
Gitlab::CloudConnector::DataModel::YamlDataLoader
- INVALID_LOADER_MESSAGE =
"Data loader must inherit from Gitlab::CloudConnector::DataModel::AbstractDataLoader"- INVALID_CONFIG_MESSAGE =
"Override configuration must be a Hash or respond to :call"- InvalidDataLoaderError =
Class.new(StandardError)
- InvalidConfigError =
Class.new(StandardError)
Class Attribute Summary collapse
- .config_dir ⇒ Object
-
.override_config ⇒ Object
Returns the value of attribute override_config.
Class Method Summary collapse
Class Attribute Details
.config_dir ⇒ Object
17 18 19 |
# File 'lib/gitlab/cloud_connector/configuration.rb', line 17 def config_dir @config_dir ||= (ENV["CLOUD_CONNECTOR_CONFIG_DIR"] || File.("../../../config", __dir__)).freeze end |
.override_config ⇒ Object
Returns the value of attribute override_config.
15 16 17 |
# File 'lib/gitlab/cloud_connector/configuration.rb', line 15 def override_config @override_config end |
Class Method Details
.configure {|_self| ... } ⇒ Object
35 36 37 |
# File 'lib/gitlab/cloud_connector/configuration.rb', line 35 def configure yield self if block_given? end |
.data_loader_class ⇒ Object
21 22 23 |
# File 'lib/gitlab/cloud_connector/configuration.rb', line 21 def data_loader_class @data_loader_class ||= DEFAULT_DATA_LOADER_CLASS end |
.data_loader_class=(klass) ⇒ Object
25 26 27 28 |
# File 'lib/gitlab/cloud_connector/configuration.rb', line 25 def data_loader_class=(klass) validate_data_loader!(klass) @data_loader_class = klass end |