lib/enviro/configuration.rb in enviro-0.0.4 vs lib/enviro/configuration.rb in enviro-0.0.5
- old
+ new
@@ -9,11 +9,11 @@
end
module ClassMethods
def configuration_path_env(value=nil)
- @_configuration_path_env ||= 'ENVY_CONF_PATH'
+ @_configuration_path_env ||= 'ENVIRO_CONF_PATH'
@_configuration_path_env = value.to_s.upcase unless value.nil?
@_configuration_path_env
end
def configuration_path_str(path=nil)
@@ -36,15 +36,15 @@
def _load_configuration_path
raise FileNotFound.new(self.configuration_path) unless
File.exists?(self.configuration_path)
- @raw_configuration = YAML.load_file(self.configuration_path)
+ @raw_configuration = YAML.load_file(self.configuration_path).deep_symbolize_keys
raise UnknownEnvironment.new(self.environment) unless
@raw_configuration.key?(self.environment)
- OpenStruct.new(@raw_configuration[self.environment].merge(:environment => self.environment))
+ ::OpenStruct.new(@raw_configuration[self.environment].merge(:environment => self.environment))
end
end
end
end