Sha256: c47aa3e08b14ef4c233a3bf8ac05e18ae3a2f575c7a55f50d2a72daefea9fe0f
Contents?: true
Size: 1.82 KB
Versions: 1
Compression:
Stored size: 1.82 KB
Contents
require 'thor' require 'norad_spec_runner/task' require 'norad_spec_runner/remote_task' require 'base64' require 'openssl' module NoradSpecRunner # Drives the CLI for norad_spec_runner class Cli < Thor desc 'remote encoded_key', 'Will test a server using RSpec' long_desc <<-SPEC_REMOTE `norad_spec_runner remote` will ssh into a server and run RSpec tests SPEC_REMOTE method_option :host, :aliases => '-h', :desc => 'Host to scan' method_option :username, :aliases => '-u', :desc => 'Username to login as' method_option :sshkey, :aliases => '-k', :desc => 'SSH Key to use', :default => '/tmp/sshkey' method_option :tests, :aliases => '-t', :desc => 'Rspec tests to execute' method_option :sub_tests, :aliases => '-s', :desc => 'Specific test from given RSpec file', :default => '\'\'' method_option :results_file, :aliases => '-r', :desc => 'File to store the results' method_option :port, :aliases => '-p', :desc => 'Port to connect on', :default => '22' method_option :cisco_enable_pw, :desc => 'Password to enter Enable mode in Cisco IOS', :default => '' method_option :detect_os, :desc => 'Whether or not to perform OS detection', :type => :boolean, :default => false def remote(encoded_key) spectask = NoradSpecRunner::RemoteTask.new(encoded_key, options) spectask.run end desc 'local', 'Will execute RSpec tests locally' long_desc <<-SPEC_LOCAL `norad_spec_runner local` will run RSpec tests locally SPEC_LOCAL method_option :tests, :aliases => '-t', :desc => 'Rspec tests to execute' method_option :results_file, :aliases => '-r', :desc => 'File to store the results' # FIXME: this class doesn't exist any more def local spectask = NoradSpecRunner::Task.new(options[:tests], options[:results_file]) spectask.run end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
norad_spec_runner-0.4.1 | lib/norad_spec_runner/cli.rb |