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,59 @@
1
+
2
+ var Q = require("q");
3
+ var Reader = require("./reader");
4
+
5
+ module.exports = BufferStream;
6
+ function BufferStream(chunks, charset) {
7
+ if (!(this instanceof BufferStream)) {
8
+ return new BufferStream(chunks, charset);
9
+ }
10
+ if (!chunks) {
11
+ chunks = [];
12
+ } else if (!Array.isArray(chunks)) {
13
+ chunks = [chunks];
14
+ }
15
+ this._charset = charset;
16
+ this._chunks = chunks;
17
+ this._close = Q.defer();
18
+ this.closed = this._close.promise;
19
+ }
20
+
21
+ BufferStream.prototype.forEach = function (write, thisp) {
22
+ var self = this;
23
+ var chunks = self._chunks;
24
+ return Q.fcall(function () {
25
+ chunks.splice(0, chunks.length).forEach(write, thisp);
26
+ });
27
+ };
28
+
29
+ BufferStream.prototype.read = function () {
30
+ var result;
31
+ result = Reader.join(this._chunks);
32
+ if (this._charset) {
33
+ result = result.toString(this._charset);
34
+ }
35
+ return Q.resolve(result);
36
+ };
37
+
38
+ BufferStream.prototype.write = function (chunk) {
39
+ if (this._charset) {
40
+ chunk = new Buffer(String(chunk), this._charset);
41
+ } else {
42
+ if (!(chunk instanceof Buffer)) {
43
+ throw new Error("Can't write strings to buffer stream without a charset: " + chunk);
44
+ }
45
+ }
46
+ this._chunks.push(chunk);
47
+ return Q.resolve();
48
+ };
49
+
50
+ BufferStream.prototype.close = function () {
51
+ this._close.resolve();
52
+ return Q.resolve();
53
+ };
54
+
55
+ BufferStream.prototype.destroy = function () {
56
+ this._close.resolve();
57
+ return Q.resolve();
58
+ };
59
+
@@ -0,0 +1,44 @@
1
+
2
+ require("collections/shim");
3
+ var Q = require("q");
4
+ var FS = require("./fs");
5
+
6
+ FS.listTree(".coverage_data", function (name, stat) {
7
+ return (/^\.coverage_data\/coveragefile/).test(name);
8
+ })
9
+ .then(function (list) {
10
+ return Q.all(list.map(function (file) {
11
+ return FS.read(file)
12
+ .then(function (content) {
13
+ return JSON.parse(content);
14
+ })
15
+ .then(function (coverage) {
16
+ console.log("<table>");
17
+ console.log(" <thead>");
18
+ console.log(" <tr>");
19
+ console.log(" <th>File</th>");
20
+ console.log(" <th>Percentage</th>");
21
+ console.log(" <th>Missing</th>");
22
+ console.log(" </tr>");
23
+ console.log(" </thead>");
24
+ console.log(" <tbody>");
25
+ Object.forEach(coverage.files, function (file, path) {
26
+ path = FS.relativeFromDirectory(__dirname, path);
27
+ if (/^spec/.test(path))
28
+ return;
29
+ console.log(" <tr>");
30
+ console.log(" <td><code>" + path + "</code></td>");
31
+ console.log(" <td>" + (file.stats.percentage * 100).toFixed(0) + "%</td>");
32
+ console.log(" <td>" + file.stats.missing + "</td>");
33
+ console.log(" </tr>");
34
+ });
35
+ console.log(" </tbody>");
36
+ console.log("</table>");
37
+ }, function (error) {
38
+ error.message = "Can't parse " + file + " because " + error.message;
39
+ throw error;
40
+ })
41
+ }))
42
+ })
43
+ .done()
44
+
@@ -0,0 +1,51 @@
1
+ /**
2
+ * @module deprecate
3
+ */
4
+
5
+ /**
6
+ * Prints out a deprecation warning to the console.warn with the format:
7
+ * `name` is deprecated, use `alternative` instead.
8
+ * It can also print out a stack trace with the line numbers.
9
+ * @param {String} name - Name of the thing that is deprecated.
10
+ * @param {String} alternative - Name of alternative that should be used instead.
11
+ * @param {Number} [stackTraceLimit] - depth of the stack trace to print out. Set to falsy value to disable stack.
12
+ */
13
+ exports.deprecationWarning = function deprecationWarning(name, alternative, stackTraceLimit) {
14
+ if (stackTraceLimit) {
15
+ var depth = Error.stackTraceLimit;
16
+ Error.stackTraceLimit = stackTraceLimit;
17
+ }
18
+ if (typeof console !== "undefined" && typeof console.warn === "function") {
19
+ var stack = (stackTraceLimit ? new Error("").stack : "") ;
20
+ if(alternative) {
21
+ console.warn(name + " is deprecated, use " + alternative + " instead.", stack);
22
+ } else {
23
+ //name is a complete message
24
+ console.warn(name, stack);
25
+ }
26
+ }
27
+ if (stackTraceLimit) {
28
+ Error.stackTraceLimit = depth;
29
+ }
30
+ }
31
+
32
+ /**
33
+ * Provides a function that can replace a method that has been deprecated.
34
+ * Prints out a deprecation warning to the console.warn with the format:
35
+ * `name` is deprecated, use `alternative` instead.
36
+ * It will also print out a stack trace with the line numbers.
37
+ * @param {Object} scope - The object that will be used as the `this` when the `deprecatedFunction` is applied.
38
+ * @param {Function} deprecatedFunction - The function object that is deprecated.
39
+ * @param {String} name - Name of the method that is deprecated.
40
+ * @param {String} alternative - Name of alternative method that should be used instead.
41
+ * @returns {Function} deprecationWrapper
42
+ */
43
+ exports.deprecateMethod = function deprecate(scope, deprecatedFunction, name, alternative) {
44
+ var deprecationWrapper = function () {
45
+ // stackTraceLimit = 3 // deprecationWarning + deprecate + caller of the deprecated method
46
+ deprecationWarning(name, alternative, 3);
47
+ return deprecatedFunction.apply(scope ? scope : this, arguments);
48
+ };
49
+ deprecationWrapper.deprecatedFunction = deprecatedFunction;
50
+ return deprecationWrapper;
51
+ }
@@ -0,0 +1,307 @@
1
+ (function (exports) {
2
+
3
+ // -- kriskowal Kris Kowal Copyright (C) 2009-2010 MIT License
4
+ // -- tlrobinson Tom Robinson TODO
5
+
6
+ /**
7
+ * Pure JavaScript implementations of file system path
8
+ * manipulation.
9
+ */
10
+
11
+ // NOTE: this file may be used is the engine bootstrapping
12
+ // process, so any "requires" must be accounted for in
13
+ // narwhal.js
14
+
15
+ /*whatsupdoc*/
16
+ /*markup markdown*/
17
+
18
+ var regExpEscape = function (str) {
19
+ return str.replace(/[-[\]{}()*+?.\\^$|,#\s]/g, "\\$&");
20
+ };
21
+
22
+ var path = require("path");
23
+
24
+ /**
25
+ * @name ROOT
26
+ * * `/` on Unix
27
+ * * `\` on Windows
28
+ */
29
+
30
+ /**
31
+ * @name SEPARATOR
32
+ * * `/` on Unix
33
+ * * `\` on Windows
34
+ */
35
+
36
+ /**
37
+ * @name ALT_SEPARATOR
38
+ * * undefined on Unix
39
+ * * `/` on Windows
40
+ */
41
+
42
+ exports.ROOT = exports.SEPARATOR = path.sep || (process.platform === "win32" ? "\\": "/");
43
+ if (path.sep === "\\") {
44
+ exports.ALT_SEPARATOR = "/";
45
+ } else {
46
+ exports.ALT_SEPARATOR = undefined;
47
+ }
48
+
49
+ // we need to make sure the separator regex is always in sync with the separators.
50
+ // this caches the generated regex and rebuild if either separator changes.
51
+ var separatorCached, altSeparatorCached, separatorReCached;
52
+ /**
53
+ * @function
54
+ */
55
+ exports.SEPARATORS_RE = function () {
56
+ if (
57
+ separatorCached !== exports.SEPARATOR ||
58
+ altSeparatorCached !== exports.ALT_SEPARATOR
59
+ ) {
60
+ separatorCached = exports.SEPARATOR;
61
+ altSeparatorCached = exports.ALT_SEPARATOR;
62
+ separatorReCached = new RegExp("[" +
63
+ (separatorCached || "").replace(/[-[\]{}()*+?.\\^$|,#\s]/g, "\\$&") +
64
+ (altSeparatorCached || "").replace(/[-[\]{}()*+?.\\^$|,#\s]/g, "\\$&") +
65
+ "]", "g");
66
+ }
67
+ return separatorReCached;
68
+ }
69
+
70
+ /**
71
+ * separates a path into components. If the path is
72
+ * absolute, the first path component is the root of the
73
+ * file system, indicated by an empty string on Unix, and a
74
+ * drive letter followed by a colon on Windows.
75
+ * @returns {Array * String}
76
+ */
77
+ exports.split = function (path) {
78
+ var parts;
79
+ try {
80
+ parts = String(path).split(exports.SEPARATORS_RE());
81
+ } catch (exception) {
82
+ throw new Error("Cannot split " + (typeof path) + ", " + JSON.stringify(path));
83
+ }
84
+ // this special case helps isAbsolute
85
+ // distinguish an empty path from an absolute path
86
+ // "" -> [] NOT [""]
87
+ if (parts.length === 1 && parts[0] === "")
88
+ return [];
89
+ // "a" -> ["a"]
90
+ // "/a" -> ["", "a"]
91
+ return parts;
92
+ };
93
+
94
+ /**
95
+ * Takes file system paths as variadic arguments and treats
96
+ * each as a file or directory path and returns the path
97
+ * arrived by traversing into the those paths. All
98
+ * arguments except for the last must be paths to
99
+ * directories for the result to be meaningful.
100
+ * @returns {String} path
101
+ */
102
+ exports.join = function () {
103
+ if (arguments.length === 1 && Array.isArray(arguments[0]))
104
+ return exports.normal.apply(exports, arguments[0]);
105
+ return exports.normal.apply(exports, arguments);
106
+ };
107
+
108
+ /**
109
+ * Takes file system paths as variadic arguments and treats
110
+ * each path as a location, in the URL sense, resolving each
111
+ * new location based on the previous. For example, if the
112
+ * first argument is the absolute path of a JSON file, and
113
+ * the second argument is a path mentioned in that JSON
114
+ * file, `resolve` returns the absolute path of the
115
+ * mentioned file.
116
+ * @returns {String} path
117
+ */
118
+ exports.resolve = function () {
119
+ var root = "";
120
+ var parents = [];
121
+ var children = [];
122
+ var leaf = "";
123
+ for (var i = 0; i < arguments.length; i++) {
124
+ var path = String(arguments[i]);
125
+ if (path == "")
126
+ continue;
127
+ var parts = path.split(exports.SEPARATORS_RE());
128
+ if (exports.isAbsolute(path)) {
129
+ root = parts.shift() + exports.SEPARATOR;
130
+ parents = [];
131
+ children = [];
132
+ }
133
+ leaf = parts.pop();
134
+ if (leaf == "." || leaf == "..") {
135
+ parts.push(leaf);
136
+ leaf = "";
137
+ }
138
+ for (var j = 0; j < parts.length; j++) {
139
+ var part = parts[j];
140
+ if (part == "." || part == "") {
141
+ } else if (part == "..") {
142
+ if (children.length) {
143
+ children.pop();
144
+ } else {
145
+ if (root) {
146
+ } else {
147
+ parents.push("..");
148
+ }
149
+ }
150
+ } else {
151
+ children.push(part);
152
+ }
153
+ };
154
+ }
155
+ path = parents.concat(children).join(exports.SEPARATOR);
156
+ if (path) leaf = exports.SEPARATOR + leaf;
157
+ return root + path + leaf;
158
+ };
159
+
160
+ /**
161
+ * Takes paths as any number of arguments and reduces them
162
+ * into a single path in normal form, removing all "." path
163
+ * components, and reducing ".." path components by removing
164
+ * the previous path component if possible.
165
+ * @returns {String} path
166
+ */
167
+ exports.normal = function () {
168
+ var root = "";
169
+ var parents = [];
170
+ var children = [];
171
+ for (var i = 0, ii = arguments.length; i < ii; i++) {
172
+ var path = String(arguments[i]);
173
+ // empty paths have no affect
174
+ if (path === "")
175
+ continue;
176
+ var parts = path.split(exports.SEPARATORS_RE());
177
+ if (exports.isAbsolute(path)) {
178
+ root = parts.shift() + exports.SEPARATOR;
179
+ parents = [];
180
+ children = [];
181
+ }
182
+ for (var j = 0, jj = parts.length; j < jj; j++) {
183
+ var part = parts[j];
184
+ if (part === "." || part === "") {
185
+ } else if (part == "..") {
186
+ if (children.length) {
187
+ children.pop();
188
+ } else {
189
+ if (root) {
190
+ } else {
191
+ parents.push("..");
192
+ }
193
+ }
194
+ } else {
195
+ children.push(part);
196
+ }
197
+ }
198
+ }
199
+ path = parents.concat(children).join(exports.SEPARATOR);
200
+ return root + path;
201
+ };
202
+
203
+ /***
204
+ * @returns {Boolean} whether the given path begins at the
205
+ * root of the file system or a drive letter.
206
+ */
207
+ exports.isAbsolute = function (path) {
208
+ // for absolute paths on any operating system,
209
+ // the first path component always determines
210
+ // whether it is relative or absolute. On Unix,
211
+ // it is empty, so ["", "foo"].join("/") == "/foo",
212
+ // "/foo".split("/") == ["", "foo"].
213
+ var parts = exports.split(path);
214
+ // split("") == []. "" is not absolute.
215
+ // split("/") == ["", ""] is absolute.
216
+ // split(?) == [""] does not occur.
217
+ if (parts.length == 0)
218
+ return false;
219
+ return exports.isRoot(parts[0]);
220
+ };
221
+
222
+ /**
223
+ * @returns {Boolean} whether the given path does not begin
224
+ * at the root of the file system or a drive letter.
225
+ */
226
+ exports.isRelative = function (path) {
227
+ return !exports.isAbsolute(path);
228
+ };
229
+
230
+ /**
231
+ * @returns {Boolean} whether the given path component
232
+ * corresponds to the root of the file system or a drive
233
+ * letter, as applicable.
234
+ */
235
+ exports.isRoot = function (first) {
236
+ if (exports.SEPARATOR === "\\") {
237
+ return /[a-zA-Z]:$/.test(first);
238
+ } else {
239
+ return first == "";
240
+ }
241
+ };
242
+
243
+ /**
244
+ * @returns {String} the Unix root path or corresponding
245
+ * Windows drive for a given path.
246
+ */
247
+ exports.root = function (path) {
248
+ if (!exports.isAbsolute(path))
249
+ path = require("./fs").absolute(path);
250
+ var parts = exports.split(path);
251
+ return exports.join(parts[0], "");
252
+ };
253
+
254
+ /**
255
+ * @returns {String} the parent directory of the given path.
256
+ */
257
+ exports.directory = function (path) {
258
+ path = exports.normal(path);
259
+ var absolute = exports.isAbsolute(path);
260
+ var parts = exports.split(path);
261
+ // XXX needs to be sensitive to the root for
262
+ // Windows compatibility
263
+ if (parts.length) {
264
+ if (parts[parts.length - 1] == "..") {
265
+ parts.push("..");
266
+ } else {
267
+ parts.pop();
268
+ }
269
+ } else {
270
+ parts.unshift("..");
271
+ }
272
+ return parts.join(exports.SEPARATOR) || (
273
+ exports.isRelative(path) ?
274
+ "" : exports.ROOT
275
+ );
276
+ };
277
+
278
+ /**
279
+ * @returns {String} the last component of a path, without
280
+ * the given extension if the extension is provided and
281
+ * matches the given file.
282
+ * @param {String} path
283
+ * @param {String} extention an optional extention to detect
284
+ * and remove if it exists.
285
+ */
286
+ exports.base = function (path, extension) {
287
+ var base = path.split(exports.SEPARATORS_RE()).pop();
288
+ if (extension)
289
+ base = base.replace(
290
+ new RegExp(regExpEscape(extension) + "$"),
291
+ ""
292
+ );
293
+ return base;
294
+ };
295
+
296
+ /**
297
+ * @returns {String} the extension (e.g., `txt`) of the file
298
+ * at the given path.
299
+ */
300
+ exports.extension = function (path) {
301
+ path = exports.base(path);
302
+ path = path.replace(/^\.*/, "");
303
+ var index = path.lastIndexOf(".");
304
+ return index <= 0 ? "" : path.substring(index);
305
+ };
306
+
307
+ })(typeof exports !== "undefined" ? exports : FS_BOOT = {});