traceur-rb 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (410) hide show
  1. checksums.yaml +8 -8
  2. data/README.md +2 -2
  3. data/lib/js/compile.js +7 -15
  4. data/lib/traceur.rb +2 -1
  5. data/lib/traceur/compilation_error.rb +27 -0
  6. data/lib/traceur/compiler.rb +4 -1
  7. data/lib/traceur/configuration.rb +1 -1
  8. data/lib/traceur/node/runner.rb +1 -1
  9. data/lib/traceur/version.rb +1 -1
  10. data/spec/examples/syntax_error.js +3 -0
  11. data/spec/integration/examples_spec.rb +6 -0
  12. data/vendor/node_modules/traceur/LICENSE +202 -0
  13. data/vendor/node_modules/traceur/README.md +5 -5
  14. data/vendor/node_modules/traceur/bin/traceur-runtime.js +1392 -623
  15. data/vendor/node_modules/traceur/bin/traceur.js +24749 -17990
  16. data/vendor/node_modules/traceur/node_modules/.bin/semver +2 -2
  17. data/vendor/node_modules/traceur/node_modules/commander/History.md +222 -0
  18. data/vendor/node_modules/traceur/node_modules/commander/Readme.md +127 -35
  19. data/vendor/node_modules/traceur/node_modules/commander/index.js +261 -93
  20. data/vendor/node_modules/traceur/node_modules/commander/package.json +41 -9
  21. data/vendor/node_modules/traceur/node_modules/glob/LICENSE +15 -0
  22. data/vendor/node_modules/traceur/node_modules/glob/README.md +357 -0
  23. data/vendor/node_modules/traceur/node_modules/glob/common.js +177 -0
  24. data/vendor/node_modules/traceur/node_modules/glob/glob.js +649 -0
  25. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/.eslintrc +17 -0
  26. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/LICENSE +15 -0
  27. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/README.md +37 -0
  28. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/inflight.js +44 -0
  29. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE +15 -0
  30. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md +36 -0
  31. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json +34 -0
  32. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/test/basic.js +51 -0
  33. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js +33 -0
  34. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/package.json +61 -0
  35. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/test.js +97 -0
  36. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/LICENSE +16 -0
  37. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/README.md +42 -0
  38. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/inherits.js +1 -0
  39. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/inherits_browser.js +23 -0
  40. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/package.json +33 -0
  41. data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/test.js +25 -0
  42. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/.npmignore +1 -0
  43. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/.travis.yml +4 -0
  44. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/LICENSE +23 -0
  45. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/README.md +216 -0
  46. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/benchmark.js +15 -0
  47. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/browser.js +1181 -0
  48. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/minimatch.js +845 -0
  49. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore +2 -0
  50. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.travis.yml +3 -0
  51. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +121 -0
  52. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js +8 -0
  53. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +191 -0
  54. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +2 -0
  55. data/vendor/node_modules/traceur/node_modules/{q-io/node_modules/collections → glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/.travis.yml +0 -0
  56. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +6 -0
  57. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +80 -0
  58. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +5 -0
  59. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +38 -0
  60. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +73 -0
  61. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +56 -0
  62. data/vendor/node_modules/traceur/node_modules/{q-io/node_modules/url2 → glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/.travis.yml +1 -1
  63. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE +18 -0
  64. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown +62 -0
  65. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js +6 -0
  66. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js +13 -0
  67. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +83 -0
  68. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js +39 -0
  69. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +75 -0
  70. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-comparison.js +32 -0
  71. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-results.txt +1075 -0
  72. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/cases.txt +182 -0
  73. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/dollar.js +9 -0
  74. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js +10 -0
  75. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/generate.sh +24 -0
  76. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/negative-increment.js +15 -0
  77. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js +16 -0
  78. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js +10 -0
  79. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js +13 -0
  80. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/same-type.js +7 -0
  81. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js +50 -0
  82. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/package.json +60 -0
  83. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/test/basic.js +399 -0
  84. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/test/brace-expand.js +45 -0
  85. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/test/defaults.js +274 -0
  86. data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js +8 -0
  87. data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/LICENSE +27 -0
  88. data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/README.md +51 -0
  89. data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE +15 -0
  90. data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/README.md +36 -0
  91. data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/package.json +34 -0
  92. data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js +51 -0
  93. data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js +33 -0
  94. data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/once.js +21 -0
  95. data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/package.json +42 -0
  96. data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/test/once.js +23 -0
  97. data/vendor/node_modules/traceur/node_modules/glob/package.json +72 -0
  98. data/vendor/node_modules/traceur/node_modules/glob/sync.js +409 -0
  99. data/vendor/node_modules/traceur/node_modules/rsvp/.release.json +17 -0
  100. data/vendor/node_modules/traceur/node_modules/rsvp/CHANGELOG.md +165 -0
  101. data/vendor/node_modules/traceur/node_modules/rsvp/LICENSE +19 -0
  102. data/vendor/node_modules/traceur/node_modules/rsvp/README.md +364 -0
  103. data/vendor/node_modules/traceur/node_modules/rsvp/dist/rsvp.js +1671 -0
  104. data/vendor/node_modules/traceur/node_modules/rsvp/dist/rsvp.min.js +9 -0
  105. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp.js +66 -0
  106. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp.umd.js +50 -0
  107. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/-internal.js +265 -0
  108. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/all-settled.js +71 -0
  109. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/all.js +15 -0
  110. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/asap.js +109 -0
  111. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/config.js +28 -0
  112. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/defer.js +45 -0
  113. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/enumerator.js +125 -0
  114. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/events.js +201 -0
  115. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/filter.js +120 -0
  116. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/hash-settled.js +124 -0
  117. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/hash.js +94 -0
  118. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/instrument.js +41 -0
  119. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/map.js +99 -0
  120. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/node.js +281 -0
  121. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise-hash.js +51 -0
  122. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise.js +496 -0
  123. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/all.js +52 -0
  124. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/race.js +105 -0
  125. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/reject.js +47 -0
  126. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/resolve.js +49 -0
  127. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/race.js +15 -0
  128. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/reject.js +16 -0
  129. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/resolve.js +17 -0
  130. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/rethrow.js +46 -0
  131. data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/utils.js +39 -0
  132. data/vendor/node_modules/traceur/node_modules/rsvp/package.json +100 -0
  133. data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/README.md +9 -0
  134. data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/bower.json +22 -0
  135. data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/composer.json +18 -0
  136. data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/package.json +52 -0
  137. data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/rsvp.amd.js +1607 -0
  138. data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/rsvp.js +1566 -0
  139. data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/rsvp.min.js +26 -0
  140. data/vendor/node_modules/traceur/node_modules/rsvp/vertx.js +1 -0
  141. data/vendor/node_modules/traceur/node_modules/semver/bin/semver +2 -2
  142. data/vendor/node_modules/traceur/node_modules/semver/package.json +4 -3
  143. data/vendor/node_modules/traceur/node_modules/semver/semver.browser.js +7 -0
  144. data/vendor/node_modules/traceur/node_modules/semver/semver.browser.js.gz +0 -0
  145. data/vendor/node_modules/traceur/node_modules/semver/semver.js +7 -0
  146. data/vendor/node_modules/traceur/node_modules/semver/semver.min.js +1 -1
  147. data/vendor/node_modules/traceur/node_modules/semver/semver.min.js.gz +0 -0
  148. data/vendor/node_modules/traceur/node_modules/semver/test/index.js +8 -4
  149. data/vendor/node_modules/traceur/node_modules/semver/test/ltr.js +2 -1
  150. data/vendor/node_modules/traceur/node_modules/source-map-support/.npmignore +1 -0
  151. data/vendor/node_modules/traceur/node_modules/{q-io/node_modules/mime/LICENSE → source-map-support/LICENSE.md} +7 -5
  152. data/vendor/node_modules/traceur/node_modules/source-map-support/README.md +165 -0
  153. data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/browser-source-map-support.js +89 -0
  154. data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/index.html +6 -0
  155. data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/require.js +36 -0
  156. data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/script.coffee +13 -0
  157. data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/script.js +24 -0
  158. data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/script.map +10 -0
  159. data/vendor/node_modules/traceur/node_modules/source-map-support/browser-source-map-support.js +89 -0
  160. data/vendor/node_modules/traceur/node_modules/source-map-support/browser-test/index.html +6 -0
  161. data/vendor/node_modules/traceur/node_modules/source-map-support/browser-test/script.coffee +12 -0
  162. data/vendor/node_modules/traceur/node_modules/source-map-support/browser-test/script.js +25 -0
  163. data/vendor/node_modules/traceur/node_modules/source-map-support/browser-test/script.map +10 -0
  164. data/vendor/node_modules/traceur/node_modules/source-map-support/build.js +69 -0
  165. data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/index.html +6 -0
  166. data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/script.coffee +12 -0
  167. data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/script.js +25 -0
  168. data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/script.map +10 -0
  169. data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/server.js +45 -0
  170. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/.npmignore +2 -0
  171. data/vendor/node_modules/traceur/node_modules/{q-io → source-map-support/node_modules/source-map}/.travis.yml +1 -0
  172. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/CHANGELOG.md +121 -0
  173. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/LICENSE +28 -0
  174. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/Makefile.dryice.js +166 -0
  175. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/README.md +434 -0
  176. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/assert-shim.js +56 -0
  177. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/mini-require.js +152 -0
  178. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/prefix-source-map.jsm +20 -0
  179. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/prefix-utils.jsm +18 -0
  180. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/suffix-browser.js +8 -0
  181. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/suffix-source-map.jsm +6 -0
  182. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/suffix-utils.jsm +21 -0
  183. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/test-prefix.js +8 -0
  184. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/test-suffix.js +3 -0
  185. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map.js +8 -0
  186. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/array-set.js +97 -0
  187. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
  188. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/base64.js +42 -0
  189. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/binary-search.js +81 -0
  190. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/source-map-consumer.js +478 -0
  191. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/source-map-generator.js +380 -0
  192. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/source-node.js +371 -0
  193. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/util.js +205 -0
  194. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
  195. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/README.md +171 -0
  196. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
  197. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/intercept.js +36 -0
  198. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/package.json +37 -0
  199. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/package.json +142 -0
  200. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/run-tests.js +62 -0
  201. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-api.js +26 -0
  202. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-array-set.js +104 -0
  203. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
  204. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-base64.js +35 -0
  205. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
  206. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-dog-fooding.js +72 -0
  207. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-source-map-consumer.js +451 -0
  208. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-source-map-generator.js +417 -0
  209. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-source-node.js +365 -0
  210. data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/util.js +161 -0
  211. data/vendor/node_modules/traceur/node_modules/source-map-support/package.json +52 -0
  212. data/vendor/node_modules/traceur/node_modules/source-map-support/source-map-support.js +381 -0
  213. data/vendor/node_modules/traceur/node_modules/source-map-support/test.js +359 -0
  214. data/vendor/node_modules/traceur/package.json +234 -20
  215. data/vendor/node_modules/traceur/src/node/NodeCompiler.js +78 -0
  216. data/vendor/node_modules/traceur/src/node/System.js +32 -5
  217. data/vendor/node_modules/traceur/src/node/api.js +28 -93
  218. data/vendor/node_modules/traceur/src/node/command.js +84 -19
  219. data/vendor/node_modules/traceur/src/node/compileAllJsFilesInDir.js +40 -0
  220. data/vendor/node_modules/traceur/src/node/interpreter.js +11 -8
  221. data/vendor/node_modules/traceur/src/node/recursiveModuleCompile.js +171 -0
  222. data/vendor/node_modules/traceur/src/node/require.js +7 -21
  223. data/vendor/node_modules/traceur/src/node/to-amd-compiler.js +2 -7
  224. data/vendor/node_modules/traceur/src/node/to-closure-compiler.js +28 -0
  225. data/vendor/node_modules/traceur/src/node/to-commonjs-compiler.js +3 -7
  226. data/vendor/node_modules/traceur/src/node/traceur.js +1 -1
  227. metadata +196 -190
  228. data/vendor/node_modules/traceur/node_modules/q-io/.npmignore +0 -1
  229. data/vendor/node_modules/traceur/node_modules/q-io/CHANGES.md +0 -122
  230. data/vendor/node_modules/traceur/node_modules/q-io/LICENSE +0 -19
  231. data/vendor/node_modules/traceur/node_modules/q-io/README.md +0 -928
  232. data/vendor/node_modules/traceur/node_modules/q-io/buffer-stream.js +0 -59
  233. data/vendor/node_modules/traceur/node_modules/q-io/coverage-report.js +0 -44
  234. data/vendor/node_modules/traceur/node_modules/q-io/deprecate.js +0 -51
  235. data/vendor/node_modules/traceur/node_modules/q-io/fs-boot.js +0 -307
  236. data/vendor/node_modules/traceur/node_modules/q-io/fs-common.js +0 -499
  237. data/vendor/node_modules/traceur/node_modules/q-io/fs-mock.js +0 -547
  238. data/vendor/node_modules/traceur/node_modules/q-io/fs-root.js +0 -105
  239. data/vendor/node_modules/traceur/node_modules/q-io/fs.js +0 -355
  240. data/vendor/node_modules/traceur/node_modules/q-io/fs2http.js +0 -65
  241. data/vendor/node_modules/traceur/node_modules/q-io/http-apps.js +0 -152
  242. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/chain.js +0 -24
  243. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/content.js +0 -93
  244. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/cookie.js +0 -154
  245. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/decorators.js +0 -178
  246. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/fs.js +0 -417
  247. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/html.js +0 -58
  248. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/json.js +0 -78
  249. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/negotiate.js +0 -120
  250. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/proxy.js +0 -27
  251. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/redirect.js +0 -209
  252. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/route.js +0 -125
  253. data/vendor/node_modules/traceur/node_modules/q-io/http-apps/status.js +0 -175
  254. data/vendor/node_modules/traceur/node_modules/q-io/http-cookie.js +0 -75
  255. data/vendor/node_modules/traceur/node_modules/q-io/http.js +0 -378
  256. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/.npmignore +0 -11
  257. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/CHANGES.md +0 -78
  258. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/LICENSE.md +0 -21
  259. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/README.md +0 -1285
  260. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/collections.js +0 -22
  261. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/dict.js +0 -142
  262. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/fast-map.js +0 -57
  263. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/fast-set.js +0 -183
  264. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-collection.js +0 -261
  265. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-map.js +0 -186
  266. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-order.js +0 -55
  267. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-set.js +0 -59
  268. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/heap.js +0 -236
  269. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/iterator.js +0 -371
  270. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/list.js +0 -435
  271. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/array-changes.js +0 -247
  272. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/map-changes.js +0 -147
  273. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/property-changes.js +0 -448
  274. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/range-changes.js +0 -139
  275. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/lru-map.js +0 -79
  276. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/lru-set.js +0 -142
  277. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/map.js +0 -60
  278. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/multi-map.js +0 -41
  279. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/package.json +0 -12
  280. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/sync +0 -7
  281. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/sync.patch +0 -48
  282. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/weak-map.js +0 -590
  283. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/package.json +0 -49
  284. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/set.js +0 -173
  285. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-array.js +0 -274
  286. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-function.js +0 -59
  287. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-object.js +0 -538
  288. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-regexp.js +0 -14
  289. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim.js +0 -6
  290. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-array-map.js +0 -49
  291. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-array-set.js +0 -51
  292. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-array.js +0 -269
  293. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-map.js +0 -61
  294. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-set.js +0 -736
  295. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/tree-log.js +0 -40
  296. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/weak-map.js +0 -1
  297. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/README.md +0 -66
  298. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/mime.js +0 -114
  299. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/package.json +0 -35
  300. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/test.js +0 -84
  301. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/types/mime.types +0 -1588
  302. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/types/node.types +0 -77
  303. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/CHANGES +0 -15
  304. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/LICENSE +0 -19
  305. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/README +0 -96
  306. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/lib/mimeparse.js +0 -166
  307. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/package.json +0 -43
  308. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/CONTRIBUTING.md +0 -40
  309. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/LICENSE +0 -19
  310. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/README.md +0 -813
  311. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/benchmark/compare-with-callbacks.js +0 -71
  312. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/benchmark/scenarios.js +0 -36
  313. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/package.json +0 -93
  314. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/q.js +0 -1937
  315. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/queue.js +0 -35
  316. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/.gitmodules +0 -6
  317. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/History.md +0 -36
  318. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/Makefile +0 -7
  319. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/Readme.md +0 -38
  320. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/benchmark.js +0 -32
  321. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/examples.js +0 -39
  322. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/index.js +0 -2
  323. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/lib/querystring.js +0 -123
  324. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/package.json +0 -19
  325. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/.gitmodules +0 -3
  326. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/.npmignore +0 -3
  327. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/History.md +0 -128
  328. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/Makefile +0 -53
  329. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/Readme.md +0 -61
  330. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/bin/expresso +0 -856
  331. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/api.html +0 -1080
  332. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/index.html +0 -377
  333. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/index.md +0 -290
  334. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/layout/foot.html +0 -3
  335. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/layout/head.html +0 -42
  336. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/lib/bar.js +0 -4
  337. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/lib/foo.js +0 -16
  338. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/package.json +0 -12
  339. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/assert.test.js +0 -91
  340. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/async.test.js +0 -12
  341. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/bar.test.js +0 -13
  342. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/foo.test.js +0 -14
  343. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/http.test.js +0 -146
  344. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/serial/async.test.js +0 -39
  345. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/serial/http.test.js +0 -48
  346. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/.gitmodules +0 -3
  347. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/History.md +0 -22
  348. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/Makefile +0 -6
  349. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/Readme.md +0 -248
  350. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/examples/runner.js +0 -53
  351. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/index.js +0 -2
  352. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/lib/eql.js +0 -91
  353. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/lib/should.js +0 -548
  354. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/package.json +0 -8
  355. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/test/should.test.js +0 -358
  356. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/test/querystring.test.js +0 -133
  357. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/.npmignore +0 -3
  358. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/LICENSE.md +0 -20
  359. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/README.md +0 -33
  360. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/package.json +0 -37
  361. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/test/url2-spec.js +0 -125
  362. data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/url2.js +0 -151
  363. data/vendor/node_modules/traceur/node_modules/q-io/package.json +0 -51
  364. data/vendor/node_modules/traceur/node_modules/q-io/reader.js +0 -133
  365. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/boot-directory-spec.js +0 -47
  366. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/contains-spec.js +0 -11
  367. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/fixtures/hello.txt +0 -1
  368. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/issues/1-spec.js +0 -33
  369. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/make-tree-spec.js +0 -92
  370. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/append-spec.js +0 -41
  371. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/copy-tree-spec.js +0 -57
  372. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/fixture/hello.txt +0 -1
  373. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/link-spec.js +0 -70
  374. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/make-tree-spec.js +0 -109
  375. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/merge-spec.js +0 -67
  376. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/move-spec.js +0 -219
  377. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/object-spec.js +0 -20
  378. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/range-spec.js +0 -26
  379. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/read-spec.js +0 -40
  380. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/remove-directory-spec.js +0 -37
  381. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/remove-tree-spec.js +0 -39
  382. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/root-spec.js +0 -32
  383. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/stat-spec.js +0 -26
  384. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/symbolic-link-spec.js +0 -86
  385. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/working-directory-spec.js +0 -31
  386. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/write-spec.js +0 -73
  387. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/range-spec.js +0 -23
  388. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/range-spec.txt +0 -1
  389. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/read-spec.js +0 -22
  390. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/relative-spec.js +0 -25
  391. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/reroot-spec.js +0 -45
  392. data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/write-spec.js +0 -38
  393. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/cookie-spec.js +0 -52
  394. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/directory-list-spec.js +0 -86
  395. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/01234.txt +0 -1
  396. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/1234.txt +0 -1
  397. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/5678.txt +0 -0
  398. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/9012/3456.txt +0 -0
  399. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/hosts-spec.js +0 -49
  400. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/interpret-range-spec.js +0 -47
  401. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/partial-range-spec.js +0 -186
  402. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/proxy-spec.js +0 -82
  403. data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/symbolic-link-spec.js +0 -110
  404. data/vendor/node_modules/traceur/node_modules/q-io/spec/http/agent-spec.js +0 -96
  405. data/vendor/node_modules/traceur/node_modules/q-io/spec/http/basic-spec.js +0 -96
  406. data/vendor/node_modules/traceur/node_modules/q-io/spec/lib/jasmine-promise.js +0 -42
  407. data/vendor/node_modules/traceur/node_modules/q-io/writer.js +0 -111
  408. data/vendor/node_modules/traceur/src/node/compile-single-file.js +0 -69
  409. data/vendor/node_modules/traceur/src/node/compiler.js +0 -116
  410. data/vendor/node_modules/traceur/src/node/inline-module.js +0 -149
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "wrappy",
3
+ "version": "1.0.1",
4
+ "description": "Callback wrapping utility",
5
+ "main": "wrappy.js",
6
+ "directories": {
7
+ "test": "test"
8
+ },
9
+ "dependencies": {},
10
+ "devDependencies": {
11
+ "tap": "^0.4.12"
12
+ },
13
+ "scripts": {
14
+ "test": "tap test/*.js"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/npm/wrappy"
19
+ },
20
+ "author": {
21
+ "name": "Isaac Z. Schlueter",
22
+ "email": "i@izs.me",
23
+ "url": "http://blog.izs.me/"
24
+ },
25
+ "license": "ISC",
26
+ "bugs": {
27
+ "url": "https://github.com/npm/wrappy/issues"
28
+ },
29
+ "homepage": "https://github.com/npm/wrappy",
30
+ "readme": "# wrappy\n\nCallback wrapping utility\n\n## USAGE\n\n```javascript\nvar wrappy = require(\"wrappy\")\n\n// var wrapper = wrappy(wrapperFunction)\n\n// make sure a cb is called only once\n// See also: http://npm.im/once for this specific use case\nvar once = wrappy(function (cb) {\n var called = false\n return function () {\n if (called) return\n called = true\n return cb.apply(this, arguments)\n }\n})\n\nfunction printBoo () {\n console.log('boo')\n}\n// has some rando property\nprintBoo.iAmBooPrinter = true\n\nvar onlyPrintOnce = once(printBoo)\n\nonlyPrintOnce() // prints 'boo'\nonlyPrintOnce() // does nothing\n\n// random property is retained!\nassert.equal(onlyPrintOnce.iAmBooPrinter, true)\n```\n",
31
+ "readmeFilename": "README.md",
32
+ "_id": "wrappy@1.0.1",
33
+ "_from": "wrappy@>=1.0.0 <2.0.0"
34
+ }
@@ -0,0 +1,51 @@
1
+ var test = require('tap').test
2
+ var wrappy = require('../wrappy.js')
3
+
4
+ test('basic', function (t) {
5
+ function onceifier (cb) {
6
+ var called = false
7
+ return function () {
8
+ if (called) return
9
+ called = true
10
+ return cb.apply(this, arguments)
11
+ }
12
+ }
13
+ onceifier.iAmOnce = {}
14
+ var once = wrappy(onceifier)
15
+ t.equal(once.iAmOnce, onceifier.iAmOnce)
16
+
17
+ var called = 0
18
+ function boo () {
19
+ t.equal(called, 0)
20
+ called++
21
+ }
22
+ // has some rando property
23
+ boo.iAmBoo = true
24
+
25
+ var onlyPrintOnce = once(boo)
26
+
27
+ onlyPrintOnce() // prints 'boo'
28
+ onlyPrintOnce() // does nothing
29
+ t.equal(called, 1)
30
+
31
+ // random property is retained!
32
+ t.equal(onlyPrintOnce.iAmBoo, true)
33
+
34
+ var logs = []
35
+ var logwrap = wrappy(function (msg, cb) {
36
+ logs.push(msg + ' wrapping cb')
37
+ return function () {
38
+ logs.push(msg + ' before cb')
39
+ var ret = cb.apply(this, arguments)
40
+ logs.push(msg + ' after cb')
41
+ }
42
+ })
43
+
44
+ var c = logwrap('foo', function () {
45
+ t.same(logs, [ 'foo wrapping cb', 'foo before cb' ])
46
+ })
47
+ c()
48
+ t.same(logs, [ 'foo wrapping cb', 'foo before cb', 'foo after cb' ])
49
+
50
+ t.end()
51
+ })
@@ -0,0 +1,33 @@
1
+ // Returns a wrapper function that returns a wrapped callback
2
+ // The wrapper function should do some stuff, and return a
3
+ // presumably different callback function.
4
+ // This makes sure that own properties are retained, so that
5
+ // decorations and such are not lost along the way.
6
+ module.exports = wrappy
7
+ function wrappy (fn, cb) {
8
+ if (fn && cb) return wrappy(fn)(cb)
9
+
10
+ if (typeof fn !== 'function')
11
+ throw new TypeError('need wrapper function')
12
+
13
+ Object.keys(fn).forEach(function (k) {
14
+ wrapper[k] = fn[k]
15
+ })
16
+
17
+ return wrapper
18
+
19
+ function wrapper() {
20
+ var args = new Array(arguments.length)
21
+ for (var i = 0; i < args.length; i++) {
22
+ args[i] = arguments[i]
23
+ }
24
+ var ret = fn.apply(this, args)
25
+ var cb = args[args.length-1]
26
+ if (typeof ret === 'function' && ret !== cb) {
27
+ Object.keys(cb).forEach(function (k) {
28
+ ret[k] = cb[k]
29
+ })
30
+ }
31
+ return ret
32
+ }
33
+ }
@@ -0,0 +1,21 @@
1
+ var wrappy = require('wrappy')
2
+ module.exports = wrappy(once)
3
+
4
+ once.proto = once(function () {
5
+ Object.defineProperty(Function.prototype, 'once', {
6
+ value: function () {
7
+ return once(this)
8
+ },
9
+ configurable: true
10
+ })
11
+ })
12
+
13
+ function once (fn) {
14
+ var f = function () {
15
+ if (f.called) return f.value
16
+ f.called = true
17
+ return f.value = fn.apply(this, arguments)
18
+ }
19
+ f.called = false
20
+ return f
21
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "once",
3
+ "version": "1.3.1",
4
+ "description": "Run a function exactly one time",
5
+ "main": "once.js",
6
+ "directories": {
7
+ "test": "test"
8
+ },
9
+ "dependencies": {
10
+ "wrappy": "1"
11
+ },
12
+ "devDependencies": {
13
+ "tap": "~0.3.0"
14
+ },
15
+ "scripts": {
16
+ "test": "tap test/*.js"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git://github.com/isaacs/once"
21
+ },
22
+ "keywords": [
23
+ "once",
24
+ "function",
25
+ "one",
26
+ "single"
27
+ ],
28
+ "author": {
29
+ "name": "Isaac Z. Schlueter",
30
+ "email": "i@izs.me",
31
+ "url": "http://blog.izs.me/"
32
+ },
33
+ "license": "BSD",
34
+ "readme": "# once\n\nOnly call a function once.\n\n## usage\n\n```javascript\nvar once = require('once')\n\nfunction load (file, cb) {\n cb = once(cb)\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nOr add to the Function.prototype in a responsible way:\n\n```javascript\n// only has to be done once\nrequire('once').proto()\n\nfunction load (file, cb) {\n cb = cb.once()\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nIronically, the prototype feature makes this module twice as\ncomplicated as necessary.\n\nTo check whether you function has been called, use `fn.called`. Once the\nfunction is called for the first time the return value of the original\nfunction is saved in `fn.value` and subsequent calls will continue to\nreturn this value.\n\n```javascript\nvar once = require('once')\n\nfunction load (cb) {\n cb = once(cb)\n var stream = createStream()\n stream.once('data', cb)\n stream.once('end', function () {\n if (!cb.called) cb(new Error('not found'))\n })\n}\n```\n",
35
+ "readmeFilename": "README.md",
36
+ "bugs": {
37
+ "url": "https://github.com/isaacs/once/issues"
38
+ },
39
+ "homepage": "https://github.com/isaacs/once",
40
+ "_id": "once@1.3.1",
41
+ "_from": "once@>=1.3.0 <2.0.0"
42
+ }
@@ -0,0 +1,23 @@
1
+ var test = require('tap').test
2
+ var once = require('../once.js')
3
+
4
+ test('once', function (t) {
5
+ var f = 0
6
+ function fn (g) {
7
+ t.equal(f, 0)
8
+ f ++
9
+ return f + g + this
10
+ }
11
+ fn.ownProperty = {}
12
+ var foo = once(fn)
13
+ t.equal(fn.ownProperty, foo.ownProperty)
14
+ t.notOk(foo.called)
15
+ for (var i = 0; i < 1E3; i++) {
16
+ t.same(f, i === 0 ? 0 : 1)
17
+ var g = foo.call(1, 1)
18
+ t.ok(foo.called)
19
+ t.same(g, 3)
20
+ t.same(f, 1)
21
+ }
22
+ t.end()
23
+ })
@@ -0,0 +1,72 @@
1
+ {
2
+ "author": {
3
+ "name": "Isaac Z. Schlueter",
4
+ "email": "i@izs.me",
5
+ "url": "http://blog.izs.me/"
6
+ },
7
+ "name": "glob",
8
+ "description": "a little globber",
9
+ "version": "4.3.5",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git://github.com/isaacs/node-glob.git"
13
+ },
14
+ "main": "glob.js",
15
+ "files": [
16
+ "glob.js",
17
+ "sync.js",
18
+ "common.js"
19
+ ],
20
+ "engines": {
21
+ "node": "*"
22
+ },
23
+ "dependencies": {
24
+ "inflight": "^1.0.4",
25
+ "inherits": "2",
26
+ "minimatch": "^2.0.1",
27
+ "once": "^1.3.0"
28
+ },
29
+ "devDependencies": {
30
+ "mkdirp": "0",
31
+ "rimraf": "^2.2.8",
32
+ "tap": "^0.5.0",
33
+ "tick": "0.0.6"
34
+ },
35
+ "scripts": {
36
+ "prepublish": "npm run benchclean",
37
+ "profclean": "rm -f v8.log profile.txt",
38
+ "test": "npm run profclean && tap test/*.js",
39
+ "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js",
40
+ "bench": "bash benchmark.sh",
41
+ "prof": "bash prof.sh && cat profile.txt",
42
+ "benchclean": "bash benchclean.sh"
43
+ },
44
+ "license": "ISC",
45
+ "gitHead": "9de4cb6bfeb9c8458cf188fe91447b99bf8f3cfd",
46
+ "bugs": {
47
+ "url": "https://github.com/isaacs/node-glob/issues"
48
+ },
49
+ "homepage": "https://github.com/isaacs/node-glob",
50
+ "_id": "glob@4.3.5",
51
+ "_shasum": "80fbb08ca540f238acce5d11d1e9bc41e75173d3",
52
+ "_from": "glob@>=4.3.0 <4.4.0",
53
+ "_npmVersion": "2.2.0",
54
+ "_nodeVersion": "0.10.35",
55
+ "_npmUser": {
56
+ "name": "isaacs",
57
+ "email": "i@izs.me"
58
+ },
59
+ "maintainers": [
60
+ {
61
+ "name": "isaacs",
62
+ "email": "i@izs.me"
63
+ }
64
+ ],
65
+ "dist": {
66
+ "shasum": "80fbb08ca540f238acce5d11d1e9bc41e75173d3",
67
+ "tarball": "http://registry.npmjs.org/glob/-/glob-4.3.5.tgz"
68
+ },
69
+ "directories": {},
70
+ "_resolved": "https://registry.npmjs.org/glob/-/glob-4.3.5.tgz",
71
+ "readme": "ERROR: No README data found!"
72
+ }
@@ -0,0 +1,409 @@
1
+ module.exports = globSync
2
+ globSync.GlobSync = GlobSync
3
+
4
+ var fs = require('fs')
5
+ var minimatch = require('minimatch')
6
+ var Minimatch = minimatch.Minimatch
7
+ var Glob = require('./glob.js').Glob
8
+ var util = require('util')
9
+ var path = require('path')
10
+ var assert = require('assert')
11
+ var common = require('./common.js')
12
+ var alphasort = common.alphasort
13
+ var alphasorti = common.alphasorti
14
+ var isAbsolute = common.isAbsolute
15
+ var setopts = common.setopts
16
+ var ownProp = common.ownProp
17
+
18
+ function globSync (pattern, options) {
19
+ if (typeof options === 'function' || arguments.length === 3)
20
+ throw new TypeError('callback provided to sync glob')
21
+
22
+ return new GlobSync(pattern, options).found
23
+ }
24
+
25
+ function GlobSync (pattern, options) {
26
+ if (!pattern)
27
+ throw new Error('must provide pattern')
28
+
29
+ if (typeof options === 'function' || arguments.length === 3)
30
+ throw new TypeError('callback provided to sync glob')
31
+
32
+ if (!(this instanceof GlobSync))
33
+ return new GlobSync(pattern, options)
34
+
35
+ setopts(this, pattern, options)
36
+
37
+ if (this.noprocess)
38
+ return this
39
+
40
+ var n = this.minimatch.set.length
41
+ this.matches = new Array(n)
42
+ for (var i = 0; i < n; i ++) {
43
+ this._process(this.minimatch.set[i], i, false)
44
+ }
45
+ this._finish()
46
+ }
47
+
48
+ GlobSync.prototype._finish = function () {
49
+ assert(this instanceof GlobSync)
50
+ common.finish(this)
51
+ }
52
+
53
+
54
+ GlobSync.prototype._process = function (pattern, index, inGlobStar) {
55
+ assert(this instanceof GlobSync)
56
+
57
+ // Get the first [n] parts of pattern that are all strings.
58
+ var n = 0
59
+ while (typeof pattern[n] === 'string') {
60
+ n ++
61
+ }
62
+ // now n is the index of the first one that is *not* a string.
63
+
64
+ // See if there's anything else
65
+ var prefix
66
+ switch (n) {
67
+ // if not, then this is rather simple
68
+ case pattern.length:
69
+ this._processSimple(pattern.join('/'), index)
70
+ return
71
+
72
+ case 0:
73
+ // pattern *starts* with some non-trivial item.
74
+ // going to readdir(cwd), but not include the prefix in matches.
75
+ prefix = null
76
+ break
77
+
78
+ default:
79
+ // pattern has some string bits in the front.
80
+ // whatever it starts with, whether that's 'absolute' like /foo/bar,
81
+ // or 'relative' like '../baz'
82
+ prefix = pattern.slice(0, n).join('/')
83
+ break
84
+ }
85
+
86
+ var remain = pattern.slice(n)
87
+
88
+ // get the list of entries.
89
+ var read
90
+ if (prefix === null)
91
+ read = '.'
92
+ else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
93
+ if (!prefix || !isAbsolute(prefix))
94
+ prefix = '/' + prefix
95
+ read = prefix
96
+ } else
97
+ read = prefix
98
+
99
+ var abs = this._makeAbs(read)
100
+
101
+ var isGlobStar = remain[0] === minimatch.GLOBSTAR
102
+ if (isGlobStar)
103
+ this._processGlobStar(prefix, read, abs, remain, index, inGlobStar)
104
+ else
105
+ this._processReaddir(prefix, read, abs, remain, index, inGlobStar)
106
+ }
107
+
108
+ GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) {
109
+ var entries = this._readdir(abs, inGlobStar)
110
+
111
+ // if the abs isn't a dir, then nothing can match!
112
+ if (!entries)
113
+ return
114
+
115
+ // It will only match dot entries if it starts with a dot, or if
116
+ // dot is set. Stuff like @(.foo|.bar) isn't allowed.
117
+ var pn = remain[0]
118
+ var negate = !!this.minimatch.negate
119
+ var rawGlob = pn._glob
120
+ var dotOk = this.dot || rawGlob.charAt(0) === '.'
121
+
122
+ var matchedEntries = []
123
+ for (var i = 0; i < entries.length; i++) {
124
+ var e = entries[i]
125
+ if (e.charAt(0) !== '.' || dotOk) {
126
+ var m
127
+ if (negate && !prefix) {
128
+ m = !e.match(pn)
129
+ } else {
130
+ m = e.match(pn)
131
+ }
132
+ if (m)
133
+ matchedEntries.push(e)
134
+ }
135
+ }
136
+
137
+ var len = matchedEntries.length
138
+ // If there are no matched entries, then nothing matches.
139
+ if (len === 0)
140
+ return
141
+
142
+ // if this is the last remaining pattern bit, then no need for
143
+ // an additional stat *unless* the user has specified mark or
144
+ // stat explicitly. We know they exist, since readdir returned
145
+ // them.
146
+
147
+ if (remain.length === 1 && !this.mark && !this.stat) {
148
+ if (!this.matches[index])
149
+ this.matches[index] = Object.create(null)
150
+
151
+ for (var i = 0; i < len; i ++) {
152
+ var e = matchedEntries[i]
153
+ if (prefix) {
154
+ if (prefix.slice(-1) !== '/')
155
+ e = prefix + '/' + e
156
+ else
157
+ e = prefix + e
158
+ }
159
+
160
+ if (e.charAt(0) === '/' && !this.nomount) {
161
+ e = path.join(this.root, e)
162
+ }
163
+ this.matches[index][e] = true
164
+ }
165
+ // This was the last one, and no stats were needed
166
+ return
167
+ }
168
+
169
+ // now test all matched entries as stand-ins for that part
170
+ // of the pattern.
171
+ remain.shift()
172
+ for (var i = 0; i < len; i ++) {
173
+ var e = matchedEntries[i]
174
+ var newPattern
175
+ if (prefix)
176
+ newPattern = [prefix, e]
177
+ else
178
+ newPattern = [e]
179
+ this._process(newPattern.concat(remain), index, inGlobStar)
180
+ }
181
+ }
182
+
183
+
184
+ GlobSync.prototype._emitMatch = function (index, e) {
185
+ if (!this.matches[index][e]) {
186
+ if (this.nodir) {
187
+ var c = this.cache[this._makeAbs(e)]
188
+ if (c === 'DIR' || Array.isArray(c))
189
+ return
190
+ }
191
+
192
+ this.matches[index][e] = true
193
+ if (this.stat || this.mark)
194
+ this._stat(this._makeAbs(e))
195
+ }
196
+ }
197
+
198
+
199
+ GlobSync.prototype._readdirInGlobStar = function (abs) {
200
+ var entries
201
+ var lstat
202
+ var stat
203
+ try {
204
+ lstat = fs.lstatSync(abs)
205
+ } catch (er) {
206
+ // lstat failed, doesn't exist
207
+ return null
208
+ }
209
+
210
+ var isSym = lstat.isSymbolicLink()
211
+ this.symlinks[abs] = isSym
212
+
213
+ // If it's not a symlink or a dir, then it's definitely a regular file.
214
+ // don't bother doing a readdir in that case.
215
+ if (!isSym && !lstat.isDirectory())
216
+ this.cache[abs] = 'FILE'
217
+ else
218
+ entries = this._readdir(abs, false)
219
+
220
+ return entries
221
+ }
222
+
223
+ GlobSync.prototype._readdir = function (abs, inGlobStar) {
224
+ var entries
225
+
226
+ if (inGlobStar && !ownProp(this.symlinks, abs))
227
+ return this._readdirInGlobStar(abs)
228
+
229
+ if (ownProp(this.cache, abs)) {
230
+ var c = this.cache[abs]
231
+ if (!c || c === 'FILE')
232
+ return null
233
+
234
+ if (Array.isArray(c))
235
+ return c
236
+ }
237
+
238
+ try {
239
+ return this._readdirEntries(abs, fs.readdirSync(abs))
240
+ } catch (er) {
241
+ this._readdirError(abs, er)
242
+ return null
243
+ }
244
+ }
245
+
246
+ GlobSync.prototype._readdirEntries = function (abs, entries) {
247
+ // if we haven't asked to stat everything, then just
248
+ // assume that everything in there exists, so we can avoid
249
+ // having to stat it a second time.
250
+ if (!this.mark && !this.stat) {
251
+ for (var i = 0; i < entries.length; i ++) {
252
+ var e = entries[i]
253
+ if (abs === '/')
254
+ e = abs + e
255
+ else
256
+ e = abs + '/' + e
257
+ this.cache[e] = true
258
+ }
259
+ }
260
+
261
+ this.cache[abs] = entries
262
+
263
+ // mark and cache dir-ness
264
+ return entries
265
+ }
266
+
267
+ GlobSync.prototype._readdirError = function (f, er) {
268
+ // handle errors, and cache the information
269
+ switch (er.code) {
270
+ case 'ENOTDIR': // totally normal. means it *does* exist.
271
+ this.cache[f] = 'FILE'
272
+ break
273
+
274
+ case 'ENOENT': // not terribly unusual
275
+ case 'ELOOP':
276
+ case 'ENAMETOOLONG':
277
+ case 'UNKNOWN':
278
+ this.cache[f] = false
279
+ break
280
+
281
+ default: // some unusual error. Treat as failure.
282
+ this.cache[f] = false
283
+ if (this.strict) throw er
284
+ if (!this.silent) console.error('glob error', er)
285
+ break
286
+ }
287
+ }
288
+
289
+ GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) {
290
+
291
+ var entries = this._readdir(abs, inGlobStar)
292
+
293
+ // no entries means not a dir, so it can never have matches
294
+ // foo.txt/** doesn't match foo.txt
295
+ if (!entries)
296
+ return
297
+
298
+ // test without the globstar, and with every child both below
299
+ // and replacing the globstar.
300
+ var remainWithoutGlobStar = remain.slice(1)
301
+ var gspref = prefix ? [ prefix ] : []
302
+ var noGlobStar = gspref.concat(remainWithoutGlobStar)
303
+
304
+ // the noGlobStar pattern exits the inGlobStar state
305
+ this._process(noGlobStar, index, false)
306
+
307
+ var len = entries.length
308
+ var isSym = this.symlinks[abs]
309
+
310
+ // If it's a symlink, and we're in a globstar, then stop
311
+ if (isSym && inGlobStar)
312
+ return
313
+
314
+ for (var i = 0; i < len; i++) {
315
+ var e = entries[i]
316
+ if (e.charAt(0) === '.' && !this.dot)
317
+ continue
318
+
319
+ // these two cases enter the inGlobStar state
320
+ var instead = gspref.concat(entries[i], remainWithoutGlobStar)
321
+ this._process(instead, index, true)
322
+
323
+ var below = gspref.concat(entries[i], remain)
324
+ this._process(below, index, true)
325
+ }
326
+ }
327
+
328
+ GlobSync.prototype._processSimple = function (prefix, index) {
329
+ // XXX review this. Shouldn't it be doing the mounting etc
330
+ // before doing stat? kinda weird?
331
+ var exists = this._stat(prefix)
332
+
333
+ if (!this.matches[index])
334
+ this.matches[index] = Object.create(null)
335
+
336
+ // If it doesn't exist, then just mark the lack of results
337
+ if (!exists)
338
+ return
339
+
340
+ if (prefix && isAbsolute(prefix) && !this.nomount) {
341
+ var trail = /[\/\\]$/.test(prefix)
342
+ if (prefix.charAt(0) === '/') {
343
+ prefix = path.join(this.root, prefix)
344
+ } else {
345
+ prefix = path.resolve(this.root, prefix)
346
+ if (trail)
347
+ prefix += '/'
348
+ }
349
+ }
350
+
351
+ if (process.platform === 'win32')
352
+ prefix = prefix.replace(/\\/g, '/')
353
+
354
+ // Mark this as a match
355
+ this.matches[index][prefix] = true
356
+ }
357
+
358
+ // Returns either 'DIR', 'FILE', or false
359
+ GlobSync.prototype._stat = function (f) {
360
+ var abs = f
361
+ if (f.charAt(0) === '/')
362
+ abs = path.join(this.root, f)
363
+ else if (this.changedCwd)
364
+ abs = path.resolve(this.cwd, f)
365
+
366
+
367
+ if (f.length > this.maxLength)
368
+ return false
369
+
370
+ if (!this.stat && ownProp(this.cache, f)) {
371
+ var c = this.cache[f]
372
+
373
+ if (Array.isArray(c))
374
+ c = 'DIR'
375
+
376
+ // It exists, but not how we need it
377
+ if (abs.slice(-1) === '/' && c !== 'DIR')
378
+ return false
379
+
380
+ return c
381
+ }
382
+
383
+ var exists
384
+ var stat = this.statCache[abs]
385
+ if (!stat) {
386
+ try {
387
+ stat = fs.statSync(abs)
388
+ } catch (er) {
389
+ return false
390
+ }
391
+ }
392
+
393
+ this.statCache[abs] = stat
394
+
395
+ if (abs.slice(-1) === '/' && !stat.isDirectory())
396
+ return false
397
+
398
+ var c = stat.isDirectory() ? 'DIR' : 'FILE'
399
+ this.cache[f] = this.cache[f] || c
400
+ return c
401
+ }
402
+
403
+ GlobSync.prototype._mark = function (p) {
404
+ return common.mark(this, p)
405
+ }
406
+
407
+ GlobSync.prototype._makeAbs = function (f) {
408
+ return common.makeAbs(this, f)
409
+ }