ProjectSource

Utopia::Command::Environment

Set environment variables within the server deployment.

Nested

Definitions

def update_environment(root, name = self.environment_name)

Setup config/environment.yaml according to specified options.

Implementation

def update_environment(root, name = self.environment_name)
	environment_path = File.join(root, "config", "#{name}.yaml")
	FileUtils.mkpath File.dirname(environment_path)
	
	store = YAML::Store.new(environment_path)
	
	store.transaction do
		yield store, name, environment_path
	end
end