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,47 @@
1
+
2
+ var FS = require("../../fs-boot");
3
+ var normalize = FS.normal;
4
+
5
+ var specs = [
6
+ {
7
+ "from": "foo",
8
+ "to": ""
9
+ },
10
+ {
11
+ "from": "",
12
+ "to": ".."
13
+ },
14
+ {
15
+ "from": ".",
16
+ "to": ".."
17
+ },
18
+ {
19
+ "from": "..",
20
+ "to": normalize("../..")
21
+ },
22
+ {
23
+ "from": "../foo",
24
+ "to": ".."
25
+ },
26
+ {
27
+ "from": "/foo/bar",
28
+ "to": normalize("/foo")
29
+ },
30
+ {
31
+ "from": "/foo",
32
+ "to": normalize("/")
33
+ },
34
+ {
35
+ "from": "/",
36
+ "to": "/"
37
+ }
38
+ ];
39
+
40
+ describe("fs-boot directory", function () {
41
+ specs.forEach(function (spec) {
42
+ it("should parse " + JSON.stringify(spec.from), function () {
43
+ expect(FS.directory(spec.from)).toBe(spec.to);
44
+ });
45
+ });
46
+ });
47
+
@@ -0,0 +1,11 @@
1
+
2
+ var FS = require("../../fs");
3
+
4
+ require("../lib/jasmine-promise");
5
+
6
+ describe("contains", function () {
7
+ it("reflexive case", function () {
8
+ expect(FS.contains("/a/b", "/a/b")).toBe(true);
9
+ });
10
+ });
11
+
@@ -0,0 +1,33 @@
1
+
2
+ require("../../lib/jasmine-promise");
3
+ var Q = require("q");
4
+ var FS = require("../../../fs");
5
+
6
+ describe("write and remove", function () {
7
+
8
+ it("should write and remove a file", function () {
9
+
10
+ var fixture = FS.join(__dirname, "fixture.txt");
11
+
12
+ return FS.write(fixture, "1234")
13
+ .then(function (result) {
14
+ expect(result).toBe(undefined);
15
+ })
16
+
17
+ .then(function () {
18
+ return FS.remove(fixture);
19
+ })
20
+ .then(function (result) {
21
+ expect(result).toBe(undefined);
22
+ })
23
+
24
+ .then(function () {
25
+ return FS.exists(fixture)
26
+ })
27
+ .then(function (exists) {
28
+ expect(exists).toBe(false);
29
+ })
30
+
31
+ });
32
+ });
33
+
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+
3
+ require("../lib/jasmine-promise");
4
+ var Q = require("q");
5
+ var FS = require("../../fs");
6
+ var _n = FS.normal;
7
+
8
+ describe("makeTree", function () {
9
+ it("should make a branch of a tree", function () {
10
+
11
+ return Q.fcall(function () {
12
+ return FS.makeTree("a/b/c");
13
+ })
14
+
15
+ .then(function () {
16
+ return FS.listTree("a");
17
+ })
18
+ .then(function (list) {
19
+ expect(list).toEqual([
20
+ "a",
21
+ _n("a/b"),
22
+ _n("a/b/c")
23
+ ]);
24
+ })
25
+
26
+ .then(function () {
27
+ return FS.exists("a/b/c");
28
+ })
29
+ .then(function (exists) {
30
+ expect(exists).toBe(true);
31
+ })
32
+
33
+ .then(function () {
34
+ return FS.isDirectory("a/b/c");
35
+ })
36
+ .then(function (isDirectory) {
37
+ expect(isDirectory).toBe(true);
38
+ })
39
+
40
+ });
41
+
42
+ it("should make a branch of a tree even if some of it already exists", function () {
43
+
44
+ return Q.fcall(function () {
45
+ return FS.makeTree("a/b/c/d");
46
+ })
47
+
48
+ .then(function () {
49
+ return FS.listTree("a");
50
+ })
51
+ .then(function (list) {
52
+ expect(list).toEqual([
53
+ "a",
54
+ _n("a/b"),
55
+ _n("a/b/c"),
56
+ _n("a/b/c/d")
57
+ ]);
58
+ })
59
+ .then(function () {
60
+ return FS.removeTree("a");
61
+ })
62
+ });
63
+
64
+ it("should make branch from an absolute path", function () {
65
+
66
+ return Q.fcall(function () {
67
+ return FS.makeTree(FS.absolute("a/b/c/d"));
68
+ })
69
+
70
+ .then(function () {
71
+ return FS.listTree("a");
72
+ })
73
+ .then(function (list) {
74
+ expect(list).toEqual([
75
+ "a",
76
+ _n("a/b"),
77
+ _n("a/b/c"),
78
+ _n("a/b/c/d")
79
+ ]);
80
+ })
81
+ .then(function () {
82
+ return FS.removeTree("a");
83
+ })
84
+ });
85
+
86
+ it("should tolerate .", function () {
87
+ return Q.fcall(function () {
88
+ return FS.makeTree(".");
89
+ })
90
+ });
91
+ });
92
+
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ require("../../lib/jasmine-promise");
4
+ var Q = require("q");
5
+ var FS = require("../../../fs");
6
+ /*global describe,it,expect */
7
+
8
+ describe("append", function () {
9
+
10
+ it("appends to a file on a mock filesystem", function () {
11
+ return FS.mock(FS.join(__dirname, "fixture"))
12
+ .then(function (mock) {
13
+ return Q.fcall(function () {
14
+ return mock.append("hello.txt", "Goodbye!\n");
15
+ })
16
+ .then(function () {
17
+ return mock.read("hello.txt");
18
+ })
19
+ .then(function (contents) {
20
+ expect(contents).toBe("Hello, World!\nGoodbye!\n");
21
+ });
22
+ });
23
+ });
24
+
25
+ it("calls open correctly", function () {
26
+ return FS.mock(FS.join(__dirname, "fixture"))
27
+ .then(function (mock) {
28
+ mock.open = function (path, options) {
29
+ expect(path).toBe("hello.txt");
30
+ expect(options.flags).toBe("a");
31
+ expect(options.charset).toBe("utf8");
32
+
33
+ return Q.resolve({write: function () {}, close: function () {}});
34
+ };
35
+
36
+ return mock.append("hello.txt", "Goodbye!\n", "a", "utf8");
37
+ });
38
+ });
39
+
40
+ });
41
+
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+
3
+ require("../../lib/jasmine-promise");
4
+ var Q = require("q");
5
+ var FS = require("../../../fs");
6
+ var Mock = require("../../../fs-mock");
7
+ var normalize = FS.normal;
8
+
9
+ describe("copyTree", function () {
10
+ it("should copy a tree", function () {
11
+
12
+ var mock = Mock({
13
+ "a/b": {
14
+ "c": {
15
+ "d": 66,
16
+ "e": 99
17
+ }
18
+ }
19
+ });
20
+
21
+ return Q.fcall(function () {
22
+ return mock.copyTree("a/b", "a/f");
23
+ })
24
+ .then(function () {
25
+ return Q.all([
26
+ mock.isDirectory("a/f"),
27
+ mock.exists("a/f/c"),
28
+ mock.isFile("a/f/c/d"),
29
+ mock.read("a/f/c/e")
30
+ ])
31
+ })
32
+ .then(function (existence) {
33
+ expect(existence.every(Boolean)).toBe(true);
34
+ })
35
+
36
+ .then(function () {
37
+ return mock.listTree();
38
+ })
39
+ .then(function (list) {
40
+ expect(list).toEqual([
41
+ ".",
42
+ "a",
43
+ normalize("a/b"),
44
+ normalize("a/b/c"),
45
+ normalize("a/b/c/d"),
46
+ normalize("a/b/c/e"),
47
+ normalize("a/f"),
48
+ normalize("a/f/c"),
49
+ normalize("a/f/c/d"),
50
+ normalize("a/f/c/e")
51
+ ]);
52
+ })
53
+
54
+ });
55
+
56
+ });
57
+
@@ -0,0 +1,70 @@
1
+
2
+ require("../../lib/jasmine-promise");
3
+ var MockFs = require("../../../fs-mock");
4
+ var normalize = require('../../../fs').normal;
5
+
6
+ describe("link", function () {
7
+ it("should", function () {
8
+ var mock = MockFs();
9
+
10
+ // make some content
11
+ return mock.makeTree("a/b")
12
+ .then(function () {
13
+ return mock.write("a/b/c.txt", "Hello, World!")
14
+ })
15
+
16
+ // verify content
17
+ .then(function () {
18
+ return mock.read("a/b/c.txt")
19
+ })
20
+ .then(function (content) {
21
+ expect(content).toBe("Hello, World!");
22
+ })
23
+
24
+ // link it
25
+ .then(function () {
26
+ return mock.link("a/b/c.txt", "a/b/d.txt")
27
+ })
28
+
29
+ // should be non-destructive
30
+ .then(function () {
31
+ return mock.read("a/b/c.txt")
32
+ })
33
+ .then(function (content) {
34
+ expect(content).toBe("Hello, World!");
35
+ })
36
+
37
+ // should be listed
38
+ .then(function () {
39
+ return mock.listTree()
40
+ })
41
+ .then(function (content) {
42
+ expect(content).toEqual([
43
+ ".",
44
+ "a",
45
+ normalize("a/b"),
46
+ normalize("a/b/c.txt"),
47
+ normalize("a/b/d.txt")
48
+ ])
49
+ })
50
+
51
+ // should be identified as a file
52
+ .then(function () {
53
+ return mock.isFile("a/b/d.txt");
54
+ })
55
+ .then(function (isFile) {
56
+ expect(isFile).toBe(true);
57
+ })
58
+
59
+ // should have the same content
60
+ .then(function () {
61
+ return mock.read("a/b/d.txt");
62
+ })
63
+ .then(function (content) {
64
+ expect(content).toBe("Hello, World!");
65
+ });
66
+
67
+ });
68
+ });
69
+
70
+
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+
3
+ require("../../lib/jasmine-promise");
4
+ var Q = require("q");
5
+ var FS = require("../../../fs");
6
+ var Mock = require("../../../fs-mock");
7
+ var normalize = FS.normal;
8
+
9
+ describe("makeTree", function () {
10
+ it("should make a branch of a tree", function () {
11
+
12
+ var mock = Mock({
13
+ "a": {}
14
+ });
15
+
16
+ return Q.fcall(function () {
17
+ return mock.makeTree("a/b/c");
18
+ })
19
+
20
+ .then(function () {
21
+ return mock.listTree();
22
+ })
23
+ .then(function (list) {
24
+ expect(list).toEqual([
25
+ ".",
26
+ "a",
27
+ normalize("a/b"),
28
+ normalize("a/b/c")
29
+ ]);
30
+ })
31
+
32
+ .then(function () {
33
+ return mock.exists("a/b/c")
34
+ })
35
+ .then(function (exists) {
36
+ expect(exists).toBe(true);
37
+ })
38
+
39
+ .then(function () {
40
+ return mock.isDirectory("a/b/c")
41
+ })
42
+ .then(function (isDirectory) {
43
+ expect(isDirectory).toBe(true);
44
+ })
45
+
46
+ });
47
+
48
+ it("should make a branch of a tree even if some of it already exists", function () {
49
+
50
+ var mock = Mock({
51
+ "a/b": {}
52
+ });
53
+
54
+ return Q.fcall(function () {
55
+ return mock.makeTree("a/b/c/d");
56
+ })
57
+
58
+ .then(function () {
59
+ return mock.listTree();
60
+ })
61
+ .then(function (list) {
62
+ expect(list).toEqual([
63
+ ".",
64
+ "a",
65
+ normalize("a/b"),
66
+ normalize("a/b/c"),
67
+ normalize("a/b/c/d")
68
+ ]);
69
+ })
70
+ });
71
+
72
+ it("should make an absolute tree from a subdirectory", function () {
73
+ var mock = Mock({
74
+ "a/b": {
75
+ "c": {
76
+ "d.ext": 66
77
+ }
78
+ }
79
+ }, "/a/b");
80
+
81
+ return Q.fcall(function () {
82
+ return mock.makeTree("/a/b/c/x/y/z");
83
+ })
84
+ .then(function () {
85
+ return Q.all([
86
+ mock.isDirectory("a/b/c/x"),
87
+ mock.isDirectory("a/b/c/x/y"),
88
+ mock.isDirectory("a/b/c/x/y/z")
89
+ ]);
90
+ })
91
+ .then(function () {
92
+ return mock.listTree("/");
93
+ })
94
+ .then(function (list) {
95
+ expect(list).toEqual([
96
+ "/",
97
+ "/a",
98
+ "/a/b",
99
+ "/a/b/c",
100
+ "/a/b/c/d.ext",
101
+ "/a/b/c/x",
102
+ "/a/b/c/x/y",
103
+ "/a/b/c/x/y/z"
104
+ ]);
105
+ });
106
+ });
107
+
108
+ });
109
+