Method: Mu::Command::Cmd_musl#cmd_from_har
- Defined in:
- lib/mu/command/cmd_musl.rb
#cmd_from_har(argv) ⇒ Object
Turns a har file into a musl scenario file
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/mu/command/cmd_musl.rb', line 67 def cmd_from_har argv # Check if our command line arguments are valid if setup argv # Get har object and hosts har_file = .har_files[0] @har = Har.new har_file, , @ignores File.open(.scenario,'w') do |file| created_musl = @har.generate file file.write created_musl end puts "You have successfully generated a scenario: #{@options.scenario}" else # Handle failure logic here raise "Invalid Command Line Options" end end |