bin/simulate in log_simulator-0.1.0 vs bin/simulate in log_simulator-0.1.1

- old
+ new

@@ -12,10 +12,12 @@ opts.on('-t time',Float,'timescale. Default is 1.0') do |time| options[:timescale] = time end + opts.on('-v','--version','Version') {puts LogSimulator::VERSION; exit} + opts.on_tail('-h', '--help', 'Show this message') { puts opts; exit } end opts.parse!(ARGV) @@ -28,9 +30,10 @@ unless ARGV.empty? options[:filepath] = ARGV.pop(ARGV.count)[0] end LogSimulator::Resolver.select_target(2.0) do |target| + puts "Connection to #{target.name} - #{target.target_name} :#{target.port}" socket_connection = LogSimulator::SocketConnetion.new(target.target_name,target.port) unless options[:filepath].nil? LogSimulator::PeakLogSimulator.start(socket_connection.socket,options[:filepath],options[:timescale]) do |success| while true #TODO: make it DRY