Module: Hamal::Helpers

Includes:
Config
Included in:
RemoteExecutor, Stages
Defined in:
lib/hamal.rb

Instance Method Summary collapse

Methods included from Config

#app_local_ports, #app_name, #app_repo, #config_file, #deploy_config, #deploy_env, #deployed_image, #deployed_revision, #project_root, #server

Instance Method Details

#log(message) ⇒ Object



26
27
28
29
30
31
32
33
# File 'lib/hamal.rb', line 26

def log(message)
  bold  = "\e[1m"
  green = "\e[32m"
  clear = "\e[0m"

  message = "#{bold}#{green}#{message}#{clear}" if $stdout.tty?
  puts message
end

#on_server(user: :root, dir: nil) ⇒ Object



24
# File 'lib/hamal.rb', line 24

def on_server(user: :root, dir: nil, &) = RemoteExecutor.new(user, dir).instance_exec(&)