freezerwatch 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (314) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +10 -0
  3. data/CODE_OF_CONDUCT.md +13 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE.txt +21 -0
  6. data/README.md +40 -0
  7. data/Rakefile +1 -0
  8. data/bin/console +14 -0
  9. data/bin/freezerwatch +9 -0
  10. data/bin/setup +7 -0
  11. data/freezerwatch.gemspec +23 -0
  12. data/lib/freezerwatch.rb +5 -0
  13. data/lib/freezerwatch/version.rb +3 -0
  14. data/node_modules/.bin/freezerwatch +139 -0
  15. data/node_modules/freezerwatch/.npmignore +3 -0
  16. data/node_modules/freezerwatch/.ruby-version +1 -0
  17. data/node_modules/freezerwatch/Gemfile +4 -0
  18. data/node_modules/freezerwatch/Gemfile.lock +79 -0
  19. data/node_modules/freezerwatch/LICENSE +23 -0
  20. data/node_modules/freezerwatch/README.md +41 -0
  21. data/node_modules/freezerwatch/Rakefile +13 -0
  22. data/node_modules/freezerwatch/freezerwatch.js +139 -0
  23. data/node_modules/freezerwatch/metrics/bigfiles_high_water_mark +1 -0
  24. data/node_modules/freezerwatch/metrics/cane_high_water_mark +1 -0
  25. data/node_modules/freezerwatch/metrics/flay_high_water_mark +1 -0
  26. data/node_modules/freezerwatch/metrics/flog_high_water_mark +1 -0
  27. data/node_modules/freezerwatch/metrics/punchlist_high_water_mark +2 -0
  28. data/node_modules/freezerwatch/metrics/reek_high_water_mark +1 -0
  29. data/node_modules/freezerwatch/metrics/rubocop_high_water_mark +1 -0
  30. data/node_modules/freezerwatch/node_modules/async/.jshintrc +25 -0
  31. data/node_modules/freezerwatch/node_modules/async/.travis.yml +6 -0
  32. data/node_modules/freezerwatch/node_modules/async/CHANGELOG.md +65 -0
  33. data/node_modules/freezerwatch/node_modules/async/LICENSE +19 -0
  34. data/node_modules/freezerwatch/node_modules/async/README.md +1803 -0
  35. data/node_modules/freezerwatch/node_modules/async/bower.json +43 -0
  36. data/node_modules/freezerwatch/node_modules/async/component.json +17 -0
  37. data/node_modules/freezerwatch/node_modules/async/coverage/base.css +182 -0
  38. data/node_modules/freezerwatch/node_modules/async/coverage/index.html +73 -0
  39. data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/base.css +182 -0
  40. data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/index.html +73 -0
  41. data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/lib/async.js.html +3900 -0
  42. data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/lib/index.html +73 -0
  43. data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/prettify.css +1 -0
  44. data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/prettify.js +1 -0
  45. data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  46. data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/sorter.js +156 -0
  47. data/node_modules/freezerwatch/node_modules/async/coverage/lcov.info +1452 -0
  48. data/node_modules/freezerwatch/node_modules/async/coverage/lib/async.js.html +3597 -0
  49. data/node_modules/freezerwatch/node_modules/async/coverage/lib/index.html +73 -0
  50. data/node_modules/freezerwatch/node_modules/async/coverage/prettify.css +1 -0
  51. data/node_modules/freezerwatch/node_modules/async/coverage/prettify.js +1 -0
  52. data/node_modules/freezerwatch/node_modules/async/coverage/sort-arrow-sprite.png +0 -0
  53. data/node_modules/freezerwatch/node_modules/async/coverage/sorter.js +156 -0
  54. data/node_modules/freezerwatch/node_modules/async/lib/async.js +1191 -0
  55. data/node_modules/freezerwatch/node_modules/async/nyc_output/5074.json +1 -0
  56. data/node_modules/freezerwatch/node_modules/async/package.json +96 -0
  57. data/node_modules/freezerwatch/node_modules/async/support/sync-package-managers.js +53 -0
  58. data/node_modules/freezerwatch/node_modules/lacrosse/.npmignore +15 -0
  59. data/node_modules/freezerwatch/node_modules/lacrosse/Client.js +60 -0
  60. data/node_modules/freezerwatch/node_modules/lacrosse/Device.js +38 -0
  61. data/node_modules/freezerwatch/node_modules/lacrosse/DeviceRawReadStream.js +36 -0
  62. data/node_modules/freezerwatch/node_modules/lacrosse/DeviceSingleRawReadStream.js +29 -0
  63. data/node_modules/freezerwatch/node_modules/lacrosse/DeviceStream.js +35 -0
  64. data/node_modules/freezerwatch/node_modules/lacrosse/LICENSE +23 -0
  65. data/node_modules/freezerwatch/node_modules/lacrosse/README.md +25 -0
  66. data/node_modules/freezerwatch/node_modules/lacrosse/index.js +1 -0
  67. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/.npmignore +2 -0
  68. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/.travis.yml +12 -0
  69. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/LICENSE +55 -0
  70. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/README.md +364 -0
  71. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/index.js +156 -0
  72. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/lib/copy.js +8 -0
  73. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/lib/debug.js +7 -0
  74. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/lib/getSafe.js +34 -0
  75. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/lib/optional.js +5 -0
  76. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/.bin/uuid +26 -0
  77. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/aws-sign2/LICENSE +55 -0
  78. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/aws-sign2/README.md +4 -0
  79. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/aws-sign2/index.js +202 -0
  80. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/aws-sign2/package.json +46 -0
  81. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/forever-agent/LICENSE +55 -0
  82. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/forever-agent/README.md +4 -0
  83. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/forever-agent/index.js +119 -0
  84. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/forever-agent/package.json +45 -0
  85. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/License +19 -0
  86. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/Readme.md +175 -0
  87. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/lib/form_data.js +351 -0
  88. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/.travis.yml +5 -0
  89. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/LICENSE +19 -0
  90. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/README.md +1647 -0
  91. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/bower.json +38 -0
  92. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/component.json +16 -0
  93. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js +1123 -0
  94. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/package.json +84 -0
  95. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/support/sync-package-managers.js +53 -0
  96. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/License +19 -0
  97. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md +132 -0
  98. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js +188 -0
  99. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/.npmignore +2 -0
  100. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License +19 -0
  101. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile +7 -0
  102. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md +154 -0
  103. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js +99 -0
  104. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json +42 -0
  105. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/common.js +6 -0
  106. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js +38 -0
  107. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-auto-pause.js +21 -0
  108. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-pause.js +14 -0
  109. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream.js +48 -0
  110. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-handle-source-errors.js +15 -0
  111. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-max-data-size.js +18 -0
  112. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-pipe-resumes.js +13 -0
  113. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-proxy-readable.js +13 -0
  114. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/run.js +7 -0
  115. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json +60 -0
  116. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/package.json +80 -0
  117. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/.npmignore +18 -0
  118. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/.travis.yml +5 -0
  119. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/LICENSE +24 -0
  120. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/Makefile +10 -0
  121. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/README.md +627 -0
  122. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/example/usage.js +78 -0
  123. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/images/hawk.png +0 -0
  124. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/images/logo.png +0 -0
  125. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/index.js +1 -0
  126. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/browser.js +485 -0
  127. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/client.js +367 -0
  128. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/crypto.js +111 -0
  129. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/index.js +15 -0
  130. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/server.js +524 -0
  131. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/utils.js +183 -0
  132. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/.npmignore +18 -0
  133. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml +5 -0
  134. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE +24 -0
  135. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/Makefile +11 -0
  136. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/README.md +6 -0
  137. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/images/boom.png +0 -0
  138. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/index.js +1 -0
  139. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js +207 -0
  140. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/package.json +64 -0
  141. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js +245 -0
  142. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore +18 -0
  143. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml +5 -0
  144. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE +24 -0
  145. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile +11 -0
  146. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md +6 -0
  147. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js +1 -0
  148. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js +68 -0
  149. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json +65 -0
  150. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js +101 -0
  151. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore +18 -0
  152. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml +5 -0
  153. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE +33 -0
  154. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile +10 -0
  155. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/README.md +436 -0
  156. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png +0 -0
  157. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/index.js +1 -0
  158. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js +132 -0
  159. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js +585 -0
  160. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/package.json +70 -0
  161. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js +86 -0
  162. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js +1078 -0
  163. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js +1 -0
  164. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js +1 -0
  165. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js +1 -0
  166. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/.npmignore +18 -0
  167. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/.travis.yml +5 -0
  168. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE +24 -0
  169. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile +11 -0
  170. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/README.md +68 -0
  171. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js +16 -0
  172. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/examples/time.js +25 -0
  173. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/index.js +1 -0
  174. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js +409 -0
  175. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/package.json +65 -0
  176. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/test/index.js +359 -0
  177. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/package.json +70 -0
  178. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/browser.js +771 -0
  179. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/client.js +206 -0
  180. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/crypto.js +86 -0
  181. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/index.js +316 -0
  182. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/message.js +246 -0
  183. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/readme.js +98 -0
  184. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/server.js +686 -0
  185. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/uri.js +456 -0
  186. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/utils.js +120 -0
  187. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/.dir-locals.el +6 -0
  188. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/.npmignore +7 -0
  189. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/LICENSE +18 -0
  190. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/README.md +79 -0
  191. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/http_signing.md +296 -0
  192. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/index.js +26 -0
  193. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/parser.js +304 -0
  194. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/signer.js +178 -0
  195. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/util.js +304 -0
  196. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/verify.js +42 -0
  197. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/.npmignore +2 -0
  198. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/LICENSE +19 -0
  199. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/README.md +50 -0
  200. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/errors.js +13 -0
  201. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/index.js +27 -0
  202. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js +267 -0
  203. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/types.js +36 -0
  204. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/writer.js +317 -0
  205. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js +20 -0
  206. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json +63 -0
  207. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/reader.test.js +172 -0
  208. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js +296 -0
  209. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md +126 -0
  210. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js +245 -0
  211. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json +45 -0
  212. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/.npmignore +1 -0
  213. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG +78 -0
  214. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE +24 -0
  215. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/README +82 -0
  216. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/README.old +298 -0
  217. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/ctf.js +245 -0
  218. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/ctio.js +1485 -0
  219. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/ctype.js +944 -0
  220. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/man/man3ctype/ctio.3ctype +241 -0
  221. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json +42 -0
  222. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsl.conf +129 -0
  223. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsstyle +839 -0
  224. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/package.json +72 -0
  225. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/.npmignore +1 -0
  226. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/CHANGELOG.md +14 -0
  227. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/LICENSE +15 -0
  228. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/Makefile +35 -0
  229. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/README.md +52 -0
  230. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/package.json +68 -0
  231. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/stringify.js +27 -0
  232. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/test/mocha.opts +2 -0
  233. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/test/stringify_test.js +246 -0
  234. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/LICENSE +19 -0
  235. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/README.md +66 -0
  236. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/mime.js +114 -0
  237. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/package.json +57 -0
  238. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/test.js +84 -0
  239. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/types/mime.types +1588 -0
  240. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/types/node.types +77 -0
  241. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/.npmignore +2 -0
  242. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/LICENSE.md +21 -0
  243. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/README.md +243 -0
  244. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/README.md +53 -0
  245. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu +174 -0
  246. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/bench.sh +34 -0
  247. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c +34 -0
  248. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js +84 -0
  249. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/bin/uuid +26 -0
  250. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/bower.json +23 -0
  251. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/component.json +18 -0
  252. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/package.json +65 -0
  253. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/test/compare_v1.js +63 -0
  254. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/test/test.html +17 -0
  255. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/test/test.js +228 -0
  256. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/uuid.js +247 -0
  257. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/LICENSE +55 -0
  258. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/README.md +4 -0
  259. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/index.js +43 -0
  260. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/package.json +48 -0
  261. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/test.js +49 -0
  262. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/.gitmodules +6 -0
  263. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/.npmignore +7 -0
  264. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/Readme.md +58 -0
  265. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/index.js +366 -0
  266. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/package.json +55 -0
  267. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/.jshintrc +72 -0
  268. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/.npmignore +3 -0
  269. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/LICENSE +78 -0
  270. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/README.md +380 -0
  271. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js +230 -0
  272. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/lib/cookie.js +947 -0
  273. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/lib/memstore.js +102 -0
  274. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js +69 -0
  275. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt +20 -0
  276. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/node_modules/punycode/README.md +176 -0
  277. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json +81 -0
  278. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js +530 -0
  279. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/package.json +63 -0
  280. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/public-suffix.txt +5229 -0
  281. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/test.js +1340 -0
  282. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tunnel-agent/LICENSE +55 -0
  283. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tunnel-agent/README.md +4 -0
  284. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tunnel-agent/index.js +227 -0
  285. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tunnel-agent/package.json +45 -0
  286. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/package.json +74 -0
  287. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/request.js +1244 -0
  288. data/node_modules/freezerwatch/node_modules/lacrosse/package.json +34 -0
  289. data/node_modules/freezerwatch/node_modules/optparse/README.md +163 -0
  290. data/node_modules/freezerwatch/node_modules/optparse/TODO +1 -0
  291. data/node_modules/freezerwatch/node_modules/optparse/examples/browser-test.html +75 -0
  292. data/node_modules/freezerwatch/node_modules/optparse/examples/nodejs-test.js +86 -0
  293. data/node_modules/freezerwatch/node_modules/optparse/lib/optparse.js +309 -0
  294. data/node_modules/freezerwatch/node_modules/optparse/package.json +46 -0
  295. data/node_modules/freezerwatch/node_modules/optparse/seed.yml +5 -0
  296. data/node_modules/freezerwatch/node_modules/osenv/.npmignore +13 -0
  297. data/node_modules/freezerwatch/node_modules/osenv/.travis.yml +9 -0
  298. data/node_modules/freezerwatch/node_modules/osenv/LICENSE +15 -0
  299. data/node_modules/freezerwatch/node_modules/osenv/README.md +63 -0
  300. data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-homedir/index.js +24 -0
  301. data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-homedir/license +21 -0
  302. data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-homedir/package.json +70 -0
  303. data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-homedir/readme.md +33 -0
  304. data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-tmpdir/index.js +25 -0
  305. data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-tmpdir/license +21 -0
  306. data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-tmpdir/package.json +70 -0
  307. data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-tmpdir/readme.md +36 -0
  308. data/node_modules/freezerwatch/node_modules/osenv/osenv.js +72 -0
  309. data/node_modules/freezerwatch/node_modules/osenv/package.json +76 -0
  310. data/node_modules/freezerwatch/node_modules/osenv/test/unix.js +71 -0
  311. data/node_modules/freezerwatch/node_modules/osenv/test/windows.js +74 -0
  312. data/node_modules/freezerwatch/node_modules/osenv/x.tap +39 -0
  313. data/node_modules/freezerwatch/package.json +37 -0
  314. metadata +384 -0
@@ -0,0 +1,72 @@
1
+ {
2
+ "name": "http-signature",
3
+ "description": "Reference implementation of Joyent's HTTP Signature scheme.",
4
+ "version": "0.10.1",
5
+ "license": "MIT",
6
+ "author": {
7
+ "name": "Joyent, Inc"
8
+ },
9
+ "contributors": [
10
+ {
11
+ "name": "Mark Cavage",
12
+ "email": "mcavage@gmail.com"
13
+ },
14
+ {
15
+ "name": "David I. Lehn",
16
+ "email": "dil@lehn.org"
17
+ }
18
+ ],
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git://github.com/joyent/node-http-signature.git"
22
+ },
23
+ "homepage": "https://github.com/joyent/node-http-signature/",
24
+ "bugs": {
25
+ "url": "https://github.com/joyent/node-http-signature/issues"
26
+ },
27
+ "keywords": [
28
+ "https",
29
+ "request"
30
+ ],
31
+ "engines": {
32
+ "node": ">=0.8"
33
+ },
34
+ "main": "lib/index.js",
35
+ "scripts": {
36
+ "test": "tap test/*.js"
37
+ },
38
+ "dependencies": {
39
+ "assert-plus": "^0.1.5",
40
+ "asn1": "0.1.11",
41
+ "ctype": "0.5.3"
42
+ },
43
+ "devDependencies": {
44
+ "node-uuid": "^1.4.1",
45
+ "tap": "0.4.2"
46
+ },
47
+ "_id": "http-signature@0.10.1",
48
+ "_shasum": "4fbdac132559aa8323121e540779c0a012b27e66",
49
+ "_resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz",
50
+ "_from": "http-signature@>=0.10.0 <0.11.0",
51
+ "_npmVersion": "1.4.28",
52
+ "_npmUser": {
53
+ "name": "pfmooney",
54
+ "email": "patrick.f.mooney@gmail.com"
55
+ },
56
+ "maintainers": [
57
+ {
58
+ "name": "mcavage",
59
+ "email": "mcavage@gmail.com"
60
+ },
61
+ {
62
+ "name": "pfmooney",
63
+ "email": "patrick.f.mooney@gmail.com"
64
+ }
65
+ ],
66
+ "dist": {
67
+ "shasum": "4fbdac132559aa8323121e540779c0a012b27e66",
68
+ "tarball": "http://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz"
69
+ },
70
+ "directories": {},
71
+ "readme": "ERROR: No README data found!"
72
+ }
@@ -0,0 +1,14 @@
1
+ ## Unreleased
2
+ - Fixes stringify to only take ancestors into account when checking
3
+ circularity.
4
+ It previously assumed every visited object was circular which led to [false
5
+ positives][issue9].
6
+ Uses the tiny serializer I wrote for [Must.js][must] a year and a half ago.
7
+ - Fixes calling the `replacer` function in the proper context (`thisArg`).
8
+ - Fixes calling the `cycleReplacer` function in the proper context (`thisArg`).
9
+ - Speeds serializing by a factor of
10
+ Big-O(h-my-god-it-linearly-searched-every-object) it had ever seen. Searching
11
+ only the ancestors for a circular references speeds up things considerably.
12
+
13
+ [must]: https://github.com/moll/js-must
14
+ [issue9]: https://github.com/isaacs/json-stringify-safe/issues/9
@@ -0,0 +1,15 @@
1
+ The ISC License
2
+
3
+ Copyright (c) Isaac Z. Schlueter and Contributors
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15
+ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,35 @@
1
+ NODE_OPTS =
2
+ TEST_OPTS =
3
+
4
+ love:
5
+ @echo "Feel like makin' love."
6
+
7
+ test:
8
+ @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R dot $(TEST_OPTS)
9
+
10
+ spec:
11
+ @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R spec $(TEST_OPTS)
12
+
13
+ autotest:
14
+ @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R dot --watch $(TEST_OPTS)
15
+
16
+ autospec:
17
+ @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R spec --watch $(TEST_OPTS)
18
+
19
+ pack:
20
+ @file=$$(npm pack); echo "$$file"; tar tf "$$file"
21
+
22
+ publish:
23
+ npm publish
24
+
25
+ tag:
26
+ git tag "v$$(node -e 'console.log(require("./package").version)')"
27
+
28
+ clean:
29
+ rm -f *.tgz
30
+ npm prune --production
31
+
32
+ .PHONY: love
33
+ .PHONY: test spec autotest autospec
34
+ .PHONY: pack publish tag
35
+ .PHONY: clean
@@ -0,0 +1,52 @@
1
+ # json-stringify-safe
2
+
3
+ Like JSON.stringify, but doesn't throw on circular references.
4
+
5
+ ## Usage
6
+
7
+ Takes the same arguments as `JSON.stringify`.
8
+
9
+ ```javascript
10
+ var stringify = require('json-stringify-safe');
11
+ var circularObj = {};
12
+ circularObj.circularRef = circularObj;
13
+ circularObj.list = [ circularObj, circularObj ];
14
+ console.log(stringify(circularObj, null, 2));
15
+ ```
16
+
17
+ Output:
18
+
19
+ ```json
20
+ {
21
+ "circularRef": "[Circular]",
22
+ "list": [
23
+ "[Circular]",
24
+ "[Circular]"
25
+ ]
26
+ }
27
+ ```
28
+
29
+ ## Details
30
+
31
+ ```
32
+ stringify(obj, serializer, indent, decycler)
33
+ ```
34
+
35
+ The first three arguments are the same as to JSON.stringify. The last
36
+ is an argument that's only used when the object has been seen already.
37
+
38
+ The default `decycler` function returns the string `'[Circular]'`.
39
+ If, for example, you pass in `function(k,v){}` (return nothing) then it
40
+ will prune cycles. If you pass in `function(k,v){ return {foo: 'bar'}}`,
41
+ then cyclical objects will always be represented as `{"foo":"bar"}` in
42
+ the result.
43
+
44
+ ```
45
+ stringify.getSerialize(serializer, decycler)
46
+ ```
47
+
48
+ Returns a serializer that can be used elsewhere. This is the actual
49
+ function that's passed to JSON.stringify.
50
+
51
+ **Note** that the function returned from `getSerialize` is stateful for now, so
52
+ do **not** use it more than once.
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "json-stringify-safe",
3
+ "version": "5.0.1",
4
+ "description": "Like JSON.stringify, but doesn't blow up on circular refs.",
5
+ "keywords": [
6
+ "json",
7
+ "stringify",
8
+ "circular",
9
+ "safe"
10
+ ],
11
+ "homepage": "https://github.com/isaacs/json-stringify-safe",
12
+ "bugs": {
13
+ "url": "https://github.com/isaacs/json-stringify-safe/issues"
14
+ },
15
+ "author": {
16
+ "name": "Isaac Z. Schlueter",
17
+ "email": "i@izs.me",
18
+ "url": "http://blog.izs.me"
19
+ },
20
+ "contributors": [
21
+ {
22
+ "name": "Andri Möll",
23
+ "email": "andri@dot.ee",
24
+ "url": "http://themoll.com"
25
+ }
26
+ ],
27
+ "license": "ISC",
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "git://github.com/isaacs/json-stringify-safe.git"
31
+ },
32
+ "main": "stringify.js",
33
+ "scripts": {
34
+ "test": "node test.js"
35
+ },
36
+ "devDependencies": {
37
+ "mocha": ">= 2.1.0 < 3",
38
+ "must": ">= 0.12 < 0.13",
39
+ "sinon": ">= 1.12.2 < 2"
40
+ },
41
+ "gitHead": "3890dceab3ad14f8701e38ca74f38276abc76de5",
42
+ "_id": "json-stringify-safe@5.0.1",
43
+ "_shasum": "1296a2d58fd45f19a0f6ce01d65701e2c735b6eb",
44
+ "_from": "json-stringify-safe@>=5.0.0 <5.1.0",
45
+ "_npmVersion": "2.10.0",
46
+ "_nodeVersion": "2.0.1",
47
+ "_npmUser": {
48
+ "name": "isaacs",
49
+ "email": "isaacs@npmjs.com"
50
+ },
51
+ "dist": {
52
+ "shasum": "1296a2d58fd45f19a0f6ce01d65701e2c735b6eb",
53
+ "tarball": "http://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz"
54
+ },
55
+ "maintainers": [
56
+ {
57
+ "name": "isaacs",
58
+ "email": "i@izs.me"
59
+ },
60
+ {
61
+ "name": "moll",
62
+ "email": "andri@dot.ee"
63
+ }
64
+ ],
65
+ "directories": {},
66
+ "_resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
67
+ "readme": "ERROR: No README data found!"
68
+ }
@@ -0,0 +1,27 @@
1
+ exports = module.exports = stringify
2
+ exports.getSerialize = serializer
3
+
4
+ function stringify(obj, replacer, spaces, cycleReplacer) {
5
+ return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces)
6
+ }
7
+
8
+ function serializer(replacer, cycleReplacer) {
9
+ var stack = [], keys = []
10
+
11
+ if (cycleReplacer == null) cycleReplacer = function(key, value) {
12
+ if (stack[0] === value) return "[Circular ~]"
13
+ return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]"
14
+ }
15
+
16
+ return function(key, value) {
17
+ if (stack.length > 0) {
18
+ var thisPos = stack.indexOf(this)
19
+ ~thisPos ? stack.splice(thisPos + 1) : stack.push(this)
20
+ ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key)
21
+ if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value)
22
+ }
23
+ else stack.push(value)
24
+
25
+ return replacer == null ? value : replacer.call(this, key, value)
26
+ }
27
+ }
@@ -0,0 +1,246 @@
1
+ var Sinon = require("sinon")
2
+ var stringify = require("..")
3
+ function jsonify(obj) { return JSON.stringify(obj, null, 2) }
4
+
5
+ describe("Stringify", function() {
6
+ it("must stringify circular objects", function() {
7
+ var obj = {name: "Alice"}
8
+ obj.self = obj
9
+ var json = stringify(obj, null, 2)
10
+ json.must.eql(jsonify({name: "Alice", self: "[Circular ~]"}))
11
+ })
12
+
13
+ it("must stringify circular objects with intermediaries", function() {
14
+ var obj = {name: "Alice"}
15
+ obj.identity = {self: obj}
16
+ var json = stringify(obj, null, 2)
17
+ json.must.eql(jsonify({name: "Alice", identity: {self: "[Circular ~]"}}))
18
+ })
19
+
20
+ it("must stringify circular objects deeper", function() {
21
+ var obj = {name: "Alice", child: {name: "Bob"}}
22
+ obj.child.self = obj.child
23
+
24
+ stringify(obj, null, 2).must.eql(jsonify({
25
+ name: "Alice",
26
+ child: {name: "Bob", self: "[Circular ~.child]"}
27
+ }))
28
+ })
29
+
30
+ it("must stringify circular objects deeper with intermediaries", function() {
31
+ var obj = {name: "Alice", child: {name: "Bob"}}
32
+ obj.child.identity = {self: obj.child}
33
+
34
+ stringify(obj, null, 2).must.eql(jsonify({
35
+ name: "Alice",
36
+ child: {name: "Bob", identity: {self: "[Circular ~.child]"}}
37
+ }))
38
+ })
39
+
40
+ it("must stringify circular objects in an array", function() {
41
+ var obj = {name: "Alice"}
42
+ obj.self = [obj, obj]
43
+
44
+ stringify(obj, null, 2).must.eql(jsonify({
45
+ name: "Alice", self: ["[Circular ~]", "[Circular ~]"]
46
+ }))
47
+ })
48
+
49
+ it("must stringify circular objects deeper in an array", function() {
50
+ var obj = {name: "Alice", children: [{name: "Bob"}, {name: "Eve"}]}
51
+ obj.children[0].self = obj.children[0]
52
+ obj.children[1].self = obj.children[1]
53
+
54
+ stringify(obj, null, 2).must.eql(jsonify({
55
+ name: "Alice",
56
+ children: [
57
+ {name: "Bob", self: "[Circular ~.children.0]"},
58
+ {name: "Eve", self: "[Circular ~.children.1]"}
59
+ ]
60
+ }))
61
+ })
62
+
63
+ it("must stringify circular arrays", function() {
64
+ var obj = []
65
+ obj.push(obj)
66
+ obj.push(obj)
67
+ var json = stringify(obj, null, 2)
68
+ json.must.eql(jsonify(["[Circular ~]", "[Circular ~]"]))
69
+ })
70
+
71
+ it("must stringify circular arrays with intermediaries", function() {
72
+ var obj = []
73
+ obj.push({name: "Alice", self: obj})
74
+ obj.push({name: "Bob", self: obj})
75
+
76
+ stringify(obj, null, 2).must.eql(jsonify([
77
+ {name: "Alice", self: "[Circular ~]"},
78
+ {name: "Bob", self: "[Circular ~]"}
79
+ ]))
80
+ })
81
+
82
+ it("must stringify repeated objects in objects", function() {
83
+ var obj = {}
84
+ var alice = {name: "Alice"}
85
+ obj.alice1 = alice
86
+ obj.alice2 = alice
87
+
88
+ stringify(obj, null, 2).must.eql(jsonify({
89
+ alice1: {name: "Alice"},
90
+ alice2: {name: "Alice"}
91
+ }))
92
+ })
93
+
94
+ it("must stringify repeated objects in arrays", function() {
95
+ var alice = {name: "Alice"}
96
+ var obj = [alice, alice]
97
+ var json = stringify(obj, null, 2)
98
+ json.must.eql(jsonify([{name: "Alice"}, {name: "Alice"}]))
99
+ })
100
+
101
+ it("must call given decycler and use its output", function() {
102
+ var obj = {}
103
+ obj.a = obj
104
+ obj.b = obj
105
+
106
+ var decycle = Sinon.spy(function() { return decycle.callCount })
107
+ var json = stringify(obj, null, 2, decycle)
108
+ json.must.eql(jsonify({a: 1, b: 2}, null, 2))
109
+
110
+ decycle.callCount.must.equal(2)
111
+ decycle.thisValues[0].must.equal(obj)
112
+ decycle.args[0][0].must.equal("a")
113
+ decycle.args[0][1].must.equal(obj)
114
+ decycle.thisValues[1].must.equal(obj)
115
+ decycle.args[1][0].must.equal("b")
116
+ decycle.args[1][1].must.equal(obj)
117
+ })
118
+
119
+ it("must call replacer and use its output", function() {
120
+ var obj = {name: "Alice", child: {name: "Bob"}}
121
+
122
+ var replacer = Sinon.spy(bangString)
123
+ var json = stringify(obj, replacer, 2)
124
+ json.must.eql(jsonify({name: "Alice!", child: {name: "Bob!"}}))
125
+
126
+ replacer.callCount.must.equal(4)
127
+ replacer.args[0][0].must.equal("")
128
+ replacer.args[0][1].must.equal(obj)
129
+ replacer.thisValues[1].must.equal(obj)
130
+ replacer.args[1][0].must.equal("name")
131
+ replacer.args[1][1].must.equal("Alice")
132
+ replacer.thisValues[2].must.equal(obj)
133
+ replacer.args[2][0].must.equal("child")
134
+ replacer.args[2][1].must.equal(obj.child)
135
+ replacer.thisValues[3].must.equal(obj.child)
136
+ replacer.args[3][0].must.equal("name")
137
+ replacer.args[3][1].must.equal("Bob")
138
+ })
139
+
140
+ it("must call replacer after describing circular references", function() {
141
+ var obj = {name: "Alice"}
142
+ obj.self = obj
143
+
144
+ var replacer = Sinon.spy(bangString)
145
+ var json = stringify(obj, replacer, 2)
146
+ json.must.eql(jsonify({name: "Alice!", self: "[Circular ~]!"}))
147
+
148
+ replacer.callCount.must.equal(3)
149
+ replacer.args[0][0].must.equal("")
150
+ replacer.args[0][1].must.equal(obj)
151
+ replacer.thisValues[1].must.equal(obj)
152
+ replacer.args[1][0].must.equal("name")
153
+ replacer.args[1][1].must.equal("Alice")
154
+ replacer.thisValues[2].must.equal(obj)
155
+ replacer.args[2][0].must.equal("self")
156
+ replacer.args[2][1].must.equal("[Circular ~]")
157
+ })
158
+
159
+ it("must call given decycler and use its output for nested objects",
160
+ function() {
161
+ var obj = {}
162
+ obj.a = obj
163
+ obj.b = {self: obj}
164
+
165
+ var decycle = Sinon.spy(function() { return decycle.callCount })
166
+ var json = stringify(obj, null, 2, decycle)
167
+ json.must.eql(jsonify({a: 1, b: {self: 2}}))
168
+
169
+ decycle.callCount.must.equal(2)
170
+ decycle.args[0][0].must.equal("a")
171
+ decycle.args[0][1].must.equal(obj)
172
+ decycle.args[1][0].must.equal("self")
173
+ decycle.args[1][1].must.equal(obj)
174
+ })
175
+
176
+ it("must use decycler's output when it returned null", function() {
177
+ var obj = {a: "b"}
178
+ obj.self = obj
179
+ obj.selves = [obj, obj]
180
+
181
+ function decycle() { return null }
182
+ stringify(obj, null, 2, decycle).must.eql(jsonify({
183
+ a: "b",
184
+ self: null,
185
+ selves: [null, null]
186
+ }))
187
+ })
188
+
189
+ it("must use decycler's output when it returned undefined", function() {
190
+ var obj = {a: "b"}
191
+ obj.self = obj
192
+ obj.selves = [obj, obj]
193
+
194
+ function decycle() {}
195
+ stringify(obj, null, 2, decycle).must.eql(jsonify({
196
+ a: "b",
197
+ selves: [null, null]
198
+ }))
199
+ })
200
+
201
+ it("must throw given a decycler that returns a cycle", function() {
202
+ var obj = {}
203
+ obj.self = obj
204
+ var err
205
+ function identity(key, value) { return value }
206
+ try { stringify(obj, null, 2, identity) } catch (ex) { err = ex }
207
+ err.must.be.an.instanceof(TypeError)
208
+ })
209
+
210
+ describe(".getSerialize", function() {
211
+ it("must stringify circular objects", function() {
212
+ var obj = {a: "b"}
213
+ obj.circularRef = obj
214
+ obj.list = [obj, obj]
215
+
216
+ var json = JSON.stringify(obj, stringify.getSerialize(), 2)
217
+ json.must.eql(jsonify({
218
+ "a": "b",
219
+ "circularRef": "[Circular ~]",
220
+ "list": ["[Circular ~]", "[Circular ~]"]
221
+ }))
222
+ })
223
+
224
+ // This is the behavior as of Mar 3, 2015.
225
+ // The serializer function keeps state inside the returned function and
226
+ // so far I'm not sure how to not do that. JSON.stringify's replacer is not
227
+ // called _after_ serialization.
228
+ xit("must return a function that could be called twice", function() {
229
+ var obj = {name: "Alice"}
230
+ obj.self = obj
231
+
232
+ var json
233
+ var serializer = stringify.getSerialize()
234
+
235
+ json = JSON.stringify(obj, serializer, 2)
236
+ json.must.eql(jsonify({name: "Alice", self: "[Circular ~]"}))
237
+
238
+ json = JSON.stringify(obj, serializer, 2)
239
+ json.must.eql(jsonify({name: "Alice", self: "[Circular ~]"}))
240
+ })
241
+ })
242
+ })
243
+
244
+ function bangString(key, value) {
245
+ return typeof value == "string" ? value + "!" : value
246
+ }