From 3993b676b6bb1f5cffab452924d8ec368a6b4bb9 Mon Sep 17 00:00:00 2001 From: Fabian Becker Date: Mon, 10 Feb 2014 12:44:07 +0000 Subject: [PATCH] Rename unregisterFilter to deregisterFilter fixes #2167 - Rename functions - Adjust tests --- core/server/apps/proxy.js | 2 +- core/server/filters.js | 4 ++-- core/test/unit/apps_spec.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/server/apps/proxy.js b/core/server/apps/proxy.js index 29afb2402f..6689dbe7fe 100644 --- a/core/server/apps/proxy.js +++ b/core/server/apps/proxy.js @@ -7,7 +7,7 @@ var proxy = { filters: { register: filters.registerFilter.bind(filters), - unregister: filters.unregisterFilter.bind(filters) + deregister: filters.deregisterFilter.bind(filters) }, helpers: { register: helpers.registerThemeHelper.bind(helpers), diff --git a/core/server/filters.js b/core/server/filters.js index d7aad1fa6f..699dde1592 100644 --- a/core/server/filters.js +++ b/core/server/filters.js @@ -38,7 +38,7 @@ Filters.prototype.registerFilter = function (name, priority, fn) { }; // Unregister a filter callback function -Filters.prototype.unregisterFilter = function (name, priority, fn) { +Filters.prototype.deregisterFilter = function (name, priority, fn) { // Curry the priority optional parameter to a default of 5 if (_.isFunction(priority)) { fn = priority; @@ -80,4 +80,4 @@ Filters.prototype.doFilter = function (name, args) { }; module.exports = new Filters(); -module.exports.Filters = Filters; \ No newline at end of file +module.exports.Filters = Filters; diff --git a/core/test/unit/apps_spec.js b/core/test/unit/apps_spec.js index ab4b16aaea..9a60579918 100644 --- a/core/test/unit/apps_spec.js +++ b/core/test/unit/apps_spec.js @@ -57,7 +57,7 @@ describe('Apps', function () { it('creates a ghost proxy', function () { should.exist(appProxy.filters); should.exist(appProxy.filters.register); - should.exist(appProxy.filters.unregister); + should.exist(appProxy.filters.deregister); should.exist(appProxy.helpers); should.exist(appProxy.helpers.register);