1
0
mirror of https://github.com/cmur2/openvpn-status-web.git synced 2024-12-22 22:54:24 +01:00
openvpn-status-web/spec/spec_helper.rb

28 lines
611 B
Ruby
Raw Normal View History

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
2021-12-24 13:20:14 +01:00
text = File.binread('examples/status.v1')
2013-05-03 21:38:10 +02:00
OpenVPNStatusWeb::Parser::V1.new.parse_status_log text
end
def status_v2
2021-12-24 13:20:14 +01:00
text = File.binread('examples/status.v2')
2013-05-03 21:38:10 +02:00
OpenVPNStatusWeb::Parser::V2.new.parse_status_log text
end
def status_2_5_v2
text = File.binread('examples/status2_5.v2')
OpenVPNStatusWeb::Parser::V2.new.parse_status_log text
end
2013-05-03 21:38:10 +02:00
def status_v3
2021-12-24 13:20:14 +01:00
text = File.binread('examples/status.v3')
2013-05-03 21:38:10 +02:00
OpenVPNStatusWeb::Parser::V3.new.parse_status_log text
end