From d80642dec349c75bae086898a70e8191060077d0 Mon Sep 17 00:00:00 2001 From: Farrin Reid Date: Sat, 23 Jun 2012 16:22:29 -0800 Subject: [PATCH] [fix] Changed require('util') to require('util') for compatibility with node v0.8 --- example/example.js | 12 ++++++------ test/test.js | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/example/example.js b/example/example.js index 30e8ab0..61f0cd6 100755 --- a/example/example.js +++ b/example/example.js @@ -1,15 +1,15 @@ var rdf2json = require("../lib/rdf2json"); -var sys = require("sys"); +var util = require('util'); rdf2json.convertFileIntoRDFJSON("./test/wine.rdf", "flat", function(err, rdfjson){ - if(err) sys.puts("Something wrong here ..."); + if(err) util.puts("Something wrong here ..."); var obj = eval("("+ rdfjson +")"); - sys.puts(JSON.stringify(obj)); + util.puts(JSON.stringify(obj)); }); rdf2json.convertURLIntoRDFJSON("http://www.w3.org/TR/owl-guide/wine.rdf", "sparql", function(err, rdfjson){ - if(err) sys.puts("Something wrong here ..."); + if(err) util.puts("Something wrong here ..."); var obj = eval("("+ rdfjson +")"); - sys.puts(JSON.stringify(obj)); + util.puts(JSON.stringify(obj)); }); rdf2json.convertStringIntoRDFJSON("" + @@ -44,5 +44,5 @@ rdf2json.convertStringIntoRDFJSON("" + " " + "", "talis", function(err, rdfjson){ var obj = eval("("+ rdfjson +")"); - sys.puts(JSON.stringify(obj)); + util.puts(JSON.stringify(obj)); }); \ No newline at end of file diff --git a/test/test.js b/test/test.js index 5b22112..fb0e5ff 100755 --- a/test/test.js +++ b/test/test.js @@ -1,6 +1,6 @@ var rdf2json = require("../lib/rdf2json"); var jsunit = require("mjsunit"); -var sys = require("sys"); +var util = require('util'); function testConvertStringIntoRDFJSON(){ rdf2json.convertStringIntoRDFJSON("" + @@ -34,7 +34,7 @@ function testConvertStringIntoRDFJSON(){ " Wine Ontology" + " " + "", "flat", function(err, rdfjson){ - if(err) sys.puts("Something wrong here ..."); + if(err) util.puts("Something wrong here ..."); jsunit.assertNotNull("The generated flat RDF/JSON string should not be null", rdfjson); var jsonobj = eval("("+ rdfjson +")"); jsunit.assertNotNull("The flat RDF/JSON object should not be null", jsonobj); @@ -89,7 +89,7 @@ function testConvertStringIntoRDFJSON(){ " Wine Ontology" + " " + "", "sparql", function(err, rdfjson){ - if(err) sys.puts("Something wrong here ..."); + if(err) util.puts("Something wrong here ..."); jsunit.assertNotNull("The generated SPARQL RDF/JSON string should not be null", rdfjson); var jsonobj = eval("("+ rdfjson +")"); jsunit.assertNotNull("The SPARQL RDF/JSON object should not be null", jsonobj); @@ -98,7 +98,7 @@ function testConvertStringIntoRDFJSON(){ function testConvertFileIntoRDFJSON(){ rdf2json.convertFileIntoRDFJSON("../wine.rdf", "sparql", function(err, rdfjson){ - if(err) sys.puts("Something wrong here ..."); + if(err) util.puts("Something wrong here ..."); jsunit.assertNotNull("The generated SPARQL RDF/JSON string should not be null", rdfjson); var jsonobj = eval("("+ rdfjson +")"); jsunit.assertNotNull("The SPARQL RDF/JSON object should not be null", jsonobj); @@ -145,7 +145,7 @@ function testConvertStringIntoRDFJSON(){ " Wine Ontology" + " " + "", "talis", function(err, rdfjson){ - if(err) sys.puts("Something wrong here ..."); + if(err) util.puts("Something wrong here ..."); jsunit.assertNotNull("The generated Talis RDF/JSON string should not be null", rdfjson); var jsonobj = eval("("+ rdfjson +")"); jsunit.assertNotNull("The Talis RDF/JSON object should not be null", jsonobj); @@ -154,7 +154,7 @@ function testConvertStringIntoRDFJSON(){ function testConvertFileIntoRDFJSON(){ rdf2json.convertFileIntoRDFJSON("../wine.rdf", "talis", function(err, rdfjson){ - if(err) sys.puts("Something wrong here ..."); + if(err) util.puts("Something wrong here ..."); jsunit.assertNotNull("The generated Talis RDF/JSON string should not be null", rdfjson); var jsonobj = eval("("+ rdfjson +")"); jsunit.assertNotNull("The Talis RDF/JSON object should not be null", jsonobj); @@ -163,7 +163,7 @@ function testConvertFileIntoRDFJSON(){ function testConvertURLIntoRDFJSON(){ rdf2json.convertURLIntoRDFJSON("http://www.w3.org/TR/owl-guide/wine.rdf", "talis", function(err, rdfjson){ - if(err) sys.puts("Something wrong here ..."); + if(err) util.puts("Something wrong here ..."); jsunit.assertNotNull("The generated Talis RDF/JSON string should not be null", rdfjson); var jsonobj = eval("("+ rdfjson +")"); jsunit.assertNotNull("The Talis RDF/JSON object should not be null", jsonobj);