Permalink
Browse files

[fix] Changed require('sys') to require('util') for compatibility wit…

…h node v0.8
  • Loading branch information...
1 parent a9865c6 commit 30714a157856f8f2ccec15de64709d9bd04ebe14 @blakmatrix blakmatrix committed Jun 23, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/index.js
View
@@ -5,14 +5,14 @@
(function() {
var T, lib, libs, oauth, sys, winston, _i, _len, _ref;
oauth = require('oauth');
- sys = require('sys');
+ util = require('util');
winston = require('winston');
T = {
login: function(req, res) {
return T.consumer.getOAuthRequestToken(function(error, oauthToken, oauthTokenSecret, results) {
if (error) {
T.log.info("login error " + error);
- return T.sendError(req, res, "Error getting OAuth request token : " + sys.inspect(error), 500);
+ return T.sendError(req, res, "Error getting OAuth request token : " + util.inspect(error), 500);
} else {
req.session || (req.session = {});
req.session.oauthRequestToken = oauthToken;
@@ -29,7 +29,7 @@
callback: function(req, res) {
return T.consumer.getOAuthAccessToken(req.session.oauthRequestToken, req.session.oauthRequestTokenSecret, req.query.oauth_verifier, function(err, oauthAccessToken, oauthAccessTokenSecret, results) {
if (err) {
- T.sendError(req, res, ("Error getting OAuth access token : " + (sys.inspect(err))) + ("[" + oauthAccessToken + "] [" + oauthAccessTokenSecret + "] [" + (sys.inspect(results)) + "]"));
+ T.sendError(req, res, ("Error getting OAuth access token : " + (util.inspect(err))) + ("[" + oauthAccessToken + "] [" + oauthAccessTokenSecret + "] [" + (util.inspect(results)) + "]"));
}
req.session.twitter = {
accessToken: oauthAccessToken,
@@ -59,7 +59,7 @@
}
m = '<p><a href="/sessions/login">Login</a> <a href="/sessions/logout">Logout</a></p><h1>Session</h1>';
if (req.session) {
- m += "<details><summary>exists</summary><pre>" + (sys.inspect(req.session)) + "</pre></details>";
+ m += "<details><summary>exists</summary><pre>" + (util.inspect(req.session)) + "</pre></details>";
} else {
m = '<p>No session. Make sure you included cookieDecoder and session middleware BEFORE twitter.</p>';
}

0 comments on commit 30714a1

Please sign in to comment.