From 5552de93d539d56ab38d41f1916fc37a4745cd30 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Mon, 21 Oct 2019 16:36:44 -0400 Subject: [PATCH] Rater: Remove interface It's used only by HttpRater and the interface is no longer adhered to by DslRater (which no longer implements it). --- src/server/rater/DslRater.js | 1 - src/server/rater/DslRaterContext.js | 1 - src/server/rater/HttpRater.js | 8 ++---- src/server/rater/Rater.js | 40 ----------------------------- 4 files changed, 2 insertions(+), 48 deletions(-) delete mode 100644 src/server/rater/Rater.js diff --git a/src/server/rater/DslRater.js b/src/server/rater/DslRater.js index 0437dbb..75bc1f1 100644 --- a/src/server/rater/DslRater.js +++ b/src/server/rater/DslRater.js @@ -20,7 +20,6 @@ */ var Class = require( 'easejs' ).Class, - Rater = require( './Rater' ), EventEmitter = require( 'events' ).EventEmitter, DslRaterContext = require( './DslRaterContext' ); diff --git a/src/server/rater/DslRaterContext.js b/src/server/rater/DslRaterContext.js index a9a837b..622eab1 100644 --- a/src/server/rater/DslRaterContext.js +++ b/src/server/rater/DslRaterContext.js @@ -20,7 +20,6 @@ */ var Class = require( 'easejs' ).Class, - Rater = require( './Rater' ), EventEmitter = require( 'events' ).EventEmitter, Quote = require( '../../quote/Quote' ); diff --git a/src/server/rater/HttpRater.js b/src/server/rater/HttpRater.js index 28f0095..ab7e600 100644 --- a/src/server/rater/HttpRater.js +++ b/src/server/rater/HttpRater.js @@ -22,18 +22,14 @@ * "HttpRater" */ -var Class = require( 'easejs' ).Class, - Rater = require( './Rater' ), - - querystring = require( 'querystring' ) -; +var Class = require( 'easejs' ).Class; +var querystring = require( 'querystring' ); /** * Rates using one of the PHP raters */ module.exports = Class( 'HttpRater' ) - .implement( Rater ) .extend( { /** diff --git a/src/server/rater/Rater.js b/src/server/rater/Rater.js deleted file mode 100644 index 3647960..0000000 --- a/src/server/rater/Rater.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Contains Rater interface - * - * Copyright (C) 2010-2019 R-T Specialty, LLC. - * - * This file is part of the Liza Data Collection Framework. - * - * liza is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -var Interface = require( 'easejs' ).Interface; - - -/** - * Represents a rater that will generate a quote from a given set of values - */ -module.exports = Interface( 'Rater', -{ - /** - * Asynchronously performs rating using the data from the given bucket - * - * @param {Quote} quote to rate - * @param {function()} callback function to call when complete - * - * @return {Rater} self - */ - 'public rate': [ 'quote', 'args', 'callback' ], -} ); -