Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added time and asynchronous before and after

  • Loading branch information...
commit f41fb9608b7a76bce55612d8275f351f43d41f62 1 parent 994d7ea
@masylum authored
Showing with 19,254 additions and 243 deletions.
  1. +1 −1  Makefile
  2. +113 −101 Readme.md
  3. +10 −10 lib/helpers/call.js
  4. +173 −113 lib/testosterone.js
  5. +1 −0  node_modules/.bin/express
  6. +19 −0 node_modules/colors/MIT-LICENSE.txt
  7. +30 −0 node_modules/colors/ReadMe.md
  8. +191 −0 node_modules/colors/colors.js
  9. +20 −0 node_modules/colors/example.html
  10. +7 −0 node_modules/colors/example.js
  11. +14 −0 node_modules/colors/package.json
  12. +7 −0 node_modules/express/.npmignore
  13. +719 −0 node_modules/express/History.md
  14. +22 −0 node_modules/express/LICENSE
  15. +35 −0 node_modules/express/Makefile
  16. +143 −0 node_modules/express/Readme.md
  17. +417 −0 node_modules/express/bin/express
  18. +2 −0  node_modules/express/index.js
  19. +79 −0 node_modules/express/lib/express.js
  20. +544 −0 node_modules/express/lib/http.js
  21. +52 −0 node_modules/express/lib/https.js
  22. +309 −0 node_modules/express/lib/request.js
  23. +462 −0 node_modules/express/lib/response.js
  24. +53 −0 node_modules/express/lib/router/collection.js
  25. +384 −0 node_modules/express/lib/router/index.js
  26. +70 −0 node_modules/express/lib/router/methods.js
  27. +90 −0 node_modules/express/lib/router/route.js
  28. +139 −0 node_modules/express/lib/utils.js
  29. +459 −0 node_modules/express/lib/view.js
  30. +40 −0 node_modules/express/lib/view/partial.js
  31. +209 −0 node_modules/express/lib/view/view.js
  32. +11 −0 node_modules/express/node_modules/connect/.npmignore
  33. +24 −0 node_modules/express/node_modules/connect/LICENSE
  34. +2 −0  node_modules/express/node_modules/connect/index.js
  35. +106 −0 node_modules/express/node_modules/connect/lib/connect.js
  36. +212 −0 node_modules/express/node_modules/connect/lib/http.js
  37. +47 −0 node_modules/express/node_modules/connect/lib/https.js
  38. +45 −0 node_modules/express/node_modules/connect/lib/index.js
  39. +93 −0 node_modules/express/node_modules/connect/lib/middleware/basicAuth.js
  40. +92 −0 node_modules/express/node_modules/connect/lib/middleware/bodyParser.js
  41. +163 −0 node_modules/express/node_modules/connect/lib/middleware/compiler.js
  42. +46 −0 node_modules/express/node_modules/connect/lib/middleware/cookieParser.js
  43. +105 −0 node_modules/express/node_modules/connect/lib/middleware/csrf.js
  44. +218 −0 node_modules/express/node_modules/connect/lib/middleware/directory.js
  45. +100 −0 node_modules/express/node_modules/connect/lib/middleware/errorHandler.js
  46. +76 −0 node_modules/express/node_modules/connect/lib/middleware/favicon.js
  47. +78 −0 node_modules/express/node_modules/connect/lib/middleware/limit.js
  48. +285 −0 node_modules/express/node_modules/connect/lib/middleware/logger.js
  49. +38 −0 node_modules/express/node_modules/connect/lib/middleware/methodOverride.js
  50. +100 −0 node_modules/express/node_modules/connect/lib/middleware/profiler.js
  51. +40 −0 node_modules/express/node_modules/connect/lib/middleware/query.js
  52. +34 −0 node_modules/express/node_modules/connect/lib/middleware/responseTime.js
  53. +379 −0 node_modules/express/node_modules/connect/lib/middleware/router.js
  54. +346 −0 node_modules/express/node_modules/connect/lib/middleware/session.js
  55. +126 −0 node_modules/express/node_modules/connect/lib/middleware/session/cookie.js
  56. +131 −0 node_modules/express/node_modules/connect/lib/middleware/session/memory.js
  57. +137 −0 node_modules/express/node_modules/connect/lib/middleware/session/session.js
  58. +59 −0 node_modules/express/node_modules/connect/lib/middleware/session/store.js
  59. +212 −0 node_modules/express/node_modules/connect/lib/middleware/static.js
  60. +44 −0 node_modules/express/node_modules/connect/lib/middleware/vhost.js
  61. +51 −0 node_modules/express/node_modules/connect/lib/patch.js
  62. +75 −0 node_modules/express/node_modules/connect/lib/public/directory.html
  63. +13 −0 node_modules/express/node_modules/connect/lib/public/error.html
  64. BIN  node_modules/express/node_modules/connect/lib/public/favicon.ico
  65. BIN  node_modules/express/node_modules/connect/lib/public/icons/page.png
  66. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_add.png
  67. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_attach.png
  68. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_code.png
  69. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_copy.png
  70. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_delete.png
  71. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_edit.png
  72. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_error.png
  73. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_excel.png
  74. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_find.png
  75. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_gear.png
  76. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_go.png
  77. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_green.png
  78. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_key.png
  79. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_lightning.png
  80. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_link.png
  81. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_paintbrush.png
  82. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_paste.png
  83. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_red.png
  84. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_refresh.png
  85. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_save.png
  86. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white.png
  87. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_acrobat.png
  88. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_actionscript.png
  89. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_add.png
  90. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_c.png
  91. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_camera.png
  92. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_cd.png
  93. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_code.png
  94. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_code_red.png
  95. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_coldfusion.png
  96. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_compressed.png
  97. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_copy.png
  98. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_cplusplus.png
  99. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_csharp.png
  100. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_cup.png
  101. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_database.png
  102. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_delete.png
  103. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_dvd.png
  104. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_edit.png
  105. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_error.png
  106. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_excel.png
  107. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_find.png
  108. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_flash.png
  109. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_freehand.png
  110. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_gear.png
  111. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_get.png
  112. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_go.png
  113. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_h.png
  114. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_horizontal.png
  115. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_key.png
  116. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_lightning.png
  117. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_link.png
  118. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_magnify.png
  119. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_medal.png
  120. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_office.png
  121. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_paint.png
  122. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_paintbrush.png
  123. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_paste.png
  124. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_php.png
  125. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_picture.png
  126. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_powerpoint.png
  127. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_put.png
  128. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_ruby.png
  129. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_stack.png
  130. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_star.png
  131. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_swoosh.png
  132. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_text.png
  133. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_text_width.png
  134. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_tux.png
  135. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_vector.png
  136. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_visualstudio.png
  137. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_width.png
  138. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_word.png
  139. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_world.png
  140. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_wrench.png
  141. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_zip.png
  142. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_word.png
  143. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_world.png
  144. +141 −0 node_modules/express/node_modules/connect/lib/public/style.css
  145. +427 −0 node_modules/express/node_modules/connect/lib/utils.js
  146. +1 −0  node_modules/express/node_modules/connect/meta.json
  147. +24 −0 node_modules/express/node_modules/connect/package.json
  148. +20 −0 node_modules/express/node_modules/connect/test.js
  149. +19 −0 node_modules/express/node_modules/mime/LICENSE
  150. +54 −0 node_modules/express/node_modules/mime/README.md
  151. +1 −0  node_modules/express/node_modules/mime/index.js
  152. +89 −0 node_modules/express/node_modules/mime/mime.js
  153. +1,479 −0 node_modules/express/node_modules/mime/mime.types
  154. +7 −0 node_modules/express/node_modules/mime/node.types
  155. +11 −0 node_modules/express/node_modules/mime/package.json
  156. +74 −0 node_modules/express/node_modules/mime/test.js
  157. +6 −0 node_modules/express/node_modules/qs/.gitmodules
  158. +46 −0 node_modules/express/node_modules/qs/History.md
  159. +7 −0 node_modules/express/node_modules/qs/Makefile
  160. +49 −0 node_modules/express/node_modules/qs/Readme.md
  161. +17 −0 node_modules/express/node_modules/qs/benchmark.js
  162. +48 −0 node_modules/express/node_modules/qs/examples.js
  163. +2 −0  node_modules/express/node_modules/qs/index.js
  164. +227 −0 node_modules/express/node_modules/qs/lib/querystring.js
  165. +9 −0 node_modules/express/node_modules/qs/package.json
  166. +3 −0  node_modules/express/node_modules/qs/support/expresso/.gitignore
  167. +3 −0  node_modules/express/node_modules/qs/support/expresso/.gitmodules
  168. +128 −0 node_modules/express/node_modules/qs/support/expresso/History.md
  169. +53 −0 node_modules/express/node_modules/qs/support/expresso/Makefile
  170. +61 −0 node_modules/express/node_modules/qs/support/expresso/Readme.md
  171. +856 −0 node_modules/express/node_modules/qs/support/expresso/bin/expresso
  172. +1,080 −0 node_modules/express/node_modules/qs/support/expresso/docs/api.html
  173. +377 −0 node_modules/express/node_modules/qs/support/expresso/docs/index.html
  174. +290 −0 node_modules/express/node_modules/qs/support/expresso/docs/index.md
  175. +3 −0  node_modules/express/node_modules/qs/support/expresso/docs/layout/foot.html
  176. +42 −0 node_modules/express/node_modules/qs/support/expresso/docs/layout/head.html
  177. +4 −0 node_modules/express/node_modules/qs/support/expresso/lib/bar.js
  178. +16 −0 node_modules/express/node_modules/qs/support/expresso/lib/foo.js
  179. +12 −0 node_modules/express/node_modules/qs/support/expresso/package.json
  180. +91 −0 node_modules/express/node_modules/qs/support/expresso/test/assert.test.js
  181. +12 −0 node_modules/express/node_modules/qs/support/expresso/test/async.test.js
  182. +13 −0 node_modules/express/node_modules/qs/support/expresso/test/bar.test.js
  183. +14 −0 node_modules/express/node_modules/qs/support/expresso/test/foo.test.js
  184. +146 −0 node_modules/express/node_modules/qs/support/expresso/test/http.test.js
  185. +39 −0 node_modules/express/node_modules/qs/support/expresso/test/serial/async.test.js
  186. +48 −0 node_modules/express/node_modules/qs/support/expresso/test/serial/http.test.js
  187. +3 −0  node_modules/express/node_modules/qs/support/should/.gitmodules
  188. +22 −0 node_modules/express/node_modules/qs/support/should/History.md
  189. +6 −0 node_modules/express/node_modules/qs/support/should/Makefile
  190. +248 −0 node_modules/express/node_modules/qs/support/should/Readme.md
  191. +53 −0 node_modules/express/node_modules/qs/support/should/examples/runner.js
  192. +2 −0  node_modules/express/node_modules/qs/support/should/index.js
  193. +91 −0 node_modules/express/node_modules/qs/support/should/lib/eql.js
  194. +548 −0 node_modules/express/node_modules/qs/support/should/lib/should.js
  195. +8 −0 node_modules/express/node_modules/qs/support/should/package.json
  196. +358 −0 node_modules/express/node_modules/qs/support/should/test/should.test.js
  197. +141 −0 node_modules/express/node_modules/qs/test/parse.test.js
  198. +95 −0 node_modules/express/node_modules/qs/test/stringify.test.js
  199. +38 −0 node_modules/express/package.json
  200. +4 −0 node_modules/gently/Makefile
  201. +167 −0 node_modules/gently/Readme.md
  202. +22 −0 node_modules/gently/example/dog.js
  203. +11 −0 node_modules/gently/example/event_emitter.js
  204. +1 −0  node_modules/gently/index.js
  205. +168 −0 node_modules/gently/lib/gently/gently.js
  206. +1 −0  node_modules/gently/lib/gently/index.js
  207. +13 −0 node_modules/gently/package.json
  208. +8 −0 node_modules/gently/test/common.js
  209. +336 −0 node_modules/gently/test/simple/test-gently.js
  210. +3 −0  node_modules/underscore/.npmignore
  211. +22 −0 node_modules/underscore/LICENSE
  212. +19 −0 node_modules/underscore/README
  213. +1,608 −0 node_modules/underscore/index.html
  214. +1 −0  node_modules/underscore/index.js
  215. +12 −0 node_modules/underscore/package.json
  216. +27 −0 node_modules/underscore/underscore-min.js
  217. +839 −0 node_modules/underscore/underscore.js
  218. +8 −1 package.json
  219. +2 −2 tests/{test.js → api.js}
  220. +3 −2 tests/app.js
  221. +4 −4 tests/serial.js
  222. +4 −4 tests/stubs.js
  223. +7 −5 tests/sync.js
View
2  Makefile
@@ -6,7 +6,7 @@ test_app:
@$(NODE) tests/app.js
test_api:
- @$(NODE) tests/test.js
+ @$(NODE) tests/api.js
test_serial:
@$(NODE) tests/serial.js
View
214 Readme.md
@@ -2,8 +2,6 @@
Virile testing for http servers or any nodejs application.
-Testosterone is built on nodejs but it allows you to test any http server.
-
## Installation
`npm install testosterone`
@@ -17,22 +15,28 @@ the same testing library.
## Options
-- `host` _(localhost)_ : Host to do the http calls.
-- `port` _(80)_ : Host to do the http calls.
-- `quiet` _(false)_ : Ninja mode.
-- `title` _(Testosterone)_ : Test title, it will be printed out.
-- `sync` _(false)_ : If set to true, you don't need to call `done` to specify when your tests are done.
+ * `host`: Host to do the http calls. *localhost*
+ * `port`: Port to do the http calls. *80*
+ * `output`: Configure the amount of verbosity you want for your tests
+ * `specs`: Print the specs *true*
+ * `ticks`: Print the ✓ and ✗ ticks *true*
+ * `summary`: Prints the summary *true*
+ * `title`: Prints the title *true*
+ * `title`: Test title, it will be printed out. *Testosterone*
+ * `sync`: If set to `true`, you don't need to call `done` to specify when your tests are done. *false*
## API
-_testosterone_ is simple and flexible.
+_testosterone_ API is simple and flexible.
- `get|post|head|put|delete...(url, req, response, cb)`: Does a http call with the given request. If a response is given, testosterone will assert that the real response matches.
-- `add(spec, function(done))`: Adds a test. The test is considered executed when `done` function is called. You can use `done` to curry a function.
-- `before(function)`: Listener for fired events before a test runs.
-- `after(function)`: Listener for fired events after a test runs.
-- `run(cb)`: Runs the tests in serial. `cb` will be called once all the tests are executed.
-- `assert`: Using this assert object instead of the native one will allow you to count and print the assertions.
+- `add(spec, function(done))`: Adds a test. The test is considered executed when `done` function is called.
+- `before(function)`: Runs before each test.
+- `after(function)`: Runs after each test.
+- `run([cb])`: Runs the tests in serial. `cb` will be called once all the tests are executed.
+- `assert`: You **must** use this assert object instead of the native one.
+
+All the functions are chainable.
## Show me the code
@@ -40,133 +44,141 @@ You have more examples on the `test` folder:
### HTTP testing example:
- var testosterone = require('testosterone')({post: 3000}),
- assert = testosterone.assert;
+``` javascript
+var testosterone = require('testosterone')({port: 3000})
+ , assert = testosterone.assert;
- testosterone
- .get('/', function (res) {
- assert.equal(res.statusCode, 200)
- })
+testosterone
+ .get('/', function (res) {
+ assert.equal(res.statusCode, 200)
+ })
- .get('/hi', function (res) {
- assert.equal(res.statusCode, 500);
- assert.equal(res.body, 'use post instead');
- })
+ .get('/hi', function (res) {
+ assert.equal(res.statusCode, 500);
+ assert.equal(res.body, 'use post instead');
+ })
- .post('/hi', {data: {message: 'hola'}}, {
- status: 200,
- body: 'hola'
- });
+ .post('/hi', {data: {message: 'hola'}}, {
+ status: 200
+ , body: 'hola'
+ });
- // Output
+// Output
- $ node test.js
+$ node test.js
- ✿ Testosterone : ✓ ✓ ✓ ✓ ✓
- » 3 responses, 5 asserts
+✿ Testosterone : ✓ ✓ ✓ ✓ ✓
+» 3 responses, 5 asserts
+```
### Asynchronous example:
- var testosterone = require('testosterone')({post: 3000, title: 'Testing async'}),
- gently = new (require('gently')),
- assert = testosterone.assert;
+``` javascript
+var testosterone = require('testosterone')({post: 3000, title: 'Testing async'})
+ , assert = testosterone.assert;
- testosterone
+testosterone
- .before(function () {
- console.log('test about to run!');
- })
+ .before(function () {
+ console.log('test about to run!');
+ })
- // using done to tell testosterone when the test is done
- .add('First test', function (done) {
- setTimeout(function () {
- assert.ok(true);
- done();
- }, 999);
- })
+ // using done to tell testosterone when the test is done
+ .add('First test', function (done) {
+ setTimeout(function () {
+ assert.ok(true);
+ done();
+ }, 999);
+ })
- // same but currying
- .add('Second test', function (spec) {
- assert.ok(true);
+ // same but currying
+ .add('Second test', function (spec) {
+ assert.ok(true);
- setTimeout(done(function () {
- assert.ok(true);
- }), 10);
- })
+ setTimeout(done(function () {
+ assert.ok(true);
+ }), 10);
+ })
- .run(function () {
- require('sys').print('All tests passed!');
- });
+ .run(function () {
+ require('sys').print('All tests passed!');
+ });
- // Output
+// Output
- $ node test.js
+$ node test.js
- ✿ Testing async :
+✿ Testing async :
- First test => ✓
- Second test => ✓ ✓
+First test =>
+Second test => ✓ ✓
- » 0 responses, 3 asserts
+» 0 responses, 3 asserts
+```
### Example with [gently](https://github.com/felixge/node-gently.git) stubbing and `sync: true`:
- var testosterone = require('testosterone')({post: 3000, title: 'Testing with stubs', sync: true}),
- gently = new (require('gently')),
- fs = require('fs'),
- assert = testosterone.assert;
+``` javascript
+var testosterone = require('testosterone')({post: 3000, title: 'Testing with stubs', sync: true})
+ , gently = new (require('gently'))
+ , fs = require('fs')
+ , assert = testosterone.assert;
- testosterone
- .add('GIVEN foo.txt \nWHEN its empty \nTHEN it return null', function (spec) {
- gently.expect(fs, 'readFile', function (path, encoding, cb) {
- assert.equal(path, 'foo.txt');
- cb(null, null);
- });
+testosterone
+ .add('GIVEN foo.txt \nWHEN its empty \nTHEN it return null', function (spec) {
+ gently.expect(fs, 'readFile', function (path, encoding, cb) {
+ assert.equal(path, 'foo.txt');
+ cb(null, null);
+ });
- fs.readFile('foo.txt', 'utf-8', function (er, data) {
- assert.equal(er, null);
- assert.equal(data, null);
- });
- })
+ fs.readFile('foo.txt', 'utf-8', function (er, data) {
+ assert.equal(er, null);
+ assert.equal(data, null);
+ });
+ })
- .add('GIVEN foo.txt \nWHEN it have content \nTHEN it return that content', function (spec) {
- gently.expect(fs, 'readFile', function (path, encoding, cb) {
- assert.equal(path, 'foo.txt');
- cb(null, 'foo');
- });
+ .add('GIVEN foo.txt \nWHEN it have content \nTHEN it return that content', function (spec) {
+ gently.expect(fs, 'readFile', function (path, encoding, cb) {
+ assert.equal(path, 'foo.txt');
+ cb(null, 'foo');
+ });
- fs.readFile('foo.txt', 'utf-8', function (er, data) {
- assert.equal(er, null);
- assert.equal(data, 'foo');
- });
- })
+ fs.readFile('foo.txt', 'utf-8', function (er, data) {
+ assert.equal(er, null);
+ assert.equal(data, 'foo');
+ });
+ })
- .run(function () {
- require('sys').print('done!');
- });
+ .run(function () {
+ require('sys').print('done!');
+ });
- // Output
+// Output
- $ node test.js
+$ node test.js
- ✿ Testing with stubs :
+✿ Testing with stubs :
- GIVEN foo.txt
- WHEN its empty
- THEN it return null => ✓ ✓ ✓
+GIVEN foo.txt
+WHEN its empty
+THEN it return null => ✓ ✓ ✓
- GIVEN foo.txt
- WHEN it have content
- THEN it return that content => ✓ ✓ ✓
+GIVEN foo.txt
+WHEN it have content
+THEN it return that content => ✓ ✓ ✓
- » 0 responses, 6 asserts
+» 6 asserts
+```
## Test
In order to run the tests type:
- make test_app
- make
+``` bash
+npm install
+make test_app
+make
+```
## Credits
View
20 lib/helpers/call.js
@@ -1,6 +1,7 @@
var _sys = require('sys');
-module.exports = function call(_client, _assert, _test, _done_responses) {
+module.exports = function call(_client, _assert, _test, _responses) {
+
/**
* Does an http call
*
@@ -18,7 +19,6 @@ module.exports = function call(_client, _assert, _test, _done_responses) {
* @returns
* undefined
*/
-
return function call(req, res, cb) {
// Callback as third or fourth arg
@@ -31,13 +31,13 @@ module.exports = function call(_client, _assert, _test, _done_responses) {
}
// Issue request
- var timer,
- method = req.method || 'GET',
- status = res.status || res.statusCode,
- data = req.data || req.body,
- requestTimeout = req.timeout || 0,
- headers = req.headers || {},
- request;
+ var timer
+ , method = req.method || 'GET'
+ , status = res.status || res.statusCode
+ , data = req.data || req.body
+ , requestTimeout = req.timeout || 0
+ , headers = req.headers || {}
+ , request;
if (data && typeof data === 'object') {
data = require('querystring').stringify(data);
@@ -126,7 +126,7 @@ module.exports = function call(_client, _assert, _test, _done_responses) {
// Callback
cb(response);
- _done_responses += 1;
+ _responses.done += 1;
_test();
});
});
View
286 lib/testosterone.js
@@ -3,88 +3,110 @@
* Copyright(c) 2011 Pau Ramon <masylum@gmail.com>
* MIT Licensed
*/
-module.exports = function (config) {
- require('colors');
+require('colors');
- var _sys = require('sys'),
- _eventEmitter = new (require('events').EventEmitter)(),
+module.exports = function (config) {
- _specs = [],
+ var _util = require('util')
+ , _ = require('underscore')
+ , _specs = []
- _config = config || {},
- _client = require('http').createClient(
- _config.port || 80,
- _config.host || 'localhost'
- ),
+ , _responses = {count: 0, done: 0}
- _count_responses = 0,
- _done_responses = 0,
+ , _count_asserts = 0
+ , _passed_asserts = 0
- _count_asserts = 0,
- _passed_asserts = 0,
+ , _before
+ , _after
+ , _call
+ , _config
+ , _client
+ , _time = Date.now()
- TESTOSTERONE = {},
+ , TESTOSTERONE = {}
- _parseSpec = function (spec) {
- var specs = spec.split('\n').map(function (spec) {
- spec = spec.replace(/(GIVEN|WHEN|AND|THEN)/g, '$1'.magenta + '\033[90m');
- spec = spec.replace(/`([^`]*)`/g, '$1'.blue + '\033[90m');
- return spec;
- });
- return '\033[90m' + specs.join('\n');
- },
+ , _assert = (function () {
+ var new_assert = {};
- _assert = (function () {
- var assert = require('assert'),
- functions = Object.keys(assert),
- a = {};
-
- functions.forEach(function (fn) {
+ Object.keys(require('assert')).forEach(function (fn) {
if (typeof require('assert')[fn] === 'function') {
- a[fn] = function (_) {
+ new_assert[fn] = function (_) {
_count_asserts += 1;
+
try {
- require('assert')[fn].apply(this, Array.prototype.slice.call(arguments, 0));
+ require('assert')[fn].apply(this, [].slice.call(arguments, 0));
} catch (exc) {
- _sys.print(('\n✗ => ' + exc.stack + '\n').red);
+ console.error(('\n✗ => ' + exc.stack + '\n').red);
process.exit();
}
_passed_asserts += 1;
- _sys.print(''.green);
+ _util.print(''.green);
};
}
});
- return a;
- }()),
-
- /**
- * Tests if all the requests are done and prints a message
- *
- * @private
- *
- * @returns
- * undefined
- */
-
- _test = function () {
- if (_count_responses === _done_responses) {
- if (!_config.quiet) {
- if (_count_responses > 0) {
- _sys.print(('\n\n» ' + _done_responses + ' responses, ' + _passed_asserts + ' asserts\n\n').yellow);
- } else {
- _sys.print(('\n\n» ' + _passed_asserts + ' asserts\n\n').yellow);
- }
- } else {
- _sys.print('\n\n');
- }
- process.exit();
+ return new_assert;
+ }());
+
+ /**
+ * Tests if all the requests are done and prints a message
+ *
+ * @private
+ */
+ function _test() {
+ if (_responses.count === _responses.done) {
+ if (!_config.output.specs) {
+ console.log('');
+ }
+ if (_config.output.summary) {
+ if (_responses.count > 0) {
+ console.log(('» ' + _responses.done + ' responses, ' + _passed_asserts
+ + ' asserts, ' + ((Date.now() - _time) / 1000).toFixed(2) + 's').yellow);
+ } else {
+ console.log(('» ' + _passed_asserts + ' asserts, ' + ((Date.now() - _time) / 1000).toFixed(2) + 's').yellow);
}
- },
+ }
+ }
+ }
+
+ /**
+ * Colorizes the output of the specs if the `verbose` options is selected
+ *
+ * @private
+ */
+ function _parseSpec(spec) {
+ var specs = spec.split('\n').map(function (spec) {
+ spec = spec.replace(/(GIVEN|WHEN|AND|THEN)/g, '$1'.magenta + '\033[90m');
+ spec = spec.replace(/`([^`]*)`/g, '$1'.blue + '\033[90m');
+ return spec;
+ });
+ return '\033[90m' + specs.join('\n');
+ }
+
+ // defaults
+ _config = _.extend({
+ port: 80
+ , host: 'localhost'
+ , title: 'Testosterone'
+ , sync: false
+ }, config);
+
+ // defaults
+ _config.output = _.extend({
+ specs: true
+ , ticks: true
+ , summary: true
+ , title: true
+ }, config.output);
- _call = require('./helpers/call')(_client, _assert, _test, _done_responses);
+ _client = require('http').createClient(_config.port, _config.host);
+ _call = require('./helpers/call')(_client, _assert, _test, _responses);
+
+ if (_config.output.title) {
+ console.log(('' + (_config.title) + ' :').inverse.yellow + ' ');
+ }
- _config.sync = _config.sync || false;
+ TESTOSTERONE.assert = _assert;
/**
* Does a testable http call
@@ -99,12 +121,12 @@ module.exports = function (config) {
* Callback that will be called after the http call. Receives the http response object.
*
* @returns
- * Testosterone, so you can chain http calls.
+ * Testosterone
*/
['get', 'post', 'head', 'put', 'delete', 'trace', 'options', 'connect'].forEach(function (http_method) {
// refactor this a little bit
TESTOSTERONE[http_method] = function (route, req, res, cb) {
- _count_responses += 1;
+ _responses.count += 1;
if (typeof req === 'function') {
cb = req;
res = {};
@@ -120,30 +142,38 @@ module.exports = function (config) {
});
/**
- * Listens for a `beforeTest` of `afterTest` event
+ * Hook triggered before each test
*
- * @param {Function} [listener]
+ * @param {Function} listener
*
* @returns
* Testosterone
*/
- ['before', 'after'].forEach(function (event) {
- TESTOSTERONE[event] = function (listener) {
- _eventEmitter.on(event + 'Test', listener);
- return TESTOSTERONE;
- };
- });
+ TESTOSTERONE.before = function (callback) {
+ _before = callback;
+ return TESTOSTERONE;
+ };
/**
- * Adds a function to be called
+ * Hook triggered after each test
*
- * @see #serial
+ * @param {Function} listener
+ *
+ * @returns
+ * Testosterone
+ */
+ TESTOSTERONE.after = function (callback) {
+ _after = callback;
+ return TESTOSTERONE;
+ };
+
+ /**
+ * Adds a function to be called
*
- * @param {String} [spec='']
+ * @param {String} spec
* Specification. Will be printer once `done` is called.
- * @param {Function} [done=undefined]
- * This function prints the spec and also tracks if the test is done.
- * This allows to work with asyncronous tests.
+ * @param {Function} body
+ * The body of the spec
*
* @returns
* Testosterone
@@ -156,60 +186,90 @@ module.exports = function (config) {
/**
* Runs all the added tests in serial.
*
- * @see #add
- *
- * @param {Function} [cb=undefined]
- * Callback that is run after all the `done` callbacks are run.
+ * @param {Function} cb
+ * Optional callback that is run after all the `done` callbacks are run.
*
* @returns
* Testosterone
*/
- TESTOSTERONE.serial = TESTOSTERONE.run = function (cb) {
- cb = cb || function () {};
+ TESTOSTERONE.run = function (cb) {
+ var next, after, runTest;
- (function next() {
- if (_specs.length > 0) {
+ cb = cb || function () {}; // noop
+
+ next = function next() {
+ if (_specs.length) {
var spec = _specs.shift();
- if (!_config.quiet) {
- _sys.print('\n\n' + _parseSpec(spec.spec) + ' => '.yellow);
- }
+ if (_config.output.specs) {
+ _util.print(_parseSpec(spec.spec).yellow);
- _eventEmitter.emit('beforeTest');
+ if (_config.output.ticks) {
+ _util.print(' => '.yellow);
+ }
+ }
- if (_config.sync) {
- spec.body.call(spec.body);
- _eventEmitter.emit('afterTest');
- next();
+ // run before
+ if (_before) {
+ if (_before.length) {
+ _before(function () {
+ runTest(spec);
+ });
+ } else {
+ _before();
+ runTest(spec);
+ }
} else {
- spec.body.call(spec.body, function done(fn) {
- // curry
- if (fn) {
- return function () {
- fn.apply(fn, arguments);
- _eventEmitter.emit('afterTest');
- next();
- };
- } else {
- _eventEmitter.emit('afterTest');
- next();
- }
- });
+ runTest(spec);
}
+
} else {
- cb.call(cb, arguments);
_test();
+ cb.call(cb, arguments);
}
- }());
+ };
- return TESTOSTERONE;
- };
+ after = function after() {
+ if (_config.output.specs) {
+ console.log('\n');
+ }
- TESTOSTERONE.assert = _assert;
+ // run after
+ if (_after) {
+ if (_after.length) {
+ _after(next);
+ } else {
+ _after();
+ next();
+ }
+ } else {
+ next();
+ }
+ };
- if (!_config.quiet) {
- _sys.print(('' + (_config.title || 'Testosterone') + ' :').inverse.yellow + ' ');
- }
+ runTest = function runTest(spec) {
+ if (_config.sync) {
+ spec.body.call(spec.body);
+ after();
+ } else {
+ spec.body.call(spec.body, function done(fn) {
+ // curry
+ if (fn) {
+ return function () {
+ fn.apply(fn, arguments);
+ after();
+ };
+ } else {
+ after();
+ }
+ });
+ }
+ };
+
+ next();
+
+ return TESTOSTERONE;
+ };
return TESTOSTERONE;
};
View
1  node_modules/.bin/express
View
19 node_modules/colors/MIT-LICENSE.txt
@@ -0,0 +1,19 @@
+Copyright (c) 2010 Alexis Sellier (cloudhead) , Marak Squires
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
View
30 node_modules/colors/ReadMe.md
@@ -0,0 +1,30 @@
+<h1>colors.js - get color and style in your node.js console like what</h1>
+
+<img src="http://i.imgur.com/goJdO.png" border = "0"/>
+
+ var sys = require('sys');
+ var colors = require('./colors');
+
+ sys.puts('hello'.green); // outputs green text
+ sys.puts('i like cake and pies'.underline.red) // outputs red underlined text
+ sys.puts('inverse the color'.inverse); // inverses the color
+ sys.puts('OMG Rainbows!'.rainbow); // rainbow (ignores spaces)
+
+<h2>colors and styles!</h2>
+- bold
+- italic
+- underline
+- inverse
+- yellow
+- cyan
+- white
+- magenta
+- green
+- red
+- grey
+- blue
+
+
+### Authors
+
+#### Alexis Sellier (cloudhead) , Marak Squires , Justin Campbell, Dustin Diaz (@ded)
View
191 node_modules/colors/colors.js
@@ -0,0 +1,191 @@
+/*
+colors.js
+
+Copyright (c) 2010 Alexis Sellier (cloudhead) , Marak Squires
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+*/
+
+// prototypes the string object to have additional method calls that add terminal colors
+var isHeadless = (typeof module !== 'undefined');
+['bold', 'underline', 'italic', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta'].forEach(function (style) {
+
+ // __defineGetter__ at the least works in more browsers
+ // http://robertnyman.com/javascript/javascript-getters-setters.html
+ // Object.defineProperty only works in Chrome
+ String.prototype.__defineGetter__(style, function () {
+ return isHeadless ?
+ stylize(this, style) : // for those running in node (headless environments)
+ this.replace(/( )/, '$1'); // and for those running in browsers:
+ // re: ^ you'd think 'return this' works (but doesn't) so replace coerces the string to be a real string
+ });
+});
+
+// prototypes string with method "rainbow"
+// rainbow will apply a the color spectrum to a string, changing colors every letter
+String.prototype.__defineGetter__('rainbow', function () {
+ if (!isHeadless) {
+ return this.replace(/( )/, '$1');
+ }
+ var rainbowcolors = ['red','yellow','green','blue','magenta']; //RoY G BiV
+ var exploded = this.split("");
+ var i=0;
+ exploded = exploded.map(function(letter) {
+ if (letter==" ") {
+ return letter;
+ }
+ else {
+ return stylize(letter,rainbowcolors[i++ % rainbowcolors.length]);
+ }
+ });
+ return exploded.join("");
+});
+
+function stylize(str, style) {
+ var styles = {
+ //styles
+ 'bold' : [1, 22],
+ 'italic' : [3, 23],
+ 'underline' : [4, 24],
+ 'inverse' : [7, 27],
+ //grayscale
+ 'white' : [37, 39],
+ 'grey' : [90, 39],
+ 'black' : [90, 39],
+ //colors
+ 'blue' : [34, 39],
+ 'cyan' : [36, 39],
+ 'green' : [32, 39],
+ 'magenta' : [35, 39],
+ 'red' : [31, 39],
+ 'yellow' : [33, 39]
+ };
+ return '\033[' + styles[style][0] + 'm' + str +
+ '\033[' + styles[style][1] + 'm';
+};
+
+// don't summon zalgo
+String.prototype.__defineGetter__('zalgo', function () {
+ return zalgo(this);
+});
+
+// please no
+function zalgo(text, options) {
+ var soul = {
+ "up" : [
+ '̍','̎','̄','̅',
+ '̿','̑','̆','̐',
+ '͒','͗','͑','̇',
+ '̈','̊','͂','̓',
+ '̈','͊','͋','͌',
+ '̃','̂','̌','͐',
+ '̀','́','̋','̏',
+ '̒','̓','̔','̽',
+ '̉','ͣ','ͤ','ͥ',
+ 'ͦ','ͧ','ͨ','ͩ',
+ 'ͪ','ͫ','ͬ','ͭ',
+ 'ͮ','ͯ','̾','͛',
+ '͆','̚'
+ ],
+ "down" : [
+ '̖','̗','̘','̙',
+ '̜','̝','̞','̟',
+ '̠','̤','̥','̦',
+ '̩','̪','̫','̬',
+ '̭','̮','̯','̰',
+ '̱','̲','̳','̹',
+ '̺','̻','̼','ͅ',
+ '͇','͈','͉','͍',
+ '͎','͓','͔','͕',
+ '͖','͙','͚','̣'
+ ],
+ "mid" : [
+ '̕','̛','̀','́',
+ '͘','̡','̢','̧',
+ '̨','̴','̵','̶',
+ '͜','͝','͞',
+ '͟','͠','͢','̸',
+ '̷','͡',' ҉'
+ ]
+ },
+ all = [].concat(soul.up, soul.down, soul.mid),
+ zalgo = {};
+
+ function randomNumber(range) {
+ r = Math.floor(Math.random()*range);
+ return r;
+ };
+
+ function is_char(character) {
+ var bool = false;
+ all.filter(function(i){
+ bool = (i == character);
+ });
+ return bool;
+ }
+
+ function heComes(text, options){
+ result = '';
+ options = options || {};
+ options["up"] = options["up"] || true;
+ options["mid"] = options["mid"] || true;
+ options["down"] = options["down"] || true;
+ options["size"] = options["size"] || "maxi";
+ var counts;
+ text = text.split('');
+ for(var l in text){
+ if(is_char(l)) { continue; }
+ result = result + text[l];
+
+ counts = {"up" : 0, "down" : 0, "mid" : 0};
+
+ switch(options.size) {
+ case 'mini':
+ counts.up = randomNumber(8);
+ counts.min= randomNumber(2);
+ counts.down = randomNumber(8);
+ break;
+ case 'maxi':
+ counts.up = randomNumber(16) + 3;
+ counts.min = randomNumber(4) + 1;
+ counts.down = randomNumber(64) + 3;
+ break;
+ default:
+ counts.up = randomNumber(8) + 1;
+ counts.mid = randomNumber(6) / 2;
+ counts.down= randomNumber(8) + 1;
+ break;
+ }
+
+ var arr = ["up", "mid", "down"];
+ for(var d in arr){
+ var index = arr[d];
+ for (var i = 0 ; i <= counts[index]; i++)
+ {
+ if(options[index]) {
+ result = result + soul[index][randomNumber(soul[index].length)];
+ }
+ }
+ }
+ }
+ return result;
+ };
+ return heComes(text);
+}
View
20 node_modules/colors/example.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML>
+<html lang="en-us">
+ <head>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+ <title>Colors Example</title>
+ <script src="colors.js"></script>
+ <script type="text/javascript">
+ console.log('Rainbows are fun!'.rainbow);
+ console.log('So '.italic + 'are'.underline + ' styles! '.bold + 'inverse'.inverse);
+ console.log('Chains are also cool.'.bold.italic.underline.red);
+ </script>
+ </head>
+ <body>
+ <script>
+ document.write('Rainbows are fun!'.rainbow + '<br>');
+ document.write('So '.italic + 'are'.underline + ' styles! '.bold + 'inverse'.inverse + '<br>');
+ document.write('Chains are also cool.'.bold.italic.underline.red);
+ </script>
+ </body>
+</html>
View
7 node_modules/colors/example.js
@@ -0,0 +1,7 @@
+var sys = require('sys');
+var colors = require('./colors');
+
+sys.puts('Rainbows are fun!'.rainbow);
+sys.puts('So '.italic + 'are'.underline + ' styles! '.bold + 'inverse'.inverse); // styles not widely supported
+sys.puts('Chains are also cool.'.bold.italic.underline.red); // styles not widely supported
+// sys.puts('zalgo time!'.zalgo);
View
14 node_modules/colors/package.json
@@ -0,0 +1,14 @@
+{
+ "name": "colors",
+ "description": "get colors in your node.js console like what",
+ "version": "0.5.0",
+ "author": "Marak Squires",
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/Marak/colors.js.git"
+ },
+ "engine": [
+ "node >=0.1.90"
+ ],
+ "main": "colors"
+}
View
7 node_modules/express/.npmignore
@@ -0,0 +1,7 @@
+.git*
+docs/
+examples/
+support/
+test/
+testing.js
+.DS_Store
View
719 node_modules/express/History.md
@@ -0,0 +1,719 @@
+
+2.4.3 / 2011-07-14
+==================
+
+ * Added docs for `status` option special-case. Closes #739
+ * Fixed `options.filename`, exposing the view path to template engines
+
+2.4.2. / 2011-07-06
+==================
+
+ * Revert "removed jsonp stripping" for XSS
+
+2.4.1 / 2011-07-06
+==================
+
+ * Added `res.json()` JSONP support. Closes #737
+ * Added _extending-templates_ example. Closes #730
+ * Added "strict routing" setting for trailing slashes
+ * Added support for multiple envs in `app.configure()` calls. Closes #735
+ * Changed: `res.send()` using `res.json()`
+ * Changed: when cookie `path === null` don't default it
+ * Changed; default cookie path to "home" setting. Closes #731
+ * Removed _pids/logs_ creation from express(1)
+
+2.4.0 / 2011-06-28
+==================
+
+ * Added chainable `res.status(code)`
+ * Added `res.json()`, an explicit version of `res.send(obj)`
+ * Added simple web-service example
+
+2.3.12 / 2011-06-22
+==================
+
+ * \#express is now on freenode! come join!
+ * Added `req.get(field, param)`
+ * Added links to Japanese documentation, thanks @hideyukisaito!
+ * Added; the `express(1)` generated app outputs the env
+ * Added `content-negotiation` example
+ * Dependency: connect >= 1.5.1 < 2.0.0
+ * Fixed view layout bug. Closes #720
+ * Fixed; ignore body on 304. Closes #701
+
+2.3.11 / 2011-06-04
+==================
+
+ * Added `npm test`
+ * Removed generation of dummy test file from `express(1)`
+ * Fixed; `express(1)` adds express as a dep
+ * Fixed; prune on `prepublish`
+
+2.3.10 / 2011-05-27
+==================
+
+ * Added `req.route`, exposing the current route
+ * Added _package.json_ generation support to `express(1)`
+ * Fixed call to `app.param()` function for optional params. Closes #682
+
+2.3.9 / 2011-05-25
+==================
+
+ * Fixed bug-ish with `../' in `res.partial()` calls
+
+2.3.8 / 2011-05-24
+==================
+
+ * Fixed `app.options()`
+
+2.3.7 / 2011-05-23
+==================
+
+ * Added route `Collection`, ex: `app.get('/user/:id').remove();`
+ * Added support for `app.param(fn)` to define param logic
+ * Removed `app.param()` support for callback with return value
+ * Removed module.parent check from express(1) generated app. Closes #670
+ * Refactored router. Closes #639
+
+2.3.6 / 2011-05-20
+==================
+
+ * Changed; using devDependencies instead of git submodules
+ * Fixed redis session example
+ * Fixed markdown example
+ * Fixed view caching, should not be enabled in development
+
+2.3.5 / 2011-05-20
+==================
+
+ * Added export `.view` as alias for `.View`
+
+2.3.4 / 2011-05-08
+==================
+
+ * Added `./examples/say`
+ * Fixed `res.sendfile()` bug preventing the transfer of files with spaces
+
+2.3.3 / 2011-05-03
+==================
+
+ * Added "case sensitive routes" option.
+ * Changed; split methods supported per rfc [slaskis]
+ * Fixed route-specific middleware when using the same callback function several times
+
+2.3.2 / 2011-04-27
+==================
+
+ * Fixed view hints
+
+2.3.1 / 2011-04-26
+==================
+
+ * Added `app.match()` as `app.match.all()`
+ * Added `app.lookup()` as `app.lookup.all()`
+ * Added `app.remove()` for `app.remove.all()`
+ * Added `app.remove.VERB()`
+ * Fixed template caching collision issue. Closes #644
+ * Moved router over from connect and started refactor
+
+2.3.0 / 2011-04-25
+==================
+
+ * Added options support to `res.clearCookie()`
+ * Added `res.helpers()` as alias of `res.locals()`
+ * Added; json defaults to UTF-8 with `res.send()`. Closes #632. [Daniel * Dependency `connect >= 1.4.0`
+ * Changed; auto set Content-Type in res.attachement [Aaron Heckmann]
+ * Renamed "cache views" to "view cache". Closes #628
+ * Fixed caching of views when using several apps. Closes #637
+ * Fixed gotcha invoking `app.param()` callbacks once per route middleware.
+Closes #638
+ * Fixed partial lookup precedence. Closes #631
+Shaw]
+
+2.2.2 / 2011-04-12
+==================
+
+ * Added second callback support for `res.download()` connection errors
+ * Fixed `filename` option passing to template engine
+
+2.2.1 / 2011-04-04
+==================
+
+ * Added `layout(path)` helper to change the layout within a view. Closes #610
+ * Fixed `partial()` collection object support.
+ Previously only anything with `.length` would work.
+ When `.length` is present one must still be aware of holes,
+ however now `{ collection: {foo: 'bar'}}` is valid, exposes
+ `keyInCollection` and `keysInCollection`.
+
+ * Performance improved with better view caching
+ * Removed `request` and `response` locals
+ * Changed; errorHandler page title is now `Express` instead of `Connect`
+
+2.2.0 / 2011-03-30
+==================
+
+ * Added `app.lookup.VERB()`, ex `app.lookup.put('/user/:id')`. Closes #606
+ * Added `app.match.VERB()`, ex `app.match.put('/user/12')`. Closes #606
+ * Added `app.VERB(path)` as alias of `app.lookup.VERB()`.
+ * Dependency `connect >= 1.2.0`
+
+2.1.1 / 2011-03-29
+==================
+
+ * Added; expose `err.view` object when failing to locate a view
+ * Fixed `res.partial()` call `next(err)` when no callback is given [reported by aheckmann]
+ * Fixed; `res.send(undefined)` responds with 204 [aheckmann]
+
+2.1.0 / 2011-03-24
+==================
+
+ * Added `<root>/_?<name>` partial lookup support. Closes #447
+ * Added `request`, `response`, and `app` local variables
+ * Added `settings` local variable, containing the app's settings
+ * Added `req.flash()` exception if `req.session` is not available
+ * Added `res.send(bool)` support (json response)
+ * Fixed stylus example for latest version
+ * Fixed; wrap try/catch around `res.render()`
+
+2.0.0 / 2011-03-17
+==================
+
+ * Fixed up index view path alternative.
+ * Changed; `res.locals()` without object returns the locals
+
+2.0.0rc3 / 2011-03-17
+==================
+
+ * Added `res.locals(obj)` to compliment `res.local(key, val)`
+ * Added `res.partial()` callback support
+ * Fixed recursive error reporting issue in `res.render()`
+
+2.0.0rc2 / 2011-03-17
+==================
+
+ * Changed; `partial()` "locals" are now optional
+ * Fixed `SlowBuffer` support. Closes #584 [reported by tyrda01]
+ * Fixed .filename view engine option [reported by drudge]
+ * Fixed blog example
+ * Fixed `{req,res}.app` reference when mounting [Ben Weaver]
+
+2.0.0rc / 2011-03-14
+==================
+
+ * Fixed; expose `HTTPSServer` constructor
+ * Fixed express(1) default test charset. Closes #579 [reported by secoif]
+ * Fixed; default charset to utf-8 instead of utf8 for lame IE [reported by NickP]
+
+2.0.0beta3 / 2011-03-09
+==================
+
+ * Added support for `res.contentType()` literal
+ The original `res.contentType('.json')`,
+ `res.contentType('application/json')`, and `res.contentType('json')`
+ will work now.
+ * Added `res.render()` status option support back
+ * Added charset option for `res.render()`
+ * Added `.charset` support (via connect 1.0.4)
+ * Added view resolution hints when in development and a lookup fails
+ * Added layout lookup support relative to the page view.
+ For example while rendering `./views/user/index.jade` if you create
+ `./views/user/layout.jade` it will be used in favour of the root layout.
+ * Fixed `res.redirect()`. RFC states absolute url [reported by unlink]
+ * Fixed; default `res.send()` string charset to utf8
+ * Removed `Partial` constructor (not currently used)
+
+2.0.0beta2 / 2011-03-07
+==================
+
+ * Added res.render() `.locals` support back to aid in migration process
+ * Fixed flash example
+
+2.0.0beta / 2011-03-03
+==================
+
+ * Added HTTPS support
+ * Added `res.cookie()` maxAge support
+ * Added `req.header()` _Referrer_ / _Referer_ special-case, either works
+ * Added mount support for `res.redirect()`, now respects the mount-point
+ * Added `union()` util, taking place of `merge(clone())` combo
+ * Added stylus support to express(1) generated app
+ * Added secret to session middleware used in examples and generated app
+ * Added `res.local(name, val)` for progressive view locals
+ * Added default param support to `req.param(name, default)`
+ * Added `app.disabled()` and `app.enabled()`
+ * Added `app.register()` support for omitting leading ".", either works
+ * Added `res.partial()`, using the same interface as `partial()` within a view. Closes #539
+ * Added `app.param()` to map route params to async/sync logic
+ * Added; aliased `app.helpers()` as `app.locals()`. Closes #481
+ * Added extname with no leading "." support to `res.contentType()`
+ * Added `cache views` setting, defaulting to enabled in "production" env
+ * Added index file partial resolution, eg: partial('user') may try _views/user/index.jade_.
+ * Added `req.accepts()` support for extensions
+ * Changed; `res.download()` and `res.sendfile()` now utilize Connect's
+ static file server `connect.static.send()`.
+ * Changed; replaced `connect.utils.mime()` with npm _mime_ module
+ * Changed; allow `req.query` to be pre-defined (via middleware or other parent
+ * Changed view partial resolution, now relative to parent view
+ * Changed view engine signature. no longer `engine.render(str, options, callback)`, now `engine.compile(str, options) -> Function`, the returned function accepts `fn(locals)`.
+ * Fixed `req.param()` bug returning Array.prototype methods. Closes #552
+ * Fixed; using `Stream#pipe()` instead of `sys.pump()` in `res.sendfile()`
+ * Fixed; using _qs_ module instead of _querystring_
+ * Fixed; strip unsafe chars from jsonp callbacks
+ * Removed "stream threshold" setting
+
+1.0.8 / 2011-03-01
+==================
+
+ * Allow `req.query` to be pre-defined (via middleware or other parent app)
+ * "connect": ">= 0.5.0 < 1.0.0". Closes #547
+ * Removed the long deprecated __EXPRESS_ENV__ support
+
+1.0.7 / 2011-02-07
+==================
+
+ * Fixed `render()` setting inheritance.
+ Mounted apps would not inherit "view engine"
+
+1.0.6 / 2011-02-07
+==================
+
+ * Fixed `view engine` setting bug when period is in dirname
+
+1.0.5 / 2011-02-05
+==================
+
+ * Added secret to generated app `session()` call
+
+1.0.4 / 2011-02-05
+==================
+
+ * Added `qs` dependency to _package.json_
+ * Fixed namespaced `require()`s for latest connect support
+
+1.0.3 / 2011-01-13
+==================
+
+ * Remove unsafe characters from JSONP callback names [Ryan Grove]
+
+1.0.2 / 2011-01-10
+==================
+
+ * Removed nested require, using `connect.router`
+
+1.0.1 / 2010-12-29
+==================
+
+ * Fixed for middleware stacked via `createServer()`
+ previously the `foo` middleware passed to `createServer(foo)`
+ would not have access to Express methods such as `res.send()`
+ or props like `req.query` etc.
+
+1.0.0 / 2010-11-16
+==================
+
+ * Added; deduce partial object names from the last segment.
+ For example by default `partial('forum/post', postObject)` will
+ give you the _post_ object, providing a meaningful default.
+ * Added http status code string representation to `res.redirect()` body
+ * Added; `res.redirect()` supporting _text/plain_ and _text/html_ via __Accept__.
+ * Added `req.is()` to aid in content negotiation
+ * Added partial local inheritance [suggested by masylum]. Closes #102
+ providing access to parent template locals.
+ * Added _-s, --session[s]_ flag to express(1) to add session related middleware
+ * Added _--template_ flag to express(1) to specify the
+ template engine to use.
+ * Added _--css_ flag to express(1) to specify the
+ stylesheet engine to use (or just plain css by default).
+ * Added `app.all()` support [thanks aheckmann]
+ * Added partial direct object support.
+ You may now `partial('user', user)` providing the "user" local,
+ vs previously `partial('user', { object: user })`.
+ * Added _route-separation_ example since many people question ways
+ to do this with CommonJS modules. Also view the _blog_ example for
+ an alternative.
+ * Performance; caching view path derived partial object names
+ * Fixed partial local inheritance precedence. [reported by Nick Poulden] Closes #454
+ * Fixed jsonp support; _text/javascript_ as per mailinglist discussion
+
+1.0.0rc4 / 2010-10-14
+==================
+
+ * Added _NODE_ENV_ support, _EXPRESS_ENV_ is deprecated and will be removed in 1.0.0
+ * Added route-middleware support (very helpful, see the [docs](http://expressjs.com/guide.html#Route-Middleware))
+ * Added _jsonp callback_ setting to enable/disable jsonp autowrapping [Dav Glass]
+ * Added callback query check on response.send to autowrap JSON objects for simple webservice implementations [Dav Glass]
+ * Added `partial()` support for array-like collections. Closes #434
+ * Added support for swappable querystring parsers
+ * Added session usage docs. Closes #443
+ * Added dynamic helper caching. Closes #439 [suggested by maritz]
+ * Added authentication example
+ * Added basic Range support to `res.sendfile()` (and `res.download()` etc)
+ * Changed; `express(1)` generated app using 2 spaces instead of 4
+ * Default env to "development" again [aheckmann]
+ * Removed _context_ option is no more, use "scope"
+ * Fixed; exposing _./support_ libs to examples so they can run without installs
+ * Fixed mvc example
+
+1.0.0rc3 / 2010-09-20
+==================
+
+ * Added confirmation for `express(1)` app generation. Closes #391
+ * Added extending of flash formatters via `app.flashFormatters`
+ * Added flash formatter support. Closes #411
+ * Added streaming support to `res.sendfile()` using `sys.pump()` when >= "stream threshold"
+ * Added _stream threshold_ setting for `res.sendfile()`
+ * Added `res.send()` __HEAD__ support
+ * Added `res.clearCookie()`
+ * Added `res.cookie()`
+ * Added `res.render()` headers option
+ * Added `res.redirect()` response bodies
+ * Added `res.render()` status option support. Closes #425 [thanks aheckmann]
+ * Fixed `res.sendfile()` responding with 403 on malicious path
+ * Fixed `res.download()` bug; when an error occurs remove _Content-Disposition_
+ * Fixed; mounted apps settings now inherit from parent app [aheckmann]
+ * Fixed; stripping Content-Length / Content-Type when 204
+ * Fixed `res.send()` 204. Closes #419
+ * Fixed multiple _Set-Cookie_ headers via `res.header()`. Closes #402
+ * Fixed bug messing with error handlers when `listenFD()` is called instead of `listen()`. [thanks guillermo]
+
+
+1.0.0rc2 / 2010-08-17
+==================
+
+ * Added `app.register()` for template engine mapping. Closes #390
+ * Added `res.render()` callback support as second argument (no options)
+ * Added callback support to `res.download()`
+ * Added callback support for `res.sendfile()`
+ * Added support for middleware access via `express.middlewareName()` vs `connect.middlewareName()`
+ * Added "partials" setting to docs
+ * Added default expresso tests to `express(1)` generated app. Closes #384
+ * Fixed `res.sendfile()` error handling, defer via `next()`
+ * Fixed `res.render()` callback when a layout is used [thanks guillermo]
+ * Fixed; `make install` creating ~/.node_libraries when not present
+ * Fixed issue preventing error handlers from being defined anywhere. Closes #387
+
+1.0.0rc / 2010-07-28
+==================
+
+ * Added mounted hook. Closes #369
+ * Added connect dependency to _package.json_
+
+ * Removed "reload views" setting and support code
+ development env never caches, production always caches.
+
+ * Removed _param_ in route callbacks, signature is now
+ simply (req, res, next), previously (req, res, params, next).
+ Use _req.params_ for path captures, _req.query_ for GET params.
+
+ * Fixed "home" setting
+ * Fixed middleware/router precedence issue. Closes #366
+ * Fixed; _configure()_ callbacks called immediately. Closes #368
+
+1.0.0beta2 / 2010-07-23
+==================
+
+ * Added more examples
+ * Added; exporting `Server` constructor
+ * Added `Server#helpers()` for view locals
+ * Added `Server#dynamicHelpers()` for dynamic view locals. Closes #349
+ * Added support for absolute view paths
+ * Added; _home_ setting defaults to `Server#route` for mounted apps. Closes #363
+ * Added Guillermo Rauch to the contributor list
+ * Added support for "as" for non-collection partials. Closes #341
+ * Fixed _install.sh_, ensuring _~/.node_libraries_ exists. Closes #362 [thanks jf]
+ * Fixed `res.render()` exceptions, now passed to `next()` when no callback is given [thanks guillermo]
+ * Fixed instanceof `Array` checks, now `Array.isArray()`
+ * Fixed express(1) expansion of public dirs. Closes #348
+ * Fixed middleware precedence. Closes #345
+ * Fixed view watcher, now async [thanks aheckmann]
+
+1.0.0beta / 2010-07-15
+==================
+
+ * Re-write
+ - much faster
+ - much lighter
+ - Check [ExpressJS.com](http://expressjs.com) for migration guide and updated docs
+
+0.14.0 / 2010-06-15
+==================
+
+ * Utilize relative requires
+ * Added Static bufferSize option [aheckmann]
+ * Fixed caching of view and partial subdirectories [aheckmann]
+ * Fixed mime.type() comments now that ".ext" is not supported
+ * Updated haml submodule
+ * Updated class submodule
+ * Removed bin/express
+
+0.13.0 / 2010-06-01
+==================
+
+ * Added node v0.1.97 compatibility
+ * Added support for deleting cookies via Request#cookie('key', null)
+ * Updated haml submodule
+ * Fixed not-found page, now using using charset utf-8
+ * Fixed show-exceptions page, now using using charset utf-8
+ * Fixed view support due to fs.readFile Buffers
+ * Changed; mime.type() no longer accepts ".type" due to node extname() changes
+
+0.12.0 / 2010-05-22
+==================
+
+ * Added node v0.1.96 compatibility
+ * Added view `helpers` export which act as additional local variables
+ * Updated haml submodule
+ * Changed ETag; removed inode, modified time only
+ * Fixed LF to CRLF for setting multiple cookies
+ * Fixed cookie complation; values are now urlencoded
+ * Fixed cookies parsing; accepts quoted values and url escaped cookies
+
+0.11.0 / 2010-05-06
+==================
+
+ * Added support for layouts using different engines
+ - this.render('page.html.haml', { layout: 'super-cool-layout.html.ejs' })
+ - this.render('page.html.haml', { layout: 'foo' }) // assumes 'foo.html.haml'
+ - this.render('page.html.haml', { layout: false }) // no layout
+ * Updated ext submodule
+ * Updated haml submodule
+ * Fixed EJS partial support by passing along the context. Issue #307
+
+0.10.1 / 2010-05-03
+==================
+
+ * Fixed binary uploads.
+
+0.10.0 / 2010-04-30
+==================
+
+ * Added charset support via Request#charset (automatically assigned to 'UTF-8' when respond()'s
+ encoding is set to 'utf8' or 'utf-8'.
+ * Added "encoding" option to Request#render(). Closes #299
+ * Added "dump exceptions" setting, which is enabled by default.
+ * Added simple ejs template engine support
+ * Added error reponse support for text/plain, application/json. Closes #297
+ * Added callback function param to Request#error()
+ * Added Request#sendHead()
+ * Added Request#stream()
+ * Added support for Request#respond(304, null) for empty response bodies
+ * Added ETag support to Request#sendfile()
+ * Added options to Request#sendfile(), passed to fs.createReadStream()
+ * Added filename arg to Request#download()
+ * Performance enhanced due to pre-reversing plugins so that plugins.reverse() is not called on each request
+ * Performance enhanced by preventing several calls to toLowerCase() in Router#match()
+ * Changed; Request#sendfile() now streams
+ * Changed; Renamed Request#halt() to Request#respond(). Closes #289
+ * Changed; Using sys.inspect() instead of JSON.encode() for error output
+ * Changed; run() returns the http.Server instance. Closes #298
+ * Changed; Defaulting Server#host to null (INADDR_ANY)
+ * Changed; Logger "common" format scale of 0.4f
+ * Removed Logger "request" format
+ * Fixed; Catching ENOENT in view caching, preventing error when "views/partials" is not found
+ * Fixed several issues with http client
+ * Fixed Logger Content-Length output
+ * Fixed bug preventing Opera from retaining the generated session id. Closes #292
+
+0.9.0 / 2010-04-14
+==================
+
+ * Added DSL level error() route support
+ * Added DSL level notFound() route support
+ * Added Request#error()
+ * Added Request#notFound()
+ * Added Request#render() callback function. Closes #258
+ * Added "max upload size" setting
+ * Added "magic" variables to collection partials (\_\_index\_\_, \_\_length\_\_, \_\_isFirst\_\_, \_\_isLast\_\_). Closes #254
+ * Added [haml.js](http://github.com/visionmedia/haml.js) submodule; removed haml-js
+ * Added callback function support to Request#halt() as 3rd/4th arg
+ * Added preprocessing of route param wildcards using param(). Closes #251
+ * Added view partial support (with collections etc)
+ * Fixed bug preventing falsey params (such as ?page=0). Closes #286
+ * Fixed setting of multiple cookies. Closes #199
+ * Changed; view naming convention is now NAME.TYPE.ENGINE (for example page.html.haml)
+ * Changed; session cookie is now httpOnly
+ * Changed; Request is no longer global
+ * Changed; Event is no longer global
+ * Changed; "sys" module is no longer global
+ * Changed; moved Request#download to Static plugin where it belongs
+ * Changed; Request instance created before body parsing. Closes #262
+ * Changed; Pre-caching views in memory when "cache view contents" is enabled. Closes #253
+ * Changed; Pre-caching view partials in memory when "cache view partials" is enabled
+ * Updated support to node --version 0.1.90
+ * Updated dependencies
+ * Removed set("session cookie") in favour of use(Session, { cookie: { ... }})
+ * Removed utils.mixin(); use Object#mergeDeep()
+
+0.8.0 / 2010-03-19
+==================
+
+ * Added coffeescript example app. Closes #242
+ * Changed; cache api now async friendly. Closes #240
+ * Removed deprecated 'express/static' support. Use 'express/plugins/static'
+
+0.7.6 / 2010-03-19
+==================
+
+ * Added Request#isXHR. Closes #229
+ * Added `make install` (for the executable)
+ * Added `express` executable for setting up simple app templates
+ * Added "GET /public/*" to Static plugin, defaulting to <root>/public
+ * Added Static plugin
+ * Fixed; Request#render() only calls cache.get() once
+ * Fixed; Namespacing View caches with "view:"
+ * Fixed; Namespacing Static caches with "static:"
+ * Fixed; Both example apps now use the Static plugin
+ * Fixed set("views"). Closes #239
+ * Fixed missing space for combined log format
+ * Deprecated Request#sendfile() and 'express/static'
+ * Removed Server#running
+
+0.7.5 / 2010-03-16
+==================
+
+ * Added Request#flash() support without args, now returns all flashes
+ * Updated ext submodule
+
+0.7.4 / 2010-03-16
+==================
+
+ * Fixed session reaper
+ * Changed; class.js replacing js-oo Class implementation (quite a bit faster, no browser cruft)
+
+0.7.3 / 2010-03-16
+==================
+
+ * Added package.json
+ * Fixed requiring of haml / sass due to kiwi removal
+
+0.7.2 / 2010-03-16
+==================
+
+ * Fixed GIT submodules (HAH!)
+
+0.7.1 / 2010-03-16
+==================
+
+ * Changed; Express now using submodules again until a PM is adopted
+ * Changed; chat example using millisecond conversions from ext
+
+0.7.0 / 2010-03-15
+==================
+
+ * Added Request#pass() support (finds the next matching route, or the given path)
+ * Added Logger plugin (default "common" format replaces CommonLogger)
+ * Removed Profiler plugin
+ * Removed CommonLogger plugin
+
+0.6.0 / 2010-03-11
+==================
+
+ * Added seed.yml for kiwi package management support
+ * Added HTTP client query string support when method is GET. Closes #205
+
+ * Added support for arbitrary view engines.
+ For example "foo.engine.html" will now require('engine'),
+ the exports from this module are cached after the first require().
+
+ * Added async plugin support
+
+ * Removed usage of RESTful route funcs as http client
+ get() etc, use http.get() and friends
+
+ * Removed custom exceptions
+
+0.5.0 / 2010-03-10
+==================
+
+ * Added ext dependency (library of js extensions)
+ * Removed extname() / basename() utils. Use path module
+ * Removed toArray() util. Use arguments.values
+ * Removed escapeRegexp() util. Use RegExp.escape()
+ * Removed process.mixin() dependency. Use utils.mixin()
+ * Removed Collection
+ * Removed ElementCollection
+ * Shameless self promotion of ebook "Advanced JavaScript" (http://dev-mag.com) ;)
+
+0.4.0 / 2010-02-11
+==================
+
+ * Added flash() example to sample upload app
+ * Added high level restful http client module (express/http)
+ * Changed; RESTful route functions double as HTTP clients. Closes #69
+ * Changed; throwing error when routes are added at runtime
+ * Changed; defaulting render() context to the current Request. Closes #197
+ * Updated haml submodule
+
+0.3.0 / 2010-02-11
+==================
+
+ * Updated haml / sass submodules. Closes #200
+ * Added flash message support. Closes #64
+ * Added accepts() now allows multiple args. fixes #117
+ * Added support for plugins to halt. Closes #189
+ * Added alternate layout support. Closes #119
+ * Removed Route#run(). Closes #188
+ * Fixed broken specs due to use(Cookie) missing
+
+0.2.1 / 2010-02-05
+==================
+
+ * Added "plot" format option for Profiler (for gnuplot processing)
+ * Added request number to Profiler plugin
+ * Fixed binary encoding for multi-part file uploads, was previously defaulting to UTF8
+ * Fixed issue with routes not firing when not files are present. Closes #184
+ * Fixed process.Promise -> events.Promise
+
+0.2.0 / 2010-02-03
+==================
+
+ * Added parseParam() support for name[] etc. (allows for file inputs with "multiple" attr) Closes #180
+ * Added Both Cache and Session option "reapInterval" may be "reapEvery". Closes #174
+ * Added expiration support to cache api with reaper. Closes #133
+ * Added cache Store.Memory#reap()
+ * Added Cache; cache api now uses first class Cache instances
+ * Added abstract session Store. Closes #172
+ * Changed; cache Memory.Store#get() utilizing Collection
+ * Renamed MemoryStore -> Store.Memory
+ * Fixed use() of the same plugin several time will always use latest options. Closes #176
+
+0.1.0 / 2010-02-03
+==================
+
+ * Changed; Hooks (before / after) pass request as arg as well as evaluated in their context
+ * Updated node support to 0.1.27 Closes #169
+ * Updated dirname(__filename) -> __dirname
+ * Updated libxmljs support to v0.2.0
+ * Added session support with memory store / reaping
+ * Added quick uid() helper
+ * Added multi-part upload support
+ * Added Sass.js support / submodule
+ * Added production env caching view contents and static files
+ * Added static file caching. Closes #136
+ * Added cache plugin with memory stores
+ * Added support to StaticFile so that it works with non-textual files.
+ * Removed dirname() helper
+ * Removed several globals (now their modules must be required)
+
+0.0.2 / 2010-01-10
+==================
+
+ * Added view benchmarks; currently haml vs ejs
+ * Added Request#attachment() specs. Closes #116
+ * Added use of node's parseQuery() util. Closes #123
+ * Added `make init` for submodules
+ * Updated Haml
+ * Updated sample chat app to show messages on load
+ * Updated libxmljs parseString -> parseHtmlString
+ * Fixed `make init` to work with older versions of git
+ * Fixed specs can now run independant specs for those who cant build deps. Closes #127
+ * Fixed issues introduced by the node url module changes. Closes 126.
+ * Fixed two assertions failing due to Collection#keys() returning strings
+ * Fixed faulty Collection#toArray() spec due to keys() returning strings
+ * Fixed `make test` now builds libxmljs.node before testing
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
View
22 node_modules/express/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2009-2011 TJ Holowaychuk <tj@vision-media.ca>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
35 node_modules/express/Makefile
@@ -0,0 +1,35 @@
+
+DOCS = $(shell find docs/*.md)
+HTMLDOCS =$(DOCS:.md=.html)
+TESTS = $(shell find test/*.test.js)
+
+test:
+ @NODE_ENV=test ./node_modules/.bin/expresso \
+ -I lib \
+ $(TESTFLAGS) \
+ $(TESTS)
+
+test-cov:
+ @TESTFLAGS=--cov $(MAKE) test
+
+docs: $(HTMLDOCS)
+ @ echo "... generating TOC"
+ @./support/toc.js docs/guide.html
+
+%.html: %.md
+ @echo "... $< -> $@"
+ @markdown $< \
+ | cat docs/layout/head.html - docs/layout/foot.html \
+ > $@
+
+site:
+ rm -fr /tmp/docs \
+ && cp -fr docs /tmp/docs \
+ && git checkout gh-pages \
+ && cp -fr /tmp/docs/* . \
+ && echo "done"
+
+docclean:
+ rm -f docs/*.{1,html}
+
+.PHONY: site test test-cov docs docclean
View
143 node_modules/express/Readme.md
@@ -0,0 +1,143 @@
+
+# Express
+
+ Insanely fast (and small) server-side JavaScript web development framework
+ built on [node](http://nodejs.org) and [Connect](http://github.com/senchalabs/connect).
+
+ var app = express.createServer();
+
+ app.get('/', function(req, res){
+ res.send('Hello World');
+ });
+
+ app.listen(3000);
+
+## Installation
+
+ $ npm install express
+
+or to access the `express(1)` executable install globally:
+
+ $ npm install -g express
+
+## Quick Start
+
+ The quickest way to get started with express is to utilize the executable `express(1)` to generate an application as shown below:
+
+ Create the app:
+
+ $ npm install -g express
+ $ express /tmp/foo && cd /tmp/foo
+
+ Install dependencies:
+
+ $ npm install -d
+
+ Start the server:
+
+ $ node app.js
+
+## Features
+
+ * Robust routing
+ * Redirection helpers
+ * Dynamic view helpers
+ * Content negotiation
+ * Focus on high performance
+ * View rendering and partials support
+ * Environment based configuration
+ * Session based flash notifications
+ * Built on [Connect](http://github.com/senchalabs/connect)
+ * High test coverage
+ * Executable for generating applications quickly
+ * Application level view options
+
+Via Connect:
+
+ * Session support
+ * Cache API
+ * Mime helpers
+ * ETag support
+ * Persistent flash notifications
+ * Cookie support
+ * JSON-RPC
+ * Logging
+ * and _much_ more!
+
+## Contributors
+
+The following are the major contributors of Express (in no specific order).
+
+ * TJ Holowaychuk ([visionmedia](http://github.com/visionmedia))
+ * Ciaran Jessup ([ciaranj](http://github.com/ciaranj))
+ * Aaron Heckmann ([aheckmann](http://github.com/aheckmann))
+ * Guillermo Rauch ([guille](http://github.com/guille))
+
+## More Information
+
+ * #express on freenode
+ * [express-expose](http://github.com/visionmedia/express-expose) expose objects, functions, modules and more to client-side js with ease
+ * [express-configure](http://github.com/visionmedia/express-configuration) async configuration support
+ * [express-messages](http://github.com/visionmedia/express-messages) flash notification rendering helper
+ * [express-namespace](http://github.com/visionmedia/express-namespace) namespaced route support
+ * [express-params](https://github.com/visionmedia/express-params) param pre-condition functions
+ * [express-mongoose](https://github.com/LearnBoost/express-mongoose) plugin for easy rendering of Mongoose async Query results
+ * Follow [tjholowaychuk](http://twitter.com/tjholowaychuk) on twitter for updates
+ * [Google Group](http://groups.google.com/group/express-js) for discussion
+ * Visit the [Wiki](http://github.com/visionmedia/express/wiki)
+ * [日本語ドキュメンテーション](http://hideyukisaito.com/doc/expressjs/) by [hideyukisaito](https://github.com/hideyukisaito)
+ * Screencast - [Introduction](http://bit.ly/eRYu0O)
+ * Screencast - [View Partials](http://bit.ly/dU13Fx)
+ * Screencast - [Route Specific Middleware](http://bit.ly/hX4IaH)
+ * Screencast - [Route Path Placeholder Preconditions](http://bit.ly/eNqmVs)
+
+## Node Compatibility
+
+Express 1.x is compatible with node 0.2.x and connect < 1.0.
+
+Express 2.x is compatible with node 0.4.x and connect 1.x
+
+## Viewing Examples
+
+First install the dev dependencies to install all the example / test suite deps:
+
+ $ npm install
+
+then run whichever tests you want:
+
+ $ node examples/jade/app.js
+
+## Running Tests
+
+To run the test suite first invoke the following command within the repo, installing the development dependencies:
+
+ $ npm install
+
+then run the tests:
+
+ $ make test
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2009-2011 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
417 node_modules/express/bin/express
@@ -0,0 +1,417 @@
+#!/usr/bin/env node
+
+/**
+ * Module dependencies.
+ */
+
+var fs = require('fs')
+ , exec = require('child_process').exec;
+
+/**
+ * Framework version.
+ */
+
+var version = '2.4.3';
+
+/**
+ * Add session support.
+ */
+
+var sessions = false;
+
+/**
+ * CSS engine to utilize.
+ */
+
+var cssEngine;
+
+/**
+ * Template engine to utilize.
+ */
+
+var templateEngine = 'jade';
+
+/**
+ * Usage documentation.
+ */
+
+var usage = ''
+ + '\n'
+ + ' Usage: express [options] [path]\n'
+ + '\n'
+ + ' Options:\n'
+ + ' -s, --sessions add session support\n'
+ + ' -t, --template <engine> add template <engine> support (jade|ejs). default=jade\n'
+ + ' -c, --css <engine> add stylesheet <engine> support (less|sass|stylus). default=plain css\n'
+ + ' -v, --version output framework version\n'
+ + ' -h, --help output help information\n'
+ ;
+
+/**
+ * Jade layout template.
+ */
+