diff options
Diffstat (limited to 'lib/custodian/protocoltest')
-rw-r--r-- | lib/custodian/protocoltest/dns.rb | 14 | ||||
-rw-r--r-- | lib/custodian/protocoltest/ftp.rb | 16 | ||||
-rw-r--r-- | lib/custodian/protocoltest/http.rb | 15 | ||||
-rw-r--r-- | lib/custodian/protocoltest/jabber.rb | 17 | ||||
-rw-r--r-- | lib/custodian/protocoltest/ldap.rb | 17 | ||||
-rw-r--r-- | lib/custodian/protocoltest/ping.rb | 15 | ||||
-rw-r--r-- | lib/custodian/protocoltest/rsync.rb | 17 | ||||
-rw-r--r-- | lib/custodian/protocoltest/smtp.rb | 17 | ||||
-rw-r--r-- | lib/custodian/protocoltest/ssh.rb | 18 | ||||
-rw-r--r-- | lib/custodian/protocoltest/tcp.rb | 18 |
10 files changed, 27 insertions, 137 deletions
diff --git a/lib/custodian/protocoltest/dns.rb b/lib/custodian/protocoltest/dns.rb index cf37abf..6c5e8db 100644 --- a/lib/custodian/protocoltest/dns.rb +++ b/lib/custodian/protocoltest/dns.rb @@ -39,26 +39,16 @@ module Custodian # - # Helper for development. + # Allow this test to be serialized. # def to_s - "dns-test - TODO." + @line end # - # Convert this class to JSON such that it may be serialized. - # - def to_json - hash = { :line => @line } - hash.to_json - end - - - - # # Run the test. # def run_test diff --git a/lib/custodian/protocoltest/ftp.rb b/lib/custodian/protocoltest/ftp.rb index db05ac4..a816bfd 100644 --- a/lib/custodian/protocoltest/ftp.rb +++ b/lib/custodian/protocoltest/ftp.rb @@ -71,27 +71,17 @@ module Custodian # - # Helper for development. + # Allow this test to be serialized. # def to_s - "ftp-test of #{@host}:#{@port}." + @line end # - # Convert this class to JSON such that it may be serialized. - # - def to_json - hash = { :line => @line } - hash.to_json - end - - - - - # Run the TCP-protocol test. + # Run the test. # def run_test diff --git a/lib/custodian/protocoltest/http.rb b/lib/custodian/protocoltest/http.rb index b3f446e..1b7f442 100644 --- a/lib/custodian/protocoltest/http.rb +++ b/lib/custodian/protocoltest/http.rb @@ -53,21 +53,10 @@ module Custodian # - # Helper for development. + # Allow this test to be serialized. # def to_s - "http-test of #{@url}." - end - - - - - # - # Convert this class to JSON such that it may be serialized. - # - def to_json - hash = { :line => @line } - hash.to_json + @line end diff --git a/lib/custodian/protocoltest/jabber.rb b/lib/custodian/protocoltest/jabber.rb index e043481..9c0eb6d 100644 --- a/lib/custodian/protocoltest/jabber.rb +++ b/lib/custodian/protocoltest/jabber.rb @@ -66,28 +66,17 @@ module Custodian # - # Helper for development. + # Allow this test to be serialized. # def to_s - "jabber-test of #{@host}:#{@port}." + @line end # - # Convert this class to JSON such that it may be serialized. - # - def to_json - hash = { :line => @line } - hash.to_json - end - - - - - # - # Run the TCP-protocol test. + # Run the test. # def run_test diff --git a/lib/custodian/protocoltest/ldap.rb b/lib/custodian/protocoltest/ldap.rb index bfda9f8..b27e5d6 100644 --- a/lib/custodian/protocoltest/ldap.rb +++ b/lib/custodian/protocoltest/ldap.rb @@ -68,28 +68,17 @@ module Custodian # - # Helper for development. + # Allow this test to be serialized. # def to_s - "ldap-test of #{@host}:#{@port}." + @line end # - # Convert this class to JSON such that it may be serialized. - # - def to_json - hash = { :line => @line } - hash.to_json - end - - - - - # - # Run the TCP-protocol test. + # Run the test. # def run_test diff --git a/lib/custodian/protocoltest/ping.rb b/lib/custodian/protocoltest/ping.rb index 173f4f4..c13c17c 100644 --- a/lib/custodian/protocoltest/ping.rb +++ b/lib/custodian/protocoltest/ping.rb @@ -52,21 +52,10 @@ module Custodian # - # Helper for development. + # Allow this test to be serialized. # def to_s - "ping-test - #{@host}." - end - - - - - # - # Convert this class to JSON such that it may be serialized. - # - def to_json - hash = { :line => @line } - hash.to_json + @line end diff --git a/lib/custodian/protocoltest/rsync.rb b/lib/custodian/protocoltest/rsync.rb index 34745c7..8b4e84c 100644 --- a/lib/custodian/protocoltest/rsync.rb +++ b/lib/custodian/protocoltest/rsync.rb @@ -67,28 +67,17 @@ module Custodian # - # Helper for development. + # Allow this test to be serialized. # def to_s - "rsync-test of #{@host}:#{@port}." + @line end # - # Convert this class to JSON such that it may be serialized. - # - def to_json - hash = { :line => @line } - hash.to_json - end - - - - - # - # Run the protocol test. + # Run the test. # def run_test diff --git a/lib/custodian/protocoltest/smtp.rb b/lib/custodian/protocoltest/smtp.rb index ee52131..0d22c95 100644 --- a/lib/custodian/protocoltest/smtp.rb +++ b/lib/custodian/protocoltest/smtp.rb @@ -68,28 +68,17 @@ module Custodian # - # Helper for development. + # Allow this test to be serialized. # def to_s - "smtp-test of #{@host}:#{@port}." + @line end # - # Convert this class to JSON such that it may be serialized. - # - def to_json - hash = { :line => @line } - hash.to_json - end - - - - - # - # Run the TCP-protocol test. + # Run the test. # def run_test diff --git a/lib/custodian/protocoltest/ssh.rb b/lib/custodian/protocoltest/ssh.rb index b8a6354..205099e 100644 --- a/lib/custodian/protocoltest/ssh.rb +++ b/lib/custodian/protocoltest/ssh.rb @@ -68,29 +68,17 @@ module Custodian # - # Helper for development. + # Allow this test to be serialized. # def to_s - "ssh-test of #{@host}:#{@port}." + return( @line ) end # - # Convert this class to JSON such that it may be - # serialized. - # - def to_json - hash = { :line => @line } - hash.to_json - end - - - - - # - # Run the TCP-protocol test. + # Run the test. # def run_test diff --git a/lib/custodian/protocoltest/tcp.rb b/lib/custodian/protocoltest/tcp.rb index 21d2ecd..c14f686 100644 --- a/lib/custodian/protocoltest/tcp.rb +++ b/lib/custodian/protocoltest/tcp.rb @@ -94,28 +94,16 @@ module Custodian # - # Helper for development. + # Allow this test to be serialized. # def to_s - "tcp-test of #{@host}:#{@port} looking for banner '#{@banner}'." + return( @line ) end - - # - # Convert this class to JSON such that it may be serialized. - # - def to_json - hash = { :line => @line } - hash.to_json - end - - - - # - # Run the TCP-protocol test. + # Run the test. # def run_test |