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,14 @@
1
+
2
+ /**
3
+ accepts a string; returns the string with regex metacharacters escaped.
4
+ the returned string can safely be used within a regex to match a literal
5
+ string. escaped characters are [, ], {, }, (, ), -, *, +, ?, ., \, ^, $,
6
+ |, #, [comma], and whitespace.
7
+ */
8
+ if (!RegExp.escape) {
9
+ var special = /[-[\]{}()*+?.\\^$|,#\s]/g;
10
+ RegExp.escape = function (string) {
11
+ return string.replace(special, "\\$&");
12
+ };
13
+ }
14
+
@@ -0,0 +1,6 @@
1
+
2
+ var Array = require("./shim-array");
3
+ var Object = require("./shim-object");
4
+ var Function = require("./shim-function");
5
+ var RegExp = require("./shim-regexp");
6
+
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ var Shim = require("./shim");
4
+ var SortedArraySet = require("./sorted-array-set");
5
+ var GenericCollection = require("./generic-collection");
6
+ var GenericMap = require("./generic-map");
7
+ var PropertyChanges = require("./listen/property-changes");
8
+
9
+ module.exports = SortedArrayMap;
10
+
11
+ function SortedArrayMap(values, equals, compare, getDefault) {
12
+ if (!(this instanceof SortedArrayMap)) {
13
+ return new SortedArrayMap(values, equals, compare, getDefault);
14
+ }
15
+ equals = equals || Object.equals;
16
+ compare = compare || Object.compare;
17
+ getDefault = getDefault || Function.noop;
18
+ this.contentEquals = equals;
19
+ this.contentCompare = compare;
20
+ this.getDefault = getDefault;
21
+ this.store = new SortedArraySet(
22
+ null,
23
+ function keysEqual(a, b) {
24
+ return equals(a.key, b.key);
25
+ },
26
+ function compareKeys(a, b) {
27
+ return compare(a.key, b.key);
28
+ }
29
+ );
30
+ this.length = 0;
31
+ this.addEach(values);
32
+ }
33
+
34
+ // hack so require("sorted-array-map").SortedArrayMap will work in MontageJS
35
+ SortedArrayMap.SortedArrayMap = SortedArrayMap;
36
+
37
+ Object.addEach(SortedArrayMap.prototype, GenericCollection.prototype);
38
+ Object.addEach(SortedArrayMap.prototype, GenericMap.prototype);
39
+ Object.addEach(SortedArrayMap.prototype, PropertyChanges.prototype);
40
+
41
+ SortedArrayMap.prototype.constructClone = function (values) {
42
+ return new this.constructor(
43
+ values,
44
+ this.contentEquals,
45
+ this.contentCompare,
46
+ this.getDefault
47
+ );
48
+ };
49
+
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+
3
+ module.exports = SortedArraySet;
4
+
5
+ var Shim = require("./shim");
6
+ var SortedArray = require("./sorted-array");
7
+ var GenericSet = require("./generic-set");
8
+ var PropertyChanges = require("./listen/property-changes");
9
+
10
+ function SortedArraySet(values, equals, compare, getDefault) {
11
+ if (!(this instanceof SortedArraySet)) {
12
+ return new SortedArraySet(values, equals, compare, getDefault);
13
+ }
14
+ SortedArray.call(this, values, equals, compare, getDefault);
15
+ }
16
+
17
+ // hack so require("sorted-array-set".SortedArraySet works in MontageJS
18
+ SortedArraySet.SortedArraySet = SortedArraySet;
19
+
20
+ SortedArraySet.prototype = Object.create(SortedArray.prototype);
21
+
22
+ SortedArraySet.prototype.constructor = SortedArraySet;
23
+
24
+ Object.addEach(SortedArraySet.prototype, GenericSet.prototype);
25
+ Object.addEach(SortedArraySet.prototype, PropertyChanges.prototype);
26
+
27
+ SortedArraySet.prototype.add = function (value) {
28
+ if (!this.has(value)) {
29
+ SortedArray.prototype.add.call(this, value);
30
+ return true;
31
+ } else {
32
+ return false;
33
+ }
34
+ };
35
+
36
+ SortedArraySet.prototype.reduce = function (callback, basis /*, thisp*/) {
37
+ var self = this;
38
+ var thisp = arguments[2];
39
+ return this.array.reduce(function (basis, value, index) {
40
+ return callback.call(thisp, basis, value, index, self);
41
+ }, basis);
42
+ };
43
+
44
+ SortedArraySet.prototype.reduceRight = function (callback, basis /*, thisp*/) {
45
+ var self = this;
46
+ var thisp = arguments[2];
47
+ return this.array.reduceRight(function (basis, value, index) {
48
+ return callback.call(thisp, basis, value, index, self);
49
+ }, basis);
50
+ };
51
+
@@ -0,0 +1,269 @@
1
+ "use strict";
2
+
3
+ module.exports = SortedArray;
4
+
5
+ var Shim = require("./shim");
6
+ var GenericCollection = require("./generic-collection");
7
+ var PropertyChanges = require("./listen/property-changes");
8
+ var RangeChanges = require("./listen/range-changes");
9
+
10
+ function SortedArray(values, equals, compare, getDefault) {
11
+ if (!(this instanceof SortedArray)) {
12
+ return new SortedArray(values, equals, compare, getDefault);
13
+ }
14
+ if (Array.isArray(values)) {
15
+ this.array = values;
16
+ values = values.splice(0, values.length);
17
+ } else {
18
+ this.array = [];
19
+ }
20
+ this.contentEquals = equals || Object.equals;
21
+ this.contentCompare = compare || Object.compare;
22
+ this.getDefault = getDefault || Function.noop;
23
+
24
+ this.length = 0;
25
+ this.addEach(values);
26
+ }
27
+
28
+ // hack so require("sorted-array").SortedArray will work in MontageJS
29
+ SortedArray.SortedArray = SortedArray;
30
+
31
+ Object.addEach(SortedArray.prototype, GenericCollection.prototype);
32
+ Object.addEach(SortedArray.prototype, PropertyChanges.prototype);
33
+ Object.addEach(SortedArray.prototype, RangeChanges.prototype);
34
+
35
+ function search(array, value, compare) {
36
+ var first = 0;
37
+ var last = array.length - 1;
38
+ while (first <= last) {
39
+ var middle = (first + last) >> 1; // Math.floor( / 2)
40
+ var comparison = compare(value, array[middle]);
41
+ if (comparison > 0) {
42
+ first = middle + 1;
43
+ } else if (comparison < 0) {
44
+ last = middle - 1;
45
+ } else {
46
+ return middle;
47
+ }
48
+ }
49
+ return -(first + 1);
50
+ }
51
+
52
+ function searchFirst(array, value, compare, equals) {
53
+ var index = search(array, value, compare);
54
+ if (index < 0) {
55
+ return -1;
56
+ } else {
57
+ while (index > 0 && equals(value, array[index - 1])) {
58
+ index--;
59
+ }
60
+ if (!equals(value, array[index])) {
61
+ return -1;
62
+ } else {
63
+ return index;
64
+ }
65
+ }
66
+ }
67
+
68
+ function searchLast(array, value, compare, equals) {
69
+ var index = search(array, value, compare);
70
+ if (index < 0) {
71
+ return -1;
72
+ } else {
73
+ while (index < array.length - 1 && equals(value, array[index + 1])) {
74
+ index++;
75
+ }
76
+ if (!equals(value, array[index])) {
77
+ return -1;
78
+ } else {
79
+ return index;
80
+ }
81
+ }
82
+ }
83
+
84
+ function searchForInsertionIndex(array, value, compare) {
85
+ var index = search(array, value, compare);
86
+ if (index < 0) {
87
+ return -index - 1;
88
+ } else {
89
+ var last = array.length - 1;
90
+ while (index < last && compare(value, array[index + 1]) === 0) {
91
+ index++;
92
+ }
93
+ return index;
94
+ }
95
+ }
96
+
97
+ SortedArray.prototype.constructClone = function (values) {
98
+ return new this.constructor(
99
+ values,
100
+ this.contentEquals,
101
+ this.contentCompare,
102
+ this.getDefault
103
+ );
104
+ };
105
+
106
+ SortedArray.prototype.has = function (value) {
107
+ var index = search(this.array, value, this.contentCompare);
108
+ return index >= 0 && this.contentEquals(this.array[index], value);
109
+ };
110
+
111
+ SortedArray.prototype.get = function (value) {
112
+ var index = searchFirst(this.array, value, this.contentCompare, this.contentEquals);
113
+ if (index !== -1) {
114
+ return this.array[index];
115
+ } else {
116
+ return this.getDefault(value);
117
+ }
118
+ };
119
+
120
+ SortedArray.prototype.add = function (value) {
121
+ var index = searchForInsertionIndex(this.array, value, this.contentCompare);
122
+ if (this.dispatchesRangeChanges) {
123
+ this.dispatchBeforeRangeChange([value], [], index);
124
+ }
125
+ this.array.splice(index, 0, value);
126
+ this.length++;
127
+ if (this.dispatchesRangeChanges) {
128
+ this.dispatchRangeChange([value], [], index);
129
+ }
130
+ return true;
131
+ };
132
+
133
+ SortedArray.prototype["delete"] = function (value) {
134
+ var index = searchFirst(this.array, value, this.contentCompare, this.contentEquals);
135
+ if (index !== -1) {
136
+ if (this.dispatchesRangeChanges) {
137
+ this.dispatchBeforeRangeChange([], [value], index);
138
+ }
139
+ this.array.splice(index, 1);
140
+ this.length--;
141
+ if (this.dispatchesRangeChanges) {
142
+ this.dispatchRangeChange([], [value], index);
143
+ }
144
+ return true;
145
+ } else {
146
+ return false;
147
+ }
148
+ };
149
+
150
+ SortedArray.prototype.indexOf = function (value) {
151
+ return searchFirst(this.array, value, this.contentCompare, this.contentEquals);
152
+ };
153
+
154
+ SortedArray.prototype.lastIndexOf = function (value) {
155
+ return searchLast(this.array, value, this.contentCompare, this.contentEquals);
156
+ };
157
+
158
+ SortedArray.prototype.find = function (value) {
159
+ return searchFirst(this.array, value, this.contentCompare, this.contentEquals);
160
+ };
161
+
162
+ SortedArray.prototype.findLast = function (value) {
163
+ return searchLast(this.array, value, this.contentCompare, this.contentEquals);
164
+ };
165
+
166
+ SortedArray.prototype.push = function () {
167
+ this.addEach(arguments);
168
+ };
169
+
170
+ SortedArray.prototype.unshift = function () {
171
+ this.addEach(arguments);
172
+ };
173
+
174
+ SortedArray.prototype.pop = function () {
175
+ return this.array.pop();
176
+ };
177
+
178
+ SortedArray.prototype.shift = function () {
179
+ return this.array.shift();
180
+ };
181
+
182
+ SortedArray.prototype.slice = function () {
183
+ return this.array.slice.apply(this.array, arguments);
184
+ };
185
+
186
+ SortedArray.prototype.splice = function (index, length /*...plus*/) {
187
+ return this.swap(index, length, Array.prototype.slice.call(arguments, 2));
188
+ };
189
+
190
+ SortedArray.prototype.swap = function (index, length, plus) {
191
+ if (index === undefined && length === undefined) {
192
+ return [];
193
+ }
194
+ index = index || 0;
195
+ if (index < 0) {
196
+ index += this.length;
197
+ }
198
+ if (length === undefined) {
199
+ length = Infinity;
200
+ }
201
+ var minus = this.slice(index, index + length);
202
+ if (this.dispatchesRangeChanges) {
203
+ this.dispatchBeforeRangeChange(plus, minus, index);
204
+ }
205
+ this.array.splice(index, length);
206
+ this.addEach(plus);
207
+ if (this.dispatchesRangeChanges) {
208
+ this.dispatchRangeChange(plus, minus, index);
209
+ }
210
+ return minus;
211
+ };
212
+
213
+ SortedArray.prototype.reduce = function (callback, basis /*, thisp*/) {
214
+ var thisp = arguments[2];
215
+ return this.array.reduce(function (basis, value, key) {
216
+ return callback.call(thisp, basis, value, key, this);
217
+ }, basis, this);
218
+ };
219
+
220
+ SortedArray.prototype.reduceRight = function () {
221
+ var thisp = arguments[2];
222
+ return this.array.reduceRight(function (basis, value, key) {
223
+ return callback.call(thisp, basis, value, key, this);
224
+ }, basis, this);
225
+ };
226
+
227
+ SortedArray.prototype.min = function () {
228
+ if (this.length) {
229
+ return this.array[0];
230
+ }
231
+ };
232
+
233
+ SortedArray.prototype.max = function () {
234
+ if (this.length) {
235
+ return this.array[this.length - 1];
236
+ }
237
+ };
238
+
239
+ SortedArray.prototype.one = function () {
240
+ return this.array.one();
241
+ };
242
+
243
+ SortedArray.prototype.clear = function () {
244
+ var minus;
245
+ if (this.dispatchesRangeChanges) {
246
+ minus = this.array.slice();
247
+ this.dispatchBeforeRangeChange([], minus, 0);
248
+ }
249
+ this.length = 0;
250
+ this.array.clear();
251
+ if (this.dispatchesRangeChanges) {
252
+ this.dispatchRangeChange([], minus, 0);
253
+ }
254
+ };
255
+
256
+ SortedArray.prototype.equals = function (that, equals) {
257
+ return this.array.equals(that, equals);
258
+ };
259
+
260
+ SortedArray.prototype.compare = function (that, compare) {
261
+ return this.array.compare(that, compare);
262
+ };
263
+
264
+ SortedArray.prototype.iterate = function (start, end) {
265
+ return new this.Iterator(this.array, start, end);
266
+ };
267
+
268
+ SortedArray.prototype.Iterator = Array.prototype.Iterator;
269
+
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+
3
+ var Shim = require("./shim");
4
+ var SortedSet = require("./sorted-set");
5
+ var GenericCollection = require("./generic-collection");
6
+ var GenericMap = require("./generic-map");
7
+ var PropertyChanges = require("./listen/property-changes");
8
+
9
+ module.exports = SortedMap;
10
+
11
+ function SortedMap(values, equals, compare, getDefault) {
12
+ if (!(this instanceof SortedMap)) {
13
+ return new SortedMap(values, equals, compare, getDefault);
14
+ }
15
+ equals = equals || Object.equals;
16
+ compare = compare || Object.compare;
17
+ getDefault = getDefault || Function.noop;
18
+ this.contentEquals = equals;
19
+ this.contentCompare = compare;
20
+ this.getDefault = getDefault;
21
+ this.store = new SortedSet(
22
+ null,
23
+ function keysEqual(a, b) {
24
+ return equals(a.key, b.key);
25
+ },
26
+ function compareKeys(a, b) {
27
+ return compare(a.key, b.key);
28
+ }
29
+ );
30
+ this.length = 0;
31
+ this.addEach(values);
32
+ }
33
+
34
+ // hack so require("sorted-map").SortedMap will work in MontageJS
35
+ SortedMap.SortedMap = SortedMap;
36
+
37
+ Object.addEach(SortedMap.prototype, GenericCollection.prototype);
38
+ Object.addEach(SortedMap.prototype, GenericMap.prototype);
39
+ Object.addEach(SortedMap.prototype, PropertyChanges.prototype);
40
+
41
+ SortedMap.prototype.constructClone = function (values) {
42
+ return new this.constructor(
43
+ values,
44
+ this.contentEquals,
45
+ this.contentCompare,
46
+ this.getDefault
47
+ );
48
+ };
49
+
50
+ SortedMap.prototype.log = function (charmap, logNode, callback, thisp) {
51
+ logNode = logNode || this.logNode
52
+ this.store.log(charmap, function (node, log, logBefore) {
53
+ logNode(node.value, log, logBefore);
54
+ }, callback, thisp);
55
+ };
56
+
57
+ SortedMap.prototype.logNode = function (node, log) {
58
+ log(" key: " + node.key);
59
+ log(" value: " + node.value);
60
+ };
61
+