summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-11-22 16:37:21 +0000
committerSteve Kemp <steve@steve.org.uk>2012-11-22 16:37:21 +0000
commit9cd645ce993c9ca1534801c759f1ec7b283b0fbe (patch)
tree4ff42d774022b327098d594bfae785f04b5882fb
parent241688a64e820ea62b1b4abcd3047e7ae95c8368 (diff)
Removed JSON-decoding.
-rw-r--r--lib/custodian/testfactory.rb18
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+|\.|$)/ )