Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

move modules to node_modules/, compatibility with node 0.5+

node-mongodb-native is now exported to the global context as MongoDBDriver.
  • Loading branch information...
commit 9f6496eb4d94d0725ca667f7b8f74be59b848128 1 parent 65a32a8
@jankuca authored
View
20 .gitmodules
@@ -1,15 +1,15 @@
-[submodule "lib/ejs"]
- path = lib/ejs
+[submodule "node_modules/ejs"]
+ path = node_modules/ejs
url = git://gist.github.com/788091.git
-[submodule "lib/relativedate"]
- path = lib/relativedate
+[submodule "node_modules/relativedate"]
+ path = node_modules/relativedate
url = git://gist.github.com/788114.git
-[submodule "lib/node-formidable"]
- path = lib/node-formidable
+[submodule "node_modules/node-formidable"]
+ path = node_modules/node-formidable
url = git://github.com/felixge/node-formidable.git
-[submodule "lib/utils"]
- path = lib/utils
+[submodule "node_modules/utils"]
+ path = node_modules/utils
url = git://gist.github.com/871775.git
-[submodule "lib/node-mongodb-native"]
- path = lib/node-mongodb-native
+[submodule "node_modules/node-mongodb-native"]
+ path = node_modules/node-mongodb-native
url = git://github.com/christkv/node-mongodb-native.git
1  node_modules/ejs
@@ -0,0 +1 @@
+Subproject commit 0ec435d9711da398e088d56bc354c42be9c47ac2
1  node_modules/node-formidable
@@ -0,0 +1 @@
+Subproject commit 63347d825bbeb30f1effadf153e537a641c3d0d4
1  node_modules/node-mongodb-native
@@ -0,0 +1 @@
+Subproject commit fdc7d8cc421abafd43c07ca0cd697acbb88e579a
1  node_modules/relativedate
@@ -0,0 +1 @@
+Subproject commit 98e5ba3b122626afc7df76e49f811c9fbcec7225
1  node_modules/utils
@@ -0,0 +1 @@
+Subproject commit 9517968bcbb0908f105cf3b3da6d068d5cff5e4d
View
24 src/flowon.coffee
@@ -1,19 +1,19 @@
-require.paths.unshift __dirname, __dirname + '/../lib/'
# libraries
-require '../lib/utils/utils'
+require '../node_modules/utils/utils'
EJS = require('ejs/ejs').EJS
# modules
-Router = require('modules/router').Router
-HttpRequest = require('modules/httprequest').HttpRequest
-HttpResponse = require('modules/httpresponse').HttpResponse
-Template = require('modules/template').Template
-global.Cache = require('modules/cache').Cache
-global.Form = require('modules/form.js').Form
-global.Model = require('modules/model').Model
-global.Controller = require('modules/controller.coffee').Controller
-global.ApiController = require('modules/apicontroller.coffee').Controller
+Router = require('./modules/router').Router
+HttpRequest = require('./modules/httprequest').HttpRequest
+HttpResponse = require('./modules/httpresponse').HttpResponse
+Template = require('./modules/template').Template
+global.Cache = require('./modules/cache').Cache
+global.Form = require('./modules/form.js').Form
+global.Model = require('./modules/model').Model
+global.Controller = require('./modules/controller.coffee').Controller
+global.ApiController = require('./modules/apicontroller.coffee').Controller
+global.MongoDBDriver = require('node-mongodb-native');
HTTP = require 'http'
URL = require 'url'
@@ -61,7 +61,7 @@ global.app =
_loadSessionModel: ->
if @db isnt undefined
if global.Session is undefined
- require 'modules/models/session'
+ require './modules/models/session'
console.info '-- Info: Using the built-in session model.'
else
console.info '-- Info: Using a custom session model.'
View
8 src/modules/controller.coffee
@@ -1,6 +1,6 @@
Path = require 'path'
-Template = require('modules/template').Template
+Template = require('./template').Template
module.exports.Controller = Controller = Function.inherit (request, response, route) ->
@_request = request
@@ -97,7 +97,7 @@ Controller::link = (ncv, params, abs) ->
if arguments.length is 2 and typeof arguments[1] is 'boolean'
abs = arguments[1]
params = undefined
-
+
ncv = ncv.split ':'
len = ncv.length
pathname = app.router.resolve
@@ -122,7 +122,7 @@ Controller::terminate = (status, message) ->
@_response.status = status
else
message = arguments[0]
-
+
return do @_response.end unless message
@_terminateWithMessage message
@@ -159,4 +159,4 @@ Controller::render = (status) ->
if err
err.message = "Rendering error: #{err.message}"
return @terminate 503, err
- @_finishRendering body
Please sign in to comment.
Something went wrong with that request. Please try again.