Class: Dip::CLI::SSH
- Inherits:
-
Thor
- Object
- Thor
- Dip::CLI::SSH
- Defined in:
- lib/dip/cli/ssh.rb
Instance Method Summary collapse
Instance Method Details
#down ⇒ Object
38 39 40 41 42 43 44 |
# File 'lib/dip/cli/ssh.rb', line 38 def down if [:help] invoke :help, ['down'] else Dip::Commands::SSH::Down.new.execute end end |
#restart(*args) ⇒ Object
49 50 51 52 53 54 55 56 57 |
# File 'lib/dip/cli/ssh.rb', line 49 def restart(*args) if [:help] invoke :help, ['restart'] else Dip::CLI::SSH.start(["down"] + args) sleep 1 Dip::CLI::SSH.start(["up"] + args) end end |
#status ⇒ Object
62 63 64 65 66 67 68 |
# File 'lib/dip/cli/ssh.rb', line 62 def status if [:help] invoke :help, ['status'] else Dip::Commands::SSH::Status.new.execute end end |
#up ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/dip/cli/ssh.rb', line 21 def up if [:help] invoke :help, ['up'] else Dip::Commands::SSH::Up.new( key: .fetch(:key), volume: .fetch(:volume), interactive: .nonteractive? ? false : .interactive? ).execute end end |