[Groonga-commit] groonga/express-droonga at 8f002ac [master] Rename REST adapter to HTTP adapter

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Jul 22 22:58:31 JST 2013


Kouhei Sutou	2013-07-22 22:58:31 +0900 (Mon, 22 Jul 2013)

  New Revision: 8f002ac52327f657a373eb75952ecacc30c06017
  https://github.com/groonga/express-droonga/commit/8f002ac52327f657a373eb75952ecacc30c06017

  Message:
    Rename REST adapter to HTTP adapter
    
    Because the adapter should handle all HTTP based request and response.

  Modified files:
    index.js
    test/adapter/rest.test.js
  Renamed files:
    lib/adapter/http.js
      (from lib/adapter/rest.js)

  Modified: index.js (+2 -2)
===================================================================
--- index.js    2013-07-22 22:50:45 +0900 (f367f6d)
+++ index.js    2013-07-22 22:58:31 +0900 (d043ef6)
@@ -1,6 +1,6 @@
 var express = require('express');
 var Connection = require('./lib/backend/connection').Connection;
-var restAdapter = require('./lib/adapter/rest');
+var httpAdapter = require('./lib/adapter/http');
 var groongaAdapter = require('./lib/adapter/groonga');
 var socketIoAdapter = require('./lib/adapter/socket.io');
 var dashboardUI = require('./lib/ui/dashboard');
@@ -14,7 +14,7 @@ express.application.droonga = function(params) {
   params.prefix = params.prefix || '';
   params.prefix = params.prefix.replace(/\/$/, '');
 
-  restAdapter.register(this, params);
+  httpAdapter.register(this, params);
   groongaAdapter.register(this, params);
 
   if (params.server) {

  Renamed: lib/adapter/http.js (+0 -0) 100%
===================================================================

  Modified: test/adapter/rest.test.js (+6 -6)
===================================================================
--- test/adapter/rest.test.js    2013-07-22 22:50:45 +0900 (574d106)
+++ test/adapter/rest.test.js    2013-07-22 22:58:31 +0900 (5591c28)
@@ -5,11 +5,11 @@ var Deferred = require('jsdeferred').Deferred;
 var utils = require('../test-utils');
 
 var express = require('express');
-var restAdapter = require('../../lib/adapter/rest');
+var httpAdapter = require('../../lib/adapter/http');
 var model = require('../../lib/model');
 var restCommands = require('../../lib/adapter/default-commands/rest');
 
-suite('REST Adapter', function() {
+suite('HTTP Adapter', function() {
   test('registeration of plugin commands', function() {
     var basePlugin = {
       getCommand: new model.REST({
@@ -41,7 +41,7 @@ suite('REST Adapter', function() {
     };
 
     var application = express();
-    var registeredCommands = restAdapter.register(application, {
+    var registeredCommands = httpAdapter.register(application, {
       prefix:     '',
       connection: utils.createStubbedBackendConnection(),
       plugins: [
@@ -101,7 +101,7 @@ suite('REST Adapter', function() {
     });
 
     test('to the document root', function(done) {
-      restAdapter.register(application, {
+      httpAdapter.register(application, {
         prefix:     '',
         connection: connection,
         plugins:    [testPlugin]
@@ -130,7 +130,7 @@ suite('REST Adapter', function() {
     });
 
     test('under specified path', function(done) {
-      restAdapter.register(application, {
+      httpAdapter.register(application, {
         prefix:     '/path/to/droonga',
         connection: connection,
         plugins:    [testPlugin]
@@ -173,7 +173,7 @@ suite('REST Adapter', function() {
       var receiverCallback = {};
       var connection = utils.createStubbedBackendConnection();
       var application = express();
-      restAdapter.register(application, {
+      httpAdapter.register(application, {
         prefix:     '',
         connection: connection
       });
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index