traceur-rb 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (255) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +22 -0
  3. data/.rspec +1 -0
  4. data/.ruby-gemset +1 -0
  5. data/.ruby-version +1 -0
  6. data/Gemfile +4 -0
  7. data/Guardfile +8 -0
  8. data/LICENSE.txt +22 -0
  9. data/README.md +87 -0
  10. data/Rakefile +2 -0
  11. data/lib/js/compile.js +31 -0
  12. data/lib/traceur-rb.rb +1 -0
  13. data/lib/traceur.rb +43 -0
  14. data/lib/traceur/compilation_options.rb +65 -0
  15. data/lib/traceur/compiler.rb +33 -0
  16. data/lib/traceur/configuration.rb +47 -0
  17. data/lib/traceur/node.rb +26 -0
  18. data/lib/traceur/node/command_result.rb +28 -0
  19. data/lib/traceur/node/runner.rb +40 -0
  20. data/lib/traceur/version.rb +3 -0
  21. data/spec/examples/classes.js +12 -0
  22. data/spec/integration/examples_spec.rb +28 -0
  23. data/spec/spec_helper.rb +1 -0
  24. data/spec/traceur/compilation_options_spec.rb +31 -0
  25. data/spec/traceur/configuration_spec.rb +54 -0
  26. data/spec/traceur/node_spec.rb +15 -0
  27. data/traceur-rb.gemspec +25 -0
  28. data/vendor/node_modules/.bin/traceur +3 -0
  29. data/vendor/node_modules/traceur/README.md +40 -0
  30. data/vendor/node_modules/traceur/bin/traceur-runtime.js +2101 -0
  31. data/vendor/node_modules/traceur/bin/traceur.js +23034 -0
  32. data/vendor/node_modules/traceur/node_modules/.bin/semver +125 -0
  33. data/vendor/node_modules/traceur/node_modules/commander/Readme.md +208 -0
  34. data/vendor/node_modules/traceur/node_modules/commander/index.js +852 -0
  35. data/vendor/node_modules/traceur/node_modules/commander/package.json +40 -0
  36. data/vendor/node_modules/traceur/node_modules/q-io/.npmignore +1 -0
  37. data/vendor/node_modules/traceur/node_modules/q-io/.travis.yml +3 -0
  38. data/vendor/node_modules/traceur/node_modules/q-io/CHANGES.md +122 -0
  39. data/vendor/node_modules/traceur/node_modules/q-io/LICENSE +19 -0
  40. data/vendor/node_modules/traceur/node_modules/q-io/README.md +928 -0
  41. data/vendor/node_modules/traceur/node_modules/q-io/buffer-stream.js +59 -0
  42. data/vendor/node_modules/traceur/node_modules/q-io/coverage-report.js +44 -0
  43. data/vendor/node_modules/traceur/node_modules/q-io/deprecate.js +51 -0
  44. data/vendor/node_modules/traceur/node_modules/q-io/fs-boot.js +307 -0
  45. data/vendor/node_modules/traceur/node_modules/q-io/fs-common.js +499 -0
  46. data/vendor/node_modules/traceur/node_modules/q-io/fs-mock.js +547 -0
  47. data/vendor/node_modules/traceur/node_modules/q-io/fs-root.js +105 -0
  48. data/vendor/node_modules/traceur/node_modules/q-io/fs.js +355 -0
  49. data/vendor/node_modules/traceur/node_modules/q-io/fs2http.js +65 -0
  50. data/vendor/node_modules/traceur/node_modules/q-io/http-apps.js +152 -0
  51. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/chain.js +24 -0
  52. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/content.js +93 -0
  53. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/cookie.js +154 -0
  54. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/decorators.js +178 -0
  55. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/fs.js +417 -0
  56. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/html.js +58 -0
  57. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/json.js +78 -0
  58. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/negotiate.js +120 -0
  59. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/proxy.js +27 -0
  60. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/redirect.js +209 -0
  61. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/route.js +125 -0
  62. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/status.js +175 -0
  63. data/vendor/node_modules/traceur/node_modules/q-io/http-cookie.js +75 -0
  64. data/vendor/node_modules/traceur/node_modules/q-io/http.js +378 -0
  65. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/.npmignore +11 -0
  66. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/.travis.yml +4 -0
  67. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/CHANGES.md +78 -0
  68. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/LICENSE.md +21 -0
  69. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/README.md +1285 -0
  70. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/collections.js +22 -0
  71. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/dict.js +142 -0
  72. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/fast-map.js +57 -0
  73. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/fast-set.js +183 -0
  74. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-collection.js +261 -0
  75. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-map.js +186 -0
  76. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-order.js +55 -0
  77. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-set.js +59 -0
  78. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/heap.js +236 -0
  79. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/iterator.js +371 -0
  80. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/list.js +435 -0
  81. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/array-changes.js +247 -0
  82. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/map-changes.js +147 -0
  83. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/property-changes.js +448 -0
  84. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/range-changes.js +139 -0
  85. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/lru-map.js +79 -0
  86. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/lru-set.js +142 -0
  87. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/map.js +60 -0
  88. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/multi-map.js +41 -0
  89. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/package.json +12 -0
  90. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/sync +7 -0
  91. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/sync.patch +48 -0
  92. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/weak-map.js +590 -0
  93. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/package.json +49 -0
  94. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/set.js +173 -0
  95. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-array.js +274 -0
  96. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-function.js +59 -0
  97. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-object.js +538 -0
  98. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-regexp.js +14 -0
  99. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim.js +6 -0
  100. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-array-map.js +49 -0
  101. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-array-set.js +51 -0
  102. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-array.js +269 -0
  103. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-map.js +61 -0
  104. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-set.js +736 -0
  105. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/tree-log.js +40 -0
  106. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/weak-map.js +1 -0
  107. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/LICENSE +19 -0
  108. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/README.md +66 -0
  109. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/mime.js +114 -0
  110. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/package.json +35 -0
  111. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/test.js +84 -0
  112. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/types/mime.types +1588 -0
  113. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/types/node.types +77 -0
  114. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/CHANGES +15 -0
  115. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/LICENSE +19 -0
  116. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/README +96 -0
  117. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/lib/mimeparse.js +166 -0
  118. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/package.json +43 -0
  119. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/CONTRIBUTING.md +40 -0
  120. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/LICENSE +19 -0
  121. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/README.md +813 -0
  122. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/benchmark/compare-with-callbacks.js +71 -0
  123. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/benchmark/scenarios.js +36 -0
  124. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/package.json +93 -0
  125. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/q.js +1937 -0
  126. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/queue.js +35 -0
  127. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/.gitmodules +6 -0
  128. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/History.md +36 -0
  129. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/Makefile +7 -0
  130. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/Readme.md +38 -0
  131. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/benchmark.js +32 -0
  132. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/examples.js +39 -0
  133. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/index.js +2 -0
  134. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/lib/querystring.js +123 -0
  135. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/package.json +19 -0
  136. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/.gitmodules +3 -0
  137. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/.npmignore +3 -0
  138. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/History.md +128 -0
  139. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/Makefile +53 -0
  140. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/Readme.md +61 -0
  141. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/bin/expresso +856 -0
  142. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/api.html +1080 -0
  143. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/index.html +377 -0
  144. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/index.md +290 -0
  145. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/layout/foot.html +3 -0
  146. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/layout/head.html +42 -0
  147. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/lib/bar.js +4 -0
  148. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/lib/foo.js +16 -0
  149. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/package.json +12 -0
  150. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/assert.test.js +91 -0
  151. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/async.test.js +12 -0
  152. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/bar.test.js +13 -0
  153. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/foo.test.js +14 -0
  154. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/http.test.js +146 -0
  155. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/serial/async.test.js +39 -0
  156. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/serial/http.test.js +48 -0
  157. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/.gitmodules +3 -0
  158. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/History.md +22 -0
  159. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/Makefile +6 -0
  160. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/Readme.md +248 -0
  161. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/examples/runner.js +53 -0
  162. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/index.js +2 -0
  163. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/lib/eql.js +91 -0
  164. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/lib/should.js +548 -0
  165. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/package.json +8 -0
  166. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/test/should.test.js +358 -0
  167. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/test/querystring.test.js +133 -0
  168. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/.npmignore +3 -0
  169. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/.travis.yml +4 -0
  170. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/LICENSE.md +20 -0
  171. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/README.md +33 -0
  172. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/package.json +37 -0
  173. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/test/url2-spec.js +125 -0
  174. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/url2.js +151 -0
  175. data/vendor/node_modules/traceur/node_modules/q-io/package.json +51 -0
  176. data/vendor/node_modules/traceur/node_modules/q-io/reader.js +133 -0
  177. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/boot-directory-spec.js +47 -0
  178. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/contains-spec.js +11 -0
  179. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/fixtures/hello.txt +1 -0
  180. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/issues/1-spec.js +33 -0
  181. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/make-tree-spec.js +92 -0
  182. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/append-spec.js +41 -0
  183. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/copy-tree-spec.js +57 -0
  184. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/fixture/hello.txt +1 -0
  185. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/link-spec.js +70 -0
  186. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/make-tree-spec.js +109 -0
  187. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/merge-spec.js +67 -0
  188. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/move-spec.js +219 -0
  189. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/object-spec.js +20 -0
  190. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/range-spec.js +26 -0
  191. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/read-spec.js +40 -0
  192. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/remove-directory-spec.js +37 -0
  193. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/remove-tree-spec.js +39 -0
  194. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/root-spec.js +32 -0
  195. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/stat-spec.js +26 -0
  196. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/symbolic-link-spec.js +86 -0
  197. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/working-directory-spec.js +31 -0
  198. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/write-spec.js +73 -0
  199. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/range-spec.js +23 -0
  200. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/range-spec.txt +1 -0
  201. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/read-spec.js +22 -0
  202. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/relative-spec.js +25 -0
  203. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/reroot-spec.js +45 -0
  204. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/write-spec.js +38 -0
  205. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/cookie-spec.js +52 -0
  206. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/directory-list-spec.js +86 -0
  207. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/01234.txt +1 -0
  208. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/1234.txt +1 -0
  209. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/5678.txt +0 -0
  210. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/9012/3456.txt +0 -0
  211. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/hosts-spec.js +49 -0
  212. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/interpret-range-spec.js +47 -0
  213. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/partial-range-spec.js +186 -0
  214. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/proxy-spec.js +82 -0
  215. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/symbolic-link-spec.js +110 -0
  216. data/vendor/node_modules/traceur/node_modules/q-io/spec/http/agent-spec.js +96 -0
  217. data/vendor/node_modules/traceur/node_modules/q-io/spec/http/basic-spec.js +96 -0
  218. data/vendor/node_modules/traceur/node_modules/q-io/spec/lib/jasmine-promise.js +42 -0
  219. data/vendor/node_modules/traceur/node_modules/q-io/writer.js +111 -0
  220. data/vendor/node_modules/traceur/node_modules/semver/.npmignore +1 -0
  221. data/vendor/node_modules/traceur/node_modules/semver/LICENSE +27 -0
  222. data/vendor/node_modules/traceur/node_modules/semver/Makefile +24 -0
  223. data/vendor/node_modules/traceur/node_modules/semver/README.md +158 -0
  224. data/vendor/node_modules/traceur/node_modules/semver/bin/semver +125 -0
  225. data/vendor/node_modules/traceur/node_modules/semver/foot.js +6 -0
  226. data/vendor/node_modules/traceur/node_modules/semver/head.js +2 -0
  227. data/vendor/node_modules/traceur/node_modules/semver/package.json +31 -0
  228. data/vendor/node_modules/traceur/node_modules/semver/semver.browser.js +1039 -0
  229. data/vendor/node_modules/traceur/node_modules/semver/semver.browser.js.gz +0 -0
  230. data/vendor/node_modules/traceur/node_modules/semver/semver.js +1043 -0
  231. data/vendor/node_modules/traceur/node_modules/semver/semver.min.js +1 -0
  232. data/vendor/node_modules/traceur/node_modules/semver/semver.min.js.gz +0 -0
  233. data/vendor/node_modules/traceur/node_modules/semver/test/amd.js +15 -0
  234. data/vendor/node_modules/traceur/node_modules/semver/test/gtr.js +173 -0
  235. data/vendor/node_modules/traceur/node_modules/semver/test/index.js +584 -0
  236. data/vendor/node_modules/traceur/node_modules/semver/test/ltr.js +174 -0
  237. data/vendor/node_modules/traceur/node_modules/semver/test/no-module.js +19 -0
  238. data/vendor/node_modules/traceur/package.json +64 -0
  239. data/vendor/node_modules/traceur/src/node/System.js +31 -0
  240. data/vendor/node_modules/traceur/src/node/api.js +124 -0
  241. data/vendor/node_modules/traceur/src/node/command.js +141 -0
  242. data/vendor/node_modules/traceur/src/node/compile-single-file.js +69 -0
  243. data/vendor/node_modules/traceur/src/node/compiler.js +116 -0
  244. data/vendor/node_modules/traceur/src/node/deferred.js +110 -0
  245. data/vendor/node_modules/traceur/src/node/file-util.js +73 -0
  246. data/vendor/node_modules/traceur/src/node/getopt.js +147 -0
  247. data/vendor/node_modules/traceur/src/node/inline-module.js +149 -0
  248. data/vendor/node_modules/traceur/src/node/interpreter.js +33 -0
  249. data/vendor/node_modules/traceur/src/node/nodeLoader.js +41 -0
  250. data/vendor/node_modules/traceur/src/node/require.js +85 -0
  251. data/vendor/node_modules/traceur/src/node/to-amd-compiler.js +33 -0
  252. data/vendor/node_modules/traceur/src/node/to-commonjs-compiler.js +33 -0
  253. data/vendor/node_modules/traceur/src/node/traceur.js +32 -0
  254. data/vendor/node_modules/traceur/traceur +3 -0
  255. metadata +359 -0
@@ -0,0 +1,77 @@
1
+ # What: WebVTT
2
+ # Why: To allow formats intended for marking up external text track resources.
3
+ # http://dev.w3.org/html5/webvtt/
4
+ # Added by: niftylettuce
5
+ text/vtt vtt
6
+
7
+ # What: Google Chrome Extension
8
+ # Why: To allow apps to (work) be served with the right content type header.
9
+ # http://codereview.chromium.org/2830017
10
+ # Added by: niftylettuce
11
+ application/x-chrome-extension crx
12
+
13
+ # What: HTC support
14
+ # Why: To properly render .htc files such as CSS3PIE
15
+ # Added by: niftylettuce
16
+ text/x-component htc
17
+
18
+ # What: HTML5 application cache manifes ('.manifest' extension)
19
+ # Why: De-facto standard. Required by Mozilla browser when serving HTML5 apps
20
+ # per https://developer.mozilla.org/en/offline_resources_in_firefox
21
+ # Added by: louisremi
22
+ text/cache-manifest manifest
23
+
24
+ # What: node binary buffer format
25
+ # Why: semi-standard extension w/in the node community
26
+ # Added by: tootallnate
27
+ application/octet-stream buffer
28
+
29
+ # What: The "protected" MP-4 formats used by iTunes.
30
+ # Why: Required for streaming music to browsers (?)
31
+ # Added by: broofa
32
+ application/mp4 m4p
33
+ audio/mp4 m4a
34
+
35
+ # What: Video format, Part of RFC1890
36
+ # Why: See https://github.com/bentomas/node-mime/pull/6
37
+ # Added by: mjrusso
38
+ video/MP2T ts
39
+
40
+ # What: EventSource mime type
41
+ # Why: mime type of Server-Sent Events stream
42
+ # http://www.w3.org/TR/eventsource/#text-event-stream
43
+ # Added by: francois2metz
44
+ text/event-stream event-stream
45
+
46
+ # What: Mozilla App manifest mime type
47
+ # Why: https://developer.mozilla.org/en/Apps/Manifest#Serving_manifests
48
+ # Added by: ednapiranha
49
+ application/x-web-app-manifest+json webapp
50
+
51
+ # What: Lua file types
52
+ # Why: Googling around shows de-facto consensus on these
53
+ # Added by: creationix (Issue #45)
54
+ text/x-lua lua
55
+ application/x-lua-bytecode luac
56
+
57
+ # What: Markdown files, as per http://daringfireball.net/projects/markdown/syntax
58
+ # Why: http://stackoverflow.com/questions/10701983/what-is-the-mime-type-for-markdown
59
+ # Added by: avoidwork
60
+ text/x-markdown markdown md mkd
61
+
62
+ # What: ini files
63
+ # Why: because they're just text files
64
+ # Added by: Matthew Kastor
65
+ text/plain ini
66
+
67
+ # What: DASH Adaptive Streaming manifest
68
+ # Why: https://developer.mozilla.org/en-US/docs/DASH_Adaptive_Streaming_for_HTML_5_Video
69
+ # Added by: eelcocramer
70
+ application/dash+xml mdp
71
+
72
+ # What: OpenType font files - http://www.microsoft.com/typography/otspec/
73
+ # Why: Browsers usually ignore the font MIME types and sniff the content,
74
+ # but Chrome, shows a warning if OpenType fonts aren't served with
75
+ # the `font/opentype` MIME type: http://i.imgur.com/8c5RN8M.png.
76
+ # Added by: alrra
77
+ font/opentype otf
@@ -0,0 +1,15 @@
1
+ 0.1.4
2
+
3
+ * Fixed several coding style issues, as suggested by JSHint
4
+ (e.g. using === instead of ==).
5
+
6
+ 0.1.3
7
+
8
+ * Moved the main module into lib to be consistent with the overlay
9
+ package style.
10
+
11
+ 0.1.2
12
+
13
+ * Ported by J. Chris Anderson, then by Kris Kowal to Chiron, Narwhal,
14
+ and finally NPM for Node.
15
+
@@ -0,0 +1,19 @@
1
+
2
+ Copyright 2009, 2010 Kristopher Michael Kowal. All rights reserved.
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to
5
+ deal in the Software without restriction, including without limitation the
6
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7
+ sell copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19
+ IN THE SOFTWARE.
@@ -0,0 +1,96 @@
1
+
2
+
3
+ This module provides basic functions for handling mime-types. It can
4
+ handle matching mime-types against a list of media-ranges. See section
5
+ 14.1 of the HTTP specification [RFC 2616] for a complete explanation.
6
+
7
+ <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1>
8
+
9
+ A port to JavaScript of Joe Gregorio's MIME-Type Parser:
10
+
11
+ <http://code.google.com/p/mimeparse/>
12
+
13
+ Ported by J. Chris Anderson <jchris@apache.org>, targeting the
14
+ Spidermonkey runtime.
15
+
16
+ Ported to Chiron, Narwhal, Node by Kris Kowal.
17
+
18
+ <http://github.com/kriskowal/mimeparse>
19
+
20
+
21
+ Installation
22
+ ============
23
+
24
+ Install <http://github.com/isaacs/npm>
25
+
26
+ npm install mimeparse
27
+
28
+
29
+ The API
30
+ =======
31
+
32
+ parseMimeType(mimeType)
33
+
34
+ Carves up a mime-type and returns an Array of the
35
+ [type, subtype, params] where "params" is a Hash of all
36
+ the parameters for the media range.
37
+
38
+ For example, the media range "application/xhtml;q=0.5" would
39
+ get parsed into::
40
+
41
+ ["application", "xhtml", { "q" : "0.5" }]
42
+
43
+ parseMediaRange(range)
44
+
45
+ Carves up a media range and returns an Array of the
46
+ [type, subtype, params] where "params" is a Object with
47
+ all the parameters for the media range.
48
+
49
+ For example, the media range "application/*;q=0.5" would
50
+ get parsed into::
51
+
52
+ ["application", "*", { "q" : "0.5" }]
53
+
54
+ In addition this function also guarantees that there
55
+ is a value for "q" in the params dictionary, filling it
56
+ in with a proper default if necessary.
57
+
58
+ fitnessAndQualityParsed(mimeType, parsedRanges)
59
+
60
+ Find the best match for a given mime-type against
61
+ a list of media_ranges that have already been
62
+ parsed by parseMediaRange(). Returns an array of
63
+ the fitness value and the value of the 'q' quality
64
+ parameter of the best match, or (-1, 0) if no match
65
+ was found. Just as for qualityParsed(), 'parsed_ranges'
66
+ must be a list of parsed media ranges.
67
+
68
+ qualityParsed(mimeType, parsedRanges)
69
+
70
+ Find the best match for a given mime-type against
71
+ a list of media_ranges that have already been
72
+ parsed by parseMediaRange(). Returns the
73
+ 'q' quality parameter of the best match, 0 if no
74
+ match was found. This function bahaves the same as quality()
75
+ except that 'parsedRanges' must be a list of
76
+ parsed media ranges.
77
+
78
+ quality(mimeType, ranges)
79
+
80
+ Returns the quality 'q' of a mime-type when compared
81
+ against the media-ranges in ranges. For example::
82
+
83
+ >>> quality('text/html','text/*;q=0.3, text/html;q=0.7, text/html;level=1, text/html;level=2;q=0.4, *\/*;q=0.5')
84
+ 0.7
85
+
86
+ bestMatch(supported, header)
87
+
88
+ Takes a list of supported mime-types and finds the best
89
+ match for all the media-ranges listed in header. The value of
90
+ header must be a string that conforms to the format of the
91
+ HTTP Accept: header. The value of 'supported' is a list of
92
+ mime-types::
93
+
94
+ >>> bestMatch(['application/xbel+xml', 'text/xml'], 'text/*;q=0.5,*\/*; q=0.1')
95
+ 'text/xml'
96
+
@@ -0,0 +1,166 @@
1
+
2
+ /**
3
+ This module provides basic functions for handling mime-types. It can
4
+ handle matching mime-types against a list of media-ranges. See section
5
+ 14.1 of the HTTP specification [RFC 2616] for a complete explanation.
6
+
7
+ <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1>
8
+
9
+ A port to JavaScript of Joe Gregorio's MIME-Type Parser:
10
+
11
+ <http://code.google.com/p/mimeparse/>
12
+
13
+ Ported by J. Chris Anderson <jchris@apache.org>, targeting the
14
+ Spidermonkey runtime.
15
+ Ported from version 0.1.2.
16
+ Comments are mostly excerpted from the original.
17
+
18
+ Ported to Chiron, Narwhal, Node by Kris Kowal.
19
+
20
+ */
21
+
22
+ /*** parseMimeType
23
+ Carves up a mime-type and returns an Array of the
24
+ [type, subtype, params] where "params" is a Hash of all
25
+ the parameters for the media range.
26
+
27
+ For example, the media range "application/xhtml;q=0.5" would
28
+ get parsed into::
29
+
30
+ ["application", "xhtml", { "q" : "0.5" }]
31
+ */
32
+ exports.parseMimeType = function (mimeType) {
33
+ var fullType, typeParts, params = {}, parts = mimeType.split(';');
34
+ for (var i=0; i < parts.length; i++) {
35
+ var p = parts[i].split('=');
36
+ if (p.length === 2) {
37
+ params[p[0].trim()] = p[1].trim();
38
+ }
39
+ }
40
+ fullType = parts[0].replace(/^\s+/, '').replace(/\s+$/, '');
41
+ if (fullType === '*') { fullType = '*/*'; }
42
+ typeParts = fullType.split('/');
43
+ return [typeParts[0], typeParts[1], params];
44
+ };
45
+
46
+ /*** parseMediaRange
47
+ Carves up a media range and returns an Array of the
48
+ [type, subtype, params] where "params" is a Object with
49
+ all the parameters for the media range.
50
+
51
+ For example, the media range "application/*;q=0.5" would
52
+ get parsed into::
53
+
54
+ ["application", "*", { "q" : "0.5" }]
55
+
56
+ In addition this function also guarantees that there
57
+ is a value for "q" in the params dictionary, filling it
58
+ in with a proper default if necessary.
59
+ */
60
+ exports.parseMediaRange = function (range) {
61
+ var q, parsedType = exports.parseMimeType(range);
62
+ if (!parsedType[2]['q']) {
63
+ parsedType[2]['q'] = '1';
64
+ } else {
65
+ q = parseFloat(parsedType[2]['q']);
66
+ if (isNaN(q)) {
67
+ parsedType[2]['q'] = '1';
68
+ } else if (q > 1 || q < 0) {
69
+ parsedType[2]['q'] = '1';
70
+ }
71
+ }
72
+ return parsedType;
73
+ };
74
+
75
+ /*** fitnessAndQualityParsed
76
+ Find the best match for a given mime-type against
77
+ a list of media_ranges that have already been
78
+ parsed by parseMediaRange(). Returns an array of
79
+ the fitness value and the value of the 'q' quality
80
+ parameter of the best match, or (-1, 0) if no match
81
+ was found. Just as for qualityParsed(), 'parsed_ranges'
82
+ must be a list of parsed media ranges.
83
+ */
84
+ exports.fitnessAndQualityParsed = function (mimeType, parsedRanges) {
85
+ var bestFitness = -1, bestFitQ = 0, target = exports.parseMediaRange(mimeType);
86
+ var targetType = target[0], targetSubtype = target[1], targetParams = target[2];
87
+
88
+ for (var i=0; i < parsedRanges.length; i++) {
89
+ var parsed = parsedRanges[i];
90
+ var type = parsed[0], subtype = parsed[1], params = parsed[2];
91
+ if ((type === targetType || type === "*" || targetType === "*") &&
92
+ (subtype === targetSubtype || subtype === "*" || targetSubtype === "*")) {
93
+ var matchCount = 0;
94
+ for (var param in targetParams) {
95
+ if (param !== 'q' && params[param] && params[param] === targetParams[param]) {
96
+ matchCount += 1;
97
+ }
98
+ }
99
+
100
+ var fitness = (type === targetType) ? 100 : 0;
101
+ fitness += (subtype === targetSubtype) ? 10 : 0;
102
+ fitness += matchCount;
103
+
104
+ if (fitness > bestFitness) {
105
+ bestFitness = fitness;
106
+ bestFitQ = params["q"];
107
+ }
108
+ }
109
+ }
110
+ return [bestFitness, parseFloat(bestFitQ)];
111
+ };
112
+
113
+ /*** qualityParsed
114
+ Find the best match for a given mime-type against
115
+ a list of media_ranges that have already been
116
+ parsed by parseMediaRange(). Returns the
117
+ 'q' quality parameter of the best match, 0 if no
118
+ match was found. This function bahaves the same as quality()
119
+ except that 'parsedRanges' must be a list of
120
+ parsed media ranges.
121
+ */
122
+ exports.qualityParsed = function (mimeType, parsedRanges) {
123
+ return exports.fitnessAndQualityParsed(mimeType, parsedRanges)[1];
124
+ };
125
+
126
+ /*** quality
127
+ Returns the quality 'q' of a mime-type when compared
128
+ against the media-ranges in ranges. For example::
129
+
130
+ >>> quality('text/html','text/*;q=0.3, text/html;q=0.7, text/html;level=1, text/html;level=2;q=0.4, *\/*;q=0.5')
131
+ 0.7
132
+ */
133
+ exports.quality = function (mimeType, ranges) {
134
+ return exports.qualityParsed(mimeType, parseRanges(ranges));
135
+ };
136
+
137
+ /*** bestMatch
138
+ Takes a list of supported mime-types and finds the best
139
+ match for all the media-ranges listed in header. The value of
140
+ header must be a string that conforms to the format of the
141
+ HTTP Accept: header. The value of 'supported' is a list of
142
+ mime-types::
143
+
144
+ >>> bestMatch(['application/xbel+xml', 'text/xml'], 'text/*;q=0.5,*\/*; q=0.1')
145
+ 'text/xml'
146
+ */
147
+ exports.bestMatch = function (supported, header) {
148
+ var parsedHeader = parseRanges(header);
149
+ var weighted = [];
150
+ for (var i=0; i < supported.length; i++) {
151
+ weighted.push([
152
+ exports.fitnessAndQualityParsed(supported[i], parsedHeader),
153
+ supported[i]
154
+ ]);
155
+ }
156
+ weighted.sort();
157
+ return weighted[weighted.length-1][0][1] ? weighted[weighted.length-1][1] : '';
158
+ };
159
+
160
+ function parseRanges(ranges) {
161
+ var parsedRanges = [], rangeParts = ranges.split(",");
162
+ for (var i=0; i < rangeParts.length; i++) {
163
+ parsedRanges.push(exports.parseMediaRange(rangeParts[i]));
164
+ }
165
+ return parsedRanges;
166
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "mimeparse",
3
+ "version": "0.1.4",
4
+ "description": "Basic functions for handling mime-types.",
5
+ "homepage": "http://github.com/kriskowal/mimeparse/",
6
+ "contributors": [
7
+ {
8
+ "name": "Joe Gregario"
9
+ },
10
+ {
11
+ "name": "J. Chris Anderson",
12
+ "email": "jchris@apache.org"
13
+ },
14
+ {
15
+ "name": "Kris Kowal",
16
+ "email": "kris@cixar.com",
17
+ "url": "http://github.com/kriskowal/"
18
+ },
19
+ {
20
+ "name": "Ivan Zuzak",
21
+ "email": "izuzak@gmail.com",
22
+ "url": "http://ivanzuzak.info"
23
+ }
24
+ ],
25
+ "bugs": {
26
+ "url": "http://github.com/kriskowal/mimeparse/issues"
27
+ },
28
+ "licenses": [
29
+ {
30
+ "type": "MIT",
31
+ "url": "http://github.com/kriskowal/mimeparse/raw/master/LICENSE"
32
+ }
33
+ ],
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "http://github.com/kriskowal/mimeparse.git"
37
+ },
38
+ "main": "lib/mimeparse.js",
39
+ "readme": "\n\nThis module provides basic functions for handling mime-types. It can\nhandle matching mime-types against a list of media-ranges. See section\n14.1 of the HTTP specification [RFC 2616] for a complete explanation.\n\n <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1>\n\nA port to JavaScript of Joe Gregorio's MIME-Type Parser:\n\n <http://code.google.com/p/mimeparse/>\n\nPorted by J. Chris Anderson <jchris@apache.org>, targeting the\nSpidermonkey runtime.\n\nPorted to Chiron, Narwhal, Node by Kris Kowal.\n\n <http://github.com/kriskowal/mimeparse>\n\n\nInstallation\n============\n\n Install <http://github.com/isaacs/npm>\n\n npm install mimeparse\n\n\nThe API\n=======\n\nparseMimeType(mimeType)\n\n Carves up a mime-type and returns an Array of the\n [type, subtype, params] where \"params\" is a Hash of all\n the parameters for the media range.\n\n For example, the media range \"application/xhtml;q=0.5\" would\n get parsed into::\n\n [\"application\", \"xhtml\", { \"q\" : \"0.5\" }]\n\nparseMediaRange(range)\n\n Carves up a media range and returns an Array of the\n [type, subtype, params] where \"params\" is a Object with\n all the parameters for the media range.\n \n For example, the media range \"application/*;q=0.5\" would\n get parsed into::\n \n [\"application\", \"*\", { \"q\" : \"0.5\" }]\n \n In addition this function also guarantees that there\n is a value for \"q\" in the params dictionary, filling it\n in with a proper default if necessary.\n\nfitnessAndQualityParsed(mimeType, parsedRanges)\n\n Find the best match for a given mime-type against\n a list of media_ranges that have already been\n parsed by parseMediaRange(). Returns an array of\n the fitness value and the value of the 'q' quality\n parameter of the best match, or (-1, 0) if no match\n was found. Just as for qualityParsed(), 'parsed_ranges'\n must be a list of parsed media ranges.\n\nqualityParsed(mimeType, parsedRanges)\n\n Find the best match for a given mime-type against\n a list of media_ranges that have already been\n parsed by parseMediaRange(). Returns the\n 'q' quality parameter of the best match, 0 if no\n match was found. This function bahaves the same as quality()\n except that 'parsedRanges' must be a list of\n parsed media ranges.\n\nquality(mimeType, ranges)\n\n Returns the quality 'q' of a mime-type when compared\n against the media-ranges in ranges. For example::\n\n >>> quality('text/html','text/*;q=0.3, text/html;q=0.7, text/html;level=1, text/html;level=2;q=0.4, *\\/*;q=0.5')\n 0.7\n\nbestMatch(supported, header)\n\n Takes a list of supported mime-types and finds the best\n match for all the media-ranges listed in header. The value of\n header must be a string that conforms to the format of the\n HTTP Accept: header. The value of 'supported' is a list of\n mime-types::\n \n >>> bestMatch(['application/xbel+xml', 'text/xml'], 'text/*;q=0.5,*\\/*; q=0.1')\n 'text/xml'\n\n",
40
+ "readmeFilename": "README",
41
+ "_id": "mimeparse@0.1.4",
42
+ "_from": "mimeparse@~0.1.4"
43
+ }
@@ -0,0 +1,40 @@
1
+
2
+ For pull requests:
3
+
4
+ - Be consistent with prevalent style and design decisions.
5
+ - Add a Jasmine spec to `specs/q-spec.js`.
6
+ - Use `npm test` to avoid regressions.
7
+ - Run tests in `q-spec/run.html` in as many supported browsers as you
8
+ can find the will to deal with.
9
+ - Do not build minified versions; we do this each release.
10
+ - If you would be so kind, add a note to `CHANGES.md` in an
11
+ appropriate section:
12
+
13
+ - `Next Major Version` if it introduces backward incompatibilities
14
+ to code in the wild using documented features.
15
+ - `Next Minor Version` if it adds a new feature.
16
+ - `Next Patch Version` if it fixes a bug.
17
+
18
+ For releases:
19
+
20
+ - Run `npm test`.
21
+ - Run tests in `q-spec/run.html` in a representative sample of every
22
+ browser under the sun.
23
+ - Run `npm run cover` and make sure you're happy with the results.
24
+ - Run `npm run minify` and be sure to commit the resulting `q.min.js`.
25
+ - Note the Gzipped size output by the previous command, and update
26
+ `README.md` if it has changed to 1 significant digit.
27
+ - Stash any local changes.
28
+ - Update `CHANGES.md` to reflect all changes in the differences
29
+ between `HEAD` and the previous tagged version. Give credit where
30
+ credit is due.
31
+ - Update `README.md` to address all new, non-experimental features.
32
+ - Update the API reference on the Wiki to reflect all non-experimental
33
+ features.
34
+ - Use `npm version major|minor|patch` to update `package.json`,
35
+ commit, and tag the new version.
36
+ - Use `npm publish` to send up a new release.
37
+ - Send an email to the q-continuum mailing list announcing the new
38
+ release and the notes from the change log. This helps folks
39
+ maintaining other package ecosystems.
40
+