diff options
author | Steve Kemp <steve@steve.org.uk> | 2012-11-22 16:37:21 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2012-11-22 16:37:21 +0000 |
commit | c0c7e79715ab8e062c32a62a12680198599cf9f5 (patch) | |
tree | 4ff42d774022b327098d594bfae785f04b5882fb /lib/custodian/testfactory.rb | |
parent | cc8d0dd3fe5eadb30263f3149315e759928d824c (diff) |
Removed JSON-decoding.
Diffstat (limited to 'lib/custodian/testfactory.rb')
-rw-r--r-- | lib/custodian/testfactory.rb | 18 |
1 files changed, 1 insertions, 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 @@ -33,21 +32,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. # if ( line =~ /must\s+run\s+(\S+)(\s+|\.|$)/ ) |