lib/enviro/configuration.rb in enviro-0.0.2 vs lib/enviro/configuration.rb in enviro-0.0.3
- old
+ new
@@ -14,11 +14,19 @@
@_configuration_path_env ||= 'ENVY_CONF_PATH'
@_configuration_path_env = value.to_s.upcase unless value.nil?
@_configuration_path_env
end
+ def configuration_path_str(path=nil)
+ @_configuration_path_str = path
+ end
+
def configuration_path
- @_configuration_path ||= (ENV[self.configuration_path_env]||'enviro.yml')
+ if @_configuration_path_str
+ @_configuration_path ||= @_configuration_path_str
+ else
+ @_configuration_path ||= (ENV[self.configuration_path_env]||'enviro.yml')
+ end
end
def configuration
@_configuration ||= _load_configuration_path
end