Class: Utopia::Command::Server::Create
- Inherits:
-
Samovar::Command
- Object
- Samovar::Command
- Utopia::Command::Server::Create
- Defined in:
- lib/utopia/command/server.rb
Overview
Create a server.
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/utopia/command/server.rb', line 25 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: 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 |
#hostname ⇒ Object
21 22 23 |
# File 'lib/utopia/command/server.rb', line 21 def hostname Socket.gethostname end |