Permalink
Browse files

Replace 'sys' by 'util'

  • Loading branch information...
1 parent a5446ff commit 7a1265ba69703bb79ba27ec9c14a0c19346c4efe @glejeune committed Jan 27, 2012
Showing with 53 additions and 48 deletions.
  1. +2 −0 .gitignore
  2. +3 −3 lib/deps/attributs.js
  3. +5 −5 lib/deps/graph.js
  4. +1 −1 lib/ext/gvpr/dot2js.g
  5. +23 −20 package.json
  6. +1 −1 tests/cluster.js
  7. +2 −2 tests/compound.js
  8. +2 −2 tests/fdpclust.js
  9. +2 −2 tests/hello.js
  10. +2 −2 tests/hello_world.js
  11. +2 −2 tests/memory.js
  12. +2 −2 tests/parse.js
  13. +4 −4 tests/server/app.js
  14. +2 −2 tests/switch.js
View
@@ -3,3 +3,5 @@ doc
pkg
test/output/
documentation.html
+node_modules/
+test/*.png
View
@@ -1,5 +1,5 @@
var Hash = require('./core_ext/hash').Hash,
- sys = require('sys');
+ util = require('util');
var attrs = {
"Damping" : { "usage" : "G", "type" : "double" },
@@ -214,7 +214,7 @@ Attributs.prototype.length = function() {
Attributs.prototype.set = function(name, value) {
if(validateAttribut(name, this._type) === false) {
- sys.debug("Warning : Invalid attribut `" + name + "' for a " + gType[this._type]);
+ util.debug("Warning : Invalid attribut `" + name + "' for a " + gType[this._type]);
// throw "Invalid attribut `"+name+"' for a "+gType[this._type]
}
this.attributs.setItem(name, value);
@@ -238,4 +238,4 @@ Attributs.prototype.to_dot = function(link) {
}
return attrsOutput;
-};
+};
View
@@ -6,7 +6,7 @@ var Hash = require( './core_ext/hash' ).Hash,
Edge = require( './edge' ).Edge,
gvattrs = require( './attributs' ),
Attributs = gvattrs.Attributs,
- sys = require('sys'),
+ util = require('util'),
path = require('path'),
spawn = require('child_process').spawn;
@@ -313,7 +313,7 @@ Graph.prototype.render = function(type_or_options, name_or_callback, errback) {
if( type_or_options.G != undefined ) {
for( attr in type_or_options.G ) {
if( gvattrs.isValid( attr, "G" ) == false ) {
- sys.debug( "Warning : Invalid attribut `"+attr+"' for a graph" );
+ util.debug( "Warning : Invalid attribut `"+attr+"' for a graph" );
}
parameters.push( "-G"+attr+"="+type_or_options.G[attr] )
}
@@ -322,7 +322,7 @@ Graph.prototype.render = function(type_or_options, name_or_callback, errback) {
if( type_or_options.N != undefined ) {
for( attr in type_or_options.N ) {
if( gvattrs.isValid( attr, "N" ) == false ) {
- sys.debug( "Warning : Invalid attribut `"+attr+"' for a node" );
+ util.debug( "Warning : Invalid attribut `"+attr+"' for a node" );
}
parameters.push( "-N"+attr+"="+type_or_options.N[attr] )
}
@@ -331,7 +331,7 @@ Graph.prototype.render = function(type_or_options, name_or_callback, errback) {
if( type_or_options.E != undefined ) {
for( attr in type_or_options.E ) {
if( gvattrs.isValid( attr, "E" ) == false ) {
- sys.debug( "Warning : Invalid attribut `"+attr+"' for an edge" );
+ util.debug( "Warning : Invalid attribut `"+attr+"' for an edge" );
}
parameters.push( "-E"+attr+"="+type_or_options.E[attr] )
}
@@ -393,4 +393,4 @@ Graph.prototype.output = function(type, name_or_callback, errback) {
*/
Graph.prototype.setGraphVizPath = function(path) {
this.gvPath = path;
-}
+}
View
@@ -50,7 +50,7 @@ BEGIN {
}
BEG_G {
- printf( "var sys = require('sys'),\n graphviz = require('graphviz');\n\n");
+ printf( "var util = require('util'),\n graphviz = require('graphviz');\n\n");
// Directed
g_direct = isDirect($);
if( g_direct == 0 ) {
View
@@ -1,22 +1,25 @@
{
- "name" : "graphviz",
- "version" : "0.0.6",
- "author" : {
- "name" : "Gregoire Lejeune",
- "mail" : "gregoire.lejeune@free.fr"
- },
- "description" : "Node.js interface to the GraphViz graphing tool",
- "homepage" : "http://algorithmique.net/",
- "contributors" : [
- "Gregoire Lejeune (http://algorithmique.net)",
- "Mathieu Ravaux (http://mathieuravaux.com)"
- ],
- "repository" : {
- "type" : "git",
- "url" : "http://github.com/glejeune/node-graphviz.git"
- },
- "keywords" : ["graphviz", "dot"],
- "engines" : ["node >= 0.2.2"],
- "directories" : { "lib" : "./lib" },
- "main" : "lib/graphviz"
+ "name" : "graphviz",
+ "version" : "0.0.6",
+ "author": "Gregoire Lejeune <gregoire.lejeune@free.fr> (http://algorithmique.net/)",
+ "description" : "Node.js interface to the GraphViz graphing tool",
+ "homepage" : "http://algorithmique.net/",
+ "contributors" : [
+ "Gregoire Lejeune (http://algorithmique.net)",
+ "Mathieu Ravaux (http://mathieuravaux.com)"
+ ],
+ "repository" : {
+ "type" : "git",
+ "url" : "http://github.com/glejeune/node-graphviz.git"
+ },
+ "keywords" : ["graphviz", "dot"],
+ "directories" : { "lib" : "./lib" },
+ "main" : "lib/graphviz",
+ "engines": {
+ "node": "~0.6.8"
+ },
+ "dependencies": {
+ "temp": "~0.4.0"
+ },
+ "devDependencies": {}
}
View
@@ -1,4 +1,4 @@
-var sys = require('sys'),
+var util = require('util'),
graphviz = require('../lib/graphviz');
// digraph G {
View
@@ -1,4 +1,4 @@
-var sys = require('sys'),
+var util = require('util'),
graphviz = require('../lib/graphviz');
// Create digraph G
@@ -11,4 +11,4 @@ g.from( "A" ).to( "F" );
g.from( "C" ).to( "F" );
g.from( "E" ).to( "F" );
-g.render( "png", "compound.png" );
+g.render( "png", "compound.png" );
View
@@ -1,4 +1,4 @@
-var sys = require('sys'),
+var util = require('util'),
graphviz = require('../lib/graphviz');
// graph G {
@@ -29,4 +29,4 @@ g.addEdge( clusterC, clusterB )
// }
g.use = "fdp"
-g.output( "png", "fdpclust.png" );
+g.output( "png", "fdpclust.png" );
View
@@ -1,4 +1,4 @@
-var sys = require('sys'),
+var util = require('util'),
graphviz = require('../lib/graphviz');
// Create digraph G
@@ -28,4 +28,4 @@ g.output( {
"G" : {
"label" : "Example"
}
-}, "hello.png" );
+}, "hello.png" );
View
@@ -1,4 +1,4 @@
-var sys = require('sys'),
+var util = require('util'),
graphviz = require('../lib/graphviz');
// Create digraph G
@@ -17,4 +17,4 @@ var e = g.addEdge( n1, "World" );
e.set( "color", "red" );
// Generate a PNG output
-g.output( "png", "hello_world.png" );
+g.output( "png", "hello_world.png" );
View
@@ -1,4 +1,4 @@
-var sys = require('sys'),
+var util = require('util'),
graphviz = require('../lib/graphviz');
// Create digraph G
@@ -22,4 +22,4 @@ g.render( "png", function(render) {
} );
// Generate a PNG output in-file
-g.output( "png", "memory.png" );
+g.output( "png", "memory.png" );
View
@@ -1,4 +1,4 @@
-var sys = require('sys'),
+var util = require('util'),
graphviz = require('../lib/graphviz');
graphviz.parse( "cluster.dot", function(graph) {
@@ -17,4 +17,4 @@ graphviz.parse( "cluster.dot", function(graph) {
console.log("PARSE ERROR")
console.log(""+err)
console.log(""+out)
-});
+});
View
@@ -1,5 +1,5 @@
var fs = require('fs');
-var sys = require('sys');
+var util = require('util');
var http = require('http');
var url = require('url');
@@ -17,8 +17,8 @@ var jsmin = require('jsmin').jsmin;
app.set('views', __dirname + '/views');
app.configure(function(){
- app.use(express.bodyDecoder());
- app.use(express.staticProvider(__dirname + '/static'));
+ app.use(express.bodyParser());
+ app.use(express.static(__dirname + '/static'));
})
// Site -----------------------------------------------------------------------
@@ -86,4 +86,4 @@ app.get('/file/*', function(req,res){
});
})
-app.listen(3000);
+app.listen(3000);
View
@@ -1,6 +1,6 @@
// This code was generated by dot2js.g
-var sys = require('sys'),
+var util = require('util'),
graphviz = require('../lib/graphviz');
var graph_g = graphviz.digraph( "g" );
@@ -206,4 +206,4 @@ var node_x = graph_u211.addNode( "X", {"height" : "0.3", "shape" : "diamond", "w
graph_u211.addEdge( "X", "80", {"color" : "#ff00ff:#ffffff:#00ffff:#000000:#00ff00:#ffff00:#ff0000:#0000ff", "dir" : "none", } );
__graph_eval = graph_g;
-__graph_eval.render( "png", "switch.png" );
+__graph_eval.render( "png", "switch.png" );

0 comments on commit 7a1265b

Please sign in to comment.