Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

using relative references where possible and updating package.json

  • Loading branch information...
commit b468cd82872003925d95f59aa02e699622f48a6a 1 parent b32d061
Ben Hockey neonstalwart authored
1  facet/jsgi.js
View
@@ -5,6 +5,7 @@
var Facet = require("perstore/facet").Facet,
directApp = require("../pintura").directApp,
defer = require("promised-io/promise").defer,
+ // FIXME: what is this module?
namedFacets = require("../facet-resolver").namedFacets;
namedFacets["application/jsgi"] = exports.JsgiFacet = Facet(Object, function(store){
2  jsgi/auth.js
View
@@ -2,7 +2,7 @@
* This middleware module provides authentication
*/
var AccessError = require("perstore/errors").AccessError,
- Response = require("../jsgi/response").Response,
+ Response = require("./response").Response,
DatabaseError = require("perstore/errors").DatabaseError,
promiseModule = require("promised-io/promise"),
when = promiseModule.when,
22 package.json
View
@@ -3,6 +3,7 @@
"version": "0.2.6",
"author": "Kris Zyp",
"email": "kriszyp@gmail.com",
+ "description": "JSGI-based RESTful JSON/JavaScript server",
"contributors": ["Vladimir Dronnikov <dronnikov@gmail.com>"],
"keywords": [
"rest",
@@ -57,18 +58,19 @@
"url":"http://github.com/kriszyp/tunguska"
},
"directories": {
- "lib": "./lib"
+ "lib": "."
},
"dependencies":{
- "tunguska": ">=0.2.4",
- "rql": ">=0.2.2",
- "patr": ">=0.2.6",
+ "tunguska": ">0.2.4",
+ "rql": ">0.2.2",
"websocket-server": ">=1.4.01",
- "perstore": ">=0.2.4",
- "promised-io": ">=0.2.3",
- "commonjs-utils": ">=0.2.2",
- "mongodb": "*",
- "multi-node": ">=0.2.3",
- "jsgi-node": ">=0.2.5"
+ "perstore": ">0.2.4",
+ "promised-io": ">0.2.3",
+ "commonjs-utils": ">0.2.2",
+ "multi-node": ">0.2.3",
+ "jsgi-node": ">0.2.5"
+ },
+ "devDependencies": {
+ "patr": ">0.2.6"
}
}
2  tests/jsgi/csrf.js
View
@@ -1,4 +1,4 @@
-var CSRFDetect = require("jsgi/csrf").CSRFDetect,
+var CSRFDetect = require("../../jsgi/csrf").CSRFDetect,
assert = require("assert"),
print = require("promised-io/process").print;
30 tests/stack.js
View
@@ -15,36 +15,36 @@ var emptyApp = function(){
body:[]
}
};
-var lowerAppMock = new MockRequest(require("jsgi/context").SetContext({},
+var lowerAppMock = new MockRequest(require("../jsgi/context").SetContext({},
// We detect if the request could have been forged from another site
- require("jsgi/csrf").CSRFDetect(emptyApp)));
+ require("../jsgi/csrf").CSRFDetect(emptyApp)));
// Support handling various cross-site request mechanisms like JSONP, window.name, CS-XHR
-var lowerApp2Mock = new MockRequest(require("jsgi/xsite").CrossSite(
+var lowerApp2Mock = new MockRequest(require("../jsgi/xsite").CrossSite(
// Handle header emulation through query parameters (useful for cross-site and links)
- require("jsgi/http-params").HttpParams(emptyApp)));
+ require("../jsgi/http-params").HttpParams(emptyApp)));
// Handle HEAD requests
-var lowerApp3Mock = new MockRequest(require("jsgi/head").Head(
+var lowerApp3Mock = new MockRequest(require("../jsgi/head").Head(
// Add some useful headers
- require("jsgi/pintura-headers").PinturaHeaders(config.serverName,
+ require("../jsgi/pintura-headers").PinturaHeaders(config.serverName,
// Handle conditional requests
- require("jsgi/conditional").Conditional(true,emptyApp
+ require("../jsgi/conditional").Conditional(true,emptyApp
))));
-var middleAppMock = new MockRequest(require("jsgi/media").Serialize(config.mediaSelector,
+var middleAppMock = new MockRequest(require("../jsgi/media").Serialize(config.mediaSelector,
// Handle errors that are thrown, converting to appropriate status codes
- require("jsgi/error").ErrorHandler(
+ require("../jsgi/error").ErrorHandler(
// Handle transactions
require("perstore/jsgi/transactional").Transactional(
// Handle sessions
- require("jsgi/session").Session({},
+ require("../jsgi/session").Session({},
// Do authentication
- require("jsgi/auth").Authentication(config.security, emptyApp))))));
-var upperAppMock = new MockRequest(require("jsgi/media").Deserialize(config.mediaSelector,
+ require("../jsgi/auth").Authentication(config.security, emptyApp))))));
+var upperAppMock = new MockRequest(require("../jsgi/media").Deserialize(config.mediaSelector,
// Non-REST custom handlers
- require('jsgi/routes').Routes(config.customRoutes,
+ require('../jsgi/routes').Routes(config.customRoutes,
// Add and retrieve metadata from objects
- exports.directApp = require("jsgi/metadata").Metadata(
+ exports.directApp = require("../jsgi/metadata").Metadata(
// Final REST handler
- require("jsgi/rest-store").RestStore(config)))));
+ require("../jsgi/rest-store").RestStore(config)))));
var emptyMock = new MockRequest(emptyApp);
config.getDataModel = function(){
return {
Please sign in to comment.
Something went wrong with that request. Please try again.