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,139 @@
1
+ "use strict";
2
+
3
+ var WeakMap = require("weak-map");
4
+ var Dict = require("../dict");
5
+
6
+ var rangeChangeDescriptors = new WeakMap(); // {isActive, willChangeListeners, changeListeners}
7
+
8
+ module.exports = RangeChanges;
9
+ function RangeChanges() {
10
+ throw new Error("Can't construct. RangeChanges is a mixin.");
11
+ }
12
+
13
+ RangeChanges.prototype.getAllRangeChangeDescriptors = function () {
14
+ if (!rangeChangeDescriptors.has(this)) {
15
+ rangeChangeDescriptors.set(this, Dict());
16
+ }
17
+ return rangeChangeDescriptors.get(this);
18
+ };
19
+
20
+ RangeChanges.prototype.getRangeChangeDescriptor = function (token) {
21
+ var tokenChangeDescriptors = this.getAllRangeChangeDescriptors();
22
+ token = token || "";
23
+ if (!tokenChangeDescriptors.has(token)) {
24
+ tokenChangeDescriptors.set(token, {
25
+ isActive: false,
26
+ changeListeners: [],
27
+ willChangeListeners: []
28
+ });
29
+ }
30
+ return tokenChangeDescriptors.get(token);
31
+ };
32
+
33
+ RangeChanges.prototype.addRangeChangeListener = function (listener, token, beforeChange) {
34
+ // a concession for objects like Array that are not inherently observable
35
+ if (!this.isObservable && this.makeObservable) {
36
+ this.makeObservable();
37
+ }
38
+
39
+ var descriptor = this.getRangeChangeDescriptor(token);
40
+
41
+ var listeners;
42
+ if (beforeChange) {
43
+ listeners = descriptor.willChangeListeners;
44
+ } else {
45
+ listeners = descriptor.changeListeners;
46
+ }
47
+
48
+ // even if already registered
49
+ listeners.push(listener);
50
+ Object.defineProperty(this, "dispatchesRangeChanges", {
51
+ value: true,
52
+ writable: true,
53
+ configurable: true,
54
+ enumerable: false
55
+ });
56
+
57
+ var self = this;
58
+ return function cancelRangeChangeListener() {
59
+ if (!self) {
60
+ // TODO throw new Error("Range change listener " + JSON.stringify(token) + " has already been canceled");
61
+ return;
62
+ }
63
+ self.removeRangeChangeListener(listener, token, beforeChange);
64
+ self = null;
65
+ };
66
+ };
67
+
68
+ RangeChanges.prototype.removeRangeChangeListener = function (listener, token, beforeChange) {
69
+ var descriptor = this.getRangeChangeDescriptor(token);
70
+
71
+ var listeners;
72
+ if (beforeChange) {
73
+ listeners = descriptor.willChangeListeners;
74
+ } else {
75
+ listeners = descriptor.changeListeners;
76
+ }
77
+
78
+ var index = listeners.lastIndexOf(listener);
79
+ if (index === -1) {
80
+ throw new Error("Can't remove listener: does not exist.");
81
+ }
82
+ listeners.splice(index, 1);
83
+ };
84
+
85
+ RangeChanges.prototype.dispatchRangeChange = function (plus, minus, index, beforeChange) {
86
+ var descriptors = this.getAllRangeChangeDescriptors();
87
+ var changeName = "Range" + (beforeChange ? "WillChange" : "Change");
88
+ descriptors.forEach(function (descriptor, token) {
89
+
90
+ if (descriptor.isActive) {
91
+ return;
92
+ } else {
93
+ descriptor.isActive = true;
94
+ }
95
+
96
+ // before or after
97
+ var listeners;
98
+ if (beforeChange) {
99
+ listeners = descriptor.willChangeListeners;
100
+ } else {
101
+ listeners = descriptor.changeListeners;
102
+ }
103
+
104
+ var tokenName = "handle" + (
105
+ token.slice(0, 1).toUpperCase() +
106
+ token.slice(1)
107
+ ) + changeName;
108
+ // notably, defaults to "handleRangeChange" or "handleRangeWillChange"
109
+ // if token is "" (the default)
110
+
111
+ // dispatch each listener
112
+ try {
113
+ listeners.forEach(function (listener) {
114
+ if (listener[tokenName]) {
115
+ listener[tokenName](plus, minus, index, this, beforeChange);
116
+ } else if (listener.call) {
117
+ listener.call(this, plus, minus, index, this, beforeChange);
118
+ } else {
119
+ throw new Error("Handler " + listener + " has no method " + tokenName + " and is not callable");
120
+ }
121
+ }, this);
122
+ } finally {
123
+ descriptor.isActive = false;
124
+ }
125
+ }, this);
126
+ };
127
+
128
+ RangeChanges.prototype.addBeforeRangeChangeListener = function (listener, token) {
129
+ return this.addRangeChangeListener(listener, token, true);
130
+ };
131
+
132
+ RangeChanges.prototype.removeBeforeRangeChangeListener = function (listener, token) {
133
+ return this.removeRangeChangeListener(listener, token, true);
134
+ };
135
+
136
+ RangeChanges.prototype.dispatchBeforeRangeChange = function (plus, minus, index) {
137
+ return this.dispatchRangeChange(plus, minus, index, true);
138
+ };
139
+
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+
3
+ var Shim = require("./shim");
4
+ var LruSet = require("./lru-set");
5
+ var GenericCollection = require("./generic-collection");
6
+ var GenericMap = require("./generic-map");
7
+ var PropertyChanges = require("./listen/property-changes");
8
+
9
+ module.exports = LruMap;
10
+
11
+ function LruMap(values, maxLength, equals, hash, getDefault) {
12
+ if (!(this instanceof LruMap)) {
13
+ return new LruMap(values, maxLength, equals, hash, getDefault);
14
+ }
15
+ equals = equals || Object.equals;
16
+ hash = hash || Object.hash;
17
+ getDefault = getDefault || Function.noop;
18
+ this.contentEquals = equals;
19
+ this.contentHash = hash;
20
+ this.getDefault = getDefault;
21
+ this.store = new LruSet(
22
+ undefined,
23
+ maxLength,
24
+ function keysEqual(a, b) {
25
+ return equals(a.key, b.key);
26
+ },
27
+ function keyHash(item) {
28
+ return hash(item.key);
29
+ }
30
+ );
31
+ this.length = 0;
32
+ this.addEach(values);
33
+ }
34
+
35
+ LruMap.LruMap = LruMap; // hack so require("lru-map").LruMap will work in MontageJS
36
+
37
+ Object.addEach(LruMap.prototype, GenericCollection.prototype);
38
+ Object.addEach(LruMap.prototype, GenericMap.prototype);
39
+ Object.addEach(LruMap.prototype, PropertyChanges.prototype);
40
+
41
+ LruMap.prototype.constructClone = function (values) {
42
+ return new this.constructor(
43
+ values,
44
+ this.maxLength,
45
+ this.contentEquals,
46
+ this.contentHash,
47
+ this.getDefault
48
+ );
49
+ };
50
+
51
+ LruMap.prototype.log = function (charmap, stringify) {
52
+ stringify = stringify || this.stringify;
53
+ this.store.log(charmap, stringify);
54
+ };
55
+
56
+ LruMap.prototype.stringify = function (item, leader) {
57
+ return leader + JSON.stringify(item.key) + ": " + JSON.stringify(item.value);
58
+ };
59
+
60
+ LruMap.prototype.addMapChangeListener = function () {
61
+ if (!this.dispatchesMapChanges) {
62
+ // Detect LRU deletions in the LruSet and emit as MapChanges.
63
+ // Array and Heap have no store.
64
+ // Dict and FastMap define no listeners on their store.
65
+ var self = this;
66
+ this.store.addBeforeRangeChangeListener(function(plus, minus) {
67
+ if (plus.length && minus.length) { // LRU item pruned
68
+ self.dispatchBeforeMapChange(minus[0].key, undefined);
69
+ }
70
+ });
71
+ this.store.addRangeChangeListener(function(plus, minus) {
72
+ if (plus.length && minus.length) {
73
+ self.dispatchMapChange(minus[0].key, undefined);
74
+ }
75
+ });
76
+ }
77
+ GenericMap.prototype.addMapChangeListener.apply(this, arguments);
78
+ };
79
+
@@ -0,0 +1,142 @@
1
+ "use strict";
2
+
3
+ var Shim = require("./shim");
4
+ var Set = require("./set");
5
+ var GenericCollection = require("./generic-collection");
6
+ var GenericSet = require("./generic-set");
7
+ var PropertyChanges = require("./listen/property-changes");
8
+ var RangeChanges = require("./listen/range-changes");
9
+
10
+ module.exports = LruSet;
11
+
12
+ function LruSet(values, maxLength, equals, hash, getDefault) {
13
+ if (!(this instanceof LruSet)) {
14
+ return new LruSet(values, maxLength, equals, hash, getDefault);
15
+ }
16
+ maxLength = maxLength || Infinity;
17
+ equals = equals || Object.equals;
18
+ hash = hash || Object.hash;
19
+ getDefault = getDefault || Function.noop;
20
+ this.store = new Set(undefined, equals, hash);
21
+ this.contentEquals = equals;
22
+ this.contentHash = hash;
23
+ this.getDefault = getDefault;
24
+ this.maxLength = maxLength;
25
+ this.length = 0;
26
+ this.addEach(values);
27
+ }
28
+
29
+ LruSet.LruSet = LruSet; // hack so require("lru-set").LruSet will work in MontageJS
30
+
31
+ Object.addEach(LruSet.prototype, GenericCollection.prototype);
32
+ Object.addEach(LruSet.prototype, GenericSet.prototype);
33
+ Object.addEach(LruSet.prototype, PropertyChanges.prototype);
34
+ Object.addEach(LruSet.prototype, RangeChanges.prototype);
35
+
36
+ LruSet.prototype.constructClone = function (values) {
37
+ return new this.constructor(
38
+ values,
39
+ this.maxLength,
40
+ this.contentEquals,
41
+ this.contentHash,
42
+ this.getDefault
43
+ );
44
+ };
45
+
46
+ LruSet.prototype.has = function (value) {
47
+ return this.store.has(value);
48
+ };
49
+
50
+ LruSet.prototype.get = function (value) {
51
+ value = this.store.get(value);
52
+ if (value !== undefined) {
53
+ this.store["delete"](value);
54
+ this.store.add(value);
55
+ } else {
56
+ value = this.getDefault(value);
57
+ }
58
+ return value;
59
+ };
60
+
61
+ LruSet.prototype.add = function (value) {
62
+ var found = this.store.has(value);
63
+ var plus = [], minus = [], eldest;
64
+ // if the value already exists, we delete it and add it back again so it
65
+ // appears at the end of the list of values to truncate
66
+ if (found) { // update
67
+ this.store["delete"](value);
68
+ this.store.add(value);
69
+ } else if (this.maxLength > 0) { // add
70
+ // because minus is constructed before adding value, we must ensure the
71
+ // set has positive length. hence the maxLength check.
72
+ plus.push(value);
73
+ if (this.length >= this.maxLength) {
74
+ eldest = this.store.order.head.next;
75
+ minus.push(eldest.value);
76
+ }
77
+ if (this.dispatchesRangeChanges) {
78
+ this.dispatchBeforeRangeChange(plus, minus, 0);
79
+ }
80
+ this.store.add(value);
81
+ if (minus.length > 0) {
82
+ this.store['delete'](eldest.value);
83
+ }
84
+ // only assign to length once to avoid jitter on length observers
85
+ this.length = this.length + plus.length - minus.length;
86
+ // after change
87
+ if (this.dispatchesRangeChanges) {
88
+ this.dispatchRangeChange(plus, minus, 0);
89
+ }
90
+ }
91
+ // whether it grew
92
+ return plus.length !== minus.length;
93
+ };
94
+
95
+ LruSet.prototype["delete"] = function (value) {
96
+ var found = this.store.has(value);
97
+ if (found) {
98
+ if (this.dispatchesRangeChanges) {
99
+ this.dispatchBeforeRangeChange([], [value], 0);
100
+ }
101
+ this.store["delete"](value);
102
+ this.length--;
103
+ if (this.dispatchesRangeChanges) {
104
+ this.dispatchRangeChange([], [value], 0);
105
+ }
106
+ }
107
+ return found;
108
+ };
109
+
110
+ LruSet.prototype.one = function () {
111
+ if (this.length > 0) {
112
+ return this.store.one();
113
+ }
114
+ };
115
+
116
+ LruSet.prototype.clear = function () {
117
+ this.store.clear();
118
+ this.length = 0;
119
+ };
120
+
121
+ LruSet.prototype.reduce = function (callback, basis /*, thisp*/) {
122
+ var thisp = arguments[2];
123
+ var set = this.store;
124
+ var index = 0;
125
+ return set.reduce(function (basis, value) {
126
+ return callback.call(thisp, basis, value, index++, this);
127
+ }, basis, this);
128
+ };
129
+
130
+ LruSet.prototype.reduceRight = function (callback, basis /*, thisp*/) {
131
+ var thisp = arguments[2];
132
+ var set = this.store;
133
+ var index = this.length - 1;
134
+ return set.reduceRight(function (basis, value) {
135
+ return callback.call(thisp, basis, value, index--, this);
136
+ }, basis, this);
137
+ };
138
+
139
+ LruSet.prototype.iterate = function () {
140
+ return this.store.iterate();
141
+ };
142
+
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+
3
+ var Shim = require("./shim");
4
+ var Set = require("./set");
5
+ var GenericCollection = require("./generic-collection");
6
+ var GenericMap = require("./generic-map");
7
+ var PropertyChanges = require("./listen/property-changes");
8
+
9
+ module.exports = Map;
10
+
11
+ function Map(values, equals, hash, getDefault) {
12
+ if (!(this instanceof Map)) {
13
+ return new Map(values, equals, hash, getDefault);
14
+ }
15
+ equals = equals || Object.equals;
16
+ hash = hash || Object.hash;
17
+ getDefault = getDefault || Function.noop;
18
+ this.contentEquals = equals;
19
+ this.contentHash = hash;
20
+ this.getDefault = getDefault;
21
+ this.store = new Set(
22
+ undefined,
23
+ function keysEqual(a, b) {
24
+ return equals(a.key, b.key);
25
+ },
26
+ function keyHash(item) {
27
+ return hash(item.key);
28
+ }
29
+ );
30
+ this.length = 0;
31
+ this.addEach(values);
32
+ }
33
+
34
+ Map.Map = Map; // hack so require("map").Map will work in MontageJS
35
+
36
+ Object.addEach(Map.prototype, GenericCollection.prototype);
37
+ Object.addEach(Map.prototype, GenericMap.prototype); // overrides GenericCollection
38
+ Object.addEach(Map.prototype, PropertyChanges.prototype);
39
+
40
+ Map.prototype.constructClone = function (values) {
41
+ return new this.constructor(
42
+ values,
43
+ this.contentEquals,
44
+ this.contentHash,
45
+ this.getDefault
46
+ );
47
+ };
48
+
49
+ Map.prototype.log = function (charmap, logNode, callback, thisp) {
50
+ logNode = logNode || this.logNode;
51
+ this.store.log(charmap, function (node, log, logBefore) {
52
+ logNode(node.value.value, log, logBefore);
53
+ }, callback, thisp);
54
+ };
55
+
56
+ Map.prototype.logNode = function (node, log) {
57
+ log(' key: ' + node.key);
58
+ log(' value: ' + node.value);
59
+ };
60
+
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ var Map = require("./map");
4
+
5
+ module.exports = MultiMap;
6
+ function MultiMap(values, bucket, equals, hash) {
7
+ if (!(this instanceof MultiMap)) {
8
+ return new MultiMap(values, bucket, equals, hash);
9
+ }
10
+ this.bucket = bucket || this.bucket;
11
+ Map.call(this, values, equals, hash, function getDefault(key) {
12
+ var bucket = this.bucket();
13
+ Map.prototype.set.call(this, key, bucket);
14
+ return bucket;
15
+ });
16
+ }
17
+
18
+ MultiMap.MultiMap = MultiMap; // hack so require("multi-map").MultiMap will work in MontageJS
19
+
20
+ MultiMap.prototype = Object.create(Map.prototype);
21
+
22
+ MultiMap.prototype.constructor = MultiMap;
23
+
24
+ MultiMap.prototype.constructClone = function (values) {
25
+ return new this.constructor(
26
+ values,
27
+ this.bucket,
28
+ this.contentEquals,
29
+ this.contentHash
30
+ );
31
+ };
32
+
33
+ MultiMap.prototype.set = function (key, newValues) {
34
+ var values = this.get(key);
35
+ values.swap(0, values.length, newValues);
36
+ };
37
+
38
+ MultiMap.prototype.bucket = function (key) {
39
+ return [];
40
+ };
41
+