lib/openvpn-status-web/parser/v1.rb in openvpn-status-web-2.0.0 vs lib/openvpn-status-web/parser/v1.rb in openvpn-status-web-2.1.0

- old
+ new

@@ -1,5 +1,6 @@ +# frozen_string_literal: true module OpenVPNStatusWeb module Parser class V1 def parse_status_log(text) @@ -11,10 +12,10 @@ text.lines.each do |line| (current_section = :cl; next) if line == "OpenVPN CLIENT LIST\n" (current_section = :rt; next) if line == "ROUTING TABLE\n" (current_section = :gs; next) if line == "GLOBAL STATS\n" (current_section = :end; next) if line == "END\n" - + case current_section when :cl client_list << line.strip.split(',') when :rt routing_table << line.strip.split(',')