Remove app.del
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parent 509ebb1 · Browse files · 6 files·+5 added−26 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
6 files+5 added−26 removed
- tests:+4 added−21 removed
- other:+1 added−5 removed
Provenance
- Commit
f31dcff- Tree
dd052bd- Author
Douglas Christopher Wilson <doug@somethingdoug.com>- Committer
Douglas Christopher Wilson <doug@somethingdoug.com>- Parent
509ebb1
6 files changed+5 added−26 removed
modified:lib/application.js-5 removed
10 unmodified lines11 var http = require('http');12 var compileETag = require('./utils').compileETag;13 var compileQueryParser = require('./utils').compileQueryParser;14 var compileTrust = require('./utils').compileTrust;15-var deprecate = require('depd')('express');15 var merge = require('utils-merge');16 var resolve = require('path').resolve;17 var slice = Array.prototype.slice;18 423 unmodified lines442 443 return this;444 };445 447-// del -> delete alias448-449-app.del = deprecate.function(app.delete, 'app.del: Use app.delete instead');450-446 /**447 * Render the given view `name` name with `options`448 * and a callback accepting an error and the449 * rendered template string.108 unmodified linesdeleted:test/app.del.js-17 removed
1234567891011121314151617
var express = require('../') , request = require('supertest');
describe('app.del()', function(){ it('should alias app.delete()', function(done){ var app = express();
app.del('/tobi', function(req, res){ res.end('deleted tobi!'); });
request(app) .del('/tobi') .expect('deleted tobi!', done); })})modified:test/app.listen.js+2 added-2 removed
4 unmodified lines5678910910111213144 unmodified lines4 unmodified linesdescribe('app.listen()', function(){ it('should wrap with an HTTP server', function(done){ var app = express();
app.del('/tobi', function(req, res){ res.end('deleted tobi!'); app.get('/tobi', function(req, res){ res.end('got tobi!'); });
var server = app.listen(9999, function(){ server.close();4 unmodified linesmodified:test/app.options.js+1 added-1 removed
4 unmodified lines5678991011121366 unmodified lines4 unmodified linesdescribe('OPTIONS', function(){ it('should default to the routes defined', function(done){ var app = express();
app.del('/', function(){}); app.post('/', function(){}); app.get('/users', function(req, res){}); app.put('/users', function(req, res){});
request(app)66 unmodified linesmodified:test/app.router.js+1 added-1 removed
32 unmodified lines33 .expect(200, '1', done);34 })35 36 describe('methods', function(){37- methods.concat('del').forEach(function(method){37+ methods.forEach(function(method){38 if (method === 'connect') return;39 40 it('should include ' + method.toUpperCase(), function(done){41 var app = express();904 unmodified linesmodified:History.md+1 added
1 5.x2 ===3 4 * remove:5+ - `app.del` - use `app.delete`6 - `res.json(obj, status)` signature - use `res.json(status, obj)`7 - `res.jsonp(obj, status)` signature - use `res.jsonp(status, obj)`8 - `res.send(body, status)` signature - use `res.send(status, body)`9 - `express.query` middleware2456 unmodified lines