postdoc 0.2.0.beta4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (371) hide show
  1. checksums.yaml +4 -4
  2. data/lib/postdoc/postdoc_view_helper.rb +15 -0
  3. data/lib/postdoc.rb +34 -14
  4. metadata +20 -373
  5. data/lib/pdf.js +0 -27
  6. data/node_modules/agent-base/History.md +0 -113
  7. data/node_modules/agent-base/README.md +0 -145
  8. data/node_modules/agent-base/index.js +0 -160
  9. data/node_modules/agent-base/package.json +0 -35
  10. data/node_modules/agent-base/patch-core.js +0 -37
  11. data/node_modules/agent-base/test/ssl-cert-snakeoil.key +0 -15
  12. data/node_modules/agent-base/test/ssl-cert-snakeoil.pem +0 -12
  13. data/node_modules/agent-base/test/test.js +0 -673
  14. data/node_modules/async-limiter/LICENSE +0 -8
  15. data/node_modules/async-limiter/coverage/coverage.json +0 -1
  16. data/node_modules/async-limiter/coverage/lcov-report/async-throttle/index.html +0 -73
  17. data/node_modules/async-limiter/coverage/lcov-report/async-throttle/index.js.html +0 -246
  18. data/node_modules/async-limiter/coverage/lcov-report/base.css +0 -182
  19. data/node_modules/async-limiter/coverage/lcov-report/index.html +0 -73
  20. data/node_modules/async-limiter/coverage/lcov-report/prettify.css +0 -1
  21. data/node_modules/async-limiter/coverage/lcov-report/prettify.js +0 -1
  22. data/node_modules/async-limiter/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  23. data/node_modules/async-limiter/coverage/lcov-report/sorter.js +0 -156
  24. data/node_modules/async-limiter/coverage/lcov.info +0 -74
  25. data/node_modules/async-limiter/index.js +0 -67
  26. data/node_modules/async-limiter/package.json +0 -35
  27. data/node_modules/async-limiter/readme.md +0 -132
  28. data/node_modules/balanced-match/LICENSE.md +0 -21
  29. data/node_modules/balanced-match/README.md +0 -91
  30. data/node_modules/balanced-match/index.js +0 -59
  31. data/node_modules/balanced-match/package.json +0 -49
  32. data/node_modules/brace-expansion/LICENSE +0 -21
  33. data/node_modules/brace-expansion/README.md +0 -129
  34. data/node_modules/brace-expansion/index.js +0 -201
  35. data/node_modules/brace-expansion/package.json +0 -47
  36. data/node_modules/buffer-from/index.js +0 -69
  37. data/node_modules/buffer-from/package.json +0 -16
  38. data/node_modules/buffer-from/readme.md +0 -69
  39. data/node_modules/buffer-from/test.js +0 -12
  40. data/node_modules/concat-map/LICENSE +0 -18
  41. data/node_modules/concat-map/README.markdown +0 -62
  42. data/node_modules/concat-map/example/map.js +0 -6
  43. data/node_modules/concat-map/index.js +0 -13
  44. data/node_modules/concat-map/package.json +0 -43
  45. data/node_modules/concat-map/test/map.js +0 -39
  46. data/node_modules/concat-stream/LICENSE +0 -24
  47. data/node_modules/concat-stream/index.js +0 -144
  48. data/node_modules/concat-stream/package.json +0 -55
  49. data/node_modules/concat-stream/readme.md +0 -102
  50. data/node_modules/core-util-is/LICENSE +0 -19
  51. data/node_modules/core-util-is/README.md +0 -3
  52. data/node_modules/core-util-is/float.patch +0 -604
  53. data/node_modules/core-util-is/lib/util.js +0 -107
  54. data/node_modules/core-util-is/package.json +0 -32
  55. data/node_modules/core-util-is/test.js +0 -68
  56. data/node_modules/debug/CHANGELOG.md +0 -395
  57. data/node_modules/debug/LICENSE +0 -19
  58. data/node_modules/debug/Makefile +0 -58
  59. data/node_modules/debug/README.md +0 -368
  60. data/node_modules/debug/karma.conf.js +0 -70
  61. data/node_modules/debug/node.js +0 -1
  62. data/node_modules/debug/package.json +0 -43
  63. data/node_modules/debug/src/browser.js +0 -195
  64. data/node_modules/debug/src/debug.js +0 -225
  65. data/node_modules/debug/src/index.js +0 -10
  66. data/node_modules/debug/src/node.js +0 -186
  67. data/node_modules/es6-promise/CHANGELOG.md +0 -151
  68. data/node_modules/es6-promise/LICENSE +0 -19
  69. data/node_modules/es6-promise/README.md +0 -97
  70. data/node_modules/es6-promise/auto.js +0 -4
  71. data/node_modules/es6-promise/dist/es6-promise.auto.js +0 -1181
  72. data/node_modules/es6-promise/dist/es6-promise.auto.map +0 -1
  73. data/node_modules/es6-promise/dist/es6-promise.auto.min.js +0 -1
  74. data/node_modules/es6-promise/dist/es6-promise.auto.min.map +0 -1
  75. data/node_modules/es6-promise/dist/es6-promise.js +0 -1179
  76. data/node_modules/es6-promise/dist/es6-promise.map +0 -1
  77. data/node_modules/es6-promise/dist/es6-promise.min.js +0 -1
  78. data/node_modules/es6-promise/dist/es6-promise.min.map +0 -1
  79. data/node_modules/es6-promise/es6-promise.d.ts +0 -81
  80. data/node_modules/es6-promise/lib/es6-promise/-internal.js +0 -266
  81. data/node_modules/es6-promise/lib/es6-promise/asap.js +0 -119
  82. data/node_modules/es6-promise/lib/es6-promise/enumerator.js +0 -113
  83. data/node_modules/es6-promise/lib/es6-promise/polyfill.js +0 -35
  84. data/node_modules/es6-promise/lib/es6-promise/promise/all.js +0 -52
  85. data/node_modules/es6-promise/lib/es6-promise/promise/race.js +0 -84
  86. data/node_modules/es6-promise/lib/es6-promise/promise/reject.js +0 -46
  87. data/node_modules/es6-promise/lib/es6-promise/promise/resolve.js +0 -48
  88. data/node_modules/es6-promise/lib/es6-promise/promise.js +0 -427
  89. data/node_modules/es6-promise/lib/es6-promise/then.js +0 -32
  90. data/node_modules/es6-promise/lib/es6-promise/utils.js +0 -21
  91. data/node_modules/es6-promise/lib/es6-promise.auto.js +0 -3
  92. data/node_modules/es6-promise/lib/es6-promise.js +0 -7
  93. data/node_modules/es6-promise/package.json +0 -75
  94. data/node_modules/es6-promisify/README.md +0 -89
  95. data/node_modules/es6-promisify/dist/promise.js +0 -73
  96. data/node_modules/es6-promisify/dist/promisify.js +0 -85
  97. data/node_modules/es6-promisify/package.json +0 -41
  98. data/node_modules/extract-zip/CONTRIBUTING.md +0 -1
  99. data/node_modules/extract-zip/LICENSE +0 -23
  100. data/node_modules/extract-zip/cli.js +0 -20
  101. data/node_modules/extract-zip/index.js +0 -205
  102. data/node_modules/extract-zip/node_modules/debug/CHANGELOG.md +0 -362
  103. data/node_modules/extract-zip/node_modules/debug/LICENSE +0 -19
  104. data/node_modules/extract-zip/node_modules/debug/Makefile +0 -50
  105. data/node_modules/extract-zip/node_modules/debug/README.md +0 -312
  106. data/node_modules/extract-zip/node_modules/debug/component.json +0 -19
  107. data/node_modules/extract-zip/node_modules/debug/karma.conf.js +0 -70
  108. data/node_modules/extract-zip/node_modules/debug/node.js +0 -1
  109. data/node_modules/extract-zip/node_modules/debug/package.json +0 -49
  110. data/node_modules/extract-zip/node_modules/debug/src/browser.js +0 -185
  111. data/node_modules/extract-zip/node_modules/debug/src/debug.js +0 -202
  112. data/node_modules/extract-zip/node_modules/debug/src/index.js +0 -10
  113. data/node_modules/extract-zip/node_modules/debug/src/inspector-log.js +0 -15
  114. data/node_modules/extract-zip/node_modules/debug/src/node.js +0 -248
  115. data/node_modules/extract-zip/package.json +0 -35
  116. data/node_modules/extract-zip/readme.md +0 -49
  117. data/node_modules/fd-slicer/CHANGELOG.md +0 -49
  118. data/node_modules/fd-slicer/LICENSE +0 -21
  119. data/node_modules/fd-slicer/README.md +0 -189
  120. data/node_modules/fd-slicer/index.js +0 -277
  121. data/node_modules/fd-slicer/package.json +0 -36
  122. data/node_modules/fd-slicer/test/test.js +0 -350
  123. data/node_modules/fs.realpath/LICENSE +0 -43
  124. data/node_modules/fs.realpath/README.md +0 -33
  125. data/node_modules/fs.realpath/index.js +0 -66
  126. data/node_modules/fs.realpath/old.js +0 -303
  127. data/node_modules/fs.realpath/package.json +0 -26
  128. data/node_modules/glob/LICENSE +0 -15
  129. data/node_modules/glob/README.md +0 -368
  130. data/node_modules/glob/changelog.md +0 -67
  131. data/node_modules/glob/common.js +0 -240
  132. data/node_modules/glob/glob.js +0 -790
  133. data/node_modules/glob/package.json +0 -43
  134. data/node_modules/glob/sync.js +0 -486
  135. data/node_modules/https-proxy-agent/History.md +0 -124
  136. data/node_modules/https-proxy-agent/README.md +0 -137
  137. data/node_modules/https-proxy-agent/index.js +0 -229
  138. data/node_modules/https-proxy-agent/package.json +0 -35
  139. data/node_modules/https-proxy-agent/test/ssl-cert-snakeoil.key +0 -15
  140. data/node_modules/https-proxy-agent/test/ssl-cert-snakeoil.pem +0 -12
  141. data/node_modules/https-proxy-agent/test/test.js +0 -342
  142. data/node_modules/inflight/LICENSE +0 -15
  143. data/node_modules/inflight/README.md +0 -37
  144. data/node_modules/inflight/inflight.js +0 -54
  145. data/node_modules/inflight/package.json +0 -29
  146. data/node_modules/inherits/LICENSE +0 -16
  147. data/node_modules/inherits/README.md +0 -42
  148. data/node_modules/inherits/inherits.js +0 -7
  149. data/node_modules/inherits/inherits_browser.js +0 -23
  150. data/node_modules/inherits/package.json +0 -29
  151. data/node_modules/isarray/Makefile +0 -6
  152. data/node_modules/isarray/README.md +0 -60
  153. data/node_modules/isarray/component.json +0 -19
  154. data/node_modules/isarray/index.js +0 -5
  155. data/node_modules/isarray/package.json +0 -45
  156. data/node_modules/isarray/test.js +0 -20
  157. data/node_modules/mime/CHANGELOG.md +0 -225
  158. data/node_modules/mime/CONTRIBUTING.md +0 -5
  159. data/node_modules/mime/LICENSE +0 -21
  160. data/node_modules/mime/Mime.js +0 -89
  161. data/node_modules/mime/README.md +0 -188
  162. data/node_modules/mime/cli.js +0 -10
  163. data/node_modules/mime/index.js +0 -4
  164. data/node_modules/mime/lite.js +0 -4
  165. data/node_modules/mime/package.json +0 -43
  166. data/node_modules/mime/src/README_js.md +0 -179
  167. data/node_modules/mime/src/build.js +0 -71
  168. data/node_modules/mime/src/test.js +0 -257
  169. data/node_modules/mime/types/other.json +0 -1
  170. data/node_modules/mime/types/standard.json +0 -1
  171. data/node_modules/minimatch/LICENSE +0 -15
  172. data/node_modules/minimatch/README.md +0 -209
  173. data/node_modules/minimatch/minimatch.js +0 -923
  174. data/node_modules/minimatch/package.json +0 -30
  175. data/node_modules/minimist/LICENSE +0 -18
  176. data/node_modules/minimist/example/parse.js +0 -2
  177. data/node_modules/minimist/index.js +0 -187
  178. data/node_modules/minimist/package.json +0 -40
  179. data/node_modules/minimist/readme.markdown +0 -73
  180. data/node_modules/minimist/test/dash.js +0 -24
  181. data/node_modules/minimist/test/default_bool.js +0 -20
  182. data/node_modules/minimist/test/dotted.js +0 -16
  183. data/node_modules/minimist/test/long.js +0 -31
  184. data/node_modules/minimist/test/parse.js +0 -318
  185. data/node_modules/minimist/test/parse_modified.js +0 -9
  186. data/node_modules/minimist/test/short.js +0 -67
  187. data/node_modules/minimist/test/whitespace.js +0 -8
  188. data/node_modules/mkdirp/LICENSE +0 -21
  189. data/node_modules/mkdirp/bin/cmd.js +0 -33
  190. data/node_modules/mkdirp/bin/usage.txt +0 -12
  191. data/node_modules/mkdirp/examples/pow.js +0 -6
  192. data/node_modules/mkdirp/index.js +0 -98
  193. data/node_modules/mkdirp/package.json +0 -27
  194. data/node_modules/mkdirp/readme.markdown +0 -100
  195. data/node_modules/mkdirp/test/chmod.js +0 -41
  196. data/node_modules/mkdirp/test/clobber.js +0 -38
  197. data/node_modules/mkdirp/test/mkdirp.js +0 -28
  198. data/node_modules/mkdirp/test/opts_fs.js +0 -29
  199. data/node_modules/mkdirp/test/opts_fs_sync.js +0 -27
  200. data/node_modules/mkdirp/test/perm.js +0 -32
  201. data/node_modules/mkdirp/test/perm_sync.js +0 -36
  202. data/node_modules/mkdirp/test/race.js +0 -37
  203. data/node_modules/mkdirp/test/rel.js +0 -32
  204. data/node_modules/mkdirp/test/return.js +0 -25
  205. data/node_modules/mkdirp/test/return_sync.js +0 -24
  206. data/node_modules/mkdirp/test/root.js +0 -19
  207. data/node_modules/mkdirp/test/sync.js +0 -32
  208. data/node_modules/mkdirp/test/umask.js +0 -28
  209. data/node_modules/mkdirp/test/umask_sync.js +0 -32
  210. data/node_modules/ms/index.js +0 -152
  211. data/node_modules/ms/license.md +0 -21
  212. data/node_modules/ms/package.json +0 -37
  213. data/node_modules/ms/readme.md +0 -51
  214. data/node_modules/once/LICENSE +0 -15
  215. data/node_modules/once/README.md +0 -79
  216. data/node_modules/once/once.js +0 -42
  217. data/node_modules/once/package.json +0 -33
  218. data/node_modules/path-is-absolute/index.js +0 -20
  219. data/node_modules/path-is-absolute/license +0 -21
  220. data/node_modules/path-is-absolute/package.json +0 -43
  221. data/node_modules/path-is-absolute/readme.md +0 -59
  222. data/node_modules/pend/LICENSE +0 -23
  223. data/node_modules/pend/README.md +0 -41
  224. data/node_modules/pend/index.js +0 -55
  225. data/node_modules/pend/package.json +0 -18
  226. data/node_modules/pend/test.js +0 -137
  227. data/node_modules/process-nextick-args/index.js +0 -44
  228. data/node_modules/process-nextick-args/license.md +0 -19
  229. data/node_modules/process-nextick-args/package.json +0 -25
  230. data/node_modules/process-nextick-args/readme.md +0 -18
  231. data/node_modules/progress/CHANGELOG.md +0 -115
  232. data/node_modules/progress/LICENSE +0 -22
  233. data/node_modules/progress/Makefile +0 -8
  234. data/node_modules/progress/README.md +0 -146
  235. data/node_modules/progress/index.js +0 -1
  236. data/node_modules/progress/lib/node-progress.js +0 -231
  237. data/node_modules/progress/package.json +0 -25
  238. data/node_modules/proxy-from-env/README.md +0 -131
  239. data/node_modules/proxy-from-env/index.js +0 -103
  240. data/node_modules/proxy-from-env/package.json +0 -35
  241. data/node_modules/proxy-from-env/test.js +0 -393
  242. data/node_modules/puppeteer/CONTRIBUTING.md +0 -206
  243. data/node_modules/puppeteer/DeviceDescriptors.js +0 -704
  244. data/node_modules/puppeteer/LICENSE +0 -202
  245. data/node_modules/puppeteer/README.md +0 -306
  246. data/node_modules/puppeteer/index.js +0 -28
  247. data/node_modules/puppeteer/install.js +0 -122
  248. data/node_modules/puppeteer/lib/Browser.js +0 -186
  249. data/node_modules/puppeteer/lib/BrowserFetcher.js +0 -279
  250. data/node_modules/puppeteer/lib/Connection.js +0 -246
  251. data/node_modules/puppeteer/lib/Coverage.js +0 -301
  252. data/node_modules/puppeteer/lib/Dialog.js +0 -84
  253. data/node_modules/puppeteer/lib/ElementHandle.js +0 -328
  254. data/node_modules/puppeteer/lib/EmulationManager.js +0 -89
  255. data/node_modules/puppeteer/lib/ExecutionContext.js +0 -232
  256. data/node_modules/puppeteer/lib/FrameManager.js +0 -997
  257. data/node_modules/puppeteer/lib/Input.js +0 -309
  258. data/node_modules/puppeteer/lib/Launcher.js +0 -310
  259. data/node_modules/puppeteer/lib/Multimap.js +0 -95
  260. data/node_modules/puppeteer/lib/NavigatorWatcher.js +0 -137
  261. data/node_modules/puppeteer/lib/NetworkManager.js +0 -796
  262. data/node_modules/puppeteer/lib/Page.js +0 -1098
  263. data/node_modules/puppeteer/lib/Pipe.js +0 -69
  264. data/node_modules/puppeteer/lib/Puppeteer.js +0 -60
  265. data/node_modules/puppeteer/lib/Target.js +0 -88
  266. data/node_modules/puppeteer/lib/TaskQueue.js +0 -17
  267. data/node_modules/puppeteer/lib/Tracing.js +0 -99
  268. data/node_modules/puppeteer/lib/USKeyboardLayout.js +0 -281
  269. data/node_modules/puppeteer/lib/helper.js +0 -248
  270. data/node_modules/puppeteer/node6/lib/Browser.js +0 -394
  271. data/node_modules/puppeteer/node6/lib/BrowserFetcher.js +0 -357
  272. data/node_modules/puppeteer/node6/lib/Connection.js +0 -350
  273. data/node_modules/puppeteer/node6/lib/Coverage.js +0 -561
  274. data/node_modules/puppeteer/node6/lib/Dialog.js +0 -136
  275. data/node_modules/puppeteer/node6/lib/ElementHandle.js +0 -796
  276. data/node_modules/puppeteer/node6/lib/EmulationManager.js +0 -115
  277. data/node_modules/puppeteer/node6/lib/ExecutionContext.js +0 -414
  278. data/node_modules/puppeteer/node6/lib/FrameManager.js +0 -1621
  279. data/node_modules/puppeteer/node6/lib/Input.js +0 -569
  280. data/node_modules/puppeteer/node6/lib/Launcher.js +0 -362
  281. data/node_modules/puppeteer/node6/lib/Multimap.js +0 -95
  282. data/node_modules/puppeteer/node6/lib/NavigatorWatcher.js +0 -163
  283. data/node_modules/puppeteer/node6/lib/NetworkManager.js +0 -1108
  284. data/node_modules/puppeteer/node6/lib/Page.js +0 -2242
  285. data/node_modules/puppeteer/node6/lib/Pipe.js +0 -69
  286. data/node_modules/puppeteer/node6/lib/Puppeteer.js +0 -60
  287. data/node_modules/puppeteer/node6/lib/Target.js +0 -114
  288. data/node_modules/puppeteer/node6/lib/TaskQueue.js +0 -17
  289. data/node_modules/puppeteer/node6/lib/Tracing.js +0 -177
  290. data/node_modules/puppeteer/node6/lib/USKeyboardLayout.js +0 -281
  291. data/node_modules/puppeteer/node6/lib/helper.js +0 -274
  292. data/node_modules/puppeteer/package.json +0 -61
  293. data/node_modules/readable-stream/CONTRIBUTING.md +0 -38
  294. data/node_modules/readable-stream/GOVERNANCE.md +0 -136
  295. data/node_modules/readable-stream/LICENSE +0 -47
  296. data/node_modules/readable-stream/README.md +0 -58
  297. data/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +0 -60
  298. data/node_modules/readable-stream/duplex-browser.js +0 -1
  299. data/node_modules/readable-stream/duplex.js +0 -1
  300. data/node_modules/readable-stream/lib/_stream_duplex.js +0 -131
  301. data/node_modules/readable-stream/lib/_stream_passthrough.js +0 -47
  302. data/node_modules/readable-stream/lib/_stream_readable.js +0 -1019
  303. data/node_modules/readable-stream/lib/_stream_transform.js +0 -214
  304. data/node_modules/readable-stream/lib/_stream_writable.js +0 -687
  305. data/node_modules/readable-stream/lib/internal/streams/BufferList.js +0 -79
  306. data/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -74
  307. data/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
  308. data/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
  309. data/node_modules/readable-stream/package.json +0 -52
  310. data/node_modules/readable-stream/passthrough.js +0 -1
  311. data/node_modules/readable-stream/readable-browser.js +0 -7
  312. data/node_modules/readable-stream/readable.js +0 -19
  313. data/node_modules/readable-stream/transform.js +0 -1
  314. data/node_modules/readable-stream/writable-browser.js +0 -1
  315. data/node_modules/readable-stream/writable.js +0 -8
  316. data/node_modules/rimraf/LICENSE +0 -15
  317. data/node_modules/rimraf/README.md +0 -101
  318. data/node_modules/rimraf/bin.js +0 -50
  319. data/node_modules/rimraf/package.json +0 -26
  320. data/node_modules/rimraf/rimraf.js +0 -364
  321. data/node_modules/safe-buffer/LICENSE +0 -21
  322. data/node_modules/safe-buffer/README.md +0 -584
  323. data/node_modules/safe-buffer/index.d.ts +0 -187
  324. data/node_modules/safe-buffer/index.js +0 -62
  325. data/node_modules/safe-buffer/package.json +0 -37
  326. data/node_modules/string_decoder/LICENSE +0 -48
  327. data/node_modules/string_decoder/README.md +0 -47
  328. data/node_modules/string_decoder/lib/string_decoder.js +0 -296
  329. data/node_modules/string_decoder/package.json +0 -31
  330. data/node_modules/typedarray/LICENSE +0 -35
  331. data/node_modules/typedarray/example/tarray.js +0 -4
  332. data/node_modules/typedarray/index.js +0 -630
  333. data/node_modules/typedarray/package.json +0 -55
  334. data/node_modules/typedarray/readme.markdown +0 -61
  335. data/node_modules/typedarray/test/server/undef_globals.js +0 -19
  336. data/node_modules/typedarray/test/tarray.js +0 -10
  337. data/node_modules/ultron/LICENSE +0 -22
  338. data/node_modules/ultron/README.md +0 -113
  339. data/node_modules/ultron/index.js +0 -136
  340. data/node_modules/ultron/package.json +0 -41
  341. data/node_modules/util-deprecate/History.md +0 -16
  342. data/node_modules/util-deprecate/LICENSE +0 -24
  343. data/node_modules/util-deprecate/README.md +0 -53
  344. data/node_modules/util-deprecate/browser.js +0 -67
  345. data/node_modules/util-deprecate/node.js +0 -6
  346. data/node_modules/util-deprecate/package.json +0 -27
  347. data/node_modules/wrappy/LICENSE +0 -15
  348. data/node_modules/wrappy/README.md +0 -36
  349. data/node_modules/wrappy/package.json +0 -29
  350. data/node_modules/wrappy/wrappy.js +0 -33
  351. data/node_modules/ws/LICENSE +0 -21
  352. data/node_modules/ws/README.md +0 -341
  353. data/node_modules/ws/index.js +0 -15
  354. data/node_modules/ws/lib/BufferUtil.js +0 -71
  355. data/node_modules/ws/lib/Constants.js +0 -10
  356. data/node_modules/ws/lib/ErrorCodes.js +0 -28
  357. data/node_modules/ws/lib/EventTarget.js +0 -151
  358. data/node_modules/ws/lib/Extensions.js +0 -203
  359. data/node_modules/ws/lib/PerMessageDeflate.js +0 -507
  360. data/node_modules/ws/lib/Receiver.js +0 -553
  361. data/node_modules/ws/lib/Sender.js +0 -412
  362. data/node_modules/ws/lib/Validation.js +0 -17
  363. data/node_modules/ws/lib/WebSocket.js +0 -717
  364. data/node_modules/ws/lib/WebSocketServer.js +0 -326
  365. data/node_modules/ws/package.json +0 -46
  366. data/node_modules/yauzl/LICENSE +0 -21
  367. data/node_modules/yauzl/README.md +0 -467
  368. data/node_modules/yauzl/index.js +0 -626
  369. data/node_modules/yauzl/package.json +0 -36
  370. data/package.json +0 -5
  371. data/yarn.lock +0 -240
@@ -1,131 +0,0 @@
1
- # proxy-from-env
2
-
3
- [![Build Status](https://travis-ci.org/Rob--W/proxy-from-env.svg?branch=master)](https://travis-ci.org/Rob--W/proxy-from-env)
4
- [![Coverage Status](https://coveralls.io/repos/github/Rob--W/proxy-from-env/badge.svg?branch=master)](https://coveralls.io/github/Rob--W/proxy-from-env?branch=master)
5
-
6
- `proxy-from-env` is a Node.js package that exports a function (`getProxyForUrl`)
7
- that takes an input URL (a string or
8
- [`url.parse`](https://nodejs.org/docs/latest/api/url.html#url_url_parsing)'s
9
- return value) and returns the desired proxy URL (also a string) based on
10
- standard proxy environment variables. If no proxy is set, an empty string is
11
- returned.
12
-
13
- It is your responsibility to actually proxy the request using the given URL.
14
-
15
- Installation:
16
-
17
- ```sh
18
- npm install proxy-from-env
19
- ```
20
-
21
- ## Example
22
- This example shows how the data for a URL can be fetched via the
23
- [`http` module](https://nodejs.org/api/http.html), in a proxy-aware way.
24
-
25
- ```javascript
26
- var http = require('http');
27
- var parseUrl = require('url').parse;
28
- var getProxyForUrl = require('proxy-from-env').getProxyForUrl;
29
-
30
- var some_url = 'http://example.com/something';
31
-
32
- // // Example, if there is a proxy server at 10.0.0.1:1234, then setting the
33
- // // http_proxy environment variable causes the request to go through a proxy.
34
- // process.env.http_proxy = 'http://10.0.0.1:1234';
35
- //
36
- // // But if the host to be proxied is listed in NO_PROXY, then the request is
37
- // // not proxied (but a direct request is made).
38
- // process.env.no_proxy = 'example.com';
39
-
40
- var proxy_url = getProxyForUrl(some_url); // <-- Our magic.
41
- if (proxy_url) {
42
- // Should be proxied through proxy_url.
43
- var parsed_some_url = parseUrl(some_url);
44
- var parsed_proxy_url = parseUrl(proxy_url);
45
- // A HTTP proxy is quite simple. It is similar to a normal request, except the
46
- // path is an absolute URL, and the proxied URL's host is put in the header
47
- // instead of the server's actual host.
48
- httpOptions = {
49
- protocol: parsed_proxy_url.protocol,
50
- hostname: parsed_proxy_url.hostname,
51
- port: parsed_proxy_url.port,
52
- path: parsed_some_url.href,
53
- headers: {
54
- Host: parsed_some_url.host, // = host name + optional port.
55
- },
56
- };
57
- } else {
58
- // Direct request.
59
- httpOptions = some_url;
60
- }
61
- http.get(httpOptions, function(res) {
62
- var responses = [];
63
- res.on('data', function(chunk) { responses.push(chunk); });
64
- res.on('end', function() { console.log(responses.join('')); });
65
- });
66
-
67
- ```
68
-
69
- ## Environment variables
70
- The environment variables can be specified in lowercase or uppercase, with the
71
- lowercase name having precedence over the uppercase variant. A variable that is
72
- not set has the same meaning as a variable that is set but has no value.
73
-
74
- ### NO\_PROXY
75
-
76
- `NO_PROXY` is a list of host names (optionally with a port). If the input URL
77
- matches any of the entries in `NO_PROXY`, then the input URL should be fetched
78
- by a direct request (i.e. without a proxy).
79
-
80
- Matching follows the following rules:
81
-
82
- - `NO_PROXY=*` disables all proxies.
83
- - Space and commas may be used to separate the entries in the `NO_PROXY` list.
84
- - If `NO_PROXY` does not contain any entries, then proxies are never disabled.
85
- - If a port is added after the host name, then the ports must match. If the URL
86
- does not have an explicit port name, the protocol's default port is used.
87
- - Generally, the proxy is only disabled if the host name is an exact match for
88
- an entry in the `NO_PROXY` list. The only exceptions are entries that start
89
- with a dot or with a wildcard; then the proxy is disabled if the host name
90
- ends with the entry.
91
-
92
- See `test.js` for examples of what should match and what does not.
93
-
94
- ### \*\_PROXY
95
-
96
- The environment variable used for the proxy depends on the protocol of the URL.
97
- For example, `https://example.com` uses the "https" protocol, and therefore the
98
- proxy to be used is `HTTPS_PROXY` (_NOT_ `HTTP_PROXY`, which is _only_ used for
99
- http:-URLs).
100
-
101
- The library is not limited to http(s), other schemes such as
102
- `FTP_PROXY` (ftp:),
103
- `WSS_PROXY` (wss:),
104
- `WS_PROXY` (ws:)
105
- are also supported.
106
-
107
- If present, `ALL_PROXY` is used as fallback if there is no other match.
108
-
109
-
110
- ## External resources
111
- The exact way of parsing the environment variables is not codified in any
112
- standard. This library is designed to be compatible with formats as expected by
113
- existing software.
114
- The following resources were used to determine the desired behavior:
115
-
116
- - cURL:
117
- https://curl.haxx.se/docs/manpage.html#ENVIRONMENT
118
- https://github.com/curl/curl/blob/4af40b3646d3b09f68e419f7ca866ff395d1f897/lib/url.c#L4446-L4514
119
- https://github.com/curl/curl/blob/4af40b3646d3b09f68e419f7ca866ff395d1f897/lib/url.c#L4608-L4638
120
-
121
- - wget:
122
- https://www.gnu.org/software/wget/manual/wget.html#Proxies
123
- http://git.savannah.gnu.org/cgit/wget.git/tree/src/init.c?id=636a5f9a1c508aa39e35a3a8e9e54520a284d93d#n383
124
- http://git.savannah.gnu.org/cgit/wget.git/tree/src/retr.c?id=93c1517c4071c4288ba5a4b038e7634e4c6b5482#n1278
125
-
126
- - W3:
127
- https://www.w3.org/Daemon/User/Proxies/ProxyClients.html
128
-
129
- - Python's urllib:
130
- https://github.com/python/cpython/blob/936135bb97fe04223aa30ca6e98eac8f3ed6b349/Lib/urllib/request.py#L755-L782
131
- https://github.com/python/cpython/blob/936135bb97fe04223aa30ca6e98eac8f3ed6b349/Lib/urllib/request.py#L2444-L2479
@@ -1,103 +0,0 @@
1
- 'use strict';
2
-
3
- var parseUrl = require('url').parse;
4
-
5
- var DEFAULT_PORTS = {
6
- ftp: 21,
7
- gopher: 70,
8
- http: 80,
9
- https: 443,
10
- ws: 80,
11
- wss: 443,
12
- };
13
-
14
- var stringEndsWith = String.prototype.endsWith || function(s) {
15
- return s.length <= this.length &&
16
- this.indexOf(s, this.length - s.length) !== -1;
17
- };
18
-
19
- /**
20
- * @param {string|object} url - The URL, or the result from url.parse.
21
- * @return {string} The URL of the proxy that should handle the request to the
22
- * given URL. If no proxy is set, this will be an empty string.
23
- */
24
- function getProxyForUrl(url) {
25
- var parsedUrl = typeof url === 'string' ? parseUrl(url) : url || {};
26
- var proto = parsedUrl.protocol;
27
- var hostname = parsedUrl.host;
28
- var port = parsedUrl.port;
29
- if (typeof hostname !== 'string' || !hostname || typeof proto !== 'string') {
30
- return ''; // Don't proxy URLs without a valid scheme or host.
31
- }
32
-
33
- proto = proto.split(':', 1)[0];
34
- // Stripping ports in this way instead of using parsedUrl.hostname to make
35
- // sure that the brackets around IPv6 addresses are kept.
36
- hostname = hostname.replace(/:\d*$/, '');
37
- port = parseInt(port) || DEFAULT_PORTS[proto] || 0;
38
- if (!shouldProxy(hostname, port)) {
39
- return ''; // Don't proxy URLs that match NO_PROXY.
40
- }
41
-
42
- var proxy = getEnv(proto + '_proxy') || getEnv('all_proxy');
43
- if (proxy && proxy.indexOf('://') === -1) {
44
- // Missing scheme in proxy, default to the requested URL's scheme.
45
- proxy = proto + '://' + proxy;
46
- }
47
- return proxy;
48
- }
49
-
50
- /**
51
- * Determines whether a given URL should be proxied.
52
- *
53
- * @param {string} hostname - The host name of the URL.
54
- * @param {number} port - The effective port of the URL.
55
- * @returns {boolean} Whether the given URL should be proxied.
56
- * @private
57
- */
58
- function shouldProxy(hostname, port) {
59
- var NO_PROXY = getEnv('no_proxy').toLowerCase();
60
- if (!NO_PROXY) {
61
- return true; // Always proxy if NO_PROXY is not set.
62
- }
63
- if (NO_PROXY === '*') {
64
- return false; // Never proxy if wildcard is set.
65
- }
66
-
67
- return NO_PROXY.split(/[,\s]/).every(function(proxy) {
68
- if (!proxy) {
69
- return true; // Skip zero-length hosts.
70
- }
71
- var parsedProxy = proxy.match(/^(.+):(\d+)$/);
72
- var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
73
- var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
74
- if (parsedProxyPort && parsedProxyPort !== port) {
75
- return true; // Skip if ports don't match.
76
- }
77
-
78
- if (!/^[.*]/.test(parsedProxyHostname)) {
79
- // No wildcards, so stop proxying if there is an exact match.
80
- return hostname !== parsedProxyHostname;
81
- }
82
-
83
- if (parsedProxyHostname.charAt(0) === '*') {
84
- // Remove leading wildcard.
85
- parsedProxyHostname = parsedProxyHostname.slice(1);
86
- }
87
- // Stop proxying if the hostname ends with the no_proxy host.
88
- return !stringEndsWith.call(hostname, parsedProxyHostname);
89
- });
90
- }
91
-
92
- /**
93
- * Get the value for an environment variable.
94
- *
95
- * @param {string} key - The name of the environment variable.
96
- * @return {string} The value of the environment variable.
97
- * @private
98
- */
99
- function getEnv(key) {
100
- return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || '';
101
- }
102
-
103
- exports.getProxyForUrl = getProxyForUrl;
@@ -1,35 +0,0 @@
1
- {
2
- "name": "proxy-from-env",
3
- "version": "1.0.0",
4
- "description": "Offers getProxyForUrl to get the proxy URL for a URL, respecting the *_PROXY (e.g. HTTP_PROXY) and NO_PROXY environment variables.",
5
- "main": "index.js",
6
- "scripts": {
7
- "lint": "jscs *.js && jshint *.js",
8
- "test": "mocha ./test.js --reporter spec",
9
- "test-coverage": "istanbul cover ./node_modules/.bin/_mocha -- --reporter spec"
10
- },
11
- "repository": {
12
- "type": "git",
13
- "url": "https://github.com/Rob--W/proxy-from-env.git"
14
- },
15
- "keywords": [
16
- "proxy",
17
- "http_proxy",
18
- "https_proxy",
19
- "no_proxy",
20
- "environment"
21
- ],
22
- "author": "Rob Wu <rob@robwu.nl> (https://robwu.nl/)",
23
- "license": "MIT",
24
- "bugs": {
25
- "url": "https://github.com/Rob--W/proxy-from-env/issues"
26
- },
27
- "homepage": "https://github.com/Rob--W/proxy-from-env#readme",
28
- "devDependencies": {
29
- "coveralls": "^2.11.6",
30
- "istanbul": "^0.4.2",
31
- "jscs": "^2.10.1",
32
- "jshint": "^2.9.1",
33
- "mocha": "^2.4.5"
34
- }
35
- }
@@ -1,393 +0,0 @@
1
- /* jshint mocha:true */
2
- 'use strict';
3
-
4
- var assert = require('assert');
5
- var parseUrl = require('url').parse;
6
-
7
- var getProxyForUrl = require('./').getProxyForUrl;
8
-
9
- // Runs the callback with process.env temporarily set to env.
10
- function runWithEnv(env, callback) {
11
- var originalEnv = process.env;
12
- process.env = env;
13
- try {
14
- callback();
15
- } finally {
16
- process.env = originalEnv;
17
- }
18
- }
19
-
20
- // Defines a test case that checks whether getProxyForUrl(input) === expected.
21
- function testProxyUrl(env, expected, input) {
22
- assert(typeof env === 'object' && env !== null);
23
- // Copy object to make sure that the in param does not get modified between
24
- // the call of this function and the use of it below.
25
- env = JSON.parse(JSON.stringify(env));
26
-
27
- var title = 'getProxyForUrl(' + JSON.stringify(input) + ')' +
28
- ' === ' + JSON.stringify(expected);
29
-
30
- // Save call stack for later use.
31
- var stack = {};
32
- Error.captureStackTrace(stack, testProxyUrl);
33
- // Only use the last stack frame because that shows where this function is
34
- // called, and that is sufficient for our purpose. No need to flood the logs
35
- // with an uninteresting stack trace.
36
- stack = stack.stack.split('\n', 2)[1];
37
-
38
- it(title, function() {
39
- var actual;
40
- runWithEnv(env, function() {
41
- actual = getProxyForUrl(input);
42
- });
43
- if (expected === actual) {
44
- return; // Good!
45
- }
46
- try {
47
- assert.strictEqual(expected, actual); // Create a formatted error message.
48
- // Should not happen because previously we determined expected !== actual.
49
- throw new Error('assert.strictEqual passed. This is impossible!');
50
- } catch (e) {
51
- // Use the original stack trace, so we can see a helpful line number.
52
- e.stack = e.message + stack;
53
- throw e;
54
- }
55
- });
56
- }
57
-
58
- describe('getProxyForUrl', function() {
59
- describe('No proxy variables', function() {
60
- var env = {};
61
- testProxyUrl(env, '', 'http://example.com');
62
- testProxyUrl(env, '', 'https://example.com');
63
- testProxyUrl(env, '', 'ftp://example.com');
64
- });
65
-
66
- describe('Invalid URLs', function() {
67
- var env = {};
68
- env.ALL_PROXY = 'http://unexpected.proxy';
69
- testProxyUrl(env, '', 'bogus');
70
- testProxyUrl(env, '', '//example.com');
71
- testProxyUrl(env, '', '://example.com');
72
- testProxyUrl(env, '', '://');
73
- testProxyUrl(env, '', '/path');
74
- testProxyUrl(env, '', '');
75
- testProxyUrl(env, '', 'http:');
76
- testProxyUrl(env, '', 'http:/');
77
- testProxyUrl(env, '', 'http://');
78
- testProxyUrl(env, '', 'prototype://');
79
- testProxyUrl(env, '', 'hasOwnProperty://');
80
- testProxyUrl(env, '', '__proto__://');
81
- testProxyUrl(env, '', undefined);
82
- testProxyUrl(env, '', null);
83
- testProxyUrl(env, '', {});
84
- testProxyUrl(env, '', {host: 'x', protocol: 1});
85
- testProxyUrl(env, '', {host: 1, protocol: 'x'});
86
- });
87
-
88
- describe('http_proxy and HTTP_PROXY', function() {
89
- var env = {};
90
- env.HTTP_PROXY = 'http://http-proxy';
91
-
92
- testProxyUrl(env, '', 'https://example');
93
- testProxyUrl(env, 'http://http-proxy', 'http://example');
94
- testProxyUrl(env, 'http://http-proxy', parseUrl('http://example'));
95
-
96
- // jscs:disable requireCamelCaseOrUpperCaseIdentifiers
97
- env.http_proxy = 'http://priority';
98
- // jscs:enable requireCamelCaseOrUpperCaseIdentifiers
99
- testProxyUrl(env, 'http://priority', 'http://example');
100
- });
101
-
102
- describe('http_proxy with non-sensical value', function() {
103
- var env = {};
104
- // Crazy values should be passed as-is. It is the responsibility of the
105
- // one who launches the application that the value makes sense.
106
- // TODO: Should we be stricter and perform validation?
107
- env.HTTP_PROXY = 'Crazy \n!() { ::// }';
108
- testProxyUrl(env, 'Crazy \n!() { ::// }', 'http://wow');
109
-
110
- // The implementation assumes that the HTTP_PROXY environment variable is
111
- // somewhat reasonable, and if the scheme is missing, it is added.
112
- // Garbage in, garbage out some would say...
113
- env.HTTP_PROXY = 'crazy without colon slash slash';
114
- testProxyUrl(env, 'http://crazy without colon slash slash', 'http://wow');
115
- });
116
-
117
- describe('https_proxy and HTTPS_PROXY', function() {
118
- var env = {};
119
- // Assert that there is no fall back to http_proxy
120
- env.HTTP_PROXY = 'http://unexpected.proxy';
121
- testProxyUrl(env, '', 'https://example');
122
-
123
- env.HTTPS_PROXY = 'http://https-proxy';
124
- testProxyUrl(env, 'http://https-proxy', 'https://example');
125
-
126
- // jscs:disable requireCamelCaseOrUpperCaseIdentifiers
127
- env.https_proxy = 'http://priority';
128
- // jscs:enable requireCamelCaseOrUpperCaseIdentifiers
129
- testProxyUrl(env, 'http://priority', 'https://example');
130
- });
131
-
132
- describe('ftp_proxy', function() {
133
- var env = {};
134
- // Something else than http_proxy / https, as a sanity check.
135
- env.FTP_PROXY = 'http://ftp-proxy';
136
-
137
- testProxyUrl(env, 'http://ftp-proxy', 'ftp://example');
138
- testProxyUrl(env, '', 'ftps://example');
139
- });
140
-
141
- describe('all_proxy', function() {
142
- var env = {};
143
- env.ALL_PROXY = 'http://catch-all';
144
- testProxyUrl(env, 'http://catch-all', 'https://example');
145
-
146
- // jscs:disable requireCamelCaseOrUpperCaseIdentifiers
147
- env.all_proxy = 'http://priority';
148
- // jscs:enable requireCamelCaseOrUpperCaseIdentifiers
149
- testProxyUrl(env, 'http://priority', 'https://example');
150
- });
151
-
152
- describe('all_proxy without scheme', function() {
153
- var env = {};
154
- env.ALL_PROXY = 'noscheme';
155
- testProxyUrl(env, 'http://noscheme', 'http://example');
156
- testProxyUrl(env, 'https://noscheme', 'https://example');
157
-
158
- // The module does not impose restrictions on the scheme.
159
- testProxyUrl(env, 'bogus-scheme://noscheme', 'bogus-scheme://example');
160
-
161
- // But the URL should still be valid.
162
- testProxyUrl(env, '', 'bogus');
163
- });
164
-
165
- describe('no_proxy empty', function() {
166
- var env = {};
167
- env.HTTPS_PROXY = 'http://proxy';
168
-
169
- // NO_PROXY set but empty.
170
- env.NO_PROXY = '';
171
- testProxyUrl(env, 'http://proxy', 'https://example');
172
-
173
- // No entries in NO_PROXY (comma).
174
- env.NO_PROXY = ',';
175
- testProxyUrl(env, 'http://proxy', 'https://example');
176
-
177
- // No entries in NO_PROXY (whitespace).
178
- env.NO_PROXY = ' ';
179
- testProxyUrl(env, 'http://proxy', 'https://example');
180
-
181
- // No entries in NO_PROXY (multiple whitespace / commas).
182
- env.NO_PROXY = ',\t,,,\n, ,\r';
183
- testProxyUrl(env, 'http://proxy', 'https://example');
184
- });
185
-
186
- describe('no_proxy=example (single host)', function() {
187
- var env = {};
188
- env.HTTP_PROXY = 'http://proxy';
189
-
190
- env.NO_PROXY = 'example';
191
- testProxyUrl(env, '', 'http://example');
192
- testProxyUrl(env, '', 'http://example:80');
193
- testProxyUrl(env, '', 'http://example:0');
194
- testProxyUrl(env, '', 'http://example:1337');
195
- testProxyUrl(env, 'http://proxy', 'http://sub.example');
196
- testProxyUrl(env, 'http://proxy', 'http://prefexample');
197
- testProxyUrl(env, 'http://proxy', 'http://example.no');
198
- testProxyUrl(env, 'http://proxy', 'http://a.b.example');
199
- testProxyUrl(env, 'http://proxy', 'http://host/example');
200
- });
201
-
202
- describe('no_proxy=sub.example (subdomain)', function() {
203
- var env = {};
204
- env.HTTP_PROXY = 'http://proxy';
205
-
206
- env.NO_PROXY = 'sub.example';
207
- testProxyUrl(env, 'http://proxy', 'http://example');
208
- testProxyUrl(env, 'http://proxy', 'http://example:80');
209
- testProxyUrl(env, 'http://proxy', 'http://example:0');
210
- testProxyUrl(env, 'http://proxy', 'http://example:1337');
211
- testProxyUrl(env, '', 'http://sub.example');
212
- testProxyUrl(env, 'http://proxy', 'http://no.sub.example');
213
- testProxyUrl(env, 'http://proxy', 'http://sub-example');
214
- testProxyUrl(env, 'http://proxy', 'http://example.sub');
215
- });
216
-
217
- describe('no_proxy=example:80 (host + port)', function() {
218
- var env = {};
219
- env.HTTP_PROXY = 'http://proxy';
220
-
221
- env.NO_PROXY = 'example:80';
222
- testProxyUrl(env, '', 'http://example');
223
- testProxyUrl(env, '', 'http://example:80');
224
- testProxyUrl(env, '', 'http://example:0');
225
- testProxyUrl(env, 'http://proxy', 'http://example:1337');
226
- testProxyUrl(env, 'http://proxy', 'http://sub.example');
227
- testProxyUrl(env, 'http://proxy', 'http://prefexample');
228
- testProxyUrl(env, 'http://proxy', 'http://example.no');
229
- testProxyUrl(env, 'http://proxy', 'http://a.b.example');
230
- });
231
-
232
- describe('no_proxy=.example (host suffix)', function() {
233
- var env = {};
234
- env.HTTP_PROXY = 'http://proxy';
235
-
236
- env.NO_PROXY = '.example';
237
- testProxyUrl(env, 'http://proxy', 'http://example');
238
- testProxyUrl(env, 'http://proxy', 'http://example:80');
239
- testProxyUrl(env, 'http://proxy', 'http://example:1337');
240
- testProxyUrl(env, '', 'http://sub.example');
241
- testProxyUrl(env, '', 'http://sub.example:80');
242
- testProxyUrl(env, '', 'http://sub.example:1337');
243
- testProxyUrl(env, 'http://proxy', 'http://prefexample');
244
- testProxyUrl(env, 'http://proxy', 'http://example.no');
245
- testProxyUrl(env, '', 'http://a.b.example');
246
- });
247
-
248
- describe('no_proxy=*', function() {
249
- var env = {};
250
- env.HTTP_PROXY = 'http://proxy';
251
- env.NO_PROXY = '*';
252
- testProxyUrl(env, '', 'http://example.com');
253
- });
254
-
255
- describe('no_proxy=*.example (host suffix with *.)', function() {
256
- var env = {};
257
- env.HTTP_PROXY = 'http://proxy';
258
-
259
- env.NO_PROXY = '*.example';
260
- testProxyUrl(env, 'http://proxy', 'http://example');
261
- testProxyUrl(env, 'http://proxy', 'http://example:80');
262
- testProxyUrl(env, 'http://proxy', 'http://example:1337');
263
- testProxyUrl(env, '', 'http://sub.example');
264
- testProxyUrl(env, '', 'http://sub.example:80');
265
- testProxyUrl(env, '', 'http://sub.example:1337');
266
- testProxyUrl(env, 'http://proxy', 'http://prefexample');
267
- testProxyUrl(env, 'http://proxy', 'http://example.no');
268
- testProxyUrl(env, '', 'http://a.b.example');
269
- });
270
-
271
- describe('no_proxy=*example (substring suffix)', function() {
272
- var env = {};
273
- env.HTTP_PROXY = 'http://proxy';
274
-
275
- env.NO_PROXY = '*example';
276
- testProxyUrl(env, '', 'http://example');
277
- testProxyUrl(env, '', 'http://example:80');
278
- testProxyUrl(env, '', 'http://example:1337');
279
- testProxyUrl(env, '', 'http://sub.example');
280
- testProxyUrl(env, '', 'http://sub.example:80');
281
- testProxyUrl(env, '', 'http://sub.example:1337');
282
- testProxyUrl(env, '', 'http://prefexample');
283
- testProxyUrl(env, '', 'http://a.b.example');
284
- testProxyUrl(env, 'http://proxy', 'http://example.no');
285
- testProxyUrl(env, 'http://proxy', 'http://host/example');
286
- });
287
-
288
- describe('no_proxy=.*example (arbitrary wildcards are NOT supported)',
289
- function() {
290
- var env = {};
291
- env.HTTP_PROXY = 'http://proxy';
292
-
293
- env.NO_PROXY = '.*example';
294
- testProxyUrl(env, 'http://proxy', 'http://example');
295
- testProxyUrl(env, 'http://proxy', 'http://sub.example');
296
- testProxyUrl(env, 'http://proxy', 'http://sub.example');
297
- testProxyUrl(env, 'http://proxy', 'http://prefexample');
298
- testProxyUrl(env, 'http://proxy', 'http://x.prefexample');
299
- testProxyUrl(env, 'http://proxy', 'http://a.b.example');
300
- });
301
-
302
- describe('no_proxy=[::1],[::2]:80,10.0.0.1,10.0.0.2:80 (IP addresses)',
303
- function() {
304
- var env = {};
305
- env.HTTP_PROXY = 'http://proxy';
306
-
307
- env.NO_PROXY = '[::1],[::2]:80,10.0.0.1,10.0.0.2:80';
308
- testProxyUrl(env, '', 'http://[::1]/');
309
- testProxyUrl(env, '', 'http://[::1]:80/');
310
- testProxyUrl(env, '', 'http://[::1]:1337/');
311
-
312
- testProxyUrl(env, '', 'http://[::2]/');
313
- testProxyUrl(env, '', 'http://[::2]:80/');
314
- testProxyUrl(env, 'http://proxy', 'http://[::2]:1337/');
315
-
316
- testProxyUrl(env, '', 'http://10.0.0.1/');
317
- testProxyUrl(env, '', 'http://10.0.0.1:80/');
318
- testProxyUrl(env, '', 'http://10.0.0.1:1337/');
319
-
320
- testProxyUrl(env, '', 'http://10.0.0.2/');
321
- testProxyUrl(env, '', 'http://10.0.0.2:80/');
322
- testProxyUrl(env, 'http://proxy', 'http://10.0.0.2:1337/');
323
- });
324
-
325
- describe('no_proxy=127.0.0.1/32 (CIDR is NOT supported)', function() {
326
- var env = {};
327
- env.HTTP_PROXY = 'http://proxy';
328
-
329
- env.NO_PROXY = '127.0.0.1/32';
330
- testProxyUrl(env, 'http://proxy', 'http://127.0.0.1');
331
- testProxyUrl(env, 'http://proxy', 'http://127.0.0.1/32');
332
- });
333
-
334
- describe('no_proxy=127.0.0.1 does NOT match localhost', function() {
335
- var env = {};
336
- env.HTTP_PROXY = 'http://proxy';
337
-
338
- env.NO_PROXY = '127.0.0.1';
339
- testProxyUrl(env, '', 'http://127.0.0.1');
340
- // We're not performing DNS queries, so this shouldn't match.
341
- testProxyUrl(env, 'http://proxy', 'http://localhost');
342
- });
343
-
344
- describe('no_proxy with protocols that have a default port', function() {
345
- var env = {};
346
- env.WS_PROXY = 'http://ws';
347
- env.WSS_PROXY = 'http://wss';
348
- env.HTTP_PROXY = 'http://http';
349
- env.HTTPS_PROXY = 'http://https';
350
- env.GOPHER_PROXY = 'http://gopher';
351
- env.FTP_PROXY = 'http://ftp';
352
- env.ALL_PROXY = 'http://all';
353
-
354
- env.NO_PROXY = 'xxx:21,xxx:70,xxx:80,xxx:443';
355
-
356
- testProxyUrl(env, '', 'http://xxx');
357
- testProxyUrl(env, '', 'http://xxx:80');
358
- testProxyUrl(env, 'http://http', 'http://xxx:1337');
359
-
360
- testProxyUrl(env, '', 'ws://xxx');
361
- testProxyUrl(env, '', 'ws://xxx:80');
362
- testProxyUrl(env, 'http://ws', 'ws://xxx:1337');
363
-
364
- testProxyUrl(env, '', 'https://xxx');
365
- testProxyUrl(env, '', 'https://xxx:443');
366
- testProxyUrl(env, 'http://https', 'https://xxx:1337');
367
-
368
- testProxyUrl(env, '', 'wss://xxx');
369
- testProxyUrl(env, '', 'wss://xxx:443');
370
- testProxyUrl(env, 'http://wss', 'wss://xxx:1337');
371
-
372
- testProxyUrl(env, '', 'gopher://xxx');
373
- testProxyUrl(env, '', 'gopher://xxx:70');
374
- testProxyUrl(env, 'http://gopher', 'gopher://xxx:1337');
375
-
376
- testProxyUrl(env, '', 'ftp://xxx');
377
- testProxyUrl(env, '', 'ftp://xxx:21');
378
- testProxyUrl(env, 'http://ftp', 'ftp://xxx:1337');
379
- });
380
-
381
- describe('no_proxy should not be case-sensitive', function() {
382
- var env = {};
383
- env.HTTP_PROXY = 'http://proxy';
384
- env.NO_PROXY = 'XXX,YYY,ZzZ';
385
-
386
- testProxyUrl(env, '', 'http://xxx');
387
- testProxyUrl(env, '', 'http://XXX');
388
- testProxyUrl(env, '', 'http://yyy');
389
- testProxyUrl(env, '', 'http://YYY');
390
- testProxyUrl(env, '', 'http://ZzZ');
391
- testProxyUrl(env, '', 'http://zZz');
392
- });
393
- });