5
6
7
8
9
10
11
|
# File 'lib/soar_environment/environment_validator.rb', line 5
def validate(environment)
errors = []
errors << 'invalid service identifier' if (environment['IDENTIFIER'].nil?) or (environment['IDENTIFIER'].strip == "")
errors << 'Missing execution environment indicator' if (environment['RACK_ENV'] == 'none') or (environment['RACK_ENV'].nil?) or (environment['RACK_ENV'].strip == "")
errors << 'Invalid execution environment indicator' if not VALID_EXECUTION_ENVIRONMENTS.include?(environment['RACK_ENV'])
errors
end
|