diff --git a/lib/command.js b/lib/command.js index bc38488..64a3c9e 100644 --- a/lib/command.js +++ b/lib/command.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.3.3 +// Generated by CoffeeScript 1.6.2 (function() { var Configuration, Daemon, Installer, usage, util, _ref; @@ -15,6 +15,7 @@ Configuration.getUserConfiguration(function(err, configuration) { var arg, createInstaller, daemon, dryRun, installer, key, printConfig, shellEscape, underscore, value, _i, _len, _ref1, _ref2, _results; + if (err) { throw err; } @@ -59,9 +60,11 @@ if (dryRun) { return installer.needsRootPrivileges(function(needsRoot) { var exitCode; + exitCode = needsRoot ? 1 : 0; return installer.getStaleFiles(function(files) { var file, _j, _len1; + for (_j = 0, _len1 = files.length; _j < _len1; _j++) { file = files[_j]; util.puts(file.path); diff --git a/lib/configuration.js b/lib/configuration.js index b107c43..861f044 100644 --- a/lib/configuration.js +++ b/lib/configuration.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.3.3 +// Generated by CoffeeScript 1.6.2 (function() { var Configuration, Logger, async, compilePattern, fs, getFilenamesForHost, getUserEnv, libraryPath, mkdirp, path, rstat, sourceScriptEnv, __slice = [].slice; @@ -18,13 +18,14 @@ getUserEnv = require("./util").getUserEnv; module.exports = Configuration = (function() { - Configuration.userConfigurationPath = path.join(process.env.HOME, ".powconfig"); Configuration.loadUserConfigurationEnvironment = function(callback) { var _this = this; + return getUserEnv(function(err, env) { var p; + if (err) { return callback(err); } else { @@ -61,6 +62,7 @@ Configuration.prototype.initialize = function(env) { var _base, _base1, _ref, _ref1, _ref10, _ref11, _ref12, _ref13, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9; + this.env = env; this.bin = (_ref = env.POW_BIN) != null ? _ref : path.join(__dirname, "../bin/pow"); this.dstPort = (_ref1 = env.POW_DST_PORT) != null ? _ref1 : 80; @@ -84,6 +86,7 @@ Configuration.prototype.toJSON = function() { var key, result, _i, _len, _ref; + result = {}; _ref = this.constructor.optionNames; for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -95,6 +98,7 @@ Configuration.prototype.getLogger = function(name) { var _base; + return (_base = this.loggers)[name] || (_base[name] = new Logger(path.join(this.logRoot, name + ".log"))); }; @@ -108,11 +112,13 @@ Configuration.prototype.findHostConfiguration = function(host, callback) { var _this = this; + if (host == null) { host = ""; } return this.gatherHostConfigurations(function(err, hosts) { var config, domain, file, _i, _j, _len, _len1, _ref, _ref1; + if (err) { return callback(err); } @@ -137,6 +143,7 @@ Configuration.prototype.gatherHostConfigurations = function(callback) { var hosts, _this = this; + hosts = {}; return mkdirp(this.hostRoot, function(err) { if (err) { @@ -148,6 +155,7 @@ } return async.forEach(files, function(file, next) { var name, root; + root = path.join(_this.hostRoot, file); name = file.toLowerCase(); return rstat(root, function(err, stats, path) { @@ -190,12 +198,14 @@ libraryPath = function() { var args; + args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; return path.join.apply(path, [process.env.HOME, "Library"].concat(__slice.call(args))); }; getFilenamesForHost = function(host, domain) { var i, length, parts, _i, _ref, _ref1, _results; + host = host.toLowerCase(); if (domain.test != null) { domain = (_ref = (_ref1 = host.match(domain)) != null ? _ref1[0] : void 0) != null ? _ref : ""; diff --git a/lib/daemon.js b/lib/daemon.js index e9addde..9c8ebad 100644 --- a/lib/daemon.js +++ b/lib/daemon.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.3.3 +// Generated by CoffeeScript 1.6.2 (function() { var Daemon, DnsServer, EventEmitter, HttpServer, fs, path, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, @@ -16,17 +16,15 @@ path = require("path"); module.exports = Daemon = (function(_super) { - __extends(Daemon, _super); function Daemon(configuration) { var hostRoot, _this = this; + this.configuration = configuration; this.stop = __bind(this.stop, this); - this.hostRootChanged = __bind(this.hostRootChanged, this); - this.httpServer = new HttpServer(this.configuration); this.dnsServer = new DnsServer(this.configuration); process.on("SIGINT", this.stop); @@ -41,12 +39,14 @@ }); this.on("close", function() { var _ref; + return (_ref = _this.watcher) != null ? _ref.close() : void 0; }); } Daemon.prototype.hostRootChanged = function() { var _this = this; + return fs.exists(this.restartFilename, function(exists) { if (exists) { return _this.restart(); @@ -56,6 +56,7 @@ Daemon.prototype.restart = function() { var _this = this; + return fs.unlink(this.restartFilename, function(err) { if (!err) { return _this.emit("restart"); @@ -66,12 +67,15 @@ Daemon.prototype.start = function() { var dnsPort, flunk, httpPort, pass, startServer, _ref, _this = this; + if (this.starting || this.started) { return; } this.starting = true; startServer = function(server, port, callback) { return process.nextTick(function() { + var err; + try { server.on('error', callback); server.once('listening', function() { @@ -79,7 +83,8 @@ return callback(); }); return server.listen(port); - } catch (err) { + } catch (_error) { + err = _error; return callback(err); } }); @@ -118,13 +123,15 @@ Daemon.prototype.stop = function() { var stopServer, _this = this; + if (this.stopping || !this.started) { return; } this.stopping = true; stopServer = function(server, callback) { return process.nextTick(function() { - var close; + var close, err; + try { close = function() { server.removeListener("close", close); @@ -132,7 +139,8 @@ }; server.on("close", close); return server.close(); - } catch (err) { + } catch (_error) { + err = _error; return callback(err); } }); diff --git a/lib/dns_server.js b/lib/dns_server.js index d96295d..bba7529 100644 --- a/lib/dns_server.js +++ b/lib/dns_server.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.3.3 +// Generated by CoffeeScript 1.6.2 (function() { var DnsServer, NS_C_IN, NS_RCODE_NXDOMAIN, NS_T_A, dnsserver, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, @@ -14,13 +14,11 @@ NS_RCODE_NXDOMAIN = 3; module.exports = DnsServer = (function(_super) { - __extends(DnsServer, _super); function DnsServer(configuration) { this.configuration = configuration; this.handleRequest = __bind(this.handleRequest, this); - DnsServer.__super__.constructor.apply(this, arguments); this.on("request", this.handleRequest); } @@ -32,6 +30,7 @@ DnsServer.prototype.handleRequest = function(req, res) { var pattern, q, _ref; + pattern = this.configuration.dnsDomainPattern; q = (_ref = req.question) != null ? _ref : {}; if (q.type === NS_T_A && q["class"] === NS_C_IN && pattern.test(q.name)) { diff --git a/lib/http_server.js b/lib/http_server.js index 33ce542..cd7cdb3 100644 --- a/lib/http_server.js +++ b/lib/http_server.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.3.3 +// Generated by CoffeeScript 1.6.2 (function() { var HttpServer, RackApplication, connect, dirname, fs, join, pause, request, url, version, _ref, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, @@ -41,6 +41,7 @@ renderTemplate = function(templateName, renderContext, yieldContents) { var context, key, template, value; + template = require("./templates/http_server/" + templateName + ".html"); context = { renderTemplate: renderTemplate, @@ -66,25 +67,17 @@ function HttpServer(configuration) { var _this = this; + this.configuration = configuration; this.handleWelcomeRequest = __bind(this.handleWelcomeRequest, this); - this.handleApplicationNotFound = __bind(this.handleApplicationNotFound, this); - this.handleRvmDeprecationRequest = __bind(this.handleRvmDeprecationRequest, this); - this.handleProxyRequest = __bind(this.handleProxyRequest, this); - this.findRackApplication = __bind(this.findRackApplication, this); - this.handleStaticRequest = __bind(this.handleStaticRequest, this); - this.findHostConfiguration = __bind(this.findHostConfiguration, this); - this.handlePowRequest = __bind(this.handlePowRequest, this); - this.logRequest = __bind(this.logRequest, this); - HttpServer.__super__.constructor.call(this, [o(this.logRequest), o(this.annotateRequest), o(this.handlePowRequest), o(this.findHostConfiguration), o(this.handleStaticRequest), o(this.findRackApplication), o(this.handleProxyRequest), o(this.handleRvmDeprecationRequest), o(this.handleApplicationRequest), x(this.handleErrorStartingApplication), o(this.handleFaviconRequest), o(this.handleApplicationNotFound), o(this.handleWelcomeRequest), o(this.handleRailsAppWithoutRackupFile), o(this.handleLocationNotFound)]); this.staticHandlers = {}; this.rackApplications = {}; @@ -92,6 +85,7 @@ this.accessLog = this.configuration.getLogger("access"); this.on("close", function() { var application, root, _ref1, _results; + _ref1 = _this.rackApplications; _results = []; for (root in _ref1) { @@ -118,6 +112,7 @@ HttpServer.prototype.annotateRequest = function(req, res, next) { var host, _ref1; + host = (_ref1 = req.headers.host) != null ? _ref1.replace(/(\.$)|(\.?:.*)/, "") : void 0; req.pow = { host: host @@ -147,6 +142,7 @@ HttpServer.prototype.findHostConfiguration = function(req, res, next) { var resume, _this = this; + resume = pause(req); return this.configuration.findHostConfiguration(req.pow.host, function(err, domain, config) { if (config) { @@ -167,6 +163,7 @@ HttpServer.prototype.handleStaticRequest = function(req, res, next) { var handler, root, _base, _ref1, _ref2; + if ((_ref1 = req.method) !== "GET" && _ref1 !== "HEAD") { return next(); } @@ -183,11 +180,13 @@ HttpServer.prototype.findRackApplication = function(req, res, next) { var root, _this = this; + if (!(root = req.pow.root)) { return next(); } return fs.exists(join(root, "config.ru"), function(rackConfigExists) { var application, _base, _ref1; + if (rackConfigExists) { req.pow.application = (_ref1 = (_base = _this.rackApplications)[root]) != null ? _ref1 : _base[root] = new RackApplication(_this.configuration, root, req.pow.host); } else if (application = _this.rackApplications[root]) { @@ -200,6 +199,7 @@ HttpServer.prototype.handleProxyRequest = function(req, res, next) { var headers, hostname, key, port, proxy, value, _ref1, _ref2; + if (!req.pow.url) { return next(); } @@ -234,6 +234,7 @@ HttpServer.prototype.handleRvmDeprecationRequest = function(req, res, next) { var action, application, match; + if (!(application = req.pow.application)) { return next(); } @@ -268,6 +269,7 @@ HttpServer.prototype.handleApplicationRequest = function(req, res, next) { var application; + if (application = req.pow.application) { return application.handle(req, res, next, req.pow.resume); } else { @@ -285,6 +287,7 @@ HttpServer.prototype.handleApplicationNotFound = function(req, res, next) { var domain, host, name, pattern, _ref1; + if (req.pow.root) { return next(); } @@ -305,6 +308,7 @@ HttpServer.prototype.handleWelcomeRequest = function(req, res, next) { var domain, domains; + if (req.pow.root || req.url !== "/") { return next(); } @@ -318,6 +322,7 @@ HttpServer.prototype.handleRailsAppWithoutRackupFile = function(req, res, next) { var root; + if (!(root = req.pow.root)) { return next(); } @@ -338,12 +343,14 @@ HttpServer.prototype.handleErrorStartingApplication = function(err, req, res, next) { var home, line, rest, root, stack, stackLines; + if (!(root = req.pow.root)) { return next(); } home = process.env.HOME; stackLines = (function() { var _i, _len, _ref1, _results; + _ref1 = err.stack.split("\n"); _results = []; for (_i = 0, _len = _ref1.length; _i < _len; _i++) { diff --git a/lib/index.js b/lib/index.js index 6ff653c..f1ec4ef 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,6 +1,5 @@ -// Generated by CoffeeScript 1.3.3 +// Generated by CoffeeScript 1.6.2 (function() { - module.exports = { Configuration: require("./configuration"), Daemon: require("./daemon"), diff --git a/lib/installer.js b/lib/installer.js index 2b4e0d5..ae0e82e 100644 --- a/lib/installer.js +++ b/lib/installer.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.3.3 +// Generated by CoffeeScript 1.6.2 (function() { var Installer, InstallerFile, async, chown, daemonSource, firewallSource, fs, mkdirp, path, resolverSource, util, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; @@ -22,24 +22,20 @@ daemonSource = require("./templates/installer/cx.pow.powd.plist"); InstallerFile = (function() { - function InstallerFile(path, source, root, mode) { this.path = path; this.root = root != null ? root : false; this.mode = mode != null ? mode : 0x1a4; this.setPermissions = __bind(this.setPermissions, this); - this.setOwnership = __bind(this.setOwnership, this); - this.writeFile = __bind(this.writeFile, this); - this.vivifyPath = __bind(this.vivifyPath, this); - this.source = source.trim(); } InstallerFile.prototype.isStale = function(callback) { var _this = this; + return fs.exists(this.path, function(exists) { if (exists) { return fs.readFile(_this.path, "utf8", function(err, contents) { @@ -84,9 +80,9 @@ })(); module.exports = Installer = (function() { - Installer.getSystemInstaller = function(configuration) { var domain, files, _i, _len, _ref; + this.configuration = configuration; files = [new InstallerFile("/Library/LaunchDaemons/cx.pow.firewall.plist", firewallSource(this.configuration), true)]; _ref = this.configuration.domains; diff --git a/lib/logger.js b/lib/logger.js index 4792cd5..58c8d70 100644 --- a/lib/logger.js +++ b/lib/logger.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.3.3 +// Generated by CoffeeScript 1.6.2 (function() { var Log, Logger, dirname, fs, level, mkdirp, _fn, _i, _len, _ref, __slice = [].slice; @@ -12,7 +12,6 @@ mkdirp = require("./util").mkdirp; module.exports = Logger = (function() { - Logger.LEVELS = ["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]; function Logger(path, level) { @@ -23,6 +22,7 @@ Logger.prototype.ready = function(callback) { var _this = this; + if (this.state === "ready") { return callback.call(this); } else { @@ -38,6 +38,7 @@ }); return _this.stream.on("open", function() { var _i, _len, _ref; + _this.log = new Log(_this.level, _this.stream); _this.state = "ready"; _ref = _this.readyCallbacks; @@ -61,6 +62,7 @@ _fn = function(level) { return Logger.prototype[level] = function() { var args; + args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; return this.ready(function() { return this.log[level].apply(this.log, args); diff --git a/lib/rack_application.js b/lib/rack_application.js index 6ef4063..85868ce 100644 --- a/lib/rack_application.js +++ b/lib/rack_application.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.3.3 +// Generated by CoffeeScript 1.6.2 (function() { var RackApplication, async, basename, bufferLines, fs, join, nack, pause, resolve, sourceScriptEnv, _ref, _ref1; @@ -13,7 +13,6 @@ _ref1 = require("path"), join = _ref1.join, basename = _ref1.basename, resolve = _ref1.resolve; module.exports = RackApplication = (function() { - function RackApplication(configuration, root, firstHost) { this.configuration = configuration; this.root = root; @@ -46,8 +45,10 @@ RackApplication.prototype.queryRestartFile = function(callback) { var _this = this; + return fs.stat(join(this.root, "tmp/restart.txt"), function(err, stats) { var lastMtime; + if (err) { _this.mtime = null; return callback(false); @@ -61,9 +62,11 @@ RackApplication.prototype.setPoolRunOnceFlag = function(callback) { var _this = this; + if (!this.statCallbacks.length) { fs.exists(join(this.root, "tmp/always_restart.txt"), function(alwaysRestart) { var statCallback, _i, _len, _ref2; + _this.pool.runOnce = alwaysRestart; _ref2 = _this.statCallbacks; for (_i = 0, _len = _ref2.length; _i < _len; _i++) { @@ -78,8 +81,10 @@ RackApplication.prototype.loadScriptEnvironment = function(env, callback) { var _this = this; + return async.reduce([".powrc", ".envrc", ".powenv"], env, function(env, filename, callback) { var script; + return fs.exists(script = join(_this.root, filename), function(scriptExists) { if (scriptExists) { return sourceScriptEnv(script, env, callback); @@ -93,11 +98,14 @@ RackApplication.prototype.loadRvmEnvironment = function(env, callback) { var script, _this = this; + return fs.exists(script = join(this.root, ".rvmrc"), function(rvmrcExists) { var rvm; + if (rvmrcExists) { return fs.exists(rvm = _this.configuration.rvmPath, function(rvmExists) { var before, libexecPath; + if (rvmExists) { libexecPath = resolve("" + __dirname + "/../libexec"); before = ("'" + libexecPath + "/pow_rvm_deprecation_notice' '" + [_this.firstHost] + "'\nsource '" + rvm + "' > /dev/null").trim(); @@ -116,6 +124,7 @@ RackApplication.prototype.loadEnvironment = function(callback) { var _this = this; + return this.queryRestartFile(function() { return _this.loadScriptEnvironment(_this.configuration.env, function(err, env) { if (err) { @@ -135,6 +144,7 @@ RackApplication.prototype.initialize = function() { var _this = this; + if (this.state) { if (this.state === "terminating") { this.quit(function() { @@ -146,6 +156,7 @@ this.state = "initializing"; return this.loadEnvironment(function(err, env) { var readyCallback, _i, _len, _ref2, _ref3, _ref4; + if (err) { _this.state = null; _this.logger.error(err.message); @@ -182,6 +193,7 @@ RackApplication.prototype.terminate = function() { var _this = this; + if (this.state === "initializing") { return this.ready(function() { return _this.terminate(); @@ -190,6 +202,7 @@ this.state = "terminating"; return this.pool.quit(function() { var quitCallback, _i, _len, _ref2; + _this.state = null; _this.mtime = null; _this.pool = null; @@ -206,6 +219,7 @@ RackApplication.prototype.handle = function(req, res, next, callback) { var resume, _this = this; + resume = pause(req); return this.ready(function(err) { if (err) { @@ -236,6 +250,7 @@ RackApplication.prototype.restart = function(callback) { var _this = this; + return this.quit(function() { return _this.ready(callback); }); @@ -243,6 +258,7 @@ RackApplication.prototype.restartIfNecessary = function(callback) { var _this = this; + return this.queryRestartFile(function(mtimeChanged) { if (mtimeChanged) { return _this.restart(callback); @@ -254,6 +270,7 @@ RackApplication.prototype.writeRvmBoilerplate = function() { var boilerplate, powrc; + powrc = join(this.root, ".powrc"); boilerplate = this.constructor.rvmBoilerplate; return fs.readFile(powrc, "utf8", function(err, contents) { diff --git a/lib/templates/http_server/layout.html.js b/lib/templates/http_server/layout.html.js index 4fbd5ef..192a628 100644 --- a/lib/templates/http_server/layout.html.js +++ b/lib/templates/http_server/layout.html.js @@ -37,7 +37,6 @@ module.exports = function(__obj) { } (function() { (function() { - __out.push('\n\n\n \n '); __out.push(__sanitize(this.title)); diff --git a/lib/templates/http_server/rvm_deprecation_notice.html.js b/lib/templates/http_server/rvm_deprecation_notice.html.js index ac29b41..28d83c9 100644 --- a/lib/templates/http_server/rvm_deprecation_notice.html.js +++ b/lib/templates/http_server/rvm_deprecation_notice.html.js @@ -37,7 +37,6 @@ module.exports = function(__obj) { } (function() { (function() { - __out.push('<!doctype html>\n<html>\n <head>\n <title>Pow: Automatic RVM support is deprecated\n \n \n \n \n

Automatic RVM support is deprecated

\n\n

We’re showing you this notice because you just accessed\n an application with a per-project .rvmrc file.

\n\n

Support for automatically loading\n per-project .rvmrc files in Pow is deprecated and\n will be removed in the next major release.

\n\n

Ensure your application continues to work with future releases\n of Pow by adding the following code to the\n application’s .powrc file:

\n\n
');
     
       __out.push(__sanitize(this.boilerplate));
diff --git a/lib/templates/installer/cx.pow.firewall.plist.js b/lib/templates/installer/cx.pow.firewall.plist.js
index cd7d420..87072af 100644
--- a/lib/templates/installer/cx.pow.firewall.plist.js
+++ b/lib/templates/installer/cx.pow.firewall.plist.js
@@ -37,7 +37,6 @@ module.exports = function(__obj) {
   }
   (function() {
     (function() {
-    
       __out.push('\n\n\n\n\tLabel\n\tcx.pow.firewall\n\tProgramArguments\n\t\n\t\tsh\n\t\t-c\n\t\tipfw add fwd 127.0.0.1,');
     
       __out.push(__sanitize(this.httpPort));
diff --git a/lib/templates/installer/cx.pow.powd.plist.js b/lib/templates/installer/cx.pow.powd.plist.js
index 613e2b2..404edb6 100644
--- a/lib/templates/installer/cx.pow.powd.plist.js
+++ b/lib/templates/installer/cx.pow.powd.plist.js
@@ -37,7 +37,6 @@ module.exports = function(__obj) {
   }
   (function() {
     (function() {
-    
       __out.push('\n\n\n\n        Label\n        cx.pow.powd\n        ProgramArguments\n        \n                ');
     
       __out.push(__sanitize(process.execPath));
diff --git a/lib/templates/installer/resolver.js b/lib/templates/installer/resolver.js
index 9f33905..ca8e907 100644
--- a/lib/templates/installer/resolver.js
+++ b/lib/templates/installer/resolver.js
@@ -37,7 +37,6 @@ module.exports = function(__obj) {
   }
   (function() {
     (function() {
-    
       __out.push('# Lovingly generated by Pow\nnameserver 127.0.0.1\nport ');
     
       __out.push(__sanitize(this.dnsPort));
diff --git a/lib/util.js b/lib/util.js
index 0884685..28a347b 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.3.3
+// Generated by CoffeeScript 1.6.2
 (function() {
   var LineBuffer, Stream, async, exec, execFile, fs, getUserLocale, getUserShell, loginExec, makeTemporaryFilename, parseEnv, path, quote, readAndUnlink,
     __hasProp = {}.hasOwnProperty,
@@ -16,22 +16,24 @@
   Stream = require("stream").Stream;
 
   exports.LineBuffer = LineBuffer = (function(_super) {
-
     __extends(LineBuffer, _super);
 
     function LineBuffer(stream) {
       var self;
+
       this.stream = stream;
       this.readable = true;
       this._buffer = "";
       self = this;
       this.stream.on('data', function() {
         var args;
+
         args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
         return self.write.apply(self, args);
       });
       this.stream.on('end', function() {
         var args;
+
         args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
         return self.end.apply(self, args);
       });
@@ -39,6 +41,7 @@
 
     LineBuffer.prototype.write = function(chunk) {
       var index, line, _results;
+
       this._buffer += chunk;
       _results = [];
       while ((index = this._buffer.indexOf("\n")) !== -1) {
@@ -51,6 +54,7 @@
 
     LineBuffer.prototype.end = function() {
       var args;
+
       args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
       if (args.length > 0) {
         this.write.apply(this, args);
@@ -67,6 +71,7 @@
 
   exports.bufferLines = function(stream, callback) {
     var buffer;
+
     buffer = new LineBuffer(stream);
     buffer.on("data", callback);
     return buffer;
@@ -74,11 +79,14 @@
 
   exports.mkdirp = function(dirname, callback) {
     var p;
+
     return fs.lstat((p = path.normalize(dirname)), function(err, stats) {
       var paths;
+
       if (err) {
         paths = [p].concat((function() {
           var _results;
+
           _results = [];
           while (p !== "/" && p !== ".") {
             _results.push(p = path.dirname(p));
@@ -110,6 +118,7 @@
 
   exports.chown = function(path, owner, callback) {
     var error;
+
     error = "";
     return exec(["chown", owner, path], function(err, stdout, stderr) {
       if (err) {
@@ -122,14 +131,17 @@
 
   exports.pause = function(stream) {
     var onClose, onData, onEnd, queue, removeListeners;
+
     queue = [];
     onData = function() {
       var args;
+
       args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
       return queue.push(['data'].concat(__slice.call(args)));
     };
     onEnd = function() {
       var args;
+
       args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
       return queue.push(['end'].concat(__slice.call(args)));
     };
@@ -146,6 +158,7 @@
     stream.on('close', onClose);
     return function() {
       var args, _i, _len, _results;
+
       removeListeners();
       _results = [];
       for (_i = 0, _len = queue.length; _i < _len; _i++) {
@@ -158,6 +171,7 @@
 
   exports.sourceScriptEnv = function(script, env, options, callback) {
     var command, cwd, filename, _ref;
+
     if (options.call) {
       callback = options;
       options = {};
@@ -192,6 +206,7 @@
 
   exports.getUserEnv = function(callback, defaultEncoding) {
     var filename;
+
     if (defaultEncoding == null) {
       defaultEncoding = "UTF-8";
     }
@@ -206,6 +221,7 @@
           } else {
             return getUserLocale(function(locale) {
               var env, _ref;
+
               env = parseEnv(result);
               if ((_ref = env.LANG) == null) {
                 env.LANG = "" + locale + "." + defaultEncoding;
@@ -232,6 +248,7 @@
 
   makeTemporaryFilename = function() {
     var filename, random, timestamp, tmpdir, _ref;
+
     tmpdir = (_ref = process.env.TMPDIR) != null ? _ref : "/tmp";
     timestamp = new Date().getTime();
     random = parseInt(Math.random() * Math.pow(2, 16));
@@ -258,6 +275,7 @@
   loginExec = function(command, callback) {
     return getUserShell(function(shell) {
       var login;
+
       login = ["login", "-qf", process.env.LOGNAME, shell];
       return exec(__slice.call(login).concat(["-l"], ["-c"], [command]), function(err, stdout, stderr) {
         if (err) {
@@ -271,9 +289,11 @@
 
   getUserShell = function(callback) {
     var command;
+
     command = ["dscl", ".", "-read", "/Users/" + process.env.LOGNAME, "UserShell"];
     return exec(command, function(err, stdout, stderr) {
       var match, matches, shell;
+
       if (err) {
         return callback(process.env.SHELL);
       } else {
@@ -290,6 +310,7 @@
   getUserLocale = function(callback) {
     return exec(["defaults", "read", "-g", "AppleLocale"], function(err, stdout, stderr) {
       var locale, _ref;
+
       locale = (_ref = stdout != null ? stdout.trim() : void 0) != null ? _ref : "";
       if (!locale.match(/^\w+$/)) {
         locale = "en_US";
@@ -300,6 +321,7 @@
 
   parseEnv = function(stdout) {
     var env, line, match, matches, name, value, _i, _len, _ref;
+
     env = {};
     _ref = stdout.split("\n");
     for (_i = 0, _len = _ref.length; _i < _len; _i++) {
diff --git a/package.json b/package.json
index e5be61b..e0549ba 100644
--- a/package.json
+++ b/package.json
@@ -19,7 +19,7 @@
 , "devDependencies": {
     "eco": "~> 1.1.0"
   , "nodeunit": ">= 0.7.4"
-  , "coffee-script": "1.3.3"
+  , "coffee-script": "1.6.2"
   }
 , "engines" : { "node" : ">= 0.8.0" }
 , "scripts": {