YUKI Hiroshi
null+****@clear*****
Tue Feb 5 16:24:41 JST 2013
YUKI Hiroshi 2013-02-05 16:24:41 +0900 (Tue, 05 Feb 2013) New Revision: df10bd15202fe2109f6e21af1b47e187cf57d2fc https://github.com/groonga/express-kotoumi/commit/df10bd15202fe2109f6e21af1b47e187cf57d2fc Log: Rename module for future changes: rest-handler => rest-adaptor Modified files: index.js Renamed files: lib/frontend/rest-adaptor.js (from lib/frontend/rest-handler.js) test/frontend-rest-adaptor.test.js (from test/frontend-rest-handler.test.js) Modified: index.js (+2 -2) =================================================================== --- index.js 2013-02-04 16:58:46 +0900 (dcbfaf4) +++ index.js 2013-02-05 16:24:41 +0900 (73e476e) @@ -1,6 +1,6 @@ var express = require('express'); var Connection = require('./lib/backend/connection').Connection; -var restHandler = require('./lib/frontend/rest-handler'); +var restAdaptor = require('./lib/frontend/rest-adaptor'); var socketIoHandler = require('./lib/frontend/socket.io-handler'); var dashboardHandler = require('./lib/frontend/dashboard-handler'); @@ -13,7 +13,7 @@ express.application.kotoumi = function(params) { params.prefix = params.prefix || ''; params.prefix = params.prefix.replace(/\/$/, ''); - restHandler.register(this, params); + restAdaptor.register(this, params); if (params.server) { socketIoHandler.register(this, params.server, params); Renamed: lib/frontend/rest-adaptor.js (+0 -0) 100% =================================================================== Renamed: test/frontend-rest-adaptor.test.js (+6 -6) 94% =================================================================== --- test/frontend-rest-handler.test.js 2013-02-04 16:58:46 +0900 (747d903) +++ test/frontend-rest-adaptor.test.js 2013-02-05 16:24:41 +0900 (616aa98) @@ -4,7 +4,7 @@ var nodemock = require('nodemock'); var utils = require('./test-utils'); var express = require('express'); -var restHandler = require('../lib/frontend/rest-handler'); +var restAdaptor = require('../lib/frontend/rest-adaptor'); var Connection = require('../lib/backend/connection').Connection; suite('REST API', function() { @@ -14,7 +14,7 @@ suite('REST API', function() { .takes(fakeConnection) .returns(function() {}); var application = express(); - restHandler.register(application, { + restAdaptor.register(application, { prefix: '', connection: fakeConnection, handlers: mockedHandlers @@ -46,7 +46,7 @@ suite('REST API', function() { test('to the document root', function(done) { var fakeConnection = utils.createStubbedBackendConnection(); var application = express(); - restHandler.register(application, { + restAdaptor.register(application, { prefix: '', connection: fakeConnection, handlers: handlersFactory @@ -68,7 +68,7 @@ suite('REST API', function() { test('under specified path', function(done) { var fakeConnection = utils.createStubbedBackendConnection(); var application = express(); - restHandler.register(application, { + restAdaptor.register(application, { prefix: '/path/to/kotoumi', connection: fakeConnection, handlers: handlersFactory @@ -99,7 +99,7 @@ suite('REST API', function() { .mock('emitMessage') .takes('search', { requestMessage: true }, function() {}, {}) .ctrl(2, onReceive); - var handler = restHandler + var handler = restAdaptor .createHandler('search', requestBuilders.search, connection); @@ -143,7 +143,7 @@ suite('REST API', function() { emitMessageCalledArguments: [] }; var application = express(); - restHandler.register(application, { + restAdaptor.register(application, { prefix: '', connection: connection }); -------------- next part -------------- HTML����������������������������...ダウンロード