Class: NoradServerspecRunner::Cli
- Inherits:
-
Thor
- Object
- Thor
- NoradServerspecRunner::Cli
- Defined in:
- lib/norad_serverspec_runner/cli.rb
Overview
Drives the CLI for norad_serverspec_runner
Instance Method Summary collapse
Instance Method Details
#local ⇒ Object
42 43 44 45 |
# File 'lib/norad_serverspec_runner/cli.rb', line 42 def local spectask = NoradServerspecRunner::Task.new([:tests], [:results_file]) spectask.run end |
#remote(encoded_key) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/norad_serverspec_runner/cli.rb', line 21 def remote(encoded_key) spectask = NoradServerspecRunner::Task.new([:tests], [:sub_tests], [:results_file]) spectask.host = [:host] spectask.username = [:username] spectask.ssh_port = [:port] # Decode the key and store File.open([:sshkey], "w") do |f| f.write Base64.decode64(encoded_key) end spectask.sshkey = [:sshkey] spectask.run end |