Top Level Namespace
Defined Under Namespace
Modules: Escualo
Instance Method Summary collapse
- #ask_monit_password(options) ⇒ Object
- #parse_args_variables(args) ⇒ Object
- #run_commands_for!(script, extra = '', ssh, options) ⇒ Object
- #say_created(kind, name) ⇒ Object
- #ssh_options ⇒ Object
Instance Method Details
#ask_monit_password(options) ⇒ Object
1 2 3 4 |
# File 'lib/commands/bootstrap.rb', line 1 def ask_monit_password() password = ask('Monit Password: ') { |q| q.echo = '*' } .default monit_password: password end |
#parse_args_variables(args) ⇒ Object
10 11 12 |
# File 'lib/commands/env.rb', line 10 def parse_args_variables(args) args.map { |it| it.split('=') }.to_h end |
#run_commands_for!(script, extra = '', ssh, options) ⇒ Object
1 2 3 4 5 6 |
# File 'lib/commands/script.rb', line 1 def run_commands_for!(script, extra='', ssh, ) Escualo::Script.each_command script, extra do |command| puts "Running `#{command}`" ssh.shell.perform! command, end end |
#say_created(kind, name) ⇒ Object
22 23 24 25 |
# File 'lib/commands/artifact.rb', line 22 def say_created(kind, name) say "#{kind.titleize} #{name} created successfully" say "Now you can deploy this #{kind}" end |
#ssh_options ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/commands/script.rb', line 8 def [$hostname.try { |it| "--hostname #{it}" }, $username.try { |it| "--username #{it}" }, $password.try { |it| "--password #{it}" }, $ssh_key.try { |it| "--ssh-key #{it}" }, $ssh_port.try { |it| "--ssh-port #{it}" } ].compact.join(' ') end |