Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi! I fixed some calls to "sys" for you! #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ioserver/ioserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

var config = require('./safe-config.js'),
sys = require('sys'),
util = require('util'),
util = require('util'),
io = module.exports = require('socket.io');

Expand Down
4 changes: 2 additions & 2 deletions ioserver/sessions.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* Temporary in memory database for User Sessions */
var _sessions = [],
lib = module.exports = {},
sys = require('sys'),
util = require('util'),
config = require('./safe-config.js'),
cradle, cradle_con, users_db, db_name;

Expand All @@ -30,7 +30,7 @@ if(config.couchdb) {

setup(function(err, db) {
if(err) {
console.log('Error: ' + sys.inspect(err));
console.log('Error: ' + util.inspect(err));
return;
}
if(db) {
Expand Down
8 changes: 4 additions & 4 deletions shelld/shelld.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var init = require('init'),
fs = require('fs'),
path = require('path'),
util = require('util'),
sys = require('sys'),
util = require('util'),
config = {};

/* Read (optional) configuration file */
Expand Down Expand Up @@ -38,7 +38,7 @@ var init = require('init'),
}
if(arg === 'config') {
console.log('Config from file `' + file + "`:" );
console.log(sys.inspect(config));
console.log(util.inspect(config));
exit = true;
}

Expand Down Expand Up @@ -81,7 +81,7 @@ init.simple({

// Let's log every icecap event
//icecap.on('event', function(name, tokens) {
// util.log("DEBUG: icecap.on(event): " + sys.inspect(name) + ": " + sys.inspect(tokens) );
// util.log("DEBUG: icecap.on(event): " + util.inspect(name) + ": " + util.inspect(tokens) );
//});

// Lets handle errors
Expand All @@ -100,7 +100,7 @@ init.simple({
icecap.on('event', icecap_event);

website_socket.on('icecap.command', function(name, tokens) {
util.log("DEBUG: website_socket.on(client-event): " + sys.inspect(name) + ": " + sys.inspect(tokens) );
util.log("DEBUG: website_socket.on(client-event): " + util.inspect(name) + ": " + util.inspect(tokens) );
icecap.command(name, tokens);
});

Expand Down
22 changes: 11 additions & 11 deletions webclient/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var app = module.exports = {},
config = require('./safe-config.js'),
express = require('express'),
sys = require('sys'),
util = require('util'),
util = require('util'),
params = require('express-params'),
namespace = require('express-namespace'),
Expand Down Expand Up @@ -96,7 +96,7 @@ app.get('/intro', function(req, res) {

// Browser requests gravator url
browser.on('get-gravatar', function(email, options, https) {
console.log('EVENT: get-gravatar: ' + sys.inspect(email) + ", " + sys.inspect(options) + ", " + sys.inspect(https));
console.log('EVENT: get-gravatar: ' + util.inspect(email) + ", " + util.inspect(options) + ", " + util.inspect(https));
var undefined,
options = options || {},
https = https || false,
Expand All @@ -106,7 +106,7 @@ app.get('/intro', function(req, res) {
url = email ? gravatar.url(email, options, https) : '';
} finally {
if(!url) url = '';
console.log('Emiting URL: ' + sys.inspect(url));
console.log('Emiting URL: ' + util.inspect(url));
browser.emit('set-gravatar', email, url, options, https);
}
});
Expand All @@ -116,7 +116,7 @@ app.get('/intro', function(req, res) {
console.log('Client requested new api key');
sessions.create(function(err, sess) {
if(err) {
console.log('Error: ' + sys.inspect(err));
console.log('Error: ' + util.inspect(err));
browser.emit('error', 'Failed to create apikey');
browser.emit('join-failed');
browser.emit('rejected-apikey');
Expand All @@ -130,7 +130,7 @@ app.get('/intro', function(req, res) {

// Browser joins with an API key
browser.on('join', function(apikey) {
console.log( 'DEBUG: browser joins with apikey = ' + sys.inspect(apikey) );
console.log( 'DEBUG: browser joins with apikey = ' + util.inspect(apikey) );
if(session) {
console.log('Error: This browser was already joined to session.');
browser.emit('error', 'This browser was already joined to session!');
Expand All @@ -156,15 +156,15 @@ app.get('/intro', function(req, res) {

// Browser sends an icecap.command event
browser.on('icecap.command', function(name, tokens) {
console.log( 'DEBUG: browser.on(icecap.command): ' + sys.inspect(name) + ": " + sys.inspect( tokens ) );
console.log( 'DEBUG: browser.on(icecap.command): ' + util.inspect(name) + ": " + util.inspect( tokens ) );
session && session.shell && session.shell.emit('icecap.command', name, tokens);
});

// Browser disconnects
browser.once('disconnect', function () {
console.log( 'DEBUG: browser disconnected');
session && session.browser && session.part(browser);
//console.log('session = ' + sys.inspect(session));
//console.log('session = ' + util.inspect(session));
browser.removeAllListeners('icecap.command');
browser.removeAllListeners('join');
browser.removeAllListeners('create');
Expand All @@ -182,7 +182,7 @@ app.get('/intro', function(req, res) {
shell.on('create', function() {
sessions.create(function(err, sess) {
if(err) {
console.log('Error: ' + sys.inspect(err));
console.log('Error: ' + util.inspect(err));
shell.emit('join-failed');
shell.emit('rejected-apikey');
shell.emit('error', 'Failed to create apikey');
Expand All @@ -196,7 +196,7 @@ app.get('/intro', function(req, res) {

// Shell joins with an API key
shell.on('join', function(apikey) {
console.log( 'DEBUG: shell joins with apikey = ' + sys.inspect(apikey) );
console.log( 'DEBUG: shell joins with apikey = ' + util.inspect(apikey) );
if(session) {
console.log('Error: This shell was already joined to session.');
shell.emit('join-failed');
Expand All @@ -223,9 +223,9 @@ app.get('/intro', function(req, res) {

// Shell sends an icecap-event, we proxy it to the browser
shell.on('icecap-event', function(name, tokens) {
console.log( 'DEBUG: shell.on(icecap-event): ' + sys.inspect(name) + ": " + sys.inspect( tokens ) );
console.log( 'DEBUG: shell.on(icecap-event): ' + util.inspect(name) + ": " + util.inspect( tokens ) );
session && session.browser && session.browser.emit('icecap-event', name, tokens);
console.log('session = ' + sys.inspect(session));
console.log('session = ' + util.inspect(session));
});

// Shell daemon disconnects
Expand Down