Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
@@ -5,6 +5,7 @@
5 5 var Facet = require("perstore/facet").Facet,
6 6 directApp = require("../pintura").directApp,
7 7 defer = require("promised-io/promise").defer,
  8 + // FIXME: what is this module?
8 9 namedFacets = require("../facet-resolver").namedFacets;
9 10
10 11 namedFacets["application/jsgi"] = exports.JsgiFacet = Facet(Object, function(store){
2  jsgi/auth.js
@@ -2,7 +2,7 @@
2 2 * This middleware module provides authentication
3 3 */
4 4 var AccessError = require("perstore/errors").AccessError,
5   - Response = require("../jsgi/response").Response,
  5 + Response = require("./response").Response,
6 6 DatabaseError = require("perstore/errors").DatabaseError,
7 7 promiseModule = require("promised-io/promise"),
8 8 when = promiseModule.when,
22 package.json
@@ -3,6 +3,7 @@
3 3 "version": "0.2.6",
4 4 "author": "Kris Zyp",
5 5 "email": "kriszyp@gmail.com",
  6 + "description": "JSGI-based RESTful JSON/JavaScript server",
6 7 "contributors": ["Vladimir Dronnikov <dronnikov@gmail.com>"],
7 8 "keywords": [
8 9 "rest",
@@ -57,18 +58,19 @@
57 58 "url":"http://github.com/kriszyp/tunguska"
58 59 },
59 60 "directories": {
60   - "lib": "./lib"
  61 + "lib": "."
61 62 },
62 63 "dependencies":{
63   - "tunguska": ">=0.2.4",
64   - "rql": ">=0.2.2",
65   - "patr": ">=0.2.6",
  64 + "tunguska": ">0.2.4",
  65 + "rql": ">0.2.2",
66 66 "websocket-server": ">=1.4.01",
67   - "perstore": ">=0.2.4",
68   - "promised-io": ">=0.2.3",
69   - "commonjs-utils": ">=0.2.2",
70   - "mongodb": "*",
71   - "multi-node": ">=0.2.3",
72   - "jsgi-node": ">=0.2.5"
  67 + "perstore": ">0.2.4",
  68 + "promised-io": ">0.2.3",
  69 + "commonjs-utils": ">0.2.2",
  70 + "multi-node": ">0.2.3",
  71 + "jsgi-node": ">0.2.5"
  72 + },
  73 + "devDependencies": {
  74 + "patr": ">0.2.6"
73 75 }
74 76 }
2  tests/jsgi/csrf.js
... ... @@ -1,4 +1,4 @@
1   -var CSRFDetect = require("jsgi/csrf").CSRFDetect,
  1 +var CSRFDetect = require("../../jsgi/csrf").CSRFDetect,
2 2 assert = require("assert"),
3 3 print = require("promised-io/process").print;
4 4
30 tests/stack.js
@@ -15,36 +15,36 @@ var emptyApp = function(){
15 15 body:[]
16 16 }
17 17 };
18   -var lowerAppMock = new MockRequest(require("jsgi/context").SetContext({},
  18 +var lowerAppMock = new MockRequest(require("../jsgi/context").SetContext({},
19 19 // We detect if the request could have been forged from another site
20   - require("jsgi/csrf").CSRFDetect(emptyApp)));
  20 + require("../jsgi/csrf").CSRFDetect(emptyApp)));
21 21 // Support handling various cross-site request mechanisms like JSONP, window.name, CS-XHR
22   -var lowerApp2Mock = new MockRequest(require("jsgi/xsite").CrossSite(
  22 +var lowerApp2Mock = new MockRequest(require("../jsgi/xsite").CrossSite(
23 23 // Handle header emulation through query parameters (useful for cross-site and links)
24   - require("jsgi/http-params").HttpParams(emptyApp)));
  24 + require("../jsgi/http-params").HttpParams(emptyApp)));
25 25 // Handle HEAD requests
26   -var lowerApp3Mock = new MockRequest(require("jsgi/head").Head(
  26 +var lowerApp3Mock = new MockRequest(require("../jsgi/head").Head(
27 27 // Add some useful headers
28   - require("jsgi/pintura-headers").PinturaHeaders(config.serverName,
  28 + require("../jsgi/pintura-headers").PinturaHeaders(config.serverName,
29 29 // Handle conditional requests
30   - require("jsgi/conditional").Conditional(true,emptyApp
  30 + require("../jsgi/conditional").Conditional(true,emptyApp
31 31 ))));
32   -var middleAppMock = new MockRequest(require("jsgi/media").Serialize(config.mediaSelector,
  32 +var middleAppMock = new MockRequest(require("../jsgi/media").Serialize(config.mediaSelector,
33 33 // Handle errors that are thrown, converting to appropriate status codes
34   - require("jsgi/error").ErrorHandler(
  34 + require("../jsgi/error").ErrorHandler(
35 35 // Handle transactions
36 36 require("perstore/jsgi/transactional").Transactional(
37 37 // Handle sessions
38   - require("jsgi/session").Session({},
  38 + require("../jsgi/session").Session({},
39 39 // Do authentication
40   - require("jsgi/auth").Authentication(config.security, emptyApp))))));
41   -var upperAppMock = new MockRequest(require("jsgi/media").Deserialize(config.mediaSelector,
  40 + require("../jsgi/auth").Authentication(config.security, emptyApp))))));
  41 +var upperAppMock = new MockRequest(require("../jsgi/media").Deserialize(config.mediaSelector,
42 42 // Non-REST custom handlers
43   - require('jsgi/routes').Routes(config.customRoutes,
  43 + require('../jsgi/routes').Routes(config.customRoutes,
44 44 // Add and retrieve metadata from objects
45   - exports.directApp = require("jsgi/metadata").Metadata(
  45 + exports.directApp = require("../jsgi/metadata").Metadata(
46 46 // Final REST handler
47   - require("jsgi/rest-store").RestStore(config)))));
  47 + require("../jsgi/rest-store").RestStore(config)))));
48 48 var emptyMock = new MockRequest(emptyApp);
49 49 config.getDataModel = function(){
50 50 return {

0 comments on commit b468cd8

Please sign in to comment.
Something went wrong with that request. Please try again.