Class: TestData::Configurators::SecretsYaml
- Inherits:
-
Object
- Object
- TestData::Configurators::SecretsYaml
- Defined in:
- lib/test_data/configurators/secrets_yaml.rb
Instance Method Summary collapse
- #configure ⇒ Object
-
#initialize ⇒ SecretsYaml
constructor
A new instance of SecretsYaml.
- #verify ⇒ Object
Constructor Details
#initialize ⇒ SecretsYaml
Returns a new instance of SecretsYaml.
4 5 6 7 |
# File 'lib/test_data/configurators/secrets_yaml.rb', line 4 def initialize @generator = SecretsYamlGenerator.new @config = TestData.config end |
Instance Method Details
#configure ⇒ Object
20 21 22 |
# File 'lib/test_data/configurators/secrets_yaml.rb', line 20 def configure @generator.call end |
#verify ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/test_data/configurators/secrets_yaml.rb', line 9 def verify if !File.exist?(@config.secrets_yaml_full_path) || YAML.load_file(@config.secrets_yaml_full_path).key?("test_data") ConfigurationVerification.new(looks_good?: true) else ConfigurationVerification.new(problems: [ "'#{@config.secrets_yaml_path}' exists but does not contain a 'test_data' section" ]) end end |