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
+ // Settings
3
+ "passfail" : false, // Stop on first error.
4
+ "maxerr" : 100, // Maximum error before stopping.
5
+
6
+
7
+ // Predefined globals whom JSHint will ignore.
8
+ "browser" : false, // Standard browser globals e.g. `window`, `document`.
9
+ "node" : true,
10
+ "rhino" : false,
11
+ "couch" : false,
12
+ "wsh" : false, // Windows Scripting Host.
13
+
14
+ "jquery" : false,
15
+ "prototypejs" : false,
16
+ "mootools" : false,
17
+ "dojo" : false,
18
+
19
+ "predef" : [ // Custom globals.
20
+ "escape", "unescape" // aren't picked up by node flag above :/
21
+ ],
22
+
23
+
24
+ // Development.
25
+ "debug" : false, // Allow debugger statements e.g. browser breakpoints.
26
+ "devel" : false, // Allow developments statements e.g. `console.log();`.
27
+
28
+
29
+ // EcmaScript 5.
30
+ "es5" : true, // Allow EcmaScript 5 syntax.
31
+ "esnext" : true, // Allow ES "next" syntax, specifically 'const' (V8 has this)
32
+ "strict" : false, // Require `use strict` pragma in every file.
33
+ "globalstrict" : false, // Allow global "use strict" (also enables 'strict').
34
+
35
+
36
+ // The Good Parts.
37
+ "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons).
38
+ "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons.
39
+ "bitwise" : true, // Prohibit bitwise operators (&, |, ^, etc.).
40
+ "boss" : false, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments.
41
+ "curly" : false, // Require {} for every new block or scope.
42
+ "eqeqeq" : false, // Require triple equals i.e. `===`.
43
+ "eqnull" : true, // Tolerate use of `== null`.
44
+ "evil" : false, // Tolerate use of `eval`.
45
+ "expr" : true, // Tolerate `ExpressionStatement` as Programs.
46
+ "forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`.
47
+ "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
48
+ "latedef" : false, // Prohibit variable use before definition.
49
+ "loopfunc" : false, // Allow functions to be defined within loops.
50
+ "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`.
51
+ "regexp" : true, // Prohibit `.` and `[^...]` in regular expressions.
52
+ "regexdash" : false, // Tolerate unescaped last dash i.e. `[-...]`.
53
+ "scripturl" : true, // Tolerate script-targeted URLs.
54
+ "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`.
55
+ "supernew" : false, // Tolerate `new function () { ... };` and `new Object;`.
56
+ "undef" : true, // Require all non-global variables be declared before they are used.
57
+
58
+
59
+ // Personal styling prefrences.
60
+ "lastsemic" : true, // Prohibit missing semicolon for the last statement in a one-line block
61
+ "newcap" : false, // Require capitalization of all constructor functions e.g. `new F()`.
62
+ "noempty" : true, // Prohipit use of empty blocks.
63
+ "nonew" : true, // Prohibit use of constructors for side-effects.
64
+ "nomen" : false, // Prohibit use of initial or trailing underbars in names.
65
+ "onevar" : false, // Allow only one `var` statement per function.
66
+ "onecase" : false, // Allow switches with one case statement
67
+ "plusplus" : false, // Prohibit use of `++` & `--`.
68
+ "proto" : false, // Allow use of __proto__
69
+ "sub" : true, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
70
+ "trailing" : true, // Prohibit trailing whitespaces.
71
+ "white" : false // Check against strict whitespace and indentation rules.
72
+ }
@@ -0,0 +1,78 @@
1
+ Copyright GoInstant, Inc. and other contributors. All rights reserved.
2
+ Permission is hereby granted, free of charge, to any person obtaining a copy
3
+ of this software and associated documentation files (the "Software"), to
4
+ deal in the Software without restriction, including without limitation the
5
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
6
+ sell copies of the Software, and to permit persons to whom the Software is
7
+ furnished to do so, subject to the following conditions:
8
+
9
+ The above copyright notice and this permission notice shall be included in
10
+ all copies or substantial portions of the Software.
11
+
12
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
17
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
18
+ IN THE SOFTWARE.
19
+
20
+ The following exceptions apply:
21
+
22
+ ===
23
+
24
+ `pubSufTest()` of generate-pubsuffix.js is in the public domain.
25
+
26
+ // Any copyright is dedicated to the Public Domain.
27
+ // http://creativecommons.org/publicdomain/zero/1.0/
28
+
29
+ ===
30
+
31
+ `public-suffix.txt` was obtained from
32
+ <https://mxr.mozilla.org/mozilla-central/source/netwerk/dns/effective_tld_names.dat?raw=1>
33
+ via <http://publicsuffix.org>.
34
+
35
+ That file contains the usual Mozilla triple-license, for which this project uses it
36
+ under the terms of the MPL 1.1:
37
+
38
+ // ***** BEGIN LICENSE BLOCK *****
39
+ // Version: MPL 1.1/GPL 2.0/LGPL 2.1
40
+ //
41
+ // The contents of this file are subject to the Mozilla Public License Version
42
+ // 1.1 (the "License"); you may not use this file except in compliance with
43
+ // the License. You may obtain a copy of the License at
44
+ // http://www.mozilla.org/MPL/
45
+ //
46
+ // Software distributed under the License is distributed on an "AS IS" basis,
47
+ // WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
48
+ // for the specific language governing rights and limitations under the
49
+ // License.
50
+ //
51
+ // The Original Code is the Public Suffix List.
52
+ //
53
+ // The Initial Developer of the Original Code is
54
+ // Jo Hermans <jo.hermans@gmail.com>.
55
+ // Portions created by the Initial Developer are Copyright (C) 2007
56
+ // the Initial Developer. All Rights Reserved.
57
+ //
58
+ // Contributor(s):
59
+ // Ruben Arakelyan <ruben@rubenarakelyan.com>
60
+ // Gervase Markham <gerv@gerv.net>
61
+ // Pamela Greene <pamg.bugs@gmail.com>
62
+ // David Triendl <david@triendl.name>
63
+ // Jothan Frakes <jothan@gmail.com>
64
+ // The kind representatives of many TLD registries
65
+ //
66
+ // Alternatively, the contents of this file may be used under the terms of
67
+ // either the GNU General Public License Version 2 or later (the "GPL"), or
68
+ // the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
69
+ // in which case the provisions of the GPL or the LGPL are applicable instead
70
+ // of those above. If you wish to allow use of your version of this file only
71
+ // under the terms of either the GPL or the LGPL, and not to allow others to
72
+ // use your version of this file under the terms of the MPL, indicate your
73
+ // decision by deleting the provisions above and replace them with the notice
74
+ // and other provisions required by the GPL or the LGPL. If you do not delete
75
+ // the provisions above, a recipient may use your version of this file under
76
+ // the terms of any one of the MPL, the GPL or the LGPL.
77
+ //
78
+ // ***** END LICENSE BLOCK *****
@@ -0,0 +1,380 @@
1
+ [RFC6265](http://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js
2
+
3
+ ![Tough Cookie](http://www.goinstant.com.s3.amazonaws.com/tough-cookie.jpg)
4
+
5
+ # Synopsis
6
+
7
+ ``` javascript
8
+ var cookies = require('tough-cookie'); // note: not 'cookie', 'cookies' or 'node-cookie'
9
+ var Cookie = cookies.Cookie;
10
+ var cookie = Cookie.parse(header);
11
+ cookie.value = 'somethingdifferent';
12
+ header = cookie.toString();
13
+
14
+ var cookiejar = new cookies.CookieJar();
15
+ cookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb);
16
+ // ...
17
+ cookiejar.getCookies('http://example.com/otherpath',function(err,cookies) {
18
+ res.headers['cookie'] = cookies.join('; ');
19
+ });
20
+ ```
21
+
22
+ # Installation
23
+
24
+ It's _so_ easy!
25
+
26
+ `npm install tough-cookie`
27
+
28
+ Requires `punycode`, which should get installed automatically for you. Note that node.js v0.6.2+ bundles punycode by default.
29
+
30
+ Why the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken.
31
+
32
+ # API
33
+
34
+ cookies
35
+ =======
36
+
37
+ Functions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be "bound".
38
+
39
+ parseDate(string[,strict])
40
+ -----------------
41
+
42
+ Parse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`. If strict is set to true then leading/trailing non-seperator characters around the time part will cause the parsing to fail (e.g. "Thu, 01 Jan 1970 00:00:010 GMT" has an extra trailing zero but Chrome, an assumedly RFC-compliant browser, treats this as valid).
43
+
44
+ formatDate(date)
45
+ ----------------
46
+
47
+ Format a Date into a RFC1123 string (the RFC6265-recommended format).
48
+
49
+ canonicalDomain(str)
50
+ --------------------
51
+
52
+ Transforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects).
53
+
54
+ domainMatch(str,domStr[,canonicalize=true])
55
+ -------------------------------------------
56
+
57
+ Answers "does this real domain match the domain in a cookie?". The `str` is the "current" domain-name and the `domStr` is the "cookie" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a "suffix match".
58
+
59
+ The `canonicalize` parameter will run the other two paramters through `canonicalDomain` or not.
60
+
61
+ defaultPath(path)
62
+ -----------------
63
+
64
+ Given a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the "directory" of a "file" in the path, but is specified by Section 5.1.4 of the RFC.
65
+
66
+ The `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output.
67
+
68
+ pathMatch(reqPath,cookiePath)
69
+ -----------------------------
70
+
71
+ Answers "does the request-path path-match a given cookie-path?" as per RFC6265 Section 5.1.4. Returns a boolean.
72
+
73
+ This is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`.
74
+
75
+ parse(header[,strict=false])
76
+ ----------------------------
77
+
78
+ alias for `Cookie.parse(header[,strict])`
79
+
80
+ fromJSON(string)
81
+ ----------------
82
+
83
+ alias for `Cookie.fromJSON(string)`
84
+
85
+ getPublicSuffix(hostname)
86
+ -------------------------
87
+
88
+ Returns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it.
89
+
90
+ For example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`.
91
+
92
+ For further information, see http://publicsuffix.org/. This module derives its list from that site.
93
+
94
+ cookieCompare(a,b)
95
+ ------------------
96
+
97
+ For use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). Longest `.path`s go first, then sorted oldest to youngest.
98
+
99
+ ``` javascript
100
+ var cookies = [ /* unsorted array of Cookie objects */ ];
101
+ cookies = cookies.sort(cookieCompare);
102
+ ```
103
+
104
+ permuteDomain(domain)
105
+ ---------------------
106
+
107
+ Generates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores.
108
+
109
+
110
+ permutePath(path)
111
+ -----------------
112
+
113
+ Generates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores.
114
+
115
+ Cookie
116
+ ======
117
+
118
+ Cookie.parse(header[,strict=false])
119
+ -----------------------------------
120
+
121
+ Parses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed. If in strict mode, returns `undefined` if the cookie doesn't follow the guidelines in section 4 of RFC6265. Generally speaking, strict mode can be used to validate your own generated Set-Cookie headers, but acting as a client you want to be lenient and leave strict mode off.
122
+
123
+ Here's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response:
124
+
125
+ ``` javascript
126
+ if (res.headers['set-cookie'] instanceof Array)
127
+ cookies = res.headers['set-cookie'].map(Cookie.parse);
128
+ else
129
+ cookies = [Cookie.parse(res.headers['set-cookie'])];
130
+ ```
131
+
132
+ Cookie.fromJSON(string)
133
+ -----------------------
134
+
135
+ Convert a JSON string to a `Cookie` object. Does a `JSON.parse()` and converts the `.created`, `.lastAccessed` and `.expires` properties into `Date` objects.
136
+
137
+ Properties
138
+ ==========
139
+
140
+ * _key_ - string - the name or key of the cookie (default "")
141
+ * _value_ - string - the value of the cookie (default "")
142
+ * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `"Infinity"`). See `setExpires()`
143
+ * _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `"Infinity"` and `"-Infinity"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()`
144
+ * _domain_ - string - the `Domain=` attribute of the cookie
145
+ * _path_ - string - the `Path=` of the cookie
146
+ * _secure_ - boolean - the `Secure` cookie flag
147
+ * _httpOnly_ - boolean - the `HttpOnly` cookie flag
148
+ * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside)
149
+
150
+ After a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes:
151
+
152
+ * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied)
153
+ * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one.
154
+ * _created_ - `Date` - when this cookie was added to the jar
155
+ * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute.
156
+
157
+ Construction([{options}])
158
+ ------------
159
+
160
+ Receives an options object that can contain any Cookie properties, uses the default for unspecified properties.
161
+
162
+ .toString()
163
+ -----------
164
+
165
+ encode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`.
166
+
167
+ .cookieString()
168
+ ---------------
169
+
170
+ encode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '=').
171
+
172
+ .setExpires(String)
173
+ -------------------
174
+
175
+ sets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `"Infinity"` (a string) is set.
176
+
177
+ .setMaxAge(number)
178
+ -------------------
179
+
180
+ sets the maxAge in seconds. Coerces `-Infinity` to `"-Infinity"` and `Infinity` to `"Infinity"` so it JSON serializes correctly.
181
+
182
+ .expiryTime([now=Date.now()])
183
+ -----------------------------
184
+
185
+ .expiryDate([now=Date.now()])
186
+ -----------------------------
187
+
188
+ expiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds.
189
+
190
+ Max-Age takes precedence over Expires (as per the RFC). The `.created` attribute -- or, by default, the `now` paramter -- is used to offset the `.maxAge` attribute.
191
+
192
+ If Expires (`.expires`) is set, that's returned.
193
+
194
+ Otherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for "Tue, 19 Jan 2038 03:14:07 GMT" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents).
195
+
196
+ .TTL([now=Date.now()])
197
+ ---------
198
+
199
+ compute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply.
200
+
201
+ The "number" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned.
202
+
203
+ .canonicalizedDoman()
204
+ ---------------------
205
+
206
+ .cdomain()
207
+ ----------
208
+
209
+ return the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters.
210
+
211
+ .validate()
212
+ -----------
213
+
214
+ Status: *IN PROGRESS*. Works for a few things, but is by no means comprehensive.
215
+
216
+ validates cookie attributes for semantic correctness. Useful for "lint" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct:
217
+
218
+ ``` javascript
219
+ if (cookie.validate() === true) {
220
+ // it's tasty
221
+ } else {
222
+ // yuck!
223
+ }
224
+ ```
225
+
226
+ CookieJar
227
+ =========
228
+
229
+ Construction([store = new MemoryCookieStore()][, rejectPublicSuffixes])
230
+ ------------
231
+
232
+ Simply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used.
233
+
234
+
235
+ Attributes
236
+ ----------
237
+
238
+ * _rejectPublicSuffixes_ - boolean - reject cookies with domains like "com" and "co.uk" (default: `true`)
239
+
240
+ Since eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods.
241
+
242
+ .setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie))
243
+ -------------------------------------------------------------------
244
+
245
+ Attempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.created`, `.lastAccessed` and `.hostOnly` properties.
246
+
247
+ The `options` object can be omitted and can have the following properties:
248
+
249
+ * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.
250
+ * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.
251
+ * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies
252
+ * _strict_ - boolean - default `false` - perform extra checks
253
+ * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. CookieStore errors aren't ignored by this option.
254
+
255
+ As per the RFC, the `.hostOnly` property is set if there was no "Domain=" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual).
256
+
257
+ .storeCookie(cookie, [{options},] cb(err,cookie))
258
+ -------------------------------------------------
259
+
260
+ __REMOVED__ removed in lieu of the CookieStore API below
261
+
262
+ .getCookies(currentUrl, [{options},] cb(err,cookies))
263
+ -----------------------------------------------------
264
+
265
+ Retrieve the list of cookies that can be sent in a Cookie header for the current url.
266
+
267
+ If an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given.
268
+
269
+ The `options` object can be omitted and can have the following properties:
270
+
271
+ * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.
272
+ * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.
273
+ * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies
274
+ * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially).
275
+ * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the CookieStore `fetchCookies` function (the default MemoryCookieStore supports it).
276
+
277
+ The `.lastAccessed` property of the returned cookies will have been updated.
278
+
279
+ .getCookieString(...)
280
+ ---------------------
281
+
282
+ Accepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`.
283
+
284
+ .getSetCookieStrings(...)
285
+ -------------------------
286
+
287
+ Accepts the same options as `.getCookies()` but passes an array of strings suitable for Set-Cookie headers (rather than an array of `Cookie`s) to the callback. Simply maps the cookie array via `.toString()`.
288
+
289
+ # CookieStore API
290
+
291
+ The storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores.
292
+
293
+ All `domain` parameters will have been normalized before calling.
294
+
295
+ The Cookie store must have all of the following methods.
296
+
297
+ store.findCookie(domain, path, key, cb(err,cookie))
298
+ ---------------------------------------------------
299
+
300
+ Retrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned.
301
+
302
+ Callback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error).
303
+
304
+ store.findCookies(domain, path, cb(err,cookies))
305
+ ------------------------------------------------
306
+
307
+ Locates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above.
308
+
309
+ If no cookies are found, the callback MUST be passed an empty array.
310
+
311
+ The resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done.
312
+
313
+ As of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only).
314
+
315
+ store.putCookie(cookie, cb(err))
316
+ --------------------------------
317
+
318
+ Adds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur.
319
+
320
+ The `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties.
321
+
322
+ Pass an error if the cookie cannot be stored.
323
+
324
+ store.updateCookie(oldCookie, newCookie, cb(err))
325
+ -------------------------------------------------
326
+
327
+ Update an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store.
328
+
329
+ The `.lastAccessed` property will always be different between the two objects and `.created` will always be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are sorted (or selected for deletion).
330
+
331
+ Stores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object.
332
+
333
+ The `newCookie` and `oldCookie` objects MUST NOT be modified.
334
+
335
+ Pass an error if the newCookie cannot be stored.
336
+
337
+ store.removeCookie(domain, path, key, cb(err))
338
+ ----------------------------------------------
339
+
340
+ Remove a cookie from the store (see notes on `findCookie` about the uniqueness constraint).
341
+
342
+ The implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie.
343
+
344
+ store.removeCookies(domain, path, cb(err))
345
+ ------------------------------------------
346
+
347
+ Removes matching cookies from the store. The `path` paramter is optional, and if missing means all paths in a domain should be removed.
348
+
349
+ Pass an error ONLY if removing any existing cookies failed.
350
+
351
+ # TODO
352
+
353
+ * _full_ RFC5890/RFC5891 canonicalization for domains in `cdomain()`
354
+ * the optional `punycode` requirement implements RFC3492, but RFC6265 requires RFC5891
355
+ * better tests for `validate()`?
356
+
357
+ # Copyright and License
358
+
359
+ (tl;dr: MIT with some MPL/1.1)
360
+
361
+ Copyright GoInstant, Inc. and other contributors. All rights reserved.
362
+ Permission is hereby granted, free of charge, to any person obtaining a copy
363
+ of this software and associated documentation files (the "Software"), to
364
+ deal in the Software without restriction, including without limitation the
365
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
366
+ sell copies of the Software, and to permit persons to whom the Software is
367
+ furnished to do so, subject to the following conditions:
368
+
369
+ The above copyright notice and this permission notice shall be included in
370
+ all copies or substantial portions of the Software.
371
+
372
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
373
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
374
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
375
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
376
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
377
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
378
+ IN THE SOFTWARE.
379
+
380
+ Portions may be licensed under different licenses (in particular public-suffix.txt is MPL/1.1); please read the LICENSE file for full details.