Class: CfDeployer::ConfigValidation
- Inherits:
-
Object
- Object
- CfDeployer::ConfigValidation
- Defined in:
- lib/cf_deployer/config_validation.rb
Defined Under Namespace
Classes: ValidationError
Constant Summary collapse
- CommonInputs =
[:application, :environment, :component, :region]
- EnvironmentOptions =
[:settings, :inputs, :tags, :components]
- ComponentOptions =
[:settings, :inputs, :tags, :'depends-on', :'deployment-strategy', :'before-destroy', :'after-create', :'after-swap', :'defined_outputs', :'defined_parameters', :config_dir, :capabilities, :notify]
Instance Method Summary collapse
Instance Method Details
#validate(config, validate_inputs = true) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/cf_deployer/config_validation.rb', line 11 def validate config, validate_inputs = true @config = config @errors = [] @warnings = [] check_application_name check_components validate_inputs check_environments @warnings.each { || puts "WARNNING:#{message}" } raise ValidationError.new(@errors.join("\n")) if @errors.length > 0 end |