lib/fulmar/domain/model/configuration.rb in fulmar-2.1.2 vs lib/fulmar/domain/model/configuration.rb in fulmar-2.2.0
- old
+ new
@@ -27,12 +27,12 @@
# Allow access of configuration via array/hash access methods (write access)
def []=(id, value)
if ready?
@data[:environments][@environment][@target][id] = value
else
- fail 'Environment or target not set. Please set both variables via configuration.environment = \'xxx\' / '\
- 'configuration.target = \'yyy\''
+ raise 'Environment or target not set. Please set both variables via configuration.environment = \'xxx\' / '\
+ 'configuration.target = \'yyy\''
end
end
# Set the environment and target in one call
def set(environment, target = nil)
@@ -48,11 +48,11 @@
end
# Checks if environment and target are set
def ready?
return false if @environment.nil? || @target.nil?
- fail 'Environment is invalid' if @data[:environments][@environment].nil?
- fail 'Target is invalid' if @data[:environments][@environment][@target].nil?
+ raise 'Environment is invalid' if @data[:environments][@environment].nil?
+ raise 'Target is invalid' if @data[:environments][@environment][@target].nil?
true
end
# Return the project
def project