lib/utopia/setup.rb
def load_environment(variant)
			path = environment_path(variant)
			
			if File.exist?(path)
				Utopia.logger.debug(self) {"Loading environment at path: #{path.inspect}"}
				
				# Load the YAML environment file:
				if environment = YAML.load_file(path)
					# We update ENV but only when it's not already set to something:
					ENV.update(environment) do |name, old_value, new_value|
						old_value || new_value
					end
				end
				
				return true
			else
				Utopia.logger.debug(self) {"Ignoring environment at path: #{path.inspect} (file not found)"}
				
				return false
			end
		end
# Load the named configuration file from the `config_root` directory.
Load the named configuration file from the `config_root` directory.
Load the named configuration file from the ` config_root ` directory .
def load_environment(variant)
			path = environment_path(variant)
			if File.exist?(path)
				Utopia.logger.debug(self) {"Loading environment at path: #{path.inspect}"}
				if environment = YAML.load_file(path)
					ENV.update(environment) do |name, old_value, new_value|
						old_value || new_value
					end
				end
				return true
			else
				Utopia.logger.debug(self) {"Ignoring environment at path: #{path.inspect} (file not found)"}
				return false
			end
		end
def load_environment ( variant ) path = environment_path ( variant ) if File . exist? ( path ) Utopia . logger . debug ( self ) { "Loading environment at path: #{path.inspect}" } if environment = YAML . load_file ( path ) ENV . update ( environment ) do | name , old_value , new_value | old_value || new_value end end return true else Utopia . logger . debug ( self ) { "Ignoring environment at path: #{path.inspect} (file not found)" } return false end end
Load the named configuration file from the `config_root` directory.
Load the named configuration file from the ` config_root ` directory .
# Load the YAML environment file: # We update ENV but only when it's not already set to something:
variant