From b7608cc947bcca078644516a288a6bef67f7f09a Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Wed, 21 Nov 2012 23:15:44 +0000 Subject: Added .to_json method to serialize our tests. --- lib/custodian/protocoltest/rsync.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lib/custodian/protocoltest/rsync.rb') diff --git a/lib/custodian/protocoltest/rsync.rb b/lib/custodian/protocoltest/rsync.rb index 3b63465..c35758e 100644 --- a/lib/custodian/protocoltest/rsync.rb +++ b/lib/custodian/protocoltest/rsync.rb @@ -58,6 +58,21 @@ class RSYNCTest < TCPTest + # + # Convert this class to JSON such that it may be serialized. + # + def to_json + hash = { + :test_type => 'rsync', + :test_target => @host, + :test_port => @port, + } + hash.to_json + end + + + + # # Run the protocol test. # -- cgit v1.2.1