Skip to content

Commit

Permalink
[breaking] Removed winston.transports.Webhook.
Browse files Browse the repository at this point in the history
  • Loading branch information
indexzero committed Oct 9, 2015
1 parent fb9eec0 commit e0c9dde
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 311 deletions.
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ test/*.log
test/fixtures/*.json
test/fixtures/logs/*.log*
test/fixtures/keys/
test/transports/webhook-test.js
node_modules/
node_modules/*
npm-debug.log
4 changes: 2 additions & 2 deletions examples/couchdb.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var winston = require('../lib/winston');
//
//
// The Console transport will simply output to the console screen
// The Couchdb tranport will perform an HTTP POST request to the specified CouchDB instance
// The CouchDB tranport will perform an HTTP POST request to the specified CouchDB instance
//
var logger = new (winston.Logger)({
transports: [
Expand All @@ -15,4 +15,4 @@ var logger = new (winston.Logger)({
]
});

logger.log('info', 'Hello webhook log files!', { 'foo': 'bar' });
logger.log('info', 'Hello log files!', { 'foo': 'bar' });
17 changes: 0 additions & 17 deletions examples/webhook-post.js

This file was deleted.

146 changes: 0 additions & 146 deletions lib/winston/transports/webhook.js

This file was deleted.

18 changes: 9 additions & 9 deletions test/container-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ vows.describe('winston/container').addBatch({
topic: function () {
this.port = 9412;
this.transports = [
new winston.transports.Webhook({
new winston.transports.Http({
port: this.port
})
];

this.container = new winston.Container({
transports: this.transports
});

return null;
},
"the get() method": {
Expand All @@ -81,19 +81,19 @@ vows.describe('winston/container').addBatch({
"should add the logger correctly": function () {
this.someLogger = this.container.get('some-logger');
assert.isObject(this.someLogger.transports);
assert.instanceOf(this.someLogger.transports['webhook'], winston.transports.Webhook);
assert.strictEqual(this.someLogger.transports['webhook'], this.transports[0]);
assert.instanceOf(this.someLogger.transports['http'], winston.transports.Http);
assert.strictEqual(this.someLogger.transports['http'], this.transports[0]);
},
"a second call to get()": {
"should respond with the same transport object": function () {
this.someOtherLogger = this.container.get('some-other-logger');

assert.isObject(this.someOtherLogger.transports);
assert.instanceOf(this.someOtherLogger.transports['webhook'], winston.transports.Webhook);
assert.strictEqual(this.someOtherLogger.transports['webhook'], this.transports[0]);
assert.strictEqual(this.someOtherLogger.transports['webhook'], this.someLogger.transports['webhook']);
assert.instanceOf(this.someOtherLogger.transports['http'], winston.transports.Http);
assert.strictEqual(this.someOtherLogger.transports['http'], this.transports[0]);
assert.strictEqual(this.someOtherLogger.transports['http'], this.someLogger.transports['http']);
}
}
}
}
}).export(module);
}).export(module);
5 changes: 0 additions & 5 deletions test/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,6 @@ helpers.assertDailyRotateFile = function (transport) {
assert.isFunction(transport.log);
}

helpers.assertWebhook = function (transport) {
assert.instanceOf(transport, winston.transports.Webhook);
assert.isFunction(transport.log);
};

helpers.assertCouchdb = function (transport) {
assert.instanceOf(transport, winston.transports.Couchdb);
assert.isFunction(transport.log);
Expand Down
2 changes: 1 addition & 1 deletion test/logger-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ vows.describe('winton/logger').addBatch({
},
"the remove() with an unadded transport": {
"should throw an Error": function (logger) {
assert.throws(function () { logger.remove(winston.transports.Webhook) }, Error);
assert.throws(function () { logger.remove(winston.transports.Http) }, Error);
}
},
"the remove() method with an added transport": {
Expand Down
3 changes: 0 additions & 3 deletions test/transports/transport.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ module.exports = function (transport, options) {
case 'file':
helpers.assertFile(transport);
break;
case 'webhook':
helpers.assertWebhook(transport);
break;
case 'couchdb':
helpers.assertCouchdb(transport);
break;
Expand Down
125 changes: 0 additions & 125 deletions test/transports/webhook-test.js

This file was deleted.

Loading

0 comments on commit e0c9dde

Please sign in to comment.