From c0c7e79715ab8e062c32a62a12680198599cf9f5 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Thu, 22 Nov 2012 16:37:21 +0000 Subject: Removed JSON-decoding. --- lib/custodian/testfactory.rb | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/lib/custodian/testfactory.rb b/lib/custodian/testfactory.rb index 816c591..ac2904a 100644 --- a/lib/custodian/testfactory.rb +++ b/lib/custodian/testfactory.rb @@ -1,4 +1,3 @@ -require 'json' # @@ -10,7 +9,7 @@ require 'json' # # This class is a factory that will return the correct # derived class for a given line from our configuration -# file - or that line encoded as a JSON string. +# file. # # module Custodian @@ -32,21 +31,6 @@ module Custodian # def self.create( line ) - # - # JSON ? - # - if ( line =~ /^\{(.*)\}$/ ) - begin - obj = JSON.parse( line ); - raise ArgumentError, "JSON object was not a hash" unless obj.kind_of?(Hash) - line = obj["line"] - raise ArgumentError, "obj[:line] was nil" unless (!line.nil?) - rescue =>ex - raise ArgumentError, "Line did not deserialize from JSON: #{line} - #{ex}" - end - end - - # # If this is an obvious protocol test. # -- cgit v1.2.1