Skip to content

Commit

Permalink
Merge branch 'master' of github.com:visionmedia/express
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Nov 4, 2012
2 parents a7ca381 + 8959ff1 commit 2d49c0d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 20 deletions.
4 changes: 2 additions & 2 deletions Readme.md
Expand Up @@ -107,7 +107,7 @@ authors:
54 Aaron Heckmann 1.5%
34 csausdev 1.0%
26 ciaranj 0.7%
21 Robert Sköld 0.6%
21 Robert Sköld 0.6%
6 Guillermo Rauch 0.2%
3 Dav Glass 0.1%
3 Nick Poulden 0.1%
Expand Down Expand Up @@ -153,7 +153,7 @@ authors:
1 Jonathan Zacsh 0.0%
1 Justin Lilly 0.0%
1 Ken Sato 0.0%
1 Maciej Małecki 0.0%
1 Maciej Małecki 0.0%
1 Masahiro Hayashi 0.0%
```

Expand Down
10 changes: 3 additions & 7 deletions lib/application.js
Expand Up @@ -9,12 +9,10 @@ var connect = require('connect')
, debug = require('debug')('express:application')
, locals = require('./utils').locals
, View = require('./view')
, url = require('url')
, utils = connect.utils
, path = require('path')
, http = require('http')
, join = path.join
, fs = require('fs');
, join = path.join;

/**
* Application prototype.
Expand All @@ -33,7 +31,6 @@ var app = exports = module.exports = {};
*/

app.init = function(){
var self = this;
this.cache = {};
this.settings = {};
this.engines = {};
Expand Down Expand Up @@ -106,7 +103,7 @@ app.defaultConfiguration = function(){
*/

app.use = function(route, fn){
var app, home, handle;
var app, handle;

// default route to '/'
if ('string' != typeof route) fn = route, route = '/';
Expand Down Expand Up @@ -455,8 +452,7 @@ app.del = app.delete;
*/

app.render = function(name, options, fn){
var self = this
, opts = {}
var opts = {}
, cache = this.cache
, engines = this.engines
, view;
Expand Down
6 changes: 2 additions & 4 deletions lib/response.js
Expand Up @@ -2,8 +2,7 @@
* Module dependencies.
*/

var fs = require('fs')
, http = require('http')
var http = require('http')
, path = require('path')
, connect = require('connect')
, utils = connect.utils
Expand All @@ -15,7 +14,6 @@ var fs = require('fs')
, send = connect.static.send
, cookie = require('cookie')
, send = require('send')
, crc = require('crc')
, mime = connect.mime
, basename = path.basename
, extname = path.extname
Expand Down Expand Up @@ -716,4 +714,4 @@ res.render = function(view, options, fn){

// render
app.render(view, options, fn);
};
};
6 changes: 2 additions & 4 deletions lib/router/index.js
Expand Up @@ -5,8 +5,7 @@
var Route = require('./route')
, utils = require('../utils')
, debug = require('debug')('express:router')
, parse = require('connect').utils.parseUrl
, methods = require('methods');
, parse = require('connect').utils.parseUrl;

/**
* Expose `Router` constructor.
Expand Down Expand Up @@ -93,8 +92,7 @@ Router.prototype._dispatch = function(req, res, next){
, paramVal
, route
, keys
, key
, ret;
, key;

// match next route
function nextRoute(err) {
Expand Down
4 changes: 1 addition & 3 deletions support/app.js
Expand Up @@ -16,8 +16,6 @@ app.set('views', __dirname + '/views');
app.set('view engine', 'jade');
app.locals.self = true;

var repo = require('../package.json');

app.get('/render', function(req, res){
res.render('hello');
});
Expand Down Expand Up @@ -65,4 +63,4 @@ app.get('/match', function(req, res){
res.send('Hello World\n');
});

app.listen(8000);
app.listen(8000);

0 comments on commit 2d49c0d

Please sign in to comment.