vulcan 0.2.5 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (211) hide show
  1. data/README.md +1 -80
  2. data/lib/vulcan/cli.rb +12 -33
  3. data/lib/vulcan/version.rb +1 -1
  4. data/server/bin/make +3 -1
  5. data/server/lib/spawner.js +4 -9
  6. data/server/node_modules/connect-form/node_modules/formidable/Readme.md +2 -13
  7. data/server/node_modules/connect-form/node_modules/formidable/lib/incoming_form.js +7 -19
  8. data/server/node_modules/connect-form/node_modules/formidable/lib/multipart_parser.js +1 -12
  9. data/server/node_modules/connect-form/node_modules/formidable/package.json +1 -1
  10. data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-chrome-13.http +10 -0
  11. data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-chrome-12.http +9 -0
  12. data/server/node_modules/connect-form/node_modules/formidable/test/legacy/simple/test-multipart-parser.js +1 -1
  13. data/server/node_modules/cradle/lib/cradle.js +1 -0
  14. data/server/node_modules/cradle/node_modules/vows/LICENSE +20 -0
  15. data/server/node_modules/cradle/node_modules/vows/Makefile +7 -0
  16. data/server/node_modules/cradle/node_modules/vows/README.md +39 -0
  17. data/server/node_modules/cradle/node_modules/vows/bin/vows +515 -0
  18. data/server/node_modules/cradle/node_modules/vows/lib/assert/error.js +27 -0
  19. data/server/node_modules/cradle/node_modules/vows/lib/assert/macros.js +215 -0
  20. data/server/node_modules/cradle/node_modules/vows/lib/assert/utils.js +77 -0
  21. data/server/node_modules/cradle/node_modules/vows/lib/vows.js +193 -0
  22. data/server/node_modules/cradle/node_modules/vows/lib/vows/console.js +131 -0
  23. data/server/node_modules/cradle/node_modules/vows/lib/vows/context.js +55 -0
  24. data/server/node_modules/cradle/node_modules/vows/lib/vows/coverage/file.js +29 -0
  25. data/server/node_modules/cradle/node_modules/vows/lib/vows/coverage/fragments/coverage-foot.html +2 -0
  26. data/server/node_modules/cradle/node_modules/vows/lib/vows/coverage/fragments/coverage-head.html +61 -0
  27. data/server/node_modules/cradle/node_modules/vows/lib/vows/coverage/report-html.js +54 -0
  28. data/server/node_modules/cradle/node_modules/vows/lib/vows/coverage/report-json.js +54 -0
  29. data/server/node_modules/cradle/node_modules/vows/lib/vows/coverage/report-plain.js +38 -0
  30. data/server/node_modules/cradle/node_modules/vows/lib/vows/extras.js +28 -0
  31. data/server/node_modules/cradle/node_modules/vows/lib/vows/reporters/dot-matrix.js +67 -0
  32. data/server/node_modules/cradle/node_modules/vows/lib/vows/reporters/json.js +16 -0
  33. data/server/node_modules/cradle/node_modules/vows/lib/vows/reporters/silent.js +8 -0
  34. data/server/node_modules/cradle/node_modules/vows/lib/vows/reporters/spec.js +44 -0
  35. data/server/node_modules/cradle/node_modules/vows/lib/vows/reporters/watch.js +39 -0
  36. data/server/node_modules/cradle/node_modules/vows/lib/vows/reporters/xunit.js +90 -0
  37. data/server/node_modules/cradle/node_modules/vows/lib/vows/suite.js +319 -0
  38. data/server/node_modules/cradle/node_modules/vows/node_modules/eyes/LICENSE +20 -0
  39. data/server/node_modules/cradle/node_modules/vows/node_modules/eyes/Makefile +4 -0
  40. data/server/node_modules/cradle/node_modules/vows/node_modules/eyes/README.md +72 -0
  41. data/server/node_modules/cradle/node_modules/vows/node_modules/eyes/lib/eyes.js +233 -0
  42. data/server/node_modules/cradle/node_modules/vows/node_modules/eyes/package.json +14 -0
  43. data/server/node_modules/cradle/node_modules/vows/node_modules/eyes/test/eyes-test.js +55 -0
  44. data/server/node_modules/cradle/node_modules/vows/package.json +14 -0
  45. data/server/node_modules/cradle/node_modules/vows/test/assert-test.js +135 -0
  46. data/server/node_modules/cradle/node_modules/vows/test/fixtures/isolate/failing.js +18 -0
  47. data/server/node_modules/cradle/node_modules/vows/test/fixtures/isolate/log.js +18 -0
  48. data/server/node_modules/cradle/node_modules/vows/test/fixtures/isolate/passing.js +17 -0
  49. data/server/node_modules/cradle/node_modules/vows/test/fixtures/isolate/stderr.js +18 -0
  50. data/server/node_modules/cradle/node_modules/vows/test/isolate-test.js +140 -0
  51. data/server/node_modules/cradle/node_modules/vows/test/testInherit.js +133 -0
  52. data/server/node_modules/cradle/node_modules/vows/test/vows-error-test.js +51 -0
  53. data/server/node_modules/cradle/node_modules/vows/test/vows-test.js +374 -0
  54. data/server/node_modules/cradle/package.json +3 -3
  55. data/server/node_modules/cradle/test/cache-test.js +7 -6
  56. data/server/node_modules/cradle/test/cradle-test.js +5 -4
  57. data/server/node_modules/cradle/test/response-test.js +6 -5
  58. data/server/node_modules/express/History.md +1 -53
  59. data/server/node_modules/express/Makefile +9 -3
  60. data/server/node_modules/express/Readme.md +1 -3
  61. data/server/node_modules/express/bin/express +66 -65
  62. data/server/node_modules/express/lib/express.js +1 -1
  63. data/server/node_modules/express/lib/request.js +9 -23
  64. data/server/node_modules/express/lib/response.js +2 -3
  65. data/server/node_modules/express/lib/utils.js +0 -13
  66. data/server/node_modules/express/lib/view.js +16 -19
  67. data/server/node_modules/express/lib/view/view.js +1 -2
  68. data/server/node_modules/express/node_modules/connect/lib/connect.js +1 -1
  69. data/server/node_modules/express/node_modules/connect/lib/http.js +0 -2
  70. data/server/node_modules/express/node_modules/connect/lib/middleware/bodyParser.js +31 -135
  71. data/server/node_modules/express/node_modules/connect/lib/middleware/limit.js +1 -5
  72. data/server/node_modules/express/node_modules/connect/lib/middleware/session.js +2 -2
  73. data/server/node_modules/express/node_modules/connect/lib/middleware/static.js +21 -26
  74. data/server/node_modules/express/node_modules/connect/lib/middleware/staticCache.js +38 -91
  75. data/server/node_modules/express/node_modules/connect/lib/middleware/vhost.js +1 -1
  76. data/server/node_modules/express/node_modules/connect/lib/utils.js +4 -11
  77. data/server/node_modules/express/node_modules/connect/package.json +6 -7
  78. data/server/node_modules/express/node_modules/connect/test.js +31 -44
  79. data/server/node_modules/express/node_modules/mime/index.js +1 -0
  80. data/server/node_modules/express/node_modules/mime/mime.js +3 -3
  81. data/server/node_modules/express/node_modules/mime/{types/mime.types → mime.types} +0 -0
  82. data/server/node_modules/express/node_modules/mime/{types/node.types → node.types} +0 -17
  83. data/server/node_modules/express/node_modules/mime/package.json +10 -21
  84. data/server/node_modules/express/node_modules/mime/test.js +3 -2
  85. data/server/node_modules/express/node_modules/qs/History.md +0 -11
  86. data/server/node_modules/express/node_modules/qs/Makefile +3 -1
  87. data/server/node_modules/express/node_modules/qs/Readme.md +4 -2
  88. data/server/node_modules/express/node_modules/qs/lib/querystring.js +74 -100
  89. data/server/node_modules/express/node_modules/qs/package.json +2 -9
  90. data/server/node_modules/express/node_modules/qs/support/expresso/History.md +128 -0
  91. data/server/node_modules/express/node_modules/qs/support/expresso/Makefile +53 -0
  92. data/server/node_modules/express/node_modules/qs/support/expresso/Readme.md +61 -0
  93. data/server/node_modules/express/node_modules/qs/support/expresso/bin/expresso +856 -0
  94. data/server/node_modules/express/node_modules/qs/support/expresso/docs/api.html +1080 -0
  95. data/server/node_modules/express/node_modules/qs/support/expresso/docs/index.html +377 -0
  96. data/server/node_modules/express/node_modules/qs/support/expresso/docs/index.md +290 -0
  97. data/server/node_modules/express/node_modules/qs/support/expresso/docs/layout/foot.html +3 -0
  98. data/server/node_modules/express/node_modules/qs/support/expresso/docs/layout/head.html +42 -0
  99. data/server/node_modules/express/node_modules/qs/support/expresso/lib/bar.js +4 -0
  100. data/server/node_modules/express/node_modules/qs/support/expresso/lib/foo.js +16 -0
  101. data/server/node_modules/express/node_modules/qs/support/expresso/package.json +12 -0
  102. data/server/node_modules/express/node_modules/qs/support/expresso/test/assert.test.js +91 -0
  103. data/server/node_modules/express/node_modules/qs/support/expresso/test/async.test.js +12 -0
  104. data/server/node_modules/express/node_modules/qs/support/expresso/test/bar.test.js +13 -0
  105. data/server/node_modules/express/node_modules/qs/support/expresso/test/foo.test.js +14 -0
  106. data/server/node_modules/express/node_modules/qs/support/expresso/test/http.test.js +146 -0
  107. data/server/node_modules/express/node_modules/qs/support/expresso/test/serial/async.test.js +39 -0
  108. data/server/node_modules/express/node_modules/qs/support/expresso/test/serial/http.test.js +48 -0
  109. data/server/node_modules/express/node_modules/qs/support/should/History.md +22 -0
  110. data/server/node_modules/express/node_modules/qs/support/should/Makefile +6 -0
  111. data/server/node_modules/express/node_modules/qs/support/should/Readme.md +248 -0
  112. data/server/node_modules/express/node_modules/qs/support/should/examples/runner.js +53 -0
  113. data/server/node_modules/express/node_modules/qs/support/should/index.js +2 -0
  114. data/server/node_modules/express/node_modules/qs/support/should/lib/eql.js +91 -0
  115. data/server/node_modules/express/node_modules/qs/support/should/lib/should.js +548 -0
  116. data/server/node_modules/express/node_modules/qs/support/should/package.json +8 -0
  117. data/server/node_modules/express/node_modules/qs/support/should/test/should.test.js +358 -0
  118. data/server/node_modules/express/node_modules/qs/test/{parse.js → parse.test.js} +2 -1
  119. data/server/node_modules/express/node_modules/qs/test/{stringify.js → stringify.test.js} +0 -0
  120. data/server/node_modules/express/package.json +8 -9
  121. data/server/node_modules/node-uuid/README.md +67 -166
  122. data/server/node_modules/node-uuid/package.json +3 -5
  123. data/server/node_modules/node-uuid/{benchmark → test}/benchmark-native.c +0 -0
  124. data/server/node_modules/node-uuid/test/benchmark.js +27 -0
  125. data/server/node_modules/node-uuid/test/test.html +0 -3
  126. data/server/node_modules/node-uuid/test/test.js +57 -214
  127. data/server/node_modules/node-uuid/uuid.js +56 -225
  128. data/server/node_modules/restler/README.md +7 -20
  129. data/server/node_modules/restler/bin/restler +1 -1
  130. data/server/node_modules/restler/lib/multipartform.js +8 -9
  131. data/server/node_modules/restler/lib/restler.js +22 -64
  132. data/server/node_modules/restler/package.json +2 -2
  133. data/server/node_modules/restler/test/restler.js +2 -22
  134. data/server/node_modules/restler/test/test_helper.js +1 -20
  135. data/server/package.json +10 -10
  136. data/server/web.js +7 -30
  137. metadata +96 -89
  138. data/server/node_modules/connect-form/node_modules/formidable/test/fixture/file/plain.txt +0 -1
  139. data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/no-filename/generic.http +0 -13
  140. data/server/node_modules/connect-form/node_modules/formidable/test/fixture/js/no-filename.js +0 -3
  141. data/server/node_modules/express/node_modules/connect/node_modules/formidable/Makefile +0 -14
  142. data/server/node_modules/express/node_modules/connect/node_modules/formidable/Readme.md +0 -286
  143. data/server/node_modules/express/node_modules/connect/node_modules/formidable/TODO +0 -3
  144. data/server/node_modules/express/node_modules/connect/node_modules/formidable/benchmark/bench-multipart-parser.js +0 -70
  145. data/server/node_modules/express/node_modules/connect/node_modules/formidable/example/post.js +0 -43
  146. data/server/node_modules/express/node_modules/connect/node_modules/formidable/example/upload.js +0 -48
  147. data/server/node_modules/express/node_modules/connect/node_modules/formidable/index.js +0 -1
  148. data/server/node_modules/express/node_modules/connect/node_modules/formidable/lib/file.js +0 -61
  149. data/server/node_modules/express/node_modules/connect/node_modules/formidable/lib/incoming_form.js +0 -377
  150. data/server/node_modules/express/node_modules/connect/node_modules/formidable/lib/index.js +0 -3
  151. data/server/node_modules/express/node_modules/connect/node_modules/formidable/lib/multipart_parser.js +0 -312
  152. data/server/node_modules/express/node_modules/connect/node_modules/formidable/lib/querystring_parser.js +0 -25
  153. data/server/node_modules/express/node_modules/connect/node_modules/formidable/lib/util.js +0 -6
  154. data/server/node_modules/express/node_modules/connect/node_modules/formidable/package.json +0 -22
  155. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/common.js +0 -19
  156. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/file/funkyfilename.txt +0 -1
  157. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/file/plain.txt +0 -1
  158. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/no-filename/generic.http +0 -13
  159. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/info.md +0 -3
  160. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-chrome-13.http +0 -26
  161. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-firefox-3.6.http +0 -24
  162. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-safari-5.http +0 -23
  163. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-chrome-12.http +0 -24
  164. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-ie-7.http +0 -22
  165. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-ie-8.http +0 -22
  166. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-safari-5.http +0 -22
  167. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/no-filename.js +0 -3
  168. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/special-chars-in-filename.js +0 -21
  169. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/multi_video.upload +0 -0
  170. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/multipart.js +0 -72
  171. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/integration/test-fixtures.js +0 -89
  172. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/common.js +0 -24
  173. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/integration/test-multipart-parser.js +0 -80
  174. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-file.js +0 -104
  175. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js +0 -715
  176. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-multipart-parser.js +0 -50
  177. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-querystring-parser.js +0 -45
  178. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/system/test-multi-video-upload.js +0 -72
  179. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/run.js +0 -2
  180. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/unit/test-incoming-form.js +0 -63
  181. data/server/node_modules/express/node_modules/connect/node_modules/formidable/tool/record.js +0 -47
  182. data/server/node_modules/express/node_modules/mkdirp/LICENSE +0 -21
  183. data/server/node_modules/express/node_modules/mkdirp/README.markdown +0 -21
  184. data/server/node_modules/express/node_modules/mkdirp/examples/pow.js +0 -6
  185. data/server/node_modules/express/node_modules/mkdirp/examples/pow.js.orig +0 -6
  186. data/server/node_modules/express/node_modules/mkdirp/examples/pow.js.rej +0 -19
  187. data/server/node_modules/express/node_modules/mkdirp/index.js +0 -20
  188. data/server/node_modules/express/node_modules/mkdirp/package.json +0 -23
  189. data/server/node_modules/express/node_modules/mkdirp/test/mkdirp.js +0 -28
  190. data/server/node_modules/express/node_modules/mkdirp/test/race.js +0 -41
  191. data/server/node_modules/express/node_modules/mkdirp/test/rel.js +0 -32
  192. data/server/node_modules/express/node_modules/qs/test/mocha.opts +0 -2
  193. data/server/node_modules/express/testing/foo/app.js +0 -35
  194. data/server/node_modules/express/testing/foo/package.json +0 -9
  195. data/server/node_modules/express/testing/foo/public/stylesheets/style.css +0 -8
  196. data/server/node_modules/express/testing/foo/routes/index.js +0 -10
  197. data/server/node_modules/express/testing/foo/views/index.jade +0 -2
  198. data/server/node_modules/express/testing/foo/views/layout.jade +0 -6
  199. data/server/node_modules/express/testing/index.js +0 -43
  200. data/server/node_modules/express/testing/public/test.txt +0 -2971
  201. data/server/node_modules/express/testing/views/page.html +0 -1
  202. data/server/node_modules/express/testing/views/page.jade +0 -3
  203. data/server/node_modules/express/testing/views/test.md +0 -1
  204. data/server/node_modules/express/testing/views/user/index.jade +0 -1
  205. data/server/node_modules/express/testing/views/user/list.jade +0 -1
  206. data/server/node_modules/node-uuid/benchmark/README.md +0 -53
  207. data/server/node_modules/node-uuid/benchmark/bench.gnu +0 -174
  208. data/server/node_modules/node-uuid/benchmark/bench.sh +0 -34
  209. data/server/node_modules/node-uuid/benchmark/benchmark.js +0 -84
  210. data/server/node_modules/node-uuid/test/benchmark-native +0 -0
  211. data/server/node_modules/node-uuid/test/compare_v1.js +0 -63
@@ -5,9 +5,9 @@
5
5
  "keywords" : ["couchdb", "database", "couch"],
6
6
  "author" : "Alexis Sellier <self@cloudhead.net>",
7
7
  "contributors" : [],
8
- "dependencies" : { "vargs": ">=0.1.0" },
9
- "devDependencies" : { "async": "0.1.x", "request": "2.2.x", "vows": "0.6.x" },
10
- "version" : "0.5.8",
8
+ "dependencies" : { "vargs": ">=0.1.0", "vows": ">=0.5.4" },
9
+ "devDependencies" : { "async": "~0.1.x", "request": "~2.1.1" },
10
+ "version" : "0.5.7",
11
11
  "main" : "./lib/cradle",
12
12
  "directories" : { "test": "./test" },
13
13
  "engines" : { "node": ">=0.3.6" }
@@ -1,4 +1,5 @@
1
1
  var path = require('path'),
2
+ sys = require('sys'),
2
3
  assert = require('assert'),
3
4
  events = require('events'),
4
5
  vows = require('vows');
@@ -18,7 +19,7 @@ vows.describe('cradle/Cache').addBatch({
18
19
 
19
20
  'should be able to store 8 keys': function (topic) {
20
21
  for (var i = 0; i < 8; i++) { topic.save(i.toString(), {}) }
21
- assert.lengthOf (Object.keys(topic.store), 8);
22
+ assert.length (Object.keys(topic.store), 8);
22
23
  },
23
24
  'if more than 8 keys are set': {
24
25
  topic: function (cache) {
@@ -29,7 +30,7 @@ vows.describe('cradle/Cache').addBatch({
29
30
  });
30
31
  },
31
32
  'there should still be 8 keys in the store': function (cache) {
32
- assert.lengthOf (Object.keys(cache.store), 8);
33
+ assert.length (Object.keys(cache.store), 8);
33
34
  }
34
35
  },
35
36
  'if an extra 8 keys are set': {
@@ -66,10 +67,10 @@ vows.describe('cradle/Cache').addBatch({
66
67
  }, 10);
67
68
  },
68
69
  'it should have the 3 accessed ones, with the 5 new ones': function (cache) {
69
- assert.lengthOf (Object.keys(cache.store), 8);
70
- assert.isTrue (cache.has('2'));
71
- assert.isTrue (cache.has('5'));
72
- assert.isTrue (cache.has('1'));
70
+ assert.length (Object.keys(cache.store), 8);
71
+ assert.isTrue (cache.has('2'));
72
+ assert.isTrue (cache.has('5'));
73
+ assert.isTrue (cache.has('1'));
73
74
  for (var i = 8; i < 13; i++) { cache.has(i.toString()) }
74
75
  }
75
76
  }
@@ -1,4 +1,5 @@
1
1
  var path = require('path'),
2
+ sys = require('sys'),
2
3
  assert = require('assert'),
3
4
  events = require('events'),
4
5
  http = require('http'),
@@ -277,7 +278,7 @@ vows.describe("cradle").addBatch(seed.requireSeed()).addBatch({
277
278
  "returns a 200": status(200),
278
279
  "returns an array of UUIDs": function (uuids) {
279
280
  assert.isArray(uuids);
280
- assert.lengthOf(uuids, 42);
281
+ assert.length(uuids, 42);
281
282
  }
282
283
  },
283
284
  "without count": {
@@ -286,7 +287,7 @@ vows.describe("cradle").addBatch(seed.requireSeed()).addBatch({
286
287
  "returns a 200": status(200),
287
288
  "returns an array of UUIDs": function (uuids) {
288
289
  assert.isArray(uuids);
289
- assert.lengthOf(uuids, 1);
290
+ assert.length(uuids, 1);
290
291
  }
291
292
  }
292
293
  },
@@ -496,7 +497,7 @@ vows.describe("cradle").addBatch(seed.requireSeed()).addBatch({
496
497
  },
497
498
  "returns an iterable object with key/val pairs": function (res) {
498
499
  assert.isArray(res);
499
- assert.lengthOf(res, 2);
500
+ assert.length(res, 2);
500
501
  res.forEach(function (k, v) {
501
502
  assert.isObject(v);
502
503
  assert.isString(k);
@@ -527,7 +528,7 @@ vows.describe("cradle").addBatch(seed.requireSeed()).addBatch({
527
528
  },
528
529
  "returns an iterable object with key/val pairs": function (res) {
529
530
  assert.isArray(res);
530
- assert.lengthOf(res, 2);
531
+ assert.length(res, 2);
531
532
  res.forEach(function (k, v) {
532
533
  assert.isObject(v);
533
534
  assert.isString(k);
@@ -1,4 +1,5 @@
1
1
  var path = require('path'),
2
+ sys = require('sys'),
2
3
  assert = require('assert'),
3
4
  events = require('events'),
4
5
  http = require('http'),
@@ -14,7 +15,7 @@ vows.describe('cradle/Response').addBatch({
14
15
  topic: new(cradle.Response)(document),
15
16
 
16
17
  'should only have the original keys': function (topic) {
17
- assert.lengthOf (Object.keys(topic), 4);
18
+ assert.length (Object.keys(topic), 4);
18
19
  assert.equal (topic.name, 'buzz');
19
20
  assert.equal (topic.age, 99);
20
21
  assert.deepEqual (document, topic);
@@ -28,15 +29,15 @@ vows.describe('cradle/Response').addBatch({
28
29
  assert.deepEqual (topic.json, document);
29
30
  assert.isUndefined (topic.json.json);
30
31
  assert.isUndefined (topic.headers);
31
- assert.lengthOf (Object.keys(topic.json), 4);
32
+ assert.length (Object.keys(topic.json), 4);
32
33
  },
33
34
  'when using a `for .. in` loop, should only return the original keys': function (topic) {
34
35
  var keys = [];
35
36
  for (var k in topic) { keys.push(k) }
36
37
 
37
- assert.lengthOf (keys, 4);
38
- assert.include (keys, 'name');
39
- assert.include (keys, 'age');
38
+ assert.length (keys, 4);
39
+ assert.include (keys, 'name');
40
+ assert.include (keys, 'age');
40
41
  },
41
42
  'should stringify': function (topic) {
42
43
  var expected = JSON.stringify(document);
@@ -1,55 +1,4 @@
1
1
 
2
- 2.5.6 / 2012-01-13
3
- ==================
4
-
5
- * Updated hamljs dev dep. Closes #953
6
-
7
- 2.5.5 / 2012-01-08
8
- ==================
9
-
10
- * Fixed: set `filename` on cached templates [matthewleon]
11
-
12
- 2.5.4 / 2012-01-02
13
- ==================
14
-
15
- * Fixed `express(1)` eol on 0.4.x. Closes #947
16
-
17
- 2.5.3 / 2011-12-30
18
- ==================
19
-
20
- * Fixed `req.is()` when a charset is present
21
-
22
- 2.5.2 / 2011-12-10
23
- ==================
24
-
25
- * Fixed: express(1) LF -> CRLF for windows
26
-
27
- 2.5.1 / 2011-11-17
28
- ==================
29
-
30
- * Changed: updated connect to 1.8.x
31
- * Removed sass.js support from express(1)
32
-
33
- 2.5.0 / 2011-10-24
34
- ==================
35
-
36
- * Added ./routes dir for generated app by default
37
- * Added npm install reminder to express(1) app gen
38
- * Added 0.5.x support
39
- * Removed `make test-cov` since it wont work with node 0.5.x
40
- * Fixed express(1) public dir for windows. Closes #866
41
-
42
- 2.4.7 / 2011-10-05
43
- ==================
44
-
45
- * Added mkdirp to express(1). Closes #795
46
- * Added simple _json-config_ example
47
- * Added shorthand for the parsed request's pathname via `req.path`
48
- * Changed connect dep to 1.7.x to fix npm issue...
49
- * Fixed `res.redirect()` __HEAD__ support. [reported by xerox]
50
- * Fixed `req.flash()`, only escape args
51
- * Fixed absolute path checking on windows. Closes #829 [reported by andrewpmckenzie]
52
-
53
2
  2.4.6 / 2011-08-22
54
3
  ==================
55
4
 
@@ -60,8 +9,7 @@
60
9
 
61
10
  * Added support for routes to handle errors. Closes #809
62
11
  * Added `app.routes.all()`. Closes #803
63
- * Added "basepath" setting to work in conjunction with reverse proxies etc.
64
- * Refactored `Route` to use a single array of callbacks
12
+ * Added "basepath" setting to work in conjunction with reverse proxies etc. * Refactored `Route` to use a single array of callbacks
65
13
  * Added support for multiple callbacks for `app.param()`. Closes #801
66
14
  Closes #805
67
15
  * Changed: removed .call(self) for route callbacks
@@ -1,10 +1,16 @@
1
1
 
2
2
  DOCS = $(shell find docs/*.md)
3
- HTMLDOCS = $(DOCS:.md=.html)
3
+ HTMLDOCS =$(DOCS:.md=.html)
4
4
  TESTS = $(shell find test/*.test.js)
5
5
 
6
6
  test:
7
- @NODE_ENV=test ./node_modules/.bin/expresso $(TESTS)
7
+ @NODE_ENV=test ./node_modules/.bin/expresso \
8
+ -I lib \
9
+ $(TESTFLAGS) \
10
+ $(TESTS)
11
+
12
+ test-cov:
13
+ @TESTFLAGS=--cov $(MAKE) test
8
14
 
9
15
  docs: $(HTMLDOCS)
10
16
  @ echo "... generating TOC"
@@ -26,4 +32,4 @@ site:
26
32
  docclean:
27
33
  rm -f docs/*.{1,html}
28
34
 
29
- .PHONY: site test docs docclean
35
+ .PHONY: site test test-cov docs docclean
@@ -95,9 +95,7 @@ The following are the major contributors of Express (in no specific order).
95
95
 
96
96
  Express 1.x is compatible with node 0.2.x and connect < 1.0.
97
97
 
98
- Express 2.x is compatible with node 0.4.x or 0.6.x, and connect 1.x
99
-
100
- Express 3.x (master) will be compatible with node 0.6.x and connect 2.x
98
+ Express 2.x is compatible with node 0.4.x and connect 1.x
101
99
 
102
100
  ## Viewing Examples
103
101
 
@@ -5,15 +5,13 @@
5
5
  */
6
6
 
7
7
  var fs = require('fs')
8
- , os = require('os')
9
- , exec = require('child_process').exec
10
- , mkdirp = require('mkdirp');
8
+ , exec = require('child_process').exec;
11
9
 
12
10
  /**
13
11
  * Framework version.
14
12
  */
15
13
 
16
- var version = '2.5.5';
14
+ var version = '2.4.6';
17
15
 
18
16
  /**
19
17
  * Add session support.
@@ -27,14 +25,6 @@ var sessions = false;
27
25
 
28
26
  var cssEngine;
29
27
 
30
- /**
31
- * End-of-line code.
32
- */
33
-
34
- var eol = os.platform
35
- ? ('win32' == os.platform() ? '\r\n' : '\n')
36
- : '\n';
37
-
38
28
  /**
39
29
  * Template engine to utilize.
40
30
  */
@@ -52,26 +42,11 @@ var usage = ''
52
42
  + ' Options:\n'
53
43
  + ' -s, --sessions add session support\n'
54
44
  + ' -t, --template <engine> add template <engine> support (jade|ejs). default=jade\n'
55
- + ' -c, --css <engine> add stylesheet <engine> support (stylus). default=plain css\n'
45
+ + ' -c, --css <engine> add stylesheet <engine> support (less|sass|stylus). default=plain css\n'
56
46
  + ' -v, --version output framework version\n'
57
47
  + ' -h, --help output help information\n'
58
48
  ;
59
49
 
60
- /**
61
- * Routes index template.
62
- */
63
-
64
- var index = [
65
- ''
66
- , '/*'
67
- , ' * GET home page.'
68
- , ' */'
69
- , ''
70
- , 'exports.index = function(req, res){'
71
- , ' res.render(\'index\', { title: \'Express\' })'
72
- , '};'
73
- ].join(eol);
74
-
75
50
  /**
76
51
  * Jade layout template.
77
52
  */
@@ -83,7 +58,7 @@ var jadeLayout = [
83
58
  , ' title= title'
84
59
  , ' link(rel=\'stylesheet\', href=\'/stylesheets/style.css\')'
85
60
  , ' body!= body'
86
- ].join(eol);
61
+ ].join('\n');
87
62
 
88
63
  /**
89
64
  * Jade index template.
@@ -92,7 +67,7 @@ var jadeLayout = [
92
67
  var jadeIndex = [
93
68
  'h1= title'
94
69
  , 'p Welcome to #{title}'
95
- ].join(eol);
70
+ ].join('\n');
96
71
 
97
72
  /**
98
73
  * EJS layout template.
@@ -109,7 +84,7 @@ var ejsLayout = [
109
84
  , ' <%- body %>'
110
85
  , ' </body>'
111
86
  , '</html>'
112
- ].join(eol);
87
+ ].join('\n');
113
88
 
114
89
  /**
115
90
  * EJS index template.
@@ -118,7 +93,7 @@ var ejsLayout = [
118
93
  var ejsIndex = [
119
94
  '<h1><%= title %></h1>'
120
95
  , '<p>Welcome to <%= title %></p>'
121
- ].join(eol);
96
+ ].join('\n');
122
97
 
123
98
  /**
124
99
  * Default css template.
@@ -133,7 +108,34 @@ var css = [
133
108
  , 'a {'
134
109
  , ' color: #00B7FF;'
135
110
  , '}'
136
- ].join(eol);
111
+ ].join('\n');
112
+
113
+ /**
114
+ * Default less template.
115
+ */
116
+
117
+ var less = [
118
+ 'body {'
119
+ , ' padding: 50px;'
120
+ , ' font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;'
121
+ , '}'
122
+ , ''
123
+ , 'a {'
124
+ , ' color: #00B7FF;'
125
+ , '}'
126
+ ].join('\n');
127
+
128
+ /**
129
+ * Default sass template.
130
+ */
131
+
132
+ var sass = [
133
+ 'body'
134
+ , ' :padding 50px'
135
+ , ' :font 14px "Lucida Grande", Helvetica, Arial, sans-serif'
136
+ , 'a'
137
+ , ' :color #00B7FF'
138
+ ].join('\n');
137
139
 
138
140
  /**
139
141
  * Default stylus template.
@@ -145,7 +147,7 @@ var stylus = [
145
147
  , ' font: 14px "Lucida Grande", Helvetica, Arial, sans-serif'
146
148
  , 'a'
147
149
  , ' color: #00B7FF'
148
- ].join(eol);
150
+ ].join('\n');
149
151
 
150
152
  /**
151
153
  * App template.
@@ -157,8 +159,7 @@ var app = [
157
159
  , ' * Module dependencies.'
158
160
  , ' */'
159
161
  , ''
160
- , 'var express = require(\'express\')'
161
- , ' , routes = require(\'./routes\')'
162
+ , 'var express = require(\'express\');'
162
163
  , ''
163
164
  , 'var app = module.exports = express.createServer();'
164
165
  , ''
@@ -183,12 +184,16 @@ var app = [
183
184
  , ''
184
185
  , '// Routes'
185
186
  , ''
186
- , 'app.get(\'/\', routes.index);'
187
+ , 'app.get(\'/\', function(req, res){'
188
+ , ' res.render(\'index\', {'
189
+ , ' title: \'Express\''
190
+ , ' });'
191
+ , '});'
187
192
  , ''
188
193
  , 'app.listen(3000);'
189
194
  , 'console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env);'
190
195
  , ''
191
- ].join(eol);
196
+ ].join('\n');
192
197
 
193
198
  // Parse arguments
194
199
 
@@ -254,16 +259,7 @@ while (args.length) {
254
259
  */
255
260
 
256
261
  function createApplicationAt(path) {
257
- console.log();
258
- process.on('exit', function(){
259
- console.log();
260
- console.log(' dont forget to install dependencies:');
261
- console.log(' $ cd %s && npm install', path);
262
- console.log();
263
- });
264
-
265
262
  mkdir(path, function(){
266
- mkdir(path + '/public');
267
263
  mkdir(path + '/public/javascripts');
268
264
  mkdir(path + '/public/images');
269
265
  mkdir(path + '/public/stylesheets', function(){
@@ -271,15 +267,16 @@ function createApplicationAt(path) {
271
267
  case 'stylus':
272
268
  write(path + '/public/stylesheets/style.styl', stylus);
273
269
  break;
270
+ case 'less':
271
+ write(path + '/public/stylesheets/style.less', less);
272
+ break;
273
+ case 'sass':
274
+ write(path + '/public/stylesheets/style.sass', sass);
275
+ break;
274
276
  default:
275
277
  write(path + '/public/stylesheets/style.css', css);
276
278
  }
277
279
  });
278
-
279
- mkdir(path + '/routes', function(){
280
- write(path + '/routes/index.js', index);
281
- });
282
-
283
280
  mkdir(path + '/views', function(){
284
281
  switch (templateEngine) {
285
282
  case 'ejs':
@@ -295,8 +292,12 @@ function createApplicationAt(path) {
295
292
 
296
293
  // CSS Engine support
297
294
  switch (cssEngine) {
295
+ case 'sass':
296
+ case 'less':
297
+ app = app.replace('{css}', '\n app.use(express.compiler({ src: __dirname + \'/public\', enable: [\'' + cssEngine + '\'] }));');
298
+ break;
298
299
  case 'stylus':
299
- app = app.replace('{css}', eol + ' app.use(require(\'stylus\').middleware({ src: __dirname + \'/public\' }));');
300
+ app = app.replace('{css}', '\n app.use(require(\'stylus\').middleware({ src: __dirname + \'/public\' }));');
300
301
  break;
301
302
  default:
302
303
  app = app.replace('{css}', '');
@@ -304,22 +305,22 @@ function createApplicationAt(path) {
304
305
 
305
306
  // Session support
306
307
  app = app.replace('{sess}', sessions
307
- ? eol + ' app.use(express.cookieParser());' + eol + ' app.use(express.session({ secret: \'your secret here\' }));'
308
+ ? '\n app.use(express.cookieParser());\n app.use(express.session({ secret: \'your secret here\' }));'
308
309
  : '');
309
310
 
310
311
  // Template support
311
312
  app = app.replace(':TEMPLATE', templateEngine);
312
313
 
313
314
  // package.json
314
- var json = '{' + eol;
315
- json += ' "name": "application-name"' + eol;
316
- json += ' , "version": "0.0.1"' + eol;
317
- json += ' , "private": true' + eol;
318
- json += ' , "dependencies": {' + eol;
319
- json += ' "express": "' + version + '"' + eol;
320
- if (cssEngine) json += ' , "' + cssEngine + '": ">= 0.0.1"' + eol;
321
- if (templateEngine) json += ' , "' + templateEngine + '": ">= 0.0.1"' + eol;
322
- json += ' }' + eol;
315
+ var json = '{\n';
316
+ json += ' "name": "application-name"\n';
317
+ json += ' , "version": "0.0.1"\n';
318
+ json += ' , "private": true\n';
319
+ json += ' , "dependencies": {\n';
320
+ json += ' "express": "' + version + '"\n';
321
+ if (cssEngine) json += ' , "' + cssEngine + '": ">= 0.0.1"\n';
322
+ if (templateEngine) json += ' , "' + templateEngine + '": ">= 0.0.1"\n';
323
+ json += ' }\n';
323
324
  json += '}';
324
325
 
325
326
 
@@ -397,9 +398,9 @@ function prompt(msg, fn) {
397
398
  */
398
399
 
399
400
  function mkdir(path, fn) {
400
- mkdirp(path, 0755, function(err){
401
+ exec('mkdir -p ' + path, function(err){
401
402
  if (err) throw err;
402
- console.log(' \033[36mcreate\033[0m : ' + path);
403
+ console.log(' \x1b[36mcreate\x1b[0m : ' + path);
403
404
  fn && fn();
404
405
  });
405
406
  }