vulcan 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (260) hide show
  1. data/lib/vulcan/cli.rb +20 -10
  2. data/lib/vulcan/version.rb +1 -1
  3. data/server/Procfile +1 -1
  4. data/server/bin/web +10 -0
  5. data/server/lib/cloudant.coffee +20 -0
  6. data/server/lib/logger.coffee +17 -0
  7. data/server/lib/on.coffee +10 -0
  8. data/server/lib/spawner.coffee +65 -0
  9. data/server/node_modules/coffee-script/CNAME +1 -0
  10. data/server/node_modules/coffee-script/LICENSE +22 -0
  11. data/server/node_modules/coffee-script/README +51 -0
  12. data/server/node_modules/coffee-script/Rakefile +78 -0
  13. data/server/node_modules/coffee-script/bin/cake +7 -0
  14. data/server/node_modules/coffee-script/bin/coffee +7 -0
  15. data/server/node_modules/coffee-script/extras/jsl.conf +44 -0
  16. data/server/node_modules/coffee-script/lib/coffee-script/browser.js +92 -0
  17. data/server/node_modules/coffee-script/lib/coffee-script/cake.js +111 -0
  18. data/server/node_modules/coffee-script/lib/coffee-script/coffee-script.js +167 -0
  19. data/server/node_modules/coffee-script/lib/coffee-script/command.js +500 -0
  20. data/server/node_modules/coffee-script/lib/coffee-script/grammar.js +606 -0
  21. data/server/node_modules/coffee-script/lib/coffee-script/helpers.js +77 -0
  22. data/server/node_modules/coffee-script/lib/coffee-script/index.js +11 -0
  23. data/server/node_modules/coffee-script/lib/coffee-script/lexer.js +788 -0
  24. data/server/node_modules/coffee-script/lib/coffee-script/nodes.js +2986 -0
  25. data/server/node_modules/coffee-script/lib/coffee-script/optparse.js +138 -0
  26. data/server/node_modules/coffee-script/lib/coffee-script/parser.js +683 -0
  27. data/server/node_modules/coffee-script/lib/coffee-script/repl.js +261 -0
  28. data/server/node_modules/coffee-script/lib/coffee-script/rewriter.js +349 -0
  29. data/server/node_modules/coffee-script/lib/coffee-script/scope.js +146 -0
  30. data/server/node_modules/coffee-script/package.json +55 -0
  31. data/server/node_modules/connect-form/History.md +0 -6
  32. data/server/node_modules/connect-form/lib/connect-form.js +2 -4
  33. data/server/node_modules/connect-form/node_modules/formidable/Readme.md +64 -36
  34. data/server/node_modules/connect-form/node_modules/formidable/lib/incoming_form.js +5 -1
  35. data/server/node_modules/connect-form/node_modules/formidable/package.json +20 -6
  36. data/server/node_modules/connect-form/node_modules/formidable/test/common.js +5 -6
  37. data/server/node_modules/connect-form/node_modules/formidable/test/fixture/file/funkyfilename.txt +1 -0
  38. data/server/node_modules/connect-form/node_modules/formidable/test/fixture/js/special-chars-in-filename.js +1 -1
  39. data/server/node_modules/connect-form/node_modules/formidable/test/{slow → integration}/test-fixtures.js +38 -33
  40. data/server/node_modules/connect-form/node_modules/formidable/test/legacy/simple/test-incoming-form.js +11 -0
  41. data/server/node_modules/connect-form/node_modules/formidable/test/run.js +1 -6
  42. data/server/node_modules/connect-form/node_modules/formidable/test/unit/test-incoming-form.js +63 -0
  43. data/server/node_modules/connect-form/package.json +27 -5
  44. data/server/node_modules/cradle/README.md +10 -10
  45. data/server/node_modules/cradle/lib/cradle.js +117 -523
  46. data/server/node_modules/cradle/lib/cradle/database/attachments.js +120 -0
  47. data/server/node_modules/cradle/lib/cradle/database/changes.js +56 -0
  48. data/server/node_modules/cradle/lib/cradle/database/documents.js +215 -0
  49. data/server/node_modules/cradle/lib/cradle/database/index.js +65 -0
  50. data/server/node_modules/cradle/lib/cradle/database/views.js +125 -0
  51. data/server/node_modules/cradle/node_modules/follow/LICENSE +202 -0
  52. data/server/node_modules/cradle/node_modules/follow/README.md +164 -0
  53. data/server/node_modules/cradle/node_modules/follow/Rakefile +54 -0
  54. data/server/node_modules/cradle/node_modules/follow/api.js +35 -0
  55. data/server/node_modules/cradle/node_modules/follow/browser/eventemitter2.js +453 -0
  56. data/server/node_modules/cradle/node_modules/follow/browser/export.js +78 -0
  57. data/server/node_modules/cradle/node_modules/follow/browser/index.html +14 -0
  58. data/server/node_modules/cradle/node_modules/follow/browser/jquery-1.6.1.min.js +18 -0
  59. data/server/node_modules/cradle/node_modules/follow/browser/log4js.js +46 -0
  60. data/server/node_modules/cradle/node_modules/follow/browser/main.js +92 -0
  61. data/server/node_modules/cradle/node_modules/follow/browser/querystring.js +28 -0
  62. data/server/node_modules/cradle/node_modules/follow/browser/request.jquery.js +237 -0
  63. data/server/node_modules/cradle/node_modules/follow/browser/require.js +33 -0
  64. data/server/node_modules/cradle/node_modules/follow/browser/util.js +28 -0
  65. data/server/node_modules/cradle/node_modules/follow/cli.js +101 -0
  66. data/server/node_modules/cradle/node_modules/follow/lib/feed.js +556 -0
  67. data/server/node_modules/cradle/node_modules/follow/lib/index.js +66 -0
  68. data/server/node_modules/cradle/node_modules/follow/lib/stream.js +305 -0
  69. data/server/node_modules/cradle/node_modules/follow/node_modules/request/LICENSE +55 -0
  70. data/server/node_modules/cradle/node_modules/follow/node_modules/request/README.md +285 -0
  71. data/server/node_modules/cradle/node_modules/follow/node_modules/request/main.js +618 -0
  72. data/server/node_modules/cradle/node_modules/follow/node_modules/request/mimetypes.js +146 -0
  73. data/server/node_modules/cradle/node_modules/follow/node_modules/request/oauth.js +34 -0
  74. data/server/node_modules/cradle/node_modules/follow/node_modules/request/package.json +42 -0
  75. data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/googledoodle.png +0 -0
  76. data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/run.sh +6 -0
  77. data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/server.js +57 -0
  78. data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/test-body.js +90 -0
  79. data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/test-cookie.js +29 -0
  80. data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/test-cookiejar.js +90 -0
  81. data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/test-errors.js +30 -0
  82. data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/test-oauth.js +109 -0
  83. data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/test-pipes.js +167 -0
  84. data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/test-proxy.js +39 -0
  85. data/server/node_modules/cradle/node_modules/follow/node_modules/request/tests/test-timeout.js +87 -0
  86. data/server/node_modules/cradle/node_modules/follow/node_modules/request/uuid.js +19 -0
  87. data/server/node_modules/cradle/node_modules/follow/node_modules/request/vendor/cookie/index.js +55 -0
  88. data/server/node_modules/cradle/node_modules/follow/node_modules/request/vendor/cookie/jar.js +72 -0
  89. data/server/node_modules/cradle/node_modules/follow/package.json +45 -0
  90. data/server/node_modules/cradle/node_modules/follow/test/couch.js +153 -0
  91. data/server/node_modules/cradle/node_modules/follow/test/follow.js +136 -0
  92. data/server/node_modules/cradle/node_modules/follow/test/issues.js +178 -0
  93. data/server/node_modules/cradle/node_modules/follow/test/issues/10.js +24 -0
  94. data/server/node_modules/cradle/node_modules/follow/test/stream.js +493 -0
  95. data/server/node_modules/cradle/node_modules/request/LICENSE +55 -0
  96. data/server/node_modules/cradle/node_modules/request/README.md +287 -0
  97. data/server/node_modules/cradle/node_modules/request/forever.js +103 -0
  98. data/server/node_modules/cradle/node_modules/request/main.js +913 -0
  99. data/server/node_modules/cradle/node_modules/request/mimetypes.js +152 -0
  100. data/server/node_modules/cradle/node_modules/request/oauth.js +34 -0
  101. data/server/node_modules/cradle/node_modules/request/package.json +42 -0
  102. data/server/node_modules/cradle/node_modules/request/tests/googledoodle.png +0 -0
  103. data/server/node_modules/cradle/node_modules/request/tests/run.js +38 -0
  104. data/server/node_modules/cradle/node_modules/request/tests/server.js +82 -0
  105. data/server/node_modules/cradle/node_modules/request/tests/squid.conf +77 -0
  106. data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/ca.cnf +20 -0
  107. data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/ca.crl +0 -0
  108. data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/ca.crt +17 -0
  109. data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/ca.csr +13 -0
  110. data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/ca.key +18 -0
  111. data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/ca.srl +1 -0
  112. data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/server.cnf +19 -0
  113. data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/server.crt +16 -0
  114. data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/server.csr +11 -0
  115. data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/server.js +28 -0
  116. data/server/node_modules/cradle/node_modules/request/tests/ssl/ca/server.key +9 -0
  117. data/server/node_modules/cradle/node_modules/request/tests/ssl/npm-ca.crt +16 -0
  118. data/server/node_modules/cradle/node_modules/request/tests/ssl/test.crt +15 -0
  119. data/server/node_modules/cradle/node_modules/request/tests/ssl/test.key +15 -0
  120. data/server/node_modules/cradle/node_modules/request/tests/test-body.js +95 -0
  121. data/server/node_modules/cradle/node_modules/request/tests/test-cookie.js +29 -0
  122. data/server/node_modules/cradle/node_modules/request/tests/test-cookiejar.js +90 -0
  123. data/server/node_modules/cradle/node_modules/request/tests/test-defaults.js +68 -0
  124. data/server/node_modules/cradle/node_modules/request/tests/test-errors.js +37 -0
  125. data/server/node_modules/cradle/node_modules/request/tests/test-headers.js +52 -0
  126. data/server/node_modules/cradle/node_modules/request/tests/test-httpModule.js +94 -0
  127. data/server/node_modules/cradle/node_modules/request/tests/test-https-strict.js +97 -0
  128. data/server/node_modules/cradle/node_modules/request/tests/test-https.js +86 -0
  129. data/server/node_modules/cradle/node_modules/request/tests/test-oauth.js +117 -0
  130. data/server/node_modules/cradle/node_modules/request/tests/test-params.js +92 -0
  131. data/server/node_modules/cradle/node_modules/request/tests/test-pipes.js +202 -0
  132. data/server/node_modules/cradle/node_modules/request/tests/test-proxy.js +39 -0
  133. data/server/node_modules/cradle/node_modules/request/tests/test-qs.js +28 -0
  134. data/server/node_modules/cradle/node_modules/request/tests/test-redirect.js +154 -0
  135. data/server/node_modules/cradle/node_modules/request/tests/test-timeout.js +87 -0
  136. data/server/node_modules/cradle/node_modules/request/tests/test-toJSON.js +14 -0
  137. data/server/node_modules/cradle/node_modules/request/tests/test-tunnel.js +61 -0
  138. data/server/node_modules/cradle/node_modules/request/tunnel.js +229 -0
  139. data/server/node_modules/cradle/node_modules/request/uuid.js +19 -0
  140. data/server/node_modules/cradle/node_modules/request/vendor/cookie/index.js +65 -0
  141. data/server/node_modules/cradle/node_modules/request/vendor/cookie/jar.js +72 -0
  142. data/server/node_modules/cradle/node_modules/vargs/package.json +33 -10
  143. data/server/node_modules/cradle/package.json +50 -12
  144. data/server/node_modules/cradle/test/cache-test.js +1 -4
  145. data/server/node_modules/cradle/test/connection-test.js +179 -0
  146. data/server/node_modules/cradle/test/database-attachment-test.js +344 -0
  147. data/server/node_modules/cradle/test/database-cache-test.js +132 -0
  148. data/server/node_modules/cradle/test/database-test.js +219 -0
  149. data/server/node_modules/cradle/test/database-view-test.js +141 -0
  150. data/server/node_modules/cradle/test/fixtures/databases.json +28 -1
  151. data/server/node_modules/cradle/test/helpers/seed.js +14 -5
  152. data/server/node_modules/cradle/test/response-test.js +1 -1
  153. data/server/node_modules/express/History.md +16 -0
  154. data/server/node_modules/express/bin/express +7 -6
  155. data/server/node_modules/express/lib-cov/application.js +510 -0
  156. data/server/node_modules/express/lib-cov/express.js +65 -0
  157. data/server/node_modules/express/lib-cov/middleware.js +54 -0
  158. data/server/node_modules/express/lib-cov/request.js +225 -0
  159. data/server/node_modules/express/lib-cov/response.js +611 -0
  160. data/server/node_modules/express/lib-cov/router/collection.js +40 -0
  161. data/server/node_modules/express/lib-cov/router/index.js +515 -0
  162. data/server/node_modules/express/lib-cov/router/methods.js +9 -0
  163. data/server/node_modules/express/lib-cov/router/route.js +68 -0
  164. data/server/node_modules/express/lib-cov/utils.js +151 -0
  165. data/server/node_modules/express/lib-cov/view.js +81 -0
  166. data/server/node_modules/express/lib/express.js +1 -1
  167. data/server/node_modules/express/lib/http.js +1 -2
  168. data/server/node_modules/express/lib/request.js +2 -2
  169. data/server/node_modules/express/lib/router/methods.js +10 -1
  170. data/server/node_modules/express/node_modules/connect/lib/connect.js +1 -1
  171. data/server/node_modules/express/node_modules/connect/lib/http.js +3 -2
  172. data/server/node_modules/express/node_modules/connect/lib/middleware/limit.js +0 -2
  173. data/server/node_modules/express/node_modules/connect/lib/middleware/session.js +1 -2
  174. data/server/node_modules/express/node_modules/connect/node_modules/formidable/Readme.md +42 -25
  175. data/server/node_modules/express/node_modules/connect/node_modules/formidable/lib/incoming_form.js +1 -0
  176. data/server/node_modules/express/node_modules/connect/node_modules/formidable/package.json +14 -3
  177. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js +11 -0
  178. data/server/node_modules/express/node_modules/connect/package.json +35 -7
  179. data/server/node_modules/express/node_modules/mime/package.json +30 -8
  180. data/server/node_modules/express/node_modules/mkdirp/README.markdown +35 -2
  181. data/server/node_modules/express/node_modules/mkdirp/examples/pow.js +1 -1
  182. data/server/node_modules/express/node_modules/mkdirp/index.js +72 -13
  183. data/server/node_modules/express/node_modules/mkdirp/package.json +39 -21
  184. data/server/node_modules/express/node_modules/mkdirp/test/chmod.js +38 -0
  185. data/server/node_modules/express/node_modules/mkdirp/test/clobber.js +37 -0
  186. data/server/node_modules/express/node_modules/mkdirp/test/perm.js +32 -0
  187. data/server/node_modules/express/node_modules/mkdirp/test/perm_sync.js +39 -0
  188. data/server/node_modules/express/node_modules/mkdirp/test/sync.js +27 -0
  189. data/server/node_modules/express/node_modules/mkdirp/test/umask.js +28 -0
  190. data/server/node_modules/express/node_modules/mkdirp/test/umask_sync.js +27 -0
  191. data/server/node_modules/express/node_modules/qs/History.md +10 -0
  192. data/server/node_modules/express/node_modules/qs/Readme.md +9 -2
  193. data/server/node_modules/express/node_modules/qs/examples.js +3 -0
  194. data/server/node_modules/express/node_modules/qs/lib/querystring.js +8 -6
  195. data/server/node_modules/express/node_modules/qs/package.json +26 -8
  196. data/server/node_modules/express/node_modules/qs/test/parse.js +13 -1
  197. data/server/node_modules/express/node_modules/qs/test/stringify.js +45 -37
  198. data/server/node_modules/express/package.json +55 -16
  199. data/server/node_modules/express/test.js +41 -0
  200. data/server/node_modules/knox/package.json +26 -4
  201. data/server/node_modules/node-uuid/package.json +40 -11
  202. data/server/node_modules/node-uuid/test/test.js +1 -1
  203. data/server/node_modules/nodemon/README.md +120 -0
  204. data/server/node_modules/nodemon/nodemon.js +518 -0
  205. data/server/node_modules/nodemon/nodemonignore.example +11 -0
  206. data/server/node_modules/nodemon/package.json +49 -0
  207. data/server/node_modules/restler/README.md +144 -94
  208. data/server/node_modules/restler/lib/multipartform.js +2 -0
  209. data/server/node_modules/restler/lib/restler.js +218 -61
  210. data/server/node_modules/restler/package.json +35 -8
  211. data/server/node_modules/restler/test/all.js +6 -1
  212. data/server/node_modules/restler/test/restler.js +624 -118
  213. data/server/package.json +14 -10
  214. data/server/web.coffee +64 -0
  215. data/server/web.js +15 -3
  216. metadata +170 -57
  217. data/server/index.js +0 -14
  218. data/server/node_modules/connect-form/LICENSE +0 -22
  219. data/server/node_modules/connect-form/index.js +0 -100
  220. data/server/node_modules/connect-form/node_modules/formidable/test/fast/test-incoming-form.js +0 -45
  221. data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/no-filename/generic.http +0 -13
  222. data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-chrome-13.http +0 -26
  223. data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-firefox-3.6.http +0 -24
  224. data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-safari-5.http +0 -23
  225. data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-chrome-12.http +0 -24
  226. data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-ie-7.http +0 -22
  227. data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-ie-8.http +0 -22
  228. data/server/node_modules/connect-form/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-safari-5.http +0 -22
  229. data/server/node_modules/connect-form/node_modules/formidable/test/fixture/multi_video.upload +0 -0
  230. data/server/node_modules/cradle/Makefile +0 -10
  231. data/server/node_modules/cradle/test/cradle-test.js +0 -650
  232. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/no-filename/generic.http +0 -13
  233. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-chrome-13.http +0 -26
  234. 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
  235. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/osx-safari-5.http +0 -23
  236. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-chrome-12.http +0 -24
  237. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-ie-7.http +0 -22
  238. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-ie-8.http +0 -22
  239. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/xp-safari-5.http +0 -22
  240. data/server/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/multi_video.upload +0 -0
  241. data/server/node_modules/express/node_modules/connect/test.js +0 -52
  242. data/server/node_modules/express/testing/foo/app.js +0 -35
  243. data/server/node_modules/express/testing/foo/package.json +0 -9
  244. data/server/node_modules/express/testing/foo/public/stylesheets/style.css +0 -8
  245. data/server/node_modules/express/testing/foo/routes/index.js +0 -10
  246. data/server/node_modules/express/testing/foo/views/index.jade +0 -2
  247. data/server/node_modules/express/testing/foo/views/layout.jade +0 -6
  248. data/server/node_modules/express/testing/index.js +0 -43
  249. data/server/node_modules/express/testing/public/test.txt +0 -2971
  250. data/server/node_modules/express/testing/views/page.html +0 -1
  251. data/server/node_modules/express/testing/views/page.jade +0 -3
  252. data/server/node_modules/express/testing/views/test.md +0 -1
  253. data/server/node_modules/express/testing/views/user/index.jade +0 -1
  254. data/server/node_modules/express/testing/views/user/list.jade +0 -1
  255. data/server/node_modules/knox/lib/knox/mime/index.js +0 -308
  256. data/server/node_modules/knox/lib/knox/mime/test.js +0 -59
  257. data/server/node_modules/node-uuid/test/benchmark-native +0 -0
  258. data/server/node_modules/on/index.js +0 -13
  259. data/server/node_modules/restler/test/test_helper.js +0 -163
  260. data/server/node_modules/spawner/index.js +0 -106
@@ -0,0 +1,152 @@
1
+ // from http://github.com/felixge/node-paperboy
2
+ exports.types = {
3
+ "3gp":"video/3gpp",
4
+ "aiff":"audio/x-aiff",
5
+ "arj":"application/x-arj-compressed",
6
+ "asf":"video/x-ms-asf",
7
+ "asx":"video/x-ms-asx",
8
+ "au":"audio/ulaw",
9
+ "avi":"video/x-msvideo",
10
+ "bcpio":"application/x-bcpio",
11
+ "ccad":"application/clariscad",
12
+ "cod":"application/vnd.rim.cod",
13
+ "com":"application/x-msdos-program",
14
+ "cpio":"application/x-cpio",
15
+ "cpt":"application/mac-compactpro",
16
+ "csh":"application/x-csh",
17
+ "css":"text/css",
18
+ "deb":"application/x-debian-package",
19
+ "dl":"video/dl",
20
+ "doc":"application/msword",
21
+ "drw":"application/drafting",
22
+ "dvi":"application/x-dvi",
23
+ "dwg":"application/acad",
24
+ "dxf":"application/dxf",
25
+ "dxr":"application/x-director",
26
+ "etx":"text/x-setext",
27
+ "ez":"application/andrew-inset",
28
+ "fli":"video/x-fli",
29
+ "flv":"video/x-flv",
30
+ "gif":"image/gif",
31
+ "gl":"video/gl",
32
+ "gtar":"application/x-gtar",
33
+ "gz":"application/x-gzip",
34
+ "hdf":"application/x-hdf",
35
+ "hqx":"application/mac-binhex40",
36
+ "html":"text/html",
37
+ "ice":"x-conference/x-cooltalk",
38
+ "ico":"image/x-icon",
39
+ "ief":"image/ief",
40
+ "igs":"model/iges",
41
+ "ips":"application/x-ipscript",
42
+ "ipx":"application/x-ipix",
43
+ "jad":"text/vnd.sun.j2me.app-descriptor",
44
+ "jar":"application/java-archive",
45
+ "jpeg":"image/jpeg",
46
+ "jpg":"image/jpeg",
47
+ "js":"text/javascript",
48
+ "json":"application/json",
49
+ "latex":"application/x-latex",
50
+ "lsp":"application/x-lisp",
51
+ "lzh":"application/octet-stream",
52
+ "m":"text/plain",
53
+ "m3u":"audio/x-mpegurl",
54
+ "m4v":"video/mp4",
55
+ "man":"application/x-troff-man",
56
+ "me":"application/x-troff-me",
57
+ "midi":"audio/midi",
58
+ "mif":"application/x-mif",
59
+ "mime":"www/mime",
60
+ "mkv":" video/x-matrosk",
61
+ "movie":"video/x-sgi-movie",
62
+ "mp4":"video/mp4",
63
+ "mp41":"video/mp4",
64
+ "mp42":"video/mp4",
65
+ "mpg":"video/mpeg",
66
+ "mpga":"audio/mpeg",
67
+ "ms":"application/x-troff-ms",
68
+ "mustache":"text/plain",
69
+ "nc":"application/x-netcdf",
70
+ "oda":"application/oda",
71
+ "ogm":"application/ogg",
72
+ "pbm":"image/x-portable-bitmap",
73
+ "pdf":"application/pdf",
74
+ "pgm":"image/x-portable-graymap",
75
+ "pgn":"application/x-chess-pgn",
76
+ "pgp":"application/pgp",
77
+ "pm":"application/x-perl",
78
+ "png":"image/png",
79
+ "pnm":"image/x-portable-anymap",
80
+ "ppm":"image/x-portable-pixmap",
81
+ "ppz":"application/vnd.ms-powerpoint",
82
+ "pre":"application/x-freelance",
83
+ "prt":"application/pro_eng",
84
+ "ps":"application/postscript",
85
+ "qt":"video/quicktime",
86
+ "ra":"audio/x-realaudio",
87
+ "rar":"application/x-rar-compressed",
88
+ "ras":"image/x-cmu-raster",
89
+ "rgb":"image/x-rgb",
90
+ "rm":"audio/x-pn-realaudio",
91
+ "rpm":"audio/x-pn-realaudio-plugin",
92
+ "rtf":"text/rtf",
93
+ "rtx":"text/richtext",
94
+ "scm":"application/x-lotusscreencam",
95
+ "set":"application/set",
96
+ "sgml":"text/sgml",
97
+ "sh":"application/x-sh",
98
+ "shar":"application/x-shar",
99
+ "silo":"model/mesh",
100
+ "sit":"application/x-stuffit",
101
+ "skt":"application/x-koan",
102
+ "smil":"application/smil",
103
+ "snd":"audio/basic",
104
+ "sol":"application/solids",
105
+ "spl":"application/x-futuresplash",
106
+ "src":"application/x-wais-source",
107
+ "stl":"application/SLA",
108
+ "stp":"application/STEP",
109
+ "sv4cpio":"application/x-sv4cpio",
110
+ "sv4crc":"application/x-sv4crc",
111
+ "svg":"image/svg+xml",
112
+ "swf":"application/x-shockwave-flash",
113
+ "tar":"application/x-tar",
114
+ "tcl":"application/x-tcl",
115
+ "tex":"application/x-tex",
116
+ "texinfo":"application/x-texinfo",
117
+ "tgz":"application/x-tar-gz",
118
+ "tiff":"image/tiff",
119
+ "tr":"application/x-troff",
120
+ "tsi":"audio/TSP-audio",
121
+ "tsp":"application/dsptype",
122
+ "tsv":"text/tab-separated-values",
123
+ "unv":"application/i-deas",
124
+ "ustar":"application/x-ustar",
125
+ "vcd":"application/x-cdlink",
126
+ "vda":"application/vda",
127
+ "vivo":"video/vnd.vivo",
128
+ "vrm":"x-world/x-vrml",
129
+ "wav":"audio/x-wav",
130
+ "wax":"audio/x-ms-wax",
131
+ "webm":"video/webm",
132
+ "wma":"audio/x-ms-wma",
133
+ "wmv":"video/x-ms-wmv",
134
+ "wmx":"video/x-ms-wmx",
135
+ "wrl":"model/vrml",
136
+ "wvx":"video/x-ms-wvx",
137
+ "xbm":"image/x-xbitmap",
138
+ "xlw":"application/vnd.ms-excel",
139
+ "xml":"text/xml",
140
+ "xpm":"image/x-xpixmap",
141
+ "xwd":"image/x-xwindowdump",
142
+ "xyz":"chemical/x-pdb",
143
+ "zip":"application/zip"
144
+ };
145
+
146
+ exports.lookup = function(ext, defaultType) {
147
+ defaultType = defaultType || 'application/octet-stream';
148
+
149
+ return (ext in exports.types)
150
+ ? exports.types[ext]
151
+ : defaultType;
152
+ };
@@ -0,0 +1,34 @@
1
+ var crypto = require('crypto')
2
+ , qs = require('querystring')
3
+ ;
4
+
5
+ function sha1 (key, body) {
6
+ return crypto.createHmac('sha1', key).update(body).digest('base64')
7
+ }
8
+
9
+ function rfc3986 (str) {
10
+ return encodeURIComponent(str)
11
+ .replace(/!/g,'%21')
12
+ .replace(/\*/g,'%2A')
13
+ .replace(/\(/g,'%28')
14
+ .replace(/\)/g,'%29')
15
+ .replace(/'/g,'%27')
16
+ ;
17
+ }
18
+
19
+ function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret, body) {
20
+ // adapted from https://dev.twitter.com/docs/auth/oauth
21
+ var base =
22
+ (httpMethod || 'GET') + "&" +
23
+ encodeURIComponent( base_uri ) + "&" +
24
+ Object.keys(params).sort().map(function (i) {
25
+ // big WTF here with the escape + encoding but it's what twitter wants
26
+ return escape(rfc3986(i)) + "%3D" + escape(rfc3986(params[i]))
27
+ }).join("%26")
28
+ var key = consumer_secret + '&'
29
+ if (token_secret) key += token_secret
30
+ return sha1(key, base)
31
+ }
32
+
33
+ exports.hmacsign = hmacsign
34
+ exports.rfc3986 = rfc3986
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "request",
3
+ "description": "Simplified HTTP request client.",
4
+ "tags": [
5
+ "http",
6
+ "simple",
7
+ "util",
8
+ "utility"
9
+ ],
10
+ "version": "2.9.202",
11
+ "author": {
12
+ "name": "Mikeal Rogers",
13
+ "email": "mikeal.rogers@gmail.com"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git://github.com/mikeal/request.git"
18
+ },
19
+ "bugs": {
20
+ "url": "http://github.com/mikeal/request/issues"
21
+ },
22
+ "engines": [
23
+ "node >= 0.3.6"
24
+ ],
25
+ "main": "./main",
26
+ "scripts": {
27
+ "test": "node tests/run.js"
28
+ },
29
+ "_npmUser": {
30
+ "name": "ddollar",
31
+ "email": "ddollar@gmail.com"
32
+ },
33
+ "_id": "request@2.9.202",
34
+ "dependencies": {},
35
+ "devDependencies": {},
36
+ "optionalDependencies": {},
37
+ "_engineSupported": true,
38
+ "_npmVersion": "1.1.21",
39
+ "_nodeVersion": "v0.6.17",
40
+ "_defaultsLoaded": true,
41
+ "_from": "request@2.x.x"
42
+ }
@@ -0,0 +1,38 @@
1
+ var spawn = require('child_process').spawn
2
+ , exitCode = 0
3
+ ;
4
+
5
+ var tests = [
6
+ 'test-body.js'
7
+ , 'test-cookie.js'
8
+ , 'test-cookiejar.js'
9
+ , 'test-defaults.js'
10
+ , 'test-errors.js'
11
+ , 'test-headers.js'
12
+ , 'test-httpModule.js'
13
+ , 'test-https.js'
14
+ , 'test-https-strict.js'
15
+ , 'test-oauth.js'
16
+ , 'test-pipes.js'
17
+ , 'test-proxy.js'
18
+ , 'test-qs.js'
19
+ , 'test-redirect.js'
20
+ , 'test-timeout.js'
21
+ , 'test-toJSON.js'
22
+ , 'test-tunnel.js'
23
+ ]
24
+
25
+ var next = function () {
26
+ if (tests.length === 0) process.exit(exitCode);
27
+
28
+ var file = tests.shift()
29
+ console.log(file)
30
+ var proc = spawn('node', [ 'tests/' + file ])
31
+ proc.stdout.pipe(process.stdout)
32
+ proc.stderr.pipe(process.stderr)
33
+ proc.on('exit', function (code) {
34
+ exitCode += code || 0
35
+ next()
36
+ })
37
+ }
38
+ next()
@@ -0,0 +1,82 @@
1
+ var fs = require('fs')
2
+ , http = require('http')
3
+ , path = require('path')
4
+ , https = require('https')
5
+ , events = require('events')
6
+ , stream = require('stream')
7
+ , assert = require('assert')
8
+ ;
9
+
10
+ exports.createServer = function (port) {
11
+ port = port || 6767
12
+ var s = http.createServer(function (req, resp) {
13
+ s.emit(req.url, req, resp);
14
+ })
15
+ s.port = port
16
+ s.url = 'http://localhost:'+port
17
+ return s;
18
+ }
19
+
20
+ exports.createSSLServer = function(port, opts) {
21
+ port = port || 16767
22
+
23
+ var options = { 'key' : path.join(__dirname, 'ssl', 'test.key')
24
+ , 'cert': path.join(__dirname, 'ssl', 'test.crt')
25
+ }
26
+ if (opts) {
27
+ for (var i in opts) options[i] = opts[i]
28
+ }
29
+
30
+ for (var i in options) {
31
+ options[i] = fs.readFileSync(options[i])
32
+ }
33
+
34
+ var s = https.createServer(options, function (req, resp) {
35
+ s.emit(req.url, req, resp);
36
+ })
37
+ s.port = port
38
+ s.url = 'https://localhost:'+port
39
+ return s;
40
+ }
41
+
42
+ exports.createPostStream = function (text) {
43
+ var postStream = new stream.Stream();
44
+ postStream.writeable = true;
45
+ postStream.readable = true;
46
+ setTimeout(function () {postStream.emit('data', new Buffer(text)); postStream.emit('end')}, 0);
47
+ return postStream;
48
+ }
49
+ exports.createPostValidator = function (text) {
50
+ var l = function (req, resp) {
51
+ var r = '';
52
+ req.on('data', function (chunk) {r += chunk})
53
+ req.on('end', function () {
54
+ if (r !== text) console.log(r, text);
55
+ assert.equal(r, text)
56
+ resp.writeHead(200, {'content-type':'text/plain'})
57
+ resp.write('OK')
58
+ resp.end()
59
+ })
60
+ }
61
+ return l;
62
+ }
63
+ exports.createGetResponse = function (text, contentType) {
64
+ var l = function (req, resp) {
65
+ contentType = contentType || 'text/plain'
66
+ resp.writeHead(200, {'content-type':contentType})
67
+ resp.write(text)
68
+ resp.end()
69
+ }
70
+ return l;
71
+ }
72
+ exports.createChunkResponse = function (chunks, contentType) {
73
+ var l = function (req, resp) {
74
+ contentType = contentType || 'text/plain'
75
+ resp.writeHead(200, {'content-type':contentType})
76
+ chunks.forEach(function (chunk) {
77
+ resp.write(chunk)
78
+ })
79
+ resp.end()
80
+ }
81
+ return l;
82
+ }
@@ -0,0 +1,77 @@
1
+ #
2
+ # Recommended minimum configuration:
3
+ #
4
+ acl manager proto cache_object
5
+ acl localhost src 127.0.0.1/32 ::1
6
+ acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
7
+
8
+ # Example rule allowing access from your local networks.
9
+ # Adapt to list your (internal) IP networks from where browsing
10
+ # should be allowed
11
+ acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
12
+ acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
13
+ acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
14
+ acl localnet src fc00::/7 # RFC 4193 local private network range
15
+ acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
16
+
17
+ acl SSL_ports port 443
18
+ acl Safe_ports port 80 # http
19
+ acl Safe_ports port 21 # ftp
20
+ acl Safe_ports port 443 # https
21
+ acl Safe_ports port 70 # gopher
22
+ acl Safe_ports port 210 # wais
23
+ acl Safe_ports port 1025-65535 # unregistered ports
24
+ acl Safe_ports port 280 # http-mgmt
25
+ acl Safe_ports port 488 # gss-http
26
+ acl Safe_ports port 591 # filemaker
27
+ acl Safe_ports port 777 # multiling http
28
+ acl CONNECT method CONNECT
29
+
30
+ #
31
+ # Recommended minimum Access Permission configuration:
32
+ #
33
+ # Only allow cachemgr access from localhost
34
+ http_access allow manager localhost
35
+ http_access deny manager
36
+
37
+ # Deny requests to certain unsafe ports
38
+ http_access deny !Safe_ports
39
+
40
+ # Deny CONNECT to other than secure SSL ports
41
+ #http_access deny CONNECT !SSL_ports
42
+
43
+ # We strongly recommend the following be uncommented to protect innocent
44
+ # web applications running on the proxy server who think the only
45
+ # one who can access services on "localhost" is a local user
46
+ #http_access deny to_localhost
47
+
48
+ #
49
+ # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
50
+ #
51
+
52
+ # Example rule allowing access from your local networks.
53
+ # Adapt localnet in the ACL section to list your (internal) IP networks
54
+ # from where browsing should be allowed
55
+ http_access allow localnet
56
+ http_access allow localhost
57
+
58
+ # And finally deny all other access to this proxy
59
+ http_access deny all
60
+
61
+ # Squid normally listens to port 3128
62
+ http_port 3128
63
+
64
+ # We recommend you to use at least the following line.
65
+ hierarchy_stoplist cgi-bin ?
66
+
67
+ # Uncomment and adjust the following to add a disk cache directory.
68
+ #cache_dir ufs /usr/local/var/cache 100 16 256
69
+
70
+ # Leave coredumps in the first cache dir
71
+ coredump_dir /usr/local/var/cache
72
+
73
+ # Add any of your own refresh_pattern entries above these.
74
+ refresh_pattern ^ftp: 1440 20% 10080
75
+ refresh_pattern ^gopher: 1440 0% 1440
76
+ refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
77
+ refresh_pattern . 0 20% 4320
@@ -0,0 +1,20 @@
1
+ [ req ]
2
+ default_bits = 1024
3
+ days = 3650
4
+ distinguished_name = req_distinguished_name
5
+ attributes = req_attributes
6
+ prompt = no
7
+ output_password = password
8
+
9
+ [ req_distinguished_name ]
10
+ C = US
11
+ ST = CA
12
+ L = Oakland
13
+ O = request
14
+ OU = request Certificate Authority
15
+ CN = requestCA
16
+ emailAddress = mikeal@mikealrogers.com
17
+
18
+ [ req_attributes ]
19
+ challengePassword = password challenge
20
+