Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Merged
merged 1 commit into from

3 participants

@node-migrator-bot

Hello mahemoff!

I am migrationBot, an open-source bot, and I'm here to help you migrate your codebase to node v0.8!

Did you know that the "sys" module throws an error if your program tries to require it in node v0.8? To help keep your code running, I automatically replaced var sys = require('sys') with var util = require('util').

If you'd like to know more about these changes in node.js, take a look at joyent/node@1582cf#L1R51 and https://github.com/joyent/node/blob/1582cfebd6719b2d2373547994b3dca5c8c569c0/ChangeLog#L51 and http://blog.jit.su/introducing-blakmatrix-and-migratorbot .

As for myself, I was written by your friendly neighborhood node ninjas at Nodejitsu, and you can find them at #nodejitsu on irc.freenode.net or with http://webchat.jit.su .

Enjoy!

--migrationBot

@mahemoff mahemoff merged commit 4a543be into mahemoff:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 23, 2012
  1. @blakmatrix
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/index.js
View
8 lib/index.js
@@ -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>';
}
Something went wrong with that request. Please try again.