2020-03-07 01:30:57 +01:00
|
|
|
# frozen_string_literal: true
|
2013-05-03 21:38:10 +02:00
|
|
|
|
|
|
|
require 'rubygems'
|
|
|
|
require 'bundler/setup'
|
|
|
|
require 'rack/test'
|
|
|
|
|
|
|
|
require 'openvpn-status-web'
|
|
|
|
|
|
|
|
def status_v1
|
2020-03-02 01:57:58 +01:00
|
|
|
text = File.open('examples/status.v1', 'rb', &:read)
|
2013-05-03 21:38:10 +02:00
|
|
|
OpenVPNStatusWeb::Parser::V1.new.parse_status_log text
|
|
|
|
end
|
|
|
|
|
|
|
|
def status_v2
|
2020-03-02 01:57:58 +01:00
|
|
|
text = File.open('examples/status.v2', 'rb', &:read)
|
2013-05-03 21:38:10 +02:00
|
|
|
OpenVPNStatusWeb::Parser::V2.new.parse_status_log text
|
|
|
|
end
|
|
|
|
|
|
|
|
def status_v3
|
2020-03-02 01:57:58 +01:00
|
|
|
text = File.open('examples/status.v3', 'rb', &:read)
|
2013-05-03 21:38:10 +02:00
|
|
|
OpenVPNStatusWeb::Parser::V3.new.parse_status_log text
|
|
|
|
end
|