Class: Utopia::Command::Server::Create

Inherits:
Samovar::Command
  • Object
show all
Defined in:
lib/utopia/command/server.rb

Overview

Create a server.

Instance Method Summary collapse

Instance Method Details

#callObject



37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/utopia/command/server.rb', line 37

def call
	destination_root = parent.root
	
	FileUtils.mkdir_p File.join(destination_root, "public")
	
	Update[parent: parent].call
	
	# Print out helpful git remote add message:
	hostname = `hostname`.chomp
	puts "Now add the git remote to your local repository:\n\tgit remote add production ssh://#{hostname}#{destination_root}"
	puts "Then push to it:\n\tgit push --set-upstream production master"
end