embeditor-rails 1.1.1 → 2.0.0.beta
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +25 -17
- data/app/assets/javascripts/embeditor/adapter.js.coffee +21 -2
- data/app/assets/javascripts/embeditor/adapters/embedly.js.coffee +4 -40
- data/app/assets/javascripts/embeditor/adapters/oembed.js.coffee +37 -2
- data/app/assets/javascripts/embeditor/embeditor.js.coffee +16 -4
- data/lib/embeditor-rails/version.rb +1 -1
- data/lib/node_modules/npm/AUTHORS +158 -0
- data/lib/node_modules/npm/CONTRIBUTING.md +9 -0
- data/lib/node_modules/npm/LICENSE +235 -0
- data/lib/node_modules/npm/Makefile +216 -0
- data/lib/node_modules/npm/README.md +241 -0
- data/lib/node_modules/npm/bin/node-gyp-bin/node-gyp +2 -0
- data/lib/node_modules/npm/bin/node-gyp-bin/node-gyp.cmd +1 -0
- data/lib/node_modules/npm/bin/npm +13 -0
- data/lib/node_modules/npm/bin/npm-cli.js +87 -0
- data/lib/node_modules/npm/bin/npm.cmd +6 -0
- data/lib/node_modules/npm/bin/read-package-json.js +22 -0
- data/lib/node_modules/npm/cli.js +2 -0
- data/lib/node_modules/npm/configure +33 -0
- data/lib/node_modules/npm/doc/api/npm-bin.md +13 -0
- data/lib/node_modules/npm/doc/api/npm-bugs.md +19 -0
- data/lib/node_modules/npm/doc/api/npm-commands.md +22 -0
- data/lib/node_modules/npm/doc/api/npm-config.md +45 -0
- data/lib/node_modules/npm/doc/api/npm-deprecate.md +34 -0
- data/lib/node_modules/npm/doc/api/npm-docs.md +19 -0
- data/lib/node_modules/npm/doc/api/npm-edit.md +24 -0
- data/lib/node_modules/npm/doc/api/npm-explore.md +18 -0
- data/lib/node_modules/npm/doc/api/npm-help-search.md +30 -0
- data/lib/node_modules/npm/doc/api/npm-init.md +29 -0
- data/lib/node_modules/npm/doc/api/npm-install.md +19 -0
- data/lib/node_modules/npm/doc/api/npm-link.md +33 -0
- data/lib/node_modules/npm/doc/api/npm-load.md +26 -0
- data/lib/node_modules/npm/doc/api/npm-ls.md +56 -0
- data/lib/node_modules/npm/doc/api/npm-outdated.md +13 -0
- data/lib/node_modules/npm/doc/api/npm-owner.md +31 -0
- data/lib/node_modules/npm/doc/api/npm-pack.md +19 -0
- data/lib/node_modules/npm/doc/api/npm-prefix.md +15 -0
- data/lib/node_modules/npm/doc/api/npm-prune.md +17 -0
- data/lib/node_modules/npm/doc/api/npm-publish.md +30 -0
- data/lib/node_modules/npm/doc/api/npm-rebuild.md +16 -0
- data/lib/node_modules/npm/doc/api/npm-repo.md +19 -0
- data/lib/node_modules/npm/doc/api/npm-restart.md +22 -0
- data/lib/node_modules/npm/doc/api/npm-root.md +15 -0
- data/lib/node_modules/npm/doc/api/npm-run-script.md +27 -0
- data/lib/node_modules/npm/doc/api/npm-search.md +35 -0
- data/lib/node_modules/npm/doc/api/npm-shrinkwrap.md +20 -0
- data/lib/node_modules/npm/doc/api/npm-start.md +13 -0
- data/lib/node_modules/npm/doc/api/npm-stop.md +13 -0
- data/lib/node_modules/npm/doc/api/npm-submodule.md +28 -0
- data/lib/node_modules/npm/doc/api/npm-tag.md +23 -0
- data/lib/node_modules/npm/doc/api/npm-test.md +16 -0
- data/lib/node_modules/npm/doc/api/npm-uninstall.md +16 -0
- data/lib/node_modules/npm/doc/api/npm-unpublish.md +20 -0
- data/lib/node_modules/npm/doc/api/npm-update.md +11 -0
- data/lib/node_modules/npm/doc/api/npm-version.md +18 -0
- data/lib/node_modules/npm/doc/api/npm-view.md +93 -0
- data/lib/node_modules/npm/doc/api/npm-whoami.md +15 -0
- data/lib/node_modules/npm/doc/api/npm.md +116 -0
- data/lib/node_modules/npm/doc/cli/npm-adduser.md +38 -0
- data/lib/node_modules/npm/doc/cli/npm-bin.md +19 -0
- data/lib/node_modules/npm/doc/cli/npm-bugs.md +42 -0
- data/lib/node_modules/npm/doc/cli/npm-build.md +22 -0
- data/lib/node_modules/npm/doc/cli/npm-bundle.md +14 -0
- data/lib/node_modules/npm/doc/cli/npm-cache.md +72 -0
- data/lib/node_modules/npm/doc/cli/npm-completion.md +29 -0
- data/lib/node_modules/npm/doc/cli/npm-config.md +71 -0
- data/lib/node_modules/npm/doc/cli/npm-dedupe.md +58 -0
- data/lib/node_modules/npm/doc/cli/npm-deprecate.md +26 -0
- data/lib/node_modules/npm/doc/cli/npm-docs.md +44 -0
- data/lib/node_modules/npm/doc/cli/npm-edit.md +37 -0
- data/lib/node_modules/npm/doc/cli/npm-explore.md +40 -0
- data/lib/node_modules/npm/doc/cli/npm-help-search.md +35 -0
- data/lib/node_modules/npm/doc/cli/npm-help.md +40 -0
- data/lib/node_modules/npm/doc/cli/npm-init.md +25 -0
- data/lib/node_modules/npm/doc/cli/npm-install.md +252 -0
- data/lib/node_modules/npm/doc/cli/npm-link.md +63 -0
- data/lib/node_modules/npm/doc/cli/npm-ls.md +80 -0
- data/lib/node_modules/npm/doc/cli/npm-outdated.md +58 -0
- data/lib/node_modules/npm/doc/cli/npm-owner.md +33 -0
- data/lib/node_modules/npm/doc/cli/npm-pack.md +27 -0
- data/lib/node_modules/npm/doc/cli/npm-prefix.md +19 -0
- data/lib/node_modules/npm/doc/cli/npm-prune.md +25 -0
- data/lib/node_modules/npm/doc/cli/npm-publish.md +30 -0
- data/lib/node_modules/npm/doc/cli/npm-rebuild.md +21 -0
- data/lib/node_modules/npm/doc/cli/npm-repo.md +28 -0
- data/lib/node_modules/npm/doc/cli/npm-restart.md +22 -0
- data/lib/node_modules/npm/doc/cli/npm-rm.md +23 -0
- data/lib/node_modules/npm/doc/cli/npm-root.md +19 -0
- data/lib/node_modules/npm/doc/cli/npm-run-script.md +21 -0
- data/lib/node_modules/npm/doc/cli/npm-search.md +36 -0
- data/lib/node_modules/npm/doc/cli/npm-shrinkwrap.md +185 -0
- data/lib/node_modules/npm/doc/cli/npm-star.md +22 -0
- data/lib/node_modules/npm/doc/cli/npm-stars.md +22 -0
- data/lib/node_modules/npm/doc/cli/npm-start.md +18 -0
- data/lib/node_modules/npm/doc/cli/npm-stop.md +18 -0
- data/lib/node_modules/npm/doc/cli/npm-submodule.md +28 -0
- data/lib/node_modules/npm/doc/cli/npm-tag.md +34 -0
- data/lib/node_modules/npm/doc/cli/npm-test.md +22 -0
- data/lib/node_modules/npm/doc/cli/npm-uninstall.md +21 -0
- data/lib/node_modules/npm/doc/cli/npm-unpublish.md +32 -0
- data/lib/node_modules/npm/doc/cli/npm-update.md +24 -0
- data/lib/node_modules/npm/doc/cli/npm-version.md +45 -0
- data/lib/node_modules/npm/doc/cli/npm-view.md +90 -0
- data/lib/node_modules/npm/doc/cli/npm-whoami.md +17 -0
- data/lib/node_modules/npm/doc/cli/npm.md +153 -0
- data/lib/node_modules/npm/doc/files/npm-folders.md +211 -0
- data/lib/node_modules/npm/doc/files/npmrc.md +59 -0
- data/lib/node_modules/npm/doc/files/package.json.md +576 -0
- data/lib/node_modules/npm/doc/misc/npm-coding-style.md +181 -0
- data/lib/node_modules/npm/doc/misc/npm-config.md +820 -0
- data/lib/node_modules/npm/doc/misc/npm-developers.md +207 -0
- data/lib/node_modules/npm/doc/misc/npm-disputes.md +99 -0
- data/lib/node_modules/npm/doc/misc/npm-faq.md +364 -0
- data/lib/node_modules/npm/doc/misc/npm-index.md +411 -0
- data/lib/node_modules/npm/doc/misc/npm-registry.md +69 -0
- data/lib/node_modules/npm/doc/misc/npm-scripts.md +245 -0
- data/lib/node_modules/npm/doc/misc/removing-npm.md +54 -0
- data/lib/node_modules/npm/doc/misc/semver.md +111 -0
- data/lib/node_modules/npm/html/doc/README.html +276 -0
- data/lib/node_modules/npm/html/doc/api/npm-bin.html +53 -0
- data/lib/node_modules/npm/html/doc/api/npm-bugs.html +59 -0
- data/lib/node_modules/npm/html/doc/api/npm-commands.html +62 -0
- data/lib/node_modules/npm/html/doc/api/npm-config.html +67 -0
- data/lib/node_modules/npm/html/doc/api/npm-deprecate.html +66 -0
- data/lib/node_modules/npm/html/doc/api/npm-docs.html +59 -0
- data/lib/node_modules/npm/html/doc/api/npm-edit.html +64 -0
- data/lib/node_modules/npm/html/doc/api/npm-explore.html +58 -0
- data/lib/node_modules/npm/html/doc/api/npm-help-search.html +66 -0
- data/lib/node_modules/npm/html/doc/api/npm-init.html +69 -0
- data/lib/node_modules/npm/html/doc/api/npm-install.html +59 -0
- data/lib/node_modules/npm/html/doc/api/npm-link.html +73 -0
- data/lib/node_modules/npm/html/doc/api/npm-load.html +66 -0
- data/lib/node_modules/npm/html/doc/api/npm-ls.html +93 -0
- data/lib/node_modules/npm/html/doc/api/npm-outdated.html +53 -0
- data/lib/node_modules/npm/html/doc/api/npm-owner.html +68 -0
- data/lib/node_modules/npm/html/doc/api/npm-pack.html +59 -0
- data/lib/node_modules/npm/html/doc/api/npm-prefix.html +55 -0
- data/lib/node_modules/npm/html/doc/api/npm-prune.html +57 -0
- data/lib/node_modules/npm/html/doc/api/npm-publish.html +66 -0
- data/lib/node_modules/npm/html/doc/api/npm-rebuild.html +56 -0
- data/lib/node_modules/npm/html/doc/api/npm-repo.html +59 -0
- data/lib/node_modules/npm/html/doc/api/npm-restart.html +61 -0
- data/lib/node_modules/npm/html/doc/api/npm-root.html +55 -0
- data/lib/node_modules/npm/html/doc/api/npm-run-script.html +63 -0
- data/lib/node_modules/npm/html/doc/api/npm-search.html +66 -0
- data/lib/node_modules/npm/html/doc/api/npm-shrinkwrap.html +60 -0
- data/lib/node_modules/npm/html/doc/api/npm-start.html +53 -0
- data/lib/node_modules/npm/html/doc/api/npm-stop.html +53 -0
- data/lib/node_modules/npm/html/doc/api/npm-submodule.html +67 -0
- data/lib/node_modules/npm/html/doc/api/npm-tag.html +63 -0
- data/lib/node_modules/npm/html/doc/api/npm-test.html +56 -0
- data/lib/node_modules/npm/html/doc/api/npm-uninstall.html +56 -0
- data/lib/node_modules/npm/html/doc/api/npm-unpublish.html +60 -0
- data/lib/node_modules/npm/html/doc/api/npm-update.html +52 -0
- data/lib/node_modules/npm/html/doc/api/npm-version.html +58 -0
- data/lib/node_modules/npm/html/doc/api/npm-view.html +133 -0
- data/lib/node_modules/npm/html/doc/api/npm-whoami.html +55 -0
- data/lib/node_modules/npm/html/doc/api/npm.html +126 -0
- data/lib/node_modules/npm/html/doc/cli/npm-adduser.html +73 -0
- data/lib/node_modules/npm/html/doc/cli/npm-bin.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm-bugs.html +72 -0
- data/lib/node_modules/npm/html/doc/cli/npm-build.html +59 -0
- data/lib/node_modules/npm/html/doc/cli/npm-bundle.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm-cache.html +100 -0
- data/lib/node_modules/npm/html/doc/cli/npm-completion.html +67 -0
- data/lib/node_modules/npm/html/doc/cli/npm-config.html +107 -0
- data/lib/node_modules/npm/html/doc/cli/npm-dedupe.html +96 -0
- data/lib/node_modules/npm/html/doc/cli/npm-deprecate.html +65 -0
- data/lib/node_modules/npm/html/doc/cli/npm-docs.html +75 -0
- data/lib/node_modules/npm/html/doc/cli/npm-edit.html +71 -0
- data/lib/node_modules/npm/html/doc/cli/npm-explore.html +74 -0
- data/lib/node_modules/npm/html/doc/cli/npm-help-search.html +72 -0
- data/lib/node_modules/npm/html/doc/cli/npm-help.html +70 -0
- data/lib/node_modules/npm/html/doc/cli/npm-init.html +63 -0
- data/lib/node_modules/npm/html/doc/cli/npm-install.html +183 -0
- data/lib/node_modules/npm/html/doc/cli/npm-link.html +96 -0
- data/lib/node_modules/npm/html/doc/cli/npm-ls.html +108 -0
- data/lib/node_modules/npm/html/doc/cli/npm-outdated.html +92 -0
- data/lib/node_modules/npm/html/doc/cli/npm-owner.html +68 -0
- data/lib/node_modules/npm/html/doc/cli/npm-pack.html +63 -0
- data/lib/node_modules/npm/html/doc/cli/npm-prefix.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm-prune.html +63 -0
- data/lib/node_modules/npm/html/doc/cli/npm-publish.html +63 -0
- data/lib/node_modules/npm/html/doc/cli/npm-rebuild.html +60 -0
- data/lib/node_modules/npm/html/doc/cli/npm-repo.html +66 -0
- data/lib/node_modules/npm/html/doc/cli/npm-restart.html +58 -0
- data/lib/node_modules/npm/html/doc/cli/npm-rm.html +58 -0
- data/lib/node_modules/npm/html/doc/cli/npm-root.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm-run-script.html +57 -0
- data/lib/node_modules/npm/html/doc/cli/npm-search.html +71 -0
- data/lib/node_modules/npm/html/doc/cli/npm-shrinkwrap.html +217 -0
- data/lib/node_modules/npm/html/doc/cli/npm-star.html +60 -0
- data/lib/node_modules/npm/html/doc/cli/npm-stars.html +59 -0
- data/lib/node_modules/npm/html/doc/cli/npm-start.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm-stop.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm-submodule.html +67 -0
- data/lib/node_modules/npm/html/doc/cli/npm-tag.html +68 -0
- data/lib/node_modules/npm/html/doc/cli/npm-test.html +58 -0
- data/lib/node_modules/npm/html/doc/cli/npm-uninstall.html +56 -0
- data/lib/node_modules/npm/html/doc/cli/npm-unpublish.html +68 -0
- data/lib/node_modules/npm/html/doc/cli/npm-update.html +60 -0
- data/lib/node_modules/npm/html/doc/cli/npm-version.html +83 -0
- data/lib/node_modules/npm/html/doc/cli/npm-view.html +125 -0
- data/lib/node_modules/npm/html/doc/cli/npm-whoami.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm.html +165 -0
- data/lib/node_modules/npm/html/doc/files/npm-folders.html +239 -0
- data/lib/node_modules/npm/html/doc/files/npm-global.html +239 -0
- data/lib/node_modules/npm/html/doc/files/npm-json.html +580 -0
- data/lib/node_modules/npm/html/doc/files/npmrc.html +93 -0
- data/lib/node_modules/npm/html/doc/files/package.json.html +580 -0
- data/lib/node_modules/npm/html/doc/index.html +450 -0
- data/lib/node_modules/npm/html/doc/misc/npm-coding-style.html +216 -0
- data/lib/node_modules/npm/html/doc/misc/npm-config.html +744 -0
- data/lib/node_modules/npm/html/doc/misc/npm-developers.html +208 -0
- data/lib/node_modules/npm/html/doc/misc/npm-disputes.html +126 -0
- data/lib/node_modules/npm/html/doc/misc/npm-faq.html +382 -0
- data/lib/node_modules/npm/html/doc/misc/npm-index.html +450 -0
- data/lib/node_modules/npm/html/doc/misc/npm-registry.html +105 -0
- data/lib/node_modules/npm/html/doc/misc/npm-scripts.html +257 -0
- data/lib/node_modules/npm/html/doc/misc/removing-npm.html +92 -0
- data/lib/node_modules/npm/html/doc/misc/semver.html +128 -0
- data/lib/node_modules/npm/html/docfoot-script.html +31 -0
- data/lib/node_modules/npm/html/docfoot.html +2 -0
- data/lib/node_modules/npm/html/dochead.html +8 -0
- data/lib/node_modules/npm/html/favicon.ico +0 -0
- data/lib/node_modules/npm/html/index.html +95 -0
- data/lib/node_modules/npm/html/static/style.css +329 -0
- data/lib/node_modules/npm/lib/adduser.js +138 -0
- data/lib/node_modules/npm/lib/bin.js +18 -0
- data/lib/node_modules/npm/lib/bugs.js +61 -0
- data/lib/node_modules/npm/lib/build.js +228 -0
- data/lib/node_modules/npm/lib/cache.js +1318 -0
- data/lib/node_modules/npm/lib/completion.js +253 -0
- data/lib/node_modules/npm/lib/config.js +285 -0
- data/lib/node_modules/npm/lib/dedupe.js +357 -0
- data/lib/node_modules/npm/lib/deprecate.js +47 -0
- data/lib/node_modules/npm/lib/docs.js +62 -0
- data/lib/node_modules/npm/lib/edit.js +32 -0
- data/lib/node_modules/npm/lib/explore.js +36 -0
- data/lib/node_modules/npm/lib/faq.js +8 -0
- data/lib/node_modules/npm/lib/get.js +12 -0
- data/lib/node_modules/npm/lib/help-search.js +218 -0
- data/lib/node_modules/npm/lib/help.js +231 -0
- data/lib/node_modules/npm/lib/init.js +36 -0
- data/lib/node_modules/npm/lib/install.js +979 -0
- data/lib/node_modules/npm/lib/link.js +173 -0
- data/lib/node_modules/npm/lib/ls.js +357 -0
- data/lib/node_modules/npm/lib/npm.js +528 -0
- data/lib/node_modules/npm/lib/outdated.js +303 -0
- data/lib/node_modules/npm/lib/owner.js +205 -0
- data/lib/node_modules/npm/lib/pack.js +65 -0
- data/lib/node_modules/npm/lib/prefix.js +11 -0
- data/lib/node_modules/npm/lib/prune.js +53 -0
- data/lib/node_modules/npm/lib/publish.js +118 -0
- data/lib/node_modules/npm/lib/rebuild.js +75 -0
- data/lib/node_modules/npm/lib/repo.js +54 -0
- data/lib/node_modules/npm/lib/restart.js +1 -0
- data/lib/node_modules/npm/lib/root.js +11 -0
- data/lib/node_modules/npm/lib/run-script.js +102 -0
- data/lib/node_modules/npm/lib/search.js +265 -0
- data/lib/node_modules/npm/lib/set.js +13 -0
- data/lib/node_modules/npm/lib/shrinkwrap.js +86 -0
- data/lib/node_modules/npm/lib/star.js +33 -0
- data/lib/node_modules/npm/lib/stars.js +27 -0
- data/lib/node_modules/npm/lib/start.js +1 -0
- data/lib/node_modules/npm/lib/stop.js +1 -0
- data/lib/node_modules/npm/lib/submodule.js +119 -0
- data/lib/node_modules/npm/lib/substack.js +20 -0
- data/lib/node_modules/npm/lib/tag.js +18 -0
- data/lib/node_modules/npm/lib/test.js +14 -0
- data/lib/node_modules/npm/lib/unbuild.js +112 -0
- data/lib/node_modules/npm/lib/uninstall.js +127 -0
- data/lib/node_modules/npm/lib/unpublish.js +83 -0
- data/lib/node_modules/npm/lib/update.js +43 -0
- data/lib/node_modules/npm/lib/utils/completion.sh +54 -0
- data/lib/node_modules/npm/lib/utils/completion/file-completion.js +26 -0
- data/lib/node_modules/npm/lib/utils/completion/installed-deep.js +50 -0
- data/lib/node_modules/npm/lib/utils/completion/installed-shallow.js +79 -0
- data/lib/node_modules/npm/lib/utils/error-handler.js +343 -0
- data/lib/node_modules/npm/lib/utils/fetch.js +93 -0
- data/lib/node_modules/npm/lib/utils/find-prefix.js +57 -0
- data/lib/node_modules/npm/lib/utils/gently-rm.js +61 -0
- data/lib/node_modules/npm/lib/utils/is-git-url.js +13 -0
- data/lib/node_modules/npm/lib/utils/lifecycle.js +360 -0
- data/lib/node_modules/npm/lib/utils/link.js +39 -0
- data/lib/node_modules/npm/lib/utils/tar.js +323 -0
- data/lib/node_modules/npm/lib/version.js +120 -0
- data/lib/node_modules/npm/lib/view.js +246 -0
- data/lib/node_modules/npm/lib/visnup.js +42 -0
- data/lib/node_modules/npm/lib/whoami.js +13 -0
- data/lib/node_modules/npm/lib/xmas.js +56 -0
- data/lib/node_modules/npm/make.bat +3 -0
- data/lib/node_modules/npm/man/man1/npm-README.1 +328 -0
- data/lib/node_modules/npm/man/man1/npm-adduser.1 +63 -0
- data/lib/node_modules/npm/man/man1/npm-bin.1 +40 -0
- data/lib/node_modules/npm/man/man1/npm-bugs.1 +78 -0
- data/lib/node_modules/npm/man/man1/npm-build.1 +43 -0
- data/lib/node_modules/npm/man/man1/npm-bundle.1 +23 -0
- data/lib/node_modules/npm/man/man1/npm-cache.1 +104 -0
- data/lib/node_modules/npm/man/man1/npm-completion.1 +47 -0
- data/lib/node_modules/npm/man/man1/npm-config.1 +113 -0
- data/lib/node_modules/npm/man/man1/npm-dedupe.1 +96 -0
- data/lib/node_modules/npm/man/man1/npm-deprecate.1 +48 -0
- data/lib/node_modules/npm/man/man1/npm-docs.1 +78 -0
- data/lib/node_modules/npm/man/man1/npm-edit.1 +66 -0
- data/lib/node_modules/npm/man/man1/npm-explore.1 +76 -0
- data/lib/node_modules/npm/man/man1/npm-help-search.1 +59 -0
- data/lib/node_modules/npm/man/man1/npm-help.1 +77 -0
- data/lib/node_modules/npm/man/man1/npm-init.1 +43 -0
- data/lib/node_modules/npm/man/man1/npm-install.1 +434 -0
- data/lib/node_modules/npm/man/man1/npm-link.1 +119 -0
- data/lib/node_modules/npm/man/man1/npm-ls.1 +146 -0
- data/lib/node_modules/npm/man/man1/npm-outdated.1 +102 -0
- data/lib/node_modules/npm/man/man1/npm-owner.1 +58 -0
- data/lib/node_modules/npm/man/man1/npm-pack.1 +48 -0
- data/lib/node_modules/npm/man/man1/npm-prefix.1 +40 -0
- data/lib/node_modules/npm/man/man1/npm-prune.1 +42 -0
- data/lib/node_modules/npm/man/man1/npm-publish.1 +53 -0
- data/lib/node_modules/npm/man/man1/npm-rebuild.1 +37 -0
- data/lib/node_modules/npm/man/man1/npm-repo.1 +47 -0
- data/lib/node_modules/npm/man/man1/npm-restart.1 +42 -0
- data/lib/node_modules/npm/man/man1/npm-rm.1 +44 -0
- data/lib/node_modules/npm/man/man1/npm-root.1 +40 -0
- data/lib/node_modules/npm/man/man1/npm-run-script.1 +41 -0
- data/lib/node_modules/npm/man/man1/npm-search.1 +62 -0
- data/lib/node_modules/npm/man/man1/npm-shrinkwrap.1 +275 -0
- data/lib/node_modules/npm/man/man1/npm-star.1 +39 -0
- data/lib/node_modules/npm/man/man1/npm-stars.1 +40 -0
- data/lib/node_modules/npm/man/man1/npm-start.1 +37 -0
- data/lib/node_modules/npm/man/man1/npm-stop.1 +37 -0
- data/lib/node_modules/npm/man/man1/npm-submodule.1 +42 -0
- data/lib/node_modules/npm/man/man1/npm-tag.1 +74 -0
- data/lib/node_modules/npm/man/man1/npm-test.1 +42 -0
- data/lib/node_modules/npm/man/man1/npm-uninstall.1 +42 -0
- data/lib/node_modules/npm/man/man1/npm-unpublish.1 +53 -0
- data/lib/node_modules/npm/man/man1/npm-update.1 +45 -0
- data/lib/node_modules/npm/man/man1/npm-version.1 +75 -0
- data/lib/node_modules/npm/man/man1/npm-view.1 +186 -0
- data/lib/node_modules/npm/man/man1/npm-whoami.1 +34 -0
- data/lib/node_modules/npm/man/man1/npm.1 +230 -0
- data/lib/node_modules/npm/man/man3/npm-bin.3 +21 -0
- data/lib/node_modules/npm/man/man3/npm-bugs.3 +28 -0
- data/lib/node_modules/npm/man/man3/npm-commands.3 +35 -0
- data/lib/node_modules/npm/man/man3/npm-config.3 +69 -0
- data/lib/node_modules/npm/man/man3/npm-deprecate.3 +57 -0
- data/lib/node_modules/npm/man/man3/npm-docs.3 +28 -0
- data/lib/node_modules/npm/man/man3/npm-edit.3 +35 -0
- data/lib/node_modules/npm/man/man3/npm-explore.3 +28 -0
- data/lib/node_modules/npm/man/man3/npm-help-search.3 +51 -0
- data/lib/node_modules/npm/man/man3/npm-init.3 +39 -0
- data/lib/node_modules/npm/man/man3/npm-install.3 +29 -0
- data/lib/node_modules/npm/man/man3/npm-link.3 +53 -0
- data/lib/node_modules/npm/man/man3/npm-load.3 +44 -0
- data/lib/node_modules/npm/man/man3/npm-ls.3 +86 -0
- data/lib/node_modules/npm/man/man3/npm-outdated.3 +21 -0
- data/lib/node_modules/npm/man/man3/npm-owner.3 +52 -0
- data/lib/node_modules/npm/man/man3/npm-pack.3 +28 -0
- data/lib/node_modules/npm/man/man3/npm-prefix.3 +24 -0
- data/lib/node_modules/npm/man/man3/npm-prune.3 +27 -0
- data/lib/node_modules/npm/man/man3/npm-publish.3 +51 -0
- data/lib/node_modules/npm/man/man3/npm-rebuild.3 +22 -0
- data/lib/node_modules/npm/man/man3/npm-repo.3 +28 -0
- data/lib/node_modules/npm/man/man3/npm-restart.3 +37 -0
- data/lib/node_modules/npm/man/man3/npm-root.3 +24 -0
- data/lib/node_modules/npm/man/man3/npm-run-script.3 +48 -0
- data/lib/node_modules/npm/man/man3/npm-search.3 +64 -0
- data/lib/node_modules/npm/man/man3/npm-shrinkwrap.3 +30 -0
- data/lib/node_modules/npm/man/man3/npm-start.3 +21 -0
- data/lib/node_modules/npm/man/man3/npm-stop.3 +21 -0
- data/lib/node_modules/npm/man/man3/npm-submodule.3 +42 -0
- data/lib/node_modules/npm/man/man3/npm-tag.3 +31 -0
- data/lib/node_modules/npm/man/man3/npm-test.3 +25 -0
- data/lib/node_modules/npm/man/man3/npm-uninstall.3 +25 -0
- data/lib/node_modules/npm/man/man3/npm-unpublish.3 +30 -0
- data/lib/node_modules/npm/man/man3/npm-update.3 +18 -0
- data/lib/node_modules/npm/man/man3/npm-version.3 +27 -0
- data/lib/node_modules/npm/man/man3/npm-view.3 +176 -0
- data/lib/node_modules/npm/man/man3/npm-whoami.3 +24 -0
- data/lib/node_modules/npm/man/man3/npm.3 +162 -0
- data/lib/node_modules/npm/man/man5/npm-folders.5 +264 -0
- data/lib/node_modules/npm/man/man5/npm-global.5 +264 -0
- data/lib/node_modules/npm/man/man5/npm-json.5 +807 -0
- data/lib/node_modules/npm/man/man5/npmrc.5 +89 -0
- data/lib/node_modules/npm/man/man5/package.json.5 +807 -0
- data/lib/node_modules/npm/man/man7/npm-coding-style.7 +254 -0
- data/lib/node_modules/npm/man/man7/npm-config.7 +1445 -0
- data/lib/node_modules/npm/man/man7/npm-developers.7 +335 -0
- data/lib/node_modules/npm/man/man7/npm-disputes.7 +146 -0
- data/lib/node_modules/npm/man/man7/npm-faq.7 +479 -0
- data/lib/node_modules/npm/man/man7/npm-index.7 +307 -0
- data/lib/node_modules/npm/man/man7/npm-registry.7 +82 -0
- data/lib/node_modules/npm/man/man7/npm-scripts.7 +354 -0
- data/lib/node_modules/npm/man/man7/removing-npm.7 +107 -0
- data/lib/node_modules/npm/man/man7/semver.7 +172 -0
- data/lib/node_modules/npm/node_modules/abbrev/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/abbrev/README.md +23 -0
- data/lib/node_modules/npm/node_modules/abbrev/lib/abbrev.js +111 -0
- data/lib/node_modules/npm/node_modules/abbrev/package.json +25 -0
- data/lib/node_modules/npm/node_modules/ansi/README.md +91 -0
- data/lib/node_modules/npm/node_modules/ansi/color-spaces.pl +67 -0
- data/lib/node_modules/npm/node_modules/ansi/examples/beep/index.js +16 -0
- data/lib/node_modules/npm/node_modules/ansi/examples/clear/index.js +15 -0
- data/lib/node_modules/npm/node_modules/ansi/examples/cursorPosition.js +32 -0
- data/lib/node_modules/npm/node_modules/ansi/examples/progress/index.js +87 -0
- data/lib/node_modules/npm/node_modules/ansi/examples/starwars.js +46 -0
- data/lib/node_modules/npm/node_modules/ansi/lib/ansi.js +405 -0
- data/lib/node_modules/npm/node_modules/ansi/lib/newlines.js +71 -0
- data/lib/node_modules/npm/node_modules/ansi/package.json +50 -0
- data/lib/node_modules/npm/node_modules/ansicolors/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/ansicolors/README.md +62 -0
- data/lib/node_modules/npm/node_modules/ansicolors/ansicolors.js +65 -0
- data/lib/node_modules/npm/node_modules/ansicolors/package.json +34 -0
- data/lib/node_modules/npm/node_modules/ansistyles/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/ansistyles/README.md +71 -0
- data/lib/node_modules/npm/node_modules/ansistyles/ansistyles.js +38 -0
- data/lib/node_modules/npm/node_modules/ansistyles/package.json +38 -0
- data/lib/node_modules/npm/node_modules/archy/README.markdown +92 -0
- data/lib/node_modules/npm/node_modules/archy/index.js +35 -0
- data/lib/node_modules/npm/node_modules/archy/package.json +52 -0
- data/lib/node_modules/npm/node_modules/block-stream/LICENCE +25 -0
- data/lib/node_modules/npm/node_modules/block-stream/README.md +14 -0
- data/lib/node_modules/npm/node_modules/block-stream/bench/block-stream-pause.js +70 -0
- data/lib/node_modules/npm/node_modules/block-stream/bench/block-stream.js +68 -0
- data/lib/node_modules/npm/node_modules/block-stream/bench/dropper-pause.js +70 -0
- data/lib/node_modules/npm/node_modules/block-stream/bench/dropper.js +68 -0
- data/lib/node_modules/npm/node_modules/block-stream/block-stream.js +209 -0
- data/lib/node_modules/npm/node_modules/block-stream/package.json +35 -0
- data/lib/node_modules/npm/node_modules/child-process-close/README.md +45 -0
- data/lib/node_modules/npm/node_modules/child-process-close/index.js +48 -0
- data/lib/node_modules/npm/node_modules/child-process-close/package.json +37 -0
- data/lib/node_modules/npm/node_modules/chmodr/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/chmodr/README.md +3 -0
- data/lib/node_modules/npm/node_modules/chmodr/chmodr.js +54 -0
- data/lib/node_modules/npm/node_modules/chmodr/package.json +28 -0
- data/lib/node_modules/npm/node_modules/chownr/LICENCE +25 -0
- data/lib/node_modules/npm/node_modules/chownr/README.md +3 -0
- data/lib/node_modules/npm/node_modules/chownr/chownr.js +41 -0
- data/lib/node_modules/npm/node_modules/chownr/package.json +42 -0
- data/lib/node_modules/npm/node_modules/cmd-shim/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/cmd-shim/README.md +42 -0
- data/lib/node_modules/npm/node_modules/cmd-shim/index.js +180 -0
- data/lib/node_modules/npm/node_modules/cmd-shim/package.json +35 -0
- data/lib/node_modules/npm/node_modules/columnify/Readme.md +189 -0
- data/lib/node_modules/npm/node_modules/columnify/index.js +210 -0
- data/lib/node_modules/npm/node_modules/columnify/package.json +42 -0
- data/lib/node_modules/npm/node_modules/columnify/utils.js +76 -0
- data/lib/node_modules/npm/node_modules/editor/LICENSE +18 -0
- data/lib/node_modules/npm/node_modules/editor/README.markdown +54 -0
- data/lib/node_modules/npm/node_modules/editor/example/beep.json +5 -0
- data/lib/node_modules/npm/node_modules/editor/example/edit.js +4 -0
- data/lib/node_modules/npm/node_modules/editor/index.js +26 -0
- data/lib/node_modules/npm/node_modules/editor/package.json +43 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/LICENCE +25 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/README.md +18 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/example/bundle.js +13 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/example/dir-tar.js +19 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/example/dir.js +25 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/example/example.js +12 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/example/ig-tar.js +19 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/example/tar.js +25 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/fstream-npm.js +323 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/README.md +22 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/example/basic.js +13 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/ignore.js +275 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json +40 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/package.json +27 -0
- data/lib/node_modules/npm/node_modules/fstream/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/fstream/README.md +76 -0
- data/lib/node_modules/npm/node_modules/fstream/examples/filter-pipe.js +131 -0
- data/lib/node_modules/npm/node_modules/fstream/examples/pipe.js +115 -0
- data/lib/node_modules/npm/node_modules/fstream/examples/reader.js +54 -0
- data/lib/node_modules/npm/node_modules/fstream/examples/symlink-write.js +24 -0
- data/lib/node_modules/npm/node_modules/fstream/fstream.js +31 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/abstract.js +85 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/collect.js +67 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/dir-reader.js +251 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js +171 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/file-reader.js +147 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/file-writer.js +100 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/get-type.js +32 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/link-reader.js +54 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/link-writer.js +95 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/proxy-reader.js +93 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/proxy-writer.js +109 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/reader.js +260 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/socket-reader.js +38 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/writer.js +389 -0
- data/lib/node_modules/npm/node_modules/fstream/package.json +43 -0
- data/lib/node_modules/npm/node_modules/github-url-from-git/History.md +10 -0
- data/lib/node_modules/npm/node_modules/github-url-from-git/Makefile +5 -0
- data/lib/node_modules/npm/node_modules/github-url-from-git/Readme.md +41 -0
- data/lib/node_modules/npm/node_modules/github-url-from-git/index.js +12 -0
- data/lib/node_modules/npm/node_modules/github-url-from-git/package.json +31 -0
- data/lib/node_modules/npm/node_modules/github-url-from-git/test.js +40 -0
- data/lib/node_modules/npm/node_modules/github-url-from-username-repo/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/github-url-from-username-repo/README.md +14 -0
- data/lib/node_modules/npm/node_modules/github-url-from-username-repo/index.js +9 -0
- data/lib/node_modules/npm/node_modules/github-url-from-username-repo/package.json +33 -0
- data/lib/node_modules/npm/node_modules/glob/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/glob/README.md +250 -0
- data/lib/node_modules/npm/node_modules/glob/examples/g.js +9 -0
- data/lib/node_modules/npm/node_modules/glob/examples/usr-local.js +9 -0
- data/lib/node_modules/npm/node_modules/glob/glob.js +680 -0
- data/lib/node_modules/npm/node_modules/glob/package.json +39 -0
- data/lib/node_modules/npm/node_modules/graceful-fs/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/graceful-fs/README.md +26 -0
- data/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js +161 -0
- data/lib/node_modules/npm/node_modules/graceful-fs/package.json +48 -0
- data/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js +228 -0
- data/lib/node_modules/npm/node_modules/inherits/LICENSE +16 -0
- data/lib/node_modules/npm/node_modules/inherits/README.md +42 -0
- data/lib/node_modules/npm/node_modules/inherits/inherits.js +1 -0
- data/lib/node_modules/npm/node_modules/inherits/inherits_browser.js +23 -0
- data/lib/node_modules/npm/node_modules/inherits/package.json +32 -0
- data/lib/node_modules/npm/node_modules/inherits/test.js +25 -0
- data/lib/node_modules/npm/node_modules/ini/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/ini/README.md +79 -0
- data/lib/node_modules/npm/node_modules/ini/ini.js +166 -0
- data/lib/node_modules/npm/node_modules/ini/package.json +29 -0
- data/lib/node_modules/npm/node_modules/init-package-json/README.md +43 -0
- data/lib/node_modules/npm/node_modules/init-package-json/default-input.js +181 -0
- data/lib/node_modules/npm/node_modules/init-package-json/example/example-basic.js +8 -0
- data/lib/node_modules/npm/node_modules/init-package-json/example/example-default.js +7 -0
- data/lib/node_modules/npm/node_modules/init-package-json/example/example-npm.js +13 -0
- data/lib/node_modules/npm/node_modules/init-package-json/example/init/basic-init.js +1 -0
- data/lib/node_modules/npm/node_modules/init-package-json/init-package-json.js +129 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/LICENSE +15 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/README.md +133 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/index.js +11 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/npm-init/README.md +8 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/npm-init/init-input.js +191 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/npm-init/init.js +37 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/npm-init/package.json +10 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/substack-input.js +61 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/package.json +32 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/promzard.js +216 -0
- data/lib/node_modules/npm/node_modules/init-package-json/package.json +48 -0
- data/lib/node_modules/npm/node_modules/lockfile/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/lockfile/README.md +81 -0
- data/lib/node_modules/npm/node_modules/lockfile/lockfile.js +272 -0
- data/lib/node_modules/npm/node_modules/lockfile/package.json +45 -0
- data/lib/node_modules/npm/node_modules/lru-cache/CONTRIBUTORS +14 -0
- data/lib/node_modules/npm/node_modules/lru-cache/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/lru-cache/README.md +97 -0
- data/lib/node_modules/npm/node_modules/lru-cache/lib/lru-cache.js +252 -0
- data/lib/node_modules/npm/node_modules/lru-cache/package.json +33 -0
- data/lib/node_modules/npm/node_modules/minimatch/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/minimatch/README.md +218 -0
- data/lib/node_modules/npm/node_modules/minimatch/minimatch.js +1055 -0
- data/lib/node_modules/npm/node_modules/minimatch/node_modules/sigmund/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/minimatch/node_modules/sigmund/README.md +53 -0
- data/lib/node_modules/npm/node_modules/minimatch/node_modules/sigmund/bench.js +283 -0
- data/lib/node_modules/npm/node_modules/minimatch/node_modules/sigmund/package.json +42 -0
- data/lib/node_modules/npm/node_modules/minimatch/node_modules/sigmund/sigmund.js +39 -0
- data/lib/node_modules/npm/node_modules/minimatch/package.json +40 -0
- data/lib/node_modules/npm/node_modules/mkdirp/LICENSE +21 -0
- data/lib/node_modules/npm/node_modules/mkdirp/README.markdown +63 -0
- data/lib/node_modules/npm/node_modules/mkdirp/examples/pow.js +6 -0
- data/lib/node_modules/npm/node_modules/mkdirp/index.js +82 -0
- data/lib/node_modules/npm/node_modules/mkdirp/package.json +33 -0
- data/lib/node_modules/npm/node_modules/node-gyp/LICENSE +24 -0
- data/lib/node_modules/npm/node_modules/node-gyp/README.md +163 -0
- data/lib/node_modules/npm/node_modules/node-gyp/addon.gypi +59 -0
- data/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js +133 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/AUTHORS +10 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/DEPS +24 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/OWNERS +1 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/PRESUBMIT.py +115 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/buildbot/buildbot_run.py +148 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/codereview.settings +10 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc +12 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp +7 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp.bat +5 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_dummy.c +7 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py +18 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/gyptest.py +274 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py +340 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py +208 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py +1051 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py +1482 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py +58 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py +147 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py +267 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py +407 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py +537 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py +513 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common_test.py +72 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py +157 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py +103 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py +49 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py +0 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py +1069 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py +81 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py +308 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py +87 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py +56 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +2172 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py +3270 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py +37 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +2150 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py +44 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py +1224 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py +23 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py +2809 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input_test.py +90 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py +264 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py +870 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py +160 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py +176 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +1324 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py +2888 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py +69 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylintrc +307 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/samples/samples +81 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/samples/samples.bat +5 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/setup.py +19 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/README +15 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/Xcode/README +5 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.pbfilespec +27 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.xclangspec +226 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/README +12 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/gyp-tests.el +63 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/gyp.el +252 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/run-unit-tests.sh +7 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp +1105 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp.fontified +1107 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/graphviz.py +100 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py +155 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_sln.py +168 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_vcproj.py +329 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/build.js +275 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/clean.js +22 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js +344 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/install.js +362 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/list.js +33 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js +225 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/rebuild.js +16 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/remove.js +56 -0
- data/lib/node_modules/npm/node_modules/node-gyp/package.json +55 -0
- data/lib/node_modules/npm/node_modules/nopt/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/nopt/README.md +210 -0
- data/lib/node_modules/npm/node_modules/nopt/bin/nopt.js +51 -0
- data/lib/node_modules/npm/node_modules/nopt/examples/my-program.js +30 -0
- data/lib/node_modules/npm/node_modules/nopt/lib/nopt.js +407 -0
- data/lib/node_modules/npm/node_modules/nopt/package.json +39 -0
- data/lib/node_modules/npm/node_modules/npm-install-checks/LICENSE +234 -0
- data/lib/node_modules/npm/node_modules/npm-install-checks/README.md +25 -0
- data/lib/node_modules/npm/node_modules/npm-install-checks/index.js +146 -0
- data/lib/node_modules/npm/node_modules/npm-install-checks/package.json +43 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/README.md +176 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/index.js +55 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/adduser.js +138 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/bugs.js +9 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/deprecate.js +28 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js +184 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/publish.js +156 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js +270 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/star.js +29 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/stars.js +9 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/tag.js +6 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/unpublish.js +104 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/upload.js +22 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/package.json +43 -0
- data/lib/node_modules/npm/node_modules/npm-user-validate/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/npm-user-validate/README.md +6 -0
- data/lib/node_modules/npm/node_modules/npm-user-validate/npm-user-validate.js +49 -0
- data/lib/node_modules/npm/node_modules/npm-user-validate/package.json +37 -0
- data/lib/node_modules/npm/node_modules/npmconf/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/npmconf/README.md +33 -0
- data/lib/node_modules/npm/node_modules/npmconf/config-defs.js +353 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/LICENCE +22 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/index.js +282 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/README.md +3 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/package.json +33 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/proto-list.js +81 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/package.json +32 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/readme.markdown +228 -0
- data/lib/node_modules/npm/node_modules/npmconf/npmconf.js +338 -0
- data/lib/node_modules/npm/node_modules/npmconf/package.json +50 -0
- data/lib/node_modules/npm/node_modules/npmlog/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/npmlog/README.md +153 -0
- data/lib/node_modules/npm/node_modules/npmlog/example.js +39 -0
- data/lib/node_modules/npm/node_modules/npmlog/log.js +154 -0
- data/lib/node_modules/npm/node_modules/npmlog/package.json +32 -0
- data/lib/node_modules/npm/node_modules/once/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/once/README.md +51 -0
- data/lib/node_modules/npm/node_modules/once/once.js +20 -0
- data/lib/node_modules/npm/node_modules/once/package.json +39 -0
- data/lib/node_modules/npm/node_modules/opener/LICENSE.txt +14 -0
- data/lib/node_modules/npm/node_modules/opener/README.md +44 -0
- data/lib/node_modules/npm/node_modules/opener/opener.js +55 -0
- data/lib/node_modules/npm/node_modules/opener/package.json +34 -0
- data/lib/node_modules/npm/node_modules/osenv/LICENSE +25 -0
- data/lib/node_modules/npm/node_modules/osenv/README.md +63 -0
- data/lib/node_modules/npm/node_modules/osenv/osenv.js +80 -0
- data/lib/node_modules/npm/node_modules/osenv/package.json +38 -0
- data/lib/node_modules/npm/node_modules/path-is-inside/LICENSE.txt +14 -0
- data/lib/node_modules/npm/node_modules/path-is-inside/README.md +35 -0
- data/lib/node_modules/npm/node_modules/path-is-inside/lib/path-is-inside.js +24 -0
- data/lib/node_modules/npm/node_modules/path-is-inside/package.json +39 -0
- data/lib/node_modules/npm/node_modules/read-installed/LICENSE +16 -0
- data/lib/node_modules/npm/node_modules/read-installed/README.md +25 -0
- data/lib/node_modules/npm/node_modules/read-installed/package.json +39 -0
- data/lib/node_modules/npm/node_modules/read-installed/read-installed.js +338 -0
- data/lib/node_modules/npm/node_modules/read-package-json/LICENSE +15 -0
- data/lib/node_modules/npm/node_modules/read-package-json/README.md +166 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/AUTHORS +4 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/LICENSE +30 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/README.md +101 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/core_module_names.json +29 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/extract_description.js +14 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js +392 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/normalize.js +36 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/safe_format.js +9 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/typos.json +25 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/warning_messages.json +28 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/package.json +53 -0
- data/lib/node_modules/npm/node_modules/read-package-json/package.json +39 -0
- data/lib/node_modules/npm/node_modules/read-package-json/read-json.js +368 -0
- data/lib/node_modules/npm/node_modules/read/LICENCE +25 -0
- data/lib/node_modules/npm/node_modules/read/README.md +53 -0
- data/lib/node_modules/npm/node_modules/read/example/example.js +13 -0
- data/lib/node_modules/npm/node_modules/read/lib/read.js +113 -0
- data/lib/node_modules/npm/node_modules/read/node_modules/mute-stream/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/read/node_modules/mute-stream/README.md +68 -0
- data/lib/node_modules/npm/node_modules/read/node_modules/mute-stream/mute.js +140 -0
- data/lib/node_modules/npm/node_modules/read/node_modules/mute-stream/package.json +37 -0
- data/lib/node_modules/npm/node_modules/read/package.json +35 -0
- data/lib/node_modules/npm/node_modules/read/rs.js +4 -0
- data/lib/node_modules/npm/node_modules/request/LICENSE +55 -0
- data/lib/node_modules/npm/node_modules/request/README.md +364 -0
- data/lib/node_modules/npm/node_modules/request/index.js +157 -0
- data/lib/node_modules/npm/node_modules/request/lib/copy.js +8 -0
- data/lib/node_modules/npm/node_modules/request/lib/debug.js +7 -0
- data/lib/node_modules/npm/node_modules/request/lib/getSafe.js +34 -0
- data/lib/node_modules/npm/node_modules/request/lib/optional.js +5 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/aws-sign2/LICENSE +55 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/aws-sign2/README.md +4 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/aws-sign2/index.js +202 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/aws-sign2/package.json +28 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/forever-agent/LICENSE +55 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/forever-agent/README.md +4 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/forever-agent/index.js +119 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/forever-agent/package.json +28 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/License +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/Readme.md +163 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/lib/form_data.js +325 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/LICENSE +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/README.md +1414 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/component.json +11 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js +955 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/package.json +43 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/License +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/Makefile +7 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md +132 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js +185 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile +7 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md +154 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js +99 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json +31 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json +32 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/package.json +46 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/LICENSE +24 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/Makefile +10 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/README.md +627 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/example/usage.js +78 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/images/hawk.png +0 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/images/logo.png +0 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/index.js +1 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/browser.js +485 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/client.js +367 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/crypto.js +111 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/index.js +15 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/server.js +524 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/utils.js +183 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE +24 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/Makefile +11 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/README.md +6 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/images/boom.png +0 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/index.js +1 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js +207 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/package.json +47 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE +24 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile +11 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md +6 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js +1 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js +68 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json +48 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE +33 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile +10 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/README.md +436 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png +0 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/index.js +1 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js +132 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js +585 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/package.json +49 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE +24 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile +11 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/README.md +68 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js +16 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/examples/time.js +25 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/index.js +1 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js +409 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/package.json +48 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/package.json +53 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/LICENSE +18 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/README.md +75 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/http_signing.md +296 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/lib/index.js +25 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/lib/parser.js +304 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/lib/signer.js +179 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/lib/util.js +249 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/lib/verify.js +42 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/LICENSE +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/README.md +50 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/errors.js +13 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/index.js +27 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js +267 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/types.js +36 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/writer.js +317 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js +20 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json +43 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/reader.test.js +172 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js +296 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md +126 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js +196 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json +20 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG +71 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE +24 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/README +82 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/README.old +298 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/ctf.js +245 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/ctio.js +1485 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/ctype.js +944 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/man/man3ctype/ctio.3ctype +241 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json +18 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsl.conf +129 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsstyle +839 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/float.json +13 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/int.json +13 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/psinfo.json +104 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/struct.json +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.fail.js +39 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.float.js +14 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.int.js +14 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.psinfo.js +17 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.struct.js +18 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.typedef.js +15 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/typedef.json +14 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.rfloat.js +767 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.wfloat.js +753 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.64.js +638 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.rint.js +101 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wbounds.js +53 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wint.js +92 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.64.js +451 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.roundtrip.js +81 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.ruint.js +95 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.wuint.js +156 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicr.js +50 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicw.js +44 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.char.js +42 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.endian.js +45 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.oldwrite.js +28 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.readSize.js +128 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.structw.js +28 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.writeStruct.js +31 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/package.json +36 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/json-stringify-safe/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/json-stringify-safe/README.md +49 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/json-stringify-safe/package.json +33 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/json-stringify-safe/stringify.js +39 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/json-stringify-safe/test.js +128 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/LICENSE +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/README.md +66 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/mime.js +114 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/package.json +36 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/test.js +84 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/types/mime.types +1588 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/types/node.types +77 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/LICENSE.md +2 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/README.md +207 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/benchmark/README.md +53 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu +174 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/benchmark/bench.sh +34 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c +34 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js +84 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/component.json +18 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/package.json +35 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/uuid.js +245 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/oauth-sign/LICENSE +55 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/oauth-sign/README.md +4 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/oauth-sign/index.js +43 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/oauth-sign/package.json +31 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/oauth-sign/test.js +49 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/qs/Readme.md +58 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/qs/index.js +366 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/qs/package.json +38 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/LICENSE +78 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/README.md +380 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js +230 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/lib/cookie.js +947 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/lib/memstore.js +102 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js +69 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-GPL.txt +278 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt +20 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json +73 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js +508 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js +2 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/LICENSE.txt +20 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/README.md +35 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/README.md +69 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/parse.php +35 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/docdown.php +38 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Alias.php +226 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Entry.php +442 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Generator.php +563 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/package.json +46 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/public-suffix.txt +5229 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/test.js +1340 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/LICENSE +55 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/README.md +4 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/index.js +227 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/package.json +28 -0
- data/lib/node_modules/npm/node_modules/request/package.json +57 -0
- data/lib/node_modules/npm/node_modules/request/request.js +1260 -0
- data/lib/node_modules/npm/node_modules/retry/License +21 -0
- data/lib/node_modules/npm/node_modules/retry/Makefile +7 -0
- data/lib/node_modules/npm/node_modules/retry/Readme.md +167 -0
- data/lib/node_modules/npm/node_modules/retry/equation.gif +0 -0
- data/lib/node_modules/npm/node_modules/retry/example/dns.js +31 -0
- data/lib/node_modules/npm/node_modules/retry/index.js +1 -0
- data/lib/node_modules/npm/node_modules/retry/lib/retry.js +50 -0
- data/lib/node_modules/npm/node_modules/retry/lib/retry_operation.js +109 -0
- data/lib/node_modules/npm/node_modules/retry/package.json +29 -0
- data/lib/node_modules/npm/node_modules/rimraf/AUTHORS +6 -0
- data/lib/node_modules/npm/node_modules/rimraf/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/rimraf/README.md +30 -0
- data/lib/node_modules/npm/node_modules/rimraf/bin.js +33 -0
- data/lib/node_modules/npm/node_modules/rimraf/package.json +56 -0
- data/lib/node_modules/npm/node_modules/rimraf/rimraf.js +178 -0
- data/lib/node_modules/npm/node_modules/semver/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/semver/Makefile +24 -0
- data/lib/node_modules/npm/node_modules/semver/README.md +142 -0
- data/lib/node_modules/npm/node_modules/semver/bin/semver +124 -0
- data/lib/node_modules/npm/node_modules/semver/foot.js +6 -0
- data/lib/node_modules/npm/node_modules/semver/head.js +2 -0
- data/lib/node_modules/npm/node_modules/semver/package.json +32 -0
- data/lib/node_modules/npm/node_modules/semver/semver.browser.js +1007 -0
- data/lib/node_modules/npm/node_modules/semver/semver.browser.js.gz +0 -0
- data/lib/node_modules/npm/node_modules/semver/semver.js +1011 -0
- data/lib/node_modules/npm/node_modules/semver/semver.min.js +1 -0
- data/lib/node_modules/npm/node_modules/semver/semver.min.js.gz +0 -0
- data/lib/node_modules/npm/node_modules/sha/LICENSE +46 -0
- data/lib/node_modules/npm/node_modules/sha/README.md +49 -0
- data/lib/node_modules/npm/node_modules/sha/index.js +120 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/README.md +768 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/duplex.js +1 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/float.patch +68 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_duplex.js +69 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_passthrough.js +41 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js +927 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js +205 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js +369 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/package.json +36 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/passthrough.js +1 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/readable.js +6 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/transform.js +1 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/writable.js +1 -0
- data/lib/node_modules/npm/node_modules/sha/package.json +32 -0
- data/lib/node_modules/npm/node_modules/slide/LICENSE +15 -0
- data/lib/node_modules/npm/node_modules/slide/README.md +143 -0
- data/lib/node_modules/npm/node_modules/slide/index.js +1 -0
- data/lib/node_modules/npm/node_modules/slide/lib/async-map-ordered.js +65 -0
- data/lib/node_modules/npm/node_modules/slide/lib/async-map.js +56 -0
- data/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js +16 -0
- data/lib/node_modules/npm/node_modules/slide/lib/chain.js +20 -0
- data/lib/node_modules/npm/node_modules/slide/lib/slide.js +3 -0
- data/lib/node_modules/npm/node_modules/slide/package.json +35 -0
- data/lib/node_modules/npm/node_modules/tar/LICENCE +25 -0
- data/lib/node_modules/npm/node_modules/tar/README.md +46 -0
- data/lib/node_modules/npm/node_modules/tar/examples/extracter.js +11 -0
- data/lib/node_modules/npm/node_modules/tar/examples/reader.js +36 -0
- data/lib/node_modules/npm/node_modules/tar/lib/buffer-entry.js +30 -0
- data/lib/node_modules/npm/node_modules/tar/lib/entry-writer.js +169 -0
- data/lib/node_modules/npm/node_modules/tar/lib/entry.js +213 -0
- data/lib/node_modules/npm/node_modules/tar/lib/extended-header-writer.js +191 -0
- data/lib/node_modules/npm/node_modules/tar/lib/extended-header.js +140 -0
- data/lib/node_modules/npm/node_modules/tar/lib/extract.js +78 -0
- data/lib/node_modules/npm/node_modules/tar/lib/global-header-writer.js +14 -0
- data/lib/node_modules/npm/node_modules/tar/lib/header.js +385 -0
- data/lib/node_modules/npm/node_modules/tar/lib/pack.js +231 -0
- data/lib/node_modules/npm/node_modules/tar/lib/parse.js +270 -0
- data/lib/node_modules/npm/node_modules/tar/package.json +40 -0
- data/lib/node_modules/npm/node_modules/tar/tar.js +173 -0
- data/lib/node_modules/npm/node_modules/text-table/LICENSE +18 -0
- data/lib/node_modules/npm/node_modules/text-table/example/align.js +8 -0
- data/lib/node_modules/npm/node_modules/text-table/example/center.js +8 -0
- data/lib/node_modules/npm/node_modules/text-table/example/dotalign.js +9 -0
- data/lib/node_modules/npm/node_modules/text-table/example/doubledot.js +11 -0
- data/lib/node_modules/npm/node_modules/text-table/example/table.js +6 -0
- data/lib/node_modules/npm/node_modules/text-table/index.js +86 -0
- data/lib/node_modules/npm/node_modules/text-table/package.json +52 -0
- data/lib/node_modules/npm/node_modules/text-table/readme.markdown +134 -0
- data/lib/node_modules/npm/node_modules/uid-number/LICENCE +25 -0
- data/lib/node_modules/npm/node_modules/uid-number/README.md +17 -0
- data/lib/node_modules/npm/node_modules/uid-number/get-uid-gid.js +24 -0
- data/lib/node_modules/npm/node_modules/uid-number/package.json +35 -0
- data/lib/node_modules/npm/node_modules/uid-number/uid-number.js +54 -0
- data/lib/node_modules/npm/node_modules/which/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/which/README.md +5 -0
- data/lib/node_modules/npm/node_modules/which/bin/which +14 -0
- data/lib/node_modules/npm/node_modules/which/package.json +34 -0
- data/lib/node_modules/npm/node_modules/which/which.js +104 -0
- data/lib/node_modules/npm/package.json +155 -0
- data/lib/node_modules/npm/scripts/clean-old.sh +165 -0
- data/lib/node_modules/npm/scripts/doc-build.sh +84 -0
- data/lib/node_modules/npm/scripts/index-build.js +62 -0
- data/lib/node_modules/npm/scripts/install.sh +313 -0
- data/lib/node_modules/npm/scripts/release.sh +36 -0
- data/lib/node_modules/npm/scripts/relocate.sh +26 -0
- metadata +1052 -36
- checksums.yaml +0 -7
@@ -0,0 +1,1340 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright GoInstant, Inc. and other contributors. All rights reserved.
|
3
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
* of this software and associated documentation files (the "Software"), to
|
5
|
+
* deal in the Software without restriction, including without limitation the
|
6
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
7
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
8
|
+
* furnished to do so, subject to the following conditions:
|
9
|
+
*
|
10
|
+
* The above copyright notice and this permission notice shall be included in
|
11
|
+
* all copies or substantial portions of the Software.
|
12
|
+
*
|
13
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
18
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
19
|
+
* IN THE SOFTWARE.
|
20
|
+
*/
|
21
|
+
|
22
|
+
var vows = require('vows');
|
23
|
+
var assert = require('assert');
|
24
|
+
var async = require('async');
|
25
|
+
|
26
|
+
// NOTE use require("tough-cookie") in your own code:
|
27
|
+
var tough = require('./lib/cookie');
|
28
|
+
var Cookie = tough.Cookie;
|
29
|
+
var CookieJar = tough.CookieJar;
|
30
|
+
|
31
|
+
|
32
|
+
function dateVows(table) {
|
33
|
+
var theVows = { };
|
34
|
+
var keys = Object.keys(table).forEach(function(date) {
|
35
|
+
var expect = table[date];
|
36
|
+
theVows[date] = function() {
|
37
|
+
var got = tough.parseDate(date) ? 'valid' : 'invalid';
|
38
|
+
assert.equal(got, expect ? 'valid' : 'invalid');
|
39
|
+
};
|
40
|
+
});
|
41
|
+
return { "date parsing": theVows };
|
42
|
+
}
|
43
|
+
|
44
|
+
function matchVows(func,table) {
|
45
|
+
var theVows = {};
|
46
|
+
table.forEach(function(item) {
|
47
|
+
var str = item[0];
|
48
|
+
var dom = item[1];
|
49
|
+
var expect = item[2];
|
50
|
+
var label = str+(expect?" matches ":" doesn't match ")+dom;
|
51
|
+
theVows[label] = function() {
|
52
|
+
assert.equal(func(str,dom),expect);
|
53
|
+
};
|
54
|
+
});
|
55
|
+
return theVows;
|
56
|
+
}
|
57
|
+
|
58
|
+
function defaultPathVows(table) {
|
59
|
+
var theVows = {};
|
60
|
+
table.forEach(function(item) {
|
61
|
+
var str = item[0];
|
62
|
+
var expect = item[1];
|
63
|
+
var label = str+" gives "+expect;
|
64
|
+
theVows[label] = function() {
|
65
|
+
assert.equal(tough.defaultPath(str),expect);
|
66
|
+
};
|
67
|
+
});
|
68
|
+
return theVows;
|
69
|
+
}
|
70
|
+
|
71
|
+
var atNow = Date.now();
|
72
|
+
function at(offset) { return {now: new Date(atNow+offset)} }
|
73
|
+
|
74
|
+
vows.describe('Cookie Jar')
|
75
|
+
.addBatch({
|
76
|
+
"all defined": function() {
|
77
|
+
assert.ok(Cookie);
|
78
|
+
assert.ok(CookieJar);
|
79
|
+
},
|
80
|
+
})
|
81
|
+
.addBatch(
|
82
|
+
dateVows({
|
83
|
+
"Wed, 09 Jun 2021 10:18:14 GMT": true,
|
84
|
+
"Wed, 09 Jun 2021 22:18:14 GMT": true,
|
85
|
+
"Tue, 18 Oct 2011 07:42:42.123 GMT": true,
|
86
|
+
"18 Oct 2011 07:42:42 GMT": true,
|
87
|
+
"8 Oct 2011 7:42:42 GMT": true,
|
88
|
+
"8 Oct 2011 7:2:42 GMT": false,
|
89
|
+
"Oct 18 2011 07:42:42 GMT": true,
|
90
|
+
"Tue Oct 18 2011 07:05:03 GMT+0000 (GMT)": true,
|
91
|
+
"09 Jun 2021 10:18:14 GMT": true,
|
92
|
+
"99 Jix 3038 48:86:72 ZMT": false,
|
93
|
+
'01 Jan 1970 00:00:00 GMT': true,
|
94
|
+
'01 Jan 1600 00:00:00 GMT': false, // before 1601
|
95
|
+
'01 Jan 1601 00:00:00 GMT': true,
|
96
|
+
'10 Feb 81 13:00:00 GMT': true, // implicit year
|
97
|
+
'Thu, 01 Jan 1970 00:00:010 GMT': true, // strange time, non-strict OK
|
98
|
+
'Thu, 17-Apr-2014 02:12:29 GMT': true, // dashes
|
99
|
+
'Thu, 17-Apr-2014 02:12:29 UTC': true, // dashes and UTC
|
100
|
+
})
|
101
|
+
)
|
102
|
+
.addBatch({
|
103
|
+
"strict date parse of Thu, 01 Jan 1970 00:00:010 GMT": {
|
104
|
+
topic: function() {
|
105
|
+
return tough.parseDate('Thu, 01 Jan 1970 00:00:010 GMT', true) ? true : false;
|
106
|
+
},
|
107
|
+
"invalid": function(date) {
|
108
|
+
assert.equal(date,false);
|
109
|
+
},
|
110
|
+
}
|
111
|
+
})
|
112
|
+
.addBatch({
|
113
|
+
"formatting": {
|
114
|
+
"a simple cookie": {
|
115
|
+
topic: function() {
|
116
|
+
var c = new Cookie();
|
117
|
+
c.key = 'a';
|
118
|
+
c.value = 'b';
|
119
|
+
return c;
|
120
|
+
},
|
121
|
+
"validates": function(c) {
|
122
|
+
assert.ok(c.validate());
|
123
|
+
},
|
124
|
+
"to string": function(c) {
|
125
|
+
assert.equal(c.toString(), 'a=b');
|
126
|
+
},
|
127
|
+
},
|
128
|
+
"a cookie with spaces in the value": {
|
129
|
+
topic: function() {
|
130
|
+
var c = new Cookie();
|
131
|
+
c.key = 'a';
|
132
|
+
c.value = 'beta gamma';
|
133
|
+
return c;
|
134
|
+
},
|
135
|
+
"doesn't validate": function(c) {
|
136
|
+
assert.ok(!c.validate());
|
137
|
+
},
|
138
|
+
"to string": function(c) {
|
139
|
+
assert.equal(c.toString(), 'a="beta gamma"');
|
140
|
+
},
|
141
|
+
},
|
142
|
+
"with an empty value and HttpOnly": {
|
143
|
+
topic: function() {
|
144
|
+
var c = new Cookie();
|
145
|
+
c.key = 'a';
|
146
|
+
c.httpOnly = true;
|
147
|
+
return c;
|
148
|
+
},
|
149
|
+
"to string": function(c) {
|
150
|
+
assert.equal(c.toString(), 'a=; HttpOnly');
|
151
|
+
}
|
152
|
+
},
|
153
|
+
"with an expiry": {
|
154
|
+
topic: function() {
|
155
|
+
var c = new Cookie();
|
156
|
+
c.key = 'a';
|
157
|
+
c.value = 'b';
|
158
|
+
c.setExpires("Oct 18 2011 07:05:03 GMT");
|
159
|
+
return c;
|
160
|
+
},
|
161
|
+
"validates": function(c) {
|
162
|
+
assert.ok(c.validate());
|
163
|
+
},
|
164
|
+
"to string": function(c) {
|
165
|
+
assert.equal(c.toString(), 'a=b; Expires=Tue, 18 Oct 2011 07:05:03 GMT');
|
166
|
+
},
|
167
|
+
"to short string": function(c) {
|
168
|
+
assert.equal(c.cookieString(), 'a=b');
|
169
|
+
},
|
170
|
+
},
|
171
|
+
"with a max-age": {
|
172
|
+
topic: function() {
|
173
|
+
var c = new Cookie();
|
174
|
+
c.key = 'a';
|
175
|
+
c.value = 'b';
|
176
|
+
c.setExpires("Oct 18 2011 07:05:03 GMT");
|
177
|
+
c.maxAge = 12345;
|
178
|
+
return c;
|
179
|
+
},
|
180
|
+
"validates": function(c) {
|
181
|
+
assert.ok(c.validate()); // mabe this one *shouldn't*?
|
182
|
+
},
|
183
|
+
"to string": function(c) {
|
184
|
+
assert.equal(c.toString(), 'a=b; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Max-Age=12345');
|
185
|
+
},
|
186
|
+
},
|
187
|
+
"with a bunch of things": function() {
|
188
|
+
var c = new Cookie();
|
189
|
+
c.key = 'a';
|
190
|
+
c.value = 'b';
|
191
|
+
c.setExpires("Oct 18 2011 07:05:03 GMT");
|
192
|
+
c.maxAge = 12345;
|
193
|
+
c.domain = 'example.com';
|
194
|
+
c.path = '/foo';
|
195
|
+
c.secure = true;
|
196
|
+
c.httpOnly = true;
|
197
|
+
c.extensions = ['MyExtension'];
|
198
|
+
assert.equal(c.toString(), 'a=b; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Max-Age=12345; Domain=example.com; Path=/foo; Secure; HttpOnly; MyExtension');
|
199
|
+
},
|
200
|
+
"a host-only cookie": {
|
201
|
+
topic: function() {
|
202
|
+
var c = new Cookie();
|
203
|
+
c.key = 'a';
|
204
|
+
c.value = 'b';
|
205
|
+
c.hostOnly = true;
|
206
|
+
c.domain = 'shouldnt-stringify.example.com';
|
207
|
+
c.path = '/should-stringify';
|
208
|
+
return c;
|
209
|
+
},
|
210
|
+
"validates": function(c) {
|
211
|
+
assert.ok(c.validate());
|
212
|
+
},
|
213
|
+
"to string": function(c) {
|
214
|
+
assert.equal(c.toString(), 'a=b; Path=/should-stringify');
|
215
|
+
},
|
216
|
+
},
|
217
|
+
"minutes are '10'": {
|
218
|
+
topic: function() {
|
219
|
+
var c = new Cookie();
|
220
|
+
c.key = 'a';
|
221
|
+
c.value = 'b';
|
222
|
+
c.expires = new Date(1284113410000);
|
223
|
+
return c;
|
224
|
+
},
|
225
|
+
"validates": function(c) {
|
226
|
+
assert.ok(c.validate());
|
227
|
+
},
|
228
|
+
"to string": function(c) {
|
229
|
+
var str = c.toString();
|
230
|
+
assert.notEqual(str, 'a=b; Expires=Fri, 010 Sep 2010 010:010:010 GMT');
|
231
|
+
assert.equal(str, 'a=b; Expires=Fri, 10 Sep 2010 10:10:10 GMT');
|
232
|
+
},
|
233
|
+
}
|
234
|
+
}
|
235
|
+
})
|
236
|
+
.addBatch({
|
237
|
+
"TTL with max-age": function() {
|
238
|
+
var c = new Cookie();
|
239
|
+
c.maxAge = 123;
|
240
|
+
assert.equal(c.TTL(), 123000);
|
241
|
+
assert.equal(c.expiryTime(new Date(9000000)), 9123000);
|
242
|
+
},
|
243
|
+
"TTL with zero max-age": function() {
|
244
|
+
var c = new Cookie();
|
245
|
+
c.key = 'a'; c.value = 'b';
|
246
|
+
c.maxAge = 0; // should be treated as "earliest representable"
|
247
|
+
assert.equal(c.TTL(), 0);
|
248
|
+
assert.equal(c.expiryTime(new Date(9000000)), -Infinity);
|
249
|
+
assert.ok(!c.validate()); // not valid, really: non-zero-digit *DIGIT
|
250
|
+
},
|
251
|
+
"TTL with negative max-age": function() {
|
252
|
+
var c = new Cookie();
|
253
|
+
c.key = 'a'; c.value = 'b';
|
254
|
+
c.maxAge = -1; // should be treated as "earliest representable"
|
255
|
+
assert.equal(c.TTL(), 0);
|
256
|
+
assert.equal(c.expiryTime(new Date(9000000)), -Infinity);
|
257
|
+
assert.ok(!c.validate()); // not valid, really: non-zero-digit *DIGIT
|
258
|
+
},
|
259
|
+
"TTL with max-age and expires": function() {
|
260
|
+
var c = new Cookie();
|
261
|
+
c.maxAge = 123;
|
262
|
+
c.expires = new Date(Date.now()+9000);
|
263
|
+
assert.equal(c.TTL(), 123000);
|
264
|
+
assert.ok(c.isPersistent());
|
265
|
+
},
|
266
|
+
"TTL with expires": function() {
|
267
|
+
var c = new Cookie();
|
268
|
+
var now = Date.now();
|
269
|
+
c.expires = new Date(now+9000);
|
270
|
+
assert.equal(c.TTL(now), 9000);
|
271
|
+
assert.equal(c.expiryTime(), c.expires.getTime());
|
272
|
+
},
|
273
|
+
"TTL with old expires": function() {
|
274
|
+
var c = new Cookie();
|
275
|
+
c.setExpires('17 Oct 2010 00:00:00 GMT');
|
276
|
+
assert.ok(c.TTL() < 0);
|
277
|
+
assert.ok(c.isPersistent());
|
278
|
+
},
|
279
|
+
"default TTL": {
|
280
|
+
topic: function() { return new Cookie() },
|
281
|
+
"is Infinite-future": function(c) { assert.equal(c.TTL(), Infinity) },
|
282
|
+
"is a 'session' cookie": function(c) { assert.ok(!c.isPersistent()) },
|
283
|
+
},
|
284
|
+
}).addBatch({
|
285
|
+
"Parsing": {
|
286
|
+
"simple": {
|
287
|
+
topic: function() {
|
288
|
+
return Cookie.parse('a=bcd',true) || null;
|
289
|
+
},
|
290
|
+
"parsed": function(c) { assert.ok(c) },
|
291
|
+
"key": function(c) { assert.equal(c.key, 'a') },
|
292
|
+
"value": function(c) { assert.equal(c.value, 'bcd') },
|
293
|
+
"no path": function(c) { assert.equal(c.path, null) },
|
294
|
+
"no domain": function(c) { assert.equal(c.domain, null) },
|
295
|
+
"no extensions": function(c) { assert.ok(!c.extensions) },
|
296
|
+
},
|
297
|
+
"with expiry": {
|
298
|
+
topic: function() {
|
299
|
+
return Cookie.parse('a=bcd; Expires=Tue, 18 Oct 2011 07:05:03 GMT',true) || null;
|
300
|
+
},
|
301
|
+
"parsed": function(c) { assert.ok(c) },
|
302
|
+
"key": function(c) { assert.equal(c.key, 'a') },
|
303
|
+
"value": function(c) { assert.equal(c.value, 'bcd') },
|
304
|
+
"has expires": function(c) {
|
305
|
+
assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be');
|
306
|
+
assert.equal(c.expires.getTime(), 1318921503000);
|
307
|
+
},
|
308
|
+
},
|
309
|
+
"with expiry and path": {
|
310
|
+
topic: function() {
|
311
|
+
return Cookie.parse('abc="xyzzy!"; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Path=/aBc',true) || null;
|
312
|
+
},
|
313
|
+
"parsed": function(c) { assert.ok(c) },
|
314
|
+
"key": function(c) { assert.equal(c.key, 'abc') },
|
315
|
+
"value": function(c) { assert.equal(c.value, 'xyzzy!') },
|
316
|
+
"has expires": function(c) {
|
317
|
+
assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be');
|
318
|
+
assert.equal(c.expires.getTime(), 1318921503000);
|
319
|
+
},
|
320
|
+
"has path": function(c) { assert.equal(c.path, '/aBc'); },
|
321
|
+
"no httponly or secure": function(c) {
|
322
|
+
assert.ok(!c.httpOnly);
|
323
|
+
assert.ok(!c.secure);
|
324
|
+
},
|
325
|
+
},
|
326
|
+
"with everything": {
|
327
|
+
topic: function() {
|
328
|
+
return Cookie.parse('abc="xyzzy!"; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Path=/aBc; Domain=example.com; Secure; HTTPOnly; Max-Age=1234; Foo=Bar; Baz', true) || null;
|
329
|
+
},
|
330
|
+
"parsed": function(c) { assert.ok(c) },
|
331
|
+
"key": function(c) { assert.equal(c.key, 'abc') },
|
332
|
+
"value": function(c) { assert.equal(c.value, 'xyzzy!') },
|
333
|
+
"has expires": function(c) {
|
334
|
+
assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be');
|
335
|
+
assert.equal(c.expires.getTime(), 1318921503000);
|
336
|
+
},
|
337
|
+
"has path": function(c) { assert.equal(c.path, '/aBc'); },
|
338
|
+
"has domain": function(c) { assert.equal(c.domain, 'example.com'); },
|
339
|
+
"has httponly": function(c) { assert.equal(c.httpOnly, true); },
|
340
|
+
"has secure": function(c) { assert.equal(c.secure, true); },
|
341
|
+
"has max-age": function(c) { assert.equal(c.maxAge, 1234); },
|
342
|
+
"has extensions": function(c) {
|
343
|
+
assert.ok(c.extensions);
|
344
|
+
assert.equal(c.extensions[0], 'Foo=Bar');
|
345
|
+
assert.equal(c.extensions[1], 'Baz');
|
346
|
+
},
|
347
|
+
},
|
348
|
+
"invalid expires": {
|
349
|
+
"strict": function() { assert.ok(!Cookie.parse("a=b; Expires=xyzzy", true)) },
|
350
|
+
"non-strict": function() {
|
351
|
+
var c = Cookie.parse("a=b; Expires=xyzzy");
|
352
|
+
assert.ok(c);
|
353
|
+
assert.equal(c.expires, Infinity);
|
354
|
+
},
|
355
|
+
},
|
356
|
+
"zero max-age": {
|
357
|
+
"strict": function() { assert.ok(!Cookie.parse("a=b; Max-Age=0", true)) },
|
358
|
+
"non-strict": function() {
|
359
|
+
var c = Cookie.parse("a=b; Max-Age=0");
|
360
|
+
assert.ok(c);
|
361
|
+
assert.equal(c.maxAge, 0);
|
362
|
+
},
|
363
|
+
},
|
364
|
+
"negative max-age": {
|
365
|
+
"strict": function() { assert.ok(!Cookie.parse("a=b; Max-Age=-1", true)) },
|
366
|
+
"non-strict": function() {
|
367
|
+
var c = Cookie.parse("a=b; Max-Age=-1");
|
368
|
+
assert.ok(c);
|
369
|
+
assert.equal(c.maxAge, -1);
|
370
|
+
},
|
371
|
+
},
|
372
|
+
"empty domain": {
|
373
|
+
"strict": function() { assert.ok(!Cookie.parse("a=b; domain=", true)) },
|
374
|
+
"non-strict": function() {
|
375
|
+
var c = Cookie.parse("a=b; domain=");
|
376
|
+
assert.ok(c);
|
377
|
+
assert.equal(c.domain, null);
|
378
|
+
},
|
379
|
+
},
|
380
|
+
"dot domain": {
|
381
|
+
"strict": function() { assert.ok(!Cookie.parse("a=b; domain=.", true)) },
|
382
|
+
"non-strict": function() {
|
383
|
+
var c = Cookie.parse("a=b; domain=.");
|
384
|
+
assert.ok(c);
|
385
|
+
assert.equal(c.domain, null);
|
386
|
+
},
|
387
|
+
},
|
388
|
+
"uppercase domain": {
|
389
|
+
"strict lowercases": function() {
|
390
|
+
var c = Cookie.parse("a=b; domain=EXAMPLE.COM");
|
391
|
+
assert.ok(c);
|
392
|
+
assert.equal(c.domain, 'example.com');
|
393
|
+
},
|
394
|
+
"non-strict lowercases": function() {
|
395
|
+
var c = Cookie.parse("a=b; domain=EXAMPLE.COM");
|
396
|
+
assert.ok(c);
|
397
|
+
assert.equal(c.domain, 'example.com');
|
398
|
+
},
|
399
|
+
},
|
400
|
+
"trailing dot in domain": {
|
401
|
+
topic: function() {
|
402
|
+
return Cookie.parse("a=b; Domain=example.com.", true) || null;
|
403
|
+
},
|
404
|
+
"has the domain": function(c) { assert.equal(c.domain,"example.com.") },
|
405
|
+
"but doesn't validate": function(c) { assert.equal(c.validate(),false) },
|
406
|
+
},
|
407
|
+
"empty path": {
|
408
|
+
"strict": function() { assert.ok(!Cookie.parse("a=b; path=", true)) },
|
409
|
+
"non-strict": function() {
|
410
|
+
var c = Cookie.parse("a=b; path=");
|
411
|
+
assert.ok(c);
|
412
|
+
assert.equal(c.path, null);
|
413
|
+
},
|
414
|
+
},
|
415
|
+
"no-slash path": {
|
416
|
+
"strict": function() { assert.ok(!Cookie.parse("a=b; path=xyzzy", true)) },
|
417
|
+
"non-strict": function() {
|
418
|
+
var c = Cookie.parse("a=b; path=xyzzy");
|
419
|
+
assert.ok(c);
|
420
|
+
assert.equal(c.path, null);
|
421
|
+
},
|
422
|
+
},
|
423
|
+
"trailing semi-colons after path": {
|
424
|
+
topic: function () {
|
425
|
+
return [
|
426
|
+
"a=b; path=/;",
|
427
|
+
"c=d;;;;"
|
428
|
+
];
|
429
|
+
},
|
430
|
+
"strict": function (t) {
|
431
|
+
assert.ok(!Cookie.parse(t[0], true));
|
432
|
+
assert.ok(!Cookie.parse(t[1], true));
|
433
|
+
},
|
434
|
+
"non-strict": function (t) {
|
435
|
+
var c1 = Cookie.parse(t[0]);
|
436
|
+
var c2 = Cookie.parse(t[1]);
|
437
|
+
assert.ok(c1);
|
438
|
+
assert.ok(c2);
|
439
|
+
assert.equal(c1.path, '/');
|
440
|
+
}
|
441
|
+
},
|
442
|
+
"secure-with-value": {
|
443
|
+
"strict": function() { assert.ok(!Cookie.parse("a=b; Secure=xyzzy", true)) },
|
444
|
+
"non-strict": function() {
|
445
|
+
var c = Cookie.parse("a=b; Secure=xyzzy");
|
446
|
+
assert.ok(c);
|
447
|
+
assert.equal(c.secure, true);
|
448
|
+
},
|
449
|
+
},
|
450
|
+
"httponly-with-value": {
|
451
|
+
"strict": function() { assert.ok(!Cookie.parse("a=b; HttpOnly=xyzzy", true)) },
|
452
|
+
"non-strict": function() {
|
453
|
+
var c = Cookie.parse("a=b; HttpOnly=xyzzy");
|
454
|
+
assert.ok(c);
|
455
|
+
assert.equal(c.httpOnly, true);
|
456
|
+
},
|
457
|
+
},
|
458
|
+
"garbage": {
|
459
|
+
topic: function() {
|
460
|
+
return Cookie.parse("\x08", true) || null;
|
461
|
+
},
|
462
|
+
"doesn't parse": function(c) { assert.equal(c,null) },
|
463
|
+
},
|
464
|
+
"public suffix domain": {
|
465
|
+
topic: function() {
|
466
|
+
return Cookie.parse("a=b; domain=kyoto.jp", true) || null;
|
467
|
+
},
|
468
|
+
"parses fine": function(c) {
|
469
|
+
assert.ok(c);
|
470
|
+
assert.equal(c.domain, 'kyoto.jp');
|
471
|
+
},
|
472
|
+
"but fails validation": function(c) {
|
473
|
+
assert.ok(c);
|
474
|
+
assert.ok(!c.validate());
|
475
|
+
},
|
476
|
+
},
|
477
|
+
"Ironically, Google 'GAPS' cookie has very little whitespace": {
|
478
|
+
topic: function() {
|
479
|
+
return Cookie.parse("GAPS=1:A1aaaaAaAAa1aaAaAaaAAAaaa1a11a:aaaAaAaAa-aaaA1-;Path=/;Expires=Thu, 17-Apr-2014 02:12:29 GMT;Secure;HttpOnly");
|
480
|
+
},
|
481
|
+
"parsed": function(c) { assert.ok(c) },
|
482
|
+
"key": function(c) { assert.equal(c.key, 'GAPS') },
|
483
|
+
"value": function(c) { assert.equal(c.value, '1:A1aaaaAaAAa1aaAaAaaAAAaaa1a11a:aaaAaAaAa-aaaA1-') },
|
484
|
+
"path": function(c) {
|
485
|
+
assert.notEqual(c.path, '/;Expires'); // BUG
|
486
|
+
assert.equal(c.path, '/');
|
487
|
+
},
|
488
|
+
"expires": function(c) {
|
489
|
+
assert.notEqual(c.expires, Infinity);
|
490
|
+
assert.equal(c.expires.getTime(), 1397700749000);
|
491
|
+
},
|
492
|
+
"secure": function(c) { assert.ok(c.secure) },
|
493
|
+
"httponly": function(c) { assert.ok(c.httpOnly) },
|
494
|
+
},
|
495
|
+
"lots of equal signs": {
|
496
|
+
topic: function() {
|
497
|
+
return Cookie.parse("queryPref=b=c&d=e; Path=/f=g; Expires=Thu, 17 Apr 2014 02:12:29 GMT; HttpOnly");
|
498
|
+
},
|
499
|
+
"parsed": function(c) { assert.ok(c) },
|
500
|
+
"key": function(c) { assert.equal(c.key, 'queryPref') },
|
501
|
+
"value": function(c) { assert.equal(c.value, 'b=c&d=e') },
|
502
|
+
"path": function(c) {
|
503
|
+
assert.equal(c.path, '/f=g');
|
504
|
+
},
|
505
|
+
"expires": function(c) {
|
506
|
+
assert.notEqual(c.expires, Infinity);
|
507
|
+
assert.equal(c.expires.getTime(), 1397700749000);
|
508
|
+
},
|
509
|
+
"httponly": function(c) { assert.ok(c.httpOnly) },
|
510
|
+
}
|
511
|
+
}
|
512
|
+
})
|
513
|
+
.addBatch({
|
514
|
+
"domain normalization": {
|
515
|
+
"simple": function() {
|
516
|
+
var c = new Cookie();
|
517
|
+
c.domain = "EXAMPLE.com";
|
518
|
+
assert.equal(c.canonicalizedDomain(), "example.com");
|
519
|
+
},
|
520
|
+
"extra dots": function() {
|
521
|
+
var c = new Cookie();
|
522
|
+
c.domain = ".EXAMPLE.com";
|
523
|
+
assert.equal(c.cdomain(), "example.com");
|
524
|
+
},
|
525
|
+
"weird trailing dot": function() {
|
526
|
+
var c = new Cookie();
|
527
|
+
c.domain = "EXAMPLE.ca.";
|
528
|
+
assert.equal(c.canonicalizedDomain(), "example.ca.");
|
529
|
+
},
|
530
|
+
"weird internal dots": function() {
|
531
|
+
var c = new Cookie();
|
532
|
+
c.domain = "EXAMPLE...ca.";
|
533
|
+
assert.equal(c.canonicalizedDomain(), "example...ca.");
|
534
|
+
},
|
535
|
+
"IDN": function() {
|
536
|
+
var c = new Cookie();
|
537
|
+
c.domain = "δοκιμή.δοκιμή"; // "test.test" in greek
|
538
|
+
assert.equal(c.canonicalizedDomain(), "xn--jxalpdlp.xn--jxalpdlp");
|
539
|
+
}
|
540
|
+
}
|
541
|
+
})
|
542
|
+
.addBatch({
|
543
|
+
"Domain Match":matchVows(tough.domainMatch, [
|
544
|
+
// str, dom, expect
|
545
|
+
["example.com", "example.com", true],
|
546
|
+
["eXaMpLe.cOm", "ExAmPlE.CoM", true],
|
547
|
+
["no.ca", "yes.ca", false],
|
548
|
+
["wwwexample.com", "example.com", false],
|
549
|
+
["www.example.com", "example.com", true],
|
550
|
+
["example.com", "www.example.com", false],
|
551
|
+
["www.subdom.example.com", "example.com", true],
|
552
|
+
["www.subdom.example.com", "subdom.example.com", true],
|
553
|
+
["example.com", "example.com.", false], // RFC6265 S4.1.2.3
|
554
|
+
["192.168.0.1", "168.0.1", false], // S5.1.3 "The string is a host name"
|
555
|
+
[null, "example.com", null],
|
556
|
+
["example.com", null, null],
|
557
|
+
[null, null, null],
|
558
|
+
[undefined, undefined, null],
|
559
|
+
])
|
560
|
+
})
|
561
|
+
.addBatch({
|
562
|
+
"default-path": defaultPathVows([
|
563
|
+
[null,"/"],
|
564
|
+
["/","/"],
|
565
|
+
["/file","/"],
|
566
|
+
["/dir/file","/dir"],
|
567
|
+
["noslash","/"],
|
568
|
+
])
|
569
|
+
})
|
570
|
+
.addBatch({
|
571
|
+
"Path-Match": matchVows(tough.pathMatch, [
|
572
|
+
// request, cookie, match
|
573
|
+
["/","/",true],
|
574
|
+
["/dir","/",true],
|
575
|
+
["/","/dir",false],
|
576
|
+
["/dir/","/dir/", true],
|
577
|
+
["/dir/file","/dir/",true],
|
578
|
+
["/dir/file","/dir",true],
|
579
|
+
["/directory","/dir",false],
|
580
|
+
])
|
581
|
+
})
|
582
|
+
.addBatch({
|
583
|
+
"Cookie Sorting": {
|
584
|
+
topic: function() {
|
585
|
+
var cookies = [];
|
586
|
+
var now = Date.now();
|
587
|
+
cookies.push(Cookie.parse("a=0; Domain=example.com"));
|
588
|
+
cookies.push(Cookie.parse("b=1; Domain=www.example.com"));
|
589
|
+
cookies.push(Cookie.parse("c=2; Domain=example.com; Path=/pathA"));
|
590
|
+
cookies.push(Cookie.parse("d=3; Domain=www.example.com; Path=/pathA"));
|
591
|
+
cookies.push(Cookie.parse("e=4; Domain=example.com; Path=/pathA/pathB"));
|
592
|
+
cookies.push(Cookie.parse("f=5; Domain=www.example.com; Path=/pathA/pathB"));
|
593
|
+
|
594
|
+
// force a stable creation time consistent with the order above since
|
595
|
+
// some may have been created at now + 1ms.
|
596
|
+
var i = cookies.length;
|
597
|
+
cookies.forEach(function(cookie) {
|
598
|
+
cookie.creation = new Date(now - 100*(i--));
|
599
|
+
});
|
600
|
+
|
601
|
+
// weak shuffle:
|
602
|
+
cookies = cookies.sort(function(){return Math.random()-0.5});
|
603
|
+
|
604
|
+
cookies = cookies.sort(tough.cookieCompare);
|
605
|
+
return cookies;
|
606
|
+
},
|
607
|
+
"got": function(cookies) {
|
608
|
+
assert.lengthOf(cookies, 6);
|
609
|
+
var names = cookies.map(function(c) {return c.key});
|
610
|
+
assert.deepEqual(names, ['e','f','c','d','a','b']);
|
611
|
+
},
|
612
|
+
}
|
613
|
+
})
|
614
|
+
.addBatch({
|
615
|
+
"CookieJar": {
|
616
|
+
"Setting a basic cookie": {
|
617
|
+
topic: function() {
|
618
|
+
var cj = new CookieJar();
|
619
|
+
var c = Cookie.parse("a=b; Domain=example.com; Path=/");
|
620
|
+
assert.strictEqual(c.hostOnly, null);
|
621
|
+
assert.instanceOf(c.creation, Date);
|
622
|
+
assert.strictEqual(c.lastAccessed, null);
|
623
|
+
c.creation = new Date(Date.now()-10000);
|
624
|
+
cj.setCookie(c, 'http://example.com/index.html', this.callback);
|
625
|
+
},
|
626
|
+
"works": function(c) { assert.instanceOf(c,Cookie) }, // C is for Cookie, good enough for me
|
627
|
+
"gets timestamped": function(c) {
|
628
|
+
assert.ok(c.creation);
|
629
|
+
assert.ok(Date.now() - c.creation.getTime() < 5000); // recently stamped
|
630
|
+
assert.ok(c.lastAccessed);
|
631
|
+
assert.equal(c.creation, c.lastAccessed);
|
632
|
+
assert.equal(c.TTL(), Infinity);
|
633
|
+
assert.ok(!c.isPersistent());
|
634
|
+
},
|
635
|
+
},
|
636
|
+
"Setting a no-path cookie": {
|
637
|
+
topic: function() {
|
638
|
+
var cj = new CookieJar();
|
639
|
+
var c = Cookie.parse("a=b; Domain=example.com");
|
640
|
+
assert.strictEqual(c.hostOnly, null);
|
641
|
+
assert.instanceOf(c.creation, Date);
|
642
|
+
assert.strictEqual(c.lastAccessed, null);
|
643
|
+
c.creation = new Date(Date.now()-10000);
|
644
|
+
cj.setCookie(c, 'http://example.com/index.html', this.callback);
|
645
|
+
},
|
646
|
+
"domain": function(c) { assert.equal(c.domain, 'example.com') },
|
647
|
+
"path is /": function(c) { assert.equal(c.path, '/') },
|
648
|
+
"path was derived": function(c) { assert.strictEqual(c.pathIsDefault, true) },
|
649
|
+
},
|
650
|
+
"Setting a cookie already marked as host-only": {
|
651
|
+
topic: function() {
|
652
|
+
var cj = new CookieJar();
|
653
|
+
var c = Cookie.parse("a=b; Domain=example.com");
|
654
|
+
assert.strictEqual(c.hostOnly, null);
|
655
|
+
assert.instanceOf(c.creation, Date);
|
656
|
+
assert.strictEqual(c.lastAccessed, null);
|
657
|
+
c.creation = new Date(Date.now()-10000);
|
658
|
+
c.hostOnly = true;
|
659
|
+
cj.setCookie(c, 'http://example.com/index.html', this.callback);
|
660
|
+
},
|
661
|
+
"domain": function(c) { assert.equal(c.domain, 'example.com') },
|
662
|
+
"still hostOnly": function(c) { assert.strictEqual(c.hostOnly, true) },
|
663
|
+
},
|
664
|
+
"Setting a session cookie": {
|
665
|
+
topic: function() {
|
666
|
+
var cj = new CookieJar();
|
667
|
+
var c = Cookie.parse("a=b");
|
668
|
+
assert.strictEqual(c.path, null);
|
669
|
+
cj.setCookie(c, 'http://www.example.com/dir/index.html', this.callback);
|
670
|
+
},
|
671
|
+
"works": function(c) { assert.instanceOf(c,Cookie) },
|
672
|
+
"gets the domain": function(c) { assert.equal(c.domain, 'www.example.com') },
|
673
|
+
"gets the default path": function(c) { assert.equal(c.path, '/dir') },
|
674
|
+
"is 'hostOnly'": function(c) { assert.ok(c.hostOnly) },
|
675
|
+
},
|
676
|
+
"Setting wrong domain cookie": {
|
677
|
+
topic: function() {
|
678
|
+
var cj = new CookieJar();
|
679
|
+
var c = Cookie.parse("a=b; Domain=fooxample.com; Path=/");
|
680
|
+
cj.setCookie(c, 'http://example.com/index.html', this.callback);
|
681
|
+
},
|
682
|
+
"fails": function(err,c) {
|
683
|
+
assert.ok(err.message.match(/domain/i));
|
684
|
+
assert.ok(!c);
|
685
|
+
},
|
686
|
+
},
|
687
|
+
"Setting sub-domain cookie": {
|
688
|
+
topic: function() {
|
689
|
+
var cj = new CookieJar();
|
690
|
+
var c = Cookie.parse("a=b; Domain=www.example.com; Path=/");
|
691
|
+
cj.setCookie(c, 'http://example.com/index.html', this.callback);
|
692
|
+
},
|
693
|
+
"fails": function(err,c) {
|
694
|
+
assert.ok(err.message.match(/domain/i));
|
695
|
+
assert.ok(!c);
|
696
|
+
},
|
697
|
+
},
|
698
|
+
"Setting super-domain cookie": {
|
699
|
+
topic: function() {
|
700
|
+
var cj = new CookieJar();
|
701
|
+
var c = Cookie.parse("a=b; Domain=example.com; Path=/");
|
702
|
+
cj.setCookie(c, 'http://www.app.example.com/index.html', this.callback);
|
703
|
+
},
|
704
|
+
"success": function(err,c) {
|
705
|
+
assert.ok(!err);
|
706
|
+
assert.equal(c.domain, 'example.com');
|
707
|
+
},
|
708
|
+
},
|
709
|
+
"Setting HttpOnly cookie over non-HTTP API": {
|
710
|
+
topic: function() {
|
711
|
+
var cj = new CookieJar();
|
712
|
+
var c = Cookie.parse("a=b; Domain=example.com; Path=/; HttpOnly");
|
713
|
+
cj.setCookie(c, 'http://example.com/index.html', {http:false}, this.callback);
|
714
|
+
},
|
715
|
+
"fails": function(err,c) {
|
716
|
+
assert.match(err.message, /HttpOnly/i);
|
717
|
+
assert.ok(!c);
|
718
|
+
},
|
719
|
+
},
|
720
|
+
},
|
721
|
+
"Cookie Jar store eight cookies": {
|
722
|
+
topic: function() {
|
723
|
+
var cj = new CookieJar();
|
724
|
+
var ex = 'http://example.com/index.html';
|
725
|
+
var tasks = [];
|
726
|
+
tasks.push(function(next) {
|
727
|
+
cj.setCookie('a=1; Domain=example.com; Path=/',ex,at(0),next);
|
728
|
+
});
|
729
|
+
tasks.push(function(next) {
|
730
|
+
cj.setCookie('b=2; Domain=example.com; Path=/; HttpOnly',ex,at(1000),next);
|
731
|
+
});
|
732
|
+
tasks.push(function(next) {
|
733
|
+
cj.setCookie('c=3; Domain=example.com; Path=/; Secure',ex,at(2000),next);
|
734
|
+
});
|
735
|
+
tasks.push(function(next) { // path
|
736
|
+
cj.setCookie('d=4; Domain=example.com; Path=/foo',ex,at(3000),next);
|
737
|
+
});
|
738
|
+
tasks.push(function(next) { // host only
|
739
|
+
cj.setCookie('e=5',ex,at(4000),next);
|
740
|
+
});
|
741
|
+
tasks.push(function(next) { // other domain
|
742
|
+
cj.setCookie('f=6; Domain=nodejs.org; Path=/','http://nodejs.org',at(5000),next);
|
743
|
+
});
|
744
|
+
tasks.push(function(next) { // expired
|
745
|
+
cj.setCookie('g=7; Domain=example.com; Path=/; Expires=Tue, 18 Oct 2011 00:00:00 GMT',ex,at(6000),next);
|
746
|
+
});
|
747
|
+
tasks.push(function(next) { // expired via Max-Age
|
748
|
+
cj.setCookie('h=8; Domain=example.com; Path=/; Max-Age=1',ex,next);
|
749
|
+
});
|
750
|
+
var cb = this.callback;
|
751
|
+
async.parallel(tasks, function(err,results){
|
752
|
+
setTimeout(function() {
|
753
|
+
cb(err,cj,results);
|
754
|
+
}, 2000); // so that 'h=8' expires
|
755
|
+
});
|
756
|
+
},
|
757
|
+
"setup ok": function(err,cj,results) {
|
758
|
+
assert.ok(1);
|
759
|
+
},
|
760
|
+
"then retrieving for http://nodejs.org": {
|
761
|
+
topic: function(cj,results) {
|
762
|
+
cj.getCookies('http://nodejs.org',this.callback);
|
763
|
+
},
|
764
|
+
"get a nodejs cookie": function(cookies) {
|
765
|
+
assert.lengthOf(cookies, 1);
|
766
|
+
var cookie = cookies[0];
|
767
|
+
assert.equal(cookie.domain, 'nodejs.org');
|
768
|
+
},
|
769
|
+
},
|
770
|
+
"then retrieving for https://example.com": {
|
771
|
+
topic: function(cj,results) {
|
772
|
+
cj.getCookies('https://example.com',{secure:true},this.callback);
|
773
|
+
},
|
774
|
+
"get a secure example cookie with others": function(cookies) {
|
775
|
+
var names = cookies.map(function(c) {return c.key});
|
776
|
+
assert.deepEqual(names, ['a','b','c','e']);
|
777
|
+
},
|
778
|
+
},
|
779
|
+
"then retrieving for https://example.com (missing options)": {
|
780
|
+
topic: function(cj,results) {
|
781
|
+
cj.getCookies('https://example.com',this.callback);
|
782
|
+
},
|
783
|
+
"get a secure example cookie with others": function(cookies) {
|
784
|
+
var names = cookies.map(function(c) {return c.key});
|
785
|
+
assert.deepEqual(names, ['a','b','c','e']);
|
786
|
+
},
|
787
|
+
},
|
788
|
+
"then retrieving for http://example.com": {
|
789
|
+
topic: function(cj,results) {
|
790
|
+
cj.getCookies('http://example.com',this.callback);
|
791
|
+
},
|
792
|
+
"get a bunch of cookies": function(cookies) {
|
793
|
+
var names = cookies.map(function(c) {return c.key});
|
794
|
+
assert.deepEqual(names, ['a','b','e']);
|
795
|
+
},
|
796
|
+
},
|
797
|
+
"then retrieving for http://EXAMPlE.com": {
|
798
|
+
topic: function(cj,results) {
|
799
|
+
cj.getCookies('http://EXAMPlE.com',this.callback);
|
800
|
+
},
|
801
|
+
"get a bunch of cookies": function(cookies) {
|
802
|
+
var names = cookies.map(function(c) {return c.key});
|
803
|
+
assert.deepEqual(names, ['a','b','e']);
|
804
|
+
},
|
805
|
+
},
|
806
|
+
"then retrieving for http://example.com, non-HTTP": {
|
807
|
+
topic: function(cj,results) {
|
808
|
+
cj.getCookies('http://example.com',{http:false},this.callback);
|
809
|
+
},
|
810
|
+
"get a bunch of cookies": function(cookies) {
|
811
|
+
var names = cookies.map(function(c) {return c.key});
|
812
|
+
assert.deepEqual(names, ['a','e']);
|
813
|
+
},
|
814
|
+
},
|
815
|
+
"then retrieving for http://example.com/foo/bar": {
|
816
|
+
topic: function(cj,results) {
|
817
|
+
cj.getCookies('http://example.com/foo/bar',this.callback);
|
818
|
+
},
|
819
|
+
"get a bunch of cookies": function(cookies) {
|
820
|
+
var names = cookies.map(function(c) {return c.key});
|
821
|
+
assert.deepEqual(names, ['d','a','b','e']);
|
822
|
+
},
|
823
|
+
},
|
824
|
+
"then retrieving for http://example.com as a string": {
|
825
|
+
topic: function(cj,results) {
|
826
|
+
cj.getCookieString('http://example.com',this.callback);
|
827
|
+
},
|
828
|
+
"get a single string": function(cookieHeader) {
|
829
|
+
assert.equal(cookieHeader, "a=1; b=2; e=5");
|
830
|
+
},
|
831
|
+
},
|
832
|
+
"then retrieving for http://example.com as a set-cookie header": {
|
833
|
+
topic: function(cj,results) {
|
834
|
+
cj.getSetCookieStrings('http://example.com',this.callback);
|
835
|
+
},
|
836
|
+
"get a single string": function(cookieHeaders) {
|
837
|
+
assert.lengthOf(cookieHeaders, 3);
|
838
|
+
assert.equal(cookieHeaders[0], "a=1; Domain=example.com; Path=/");
|
839
|
+
assert.equal(cookieHeaders[1], "b=2; Domain=example.com; Path=/; HttpOnly");
|
840
|
+
assert.equal(cookieHeaders[2], "e=5; Path=/");
|
841
|
+
},
|
842
|
+
},
|
843
|
+
"then retrieving for http://www.example.com/": {
|
844
|
+
topic: function(cj,results) {
|
845
|
+
cj.getCookies('http://www.example.com/foo/bar',this.callback);
|
846
|
+
},
|
847
|
+
"get a bunch of cookies": function(cookies) {
|
848
|
+
var names = cookies.map(function(c) {return c.key});
|
849
|
+
assert.deepEqual(names, ['d','a','b']); // note lack of 'e'
|
850
|
+
},
|
851
|
+
},
|
852
|
+
},
|
853
|
+
"Repeated names": {
|
854
|
+
topic: function() {
|
855
|
+
var cb = this.callback;
|
856
|
+
var cj = new CookieJar();
|
857
|
+
var ex = 'http://www.example.com/';
|
858
|
+
var sc = cj.setCookie;
|
859
|
+
var tasks = [];
|
860
|
+
var now = Date.now();
|
861
|
+
tasks.push(sc.bind(cj,'aaaa=xxxx',ex,at(0)));
|
862
|
+
tasks.push(sc.bind(cj,'aaaa=1111; Domain=www.example.com',ex,at(1000)));
|
863
|
+
tasks.push(sc.bind(cj,'aaaa=2222; Domain=example.com',ex,at(2000)));
|
864
|
+
tasks.push(sc.bind(cj,'aaaa=3333; Domain=www.example.com; Path=/pathA',ex,at(3000)));
|
865
|
+
async.series(tasks,function(err,results) {
|
866
|
+
results = results.filter(function(e) {return e !== undefined});
|
867
|
+
cb(err,{cj:cj, cookies:results, now:now});
|
868
|
+
});
|
869
|
+
},
|
870
|
+
"all got set": function(err,t) {
|
871
|
+
assert.lengthOf(t.cookies,4);
|
872
|
+
},
|
873
|
+
"then getting 'em back": {
|
874
|
+
topic: function(t) {
|
875
|
+
var cj = t.cj;
|
876
|
+
cj.getCookies('http://www.example.com/pathA',this.callback);
|
877
|
+
},
|
878
|
+
"there's just three": function (err,cookies) {
|
879
|
+
var vals = cookies.map(function(c) {return c.value});
|
880
|
+
// may break with sorting; sorting should put 3333 first due to longest path:
|
881
|
+
assert.deepEqual(vals, ['3333','1111','2222']);
|
882
|
+
}
|
883
|
+
},
|
884
|
+
},
|
885
|
+
"CookieJar setCookie errors": {
|
886
|
+
"public-suffix domain": {
|
887
|
+
topic: function() {
|
888
|
+
var cj = new CookieJar();
|
889
|
+
cj.setCookie('i=9; Domain=kyoto.jp; Path=/','kyoto.jp',this.callback);
|
890
|
+
},
|
891
|
+
"errors": function(err,cookie) {
|
892
|
+
assert.ok(err);
|
893
|
+
assert.ok(!cookie);
|
894
|
+
assert.match(err.message, /public suffix/i);
|
895
|
+
},
|
896
|
+
},
|
897
|
+
"wrong domain": {
|
898
|
+
topic: function() {
|
899
|
+
var cj = new CookieJar();
|
900
|
+
cj.setCookie('j=10; Domain=google.com; Path=/','google.ca',this.callback);
|
901
|
+
},
|
902
|
+
"errors": function(err,cookie) {
|
903
|
+
assert.ok(err);
|
904
|
+
assert.ok(!cookie);
|
905
|
+
assert.match(err.message, /not in this host's domain/i);
|
906
|
+
},
|
907
|
+
},
|
908
|
+
"old cookie is HttpOnly": {
|
909
|
+
topic: function() {
|
910
|
+
var cb = this.callback;
|
911
|
+
var next = function (err,c) {
|
912
|
+
return cb(err,cj);
|
913
|
+
};
|
914
|
+
var cj = new CookieJar();
|
915
|
+
cj.setCookie('k=11; Domain=example.ca; Path=/; HttpOnly','http://example.ca',{http:true},next);
|
916
|
+
},
|
917
|
+
"initial cookie is set": function(err,cj) {
|
918
|
+
assert.ok(!err);
|
919
|
+
},
|
920
|
+
"but when trying to overwrite": {
|
921
|
+
topic: function(cj) {
|
922
|
+
var cb = this.callback;
|
923
|
+
cj.setCookie('k=12; Domain=example.ca; Path=/','http://example.ca',{http:false},function(err,c) {cb(null,err)});
|
924
|
+
},
|
925
|
+
"it's an error": function(err) {
|
926
|
+
assert.ok(err);
|
927
|
+
},
|
928
|
+
"then, checking the original": {
|
929
|
+
topic: function(ignored,cj) {
|
930
|
+
assert.ok(cj instanceof CookieJar);
|
931
|
+
cj.getCookies('http://example.ca',{http:true},this.callback);
|
932
|
+
},
|
933
|
+
"cookie has original value": function(err,cookies) {
|
934
|
+
assert.equal(err,null);
|
935
|
+
assert.lengthOf(cookies, 1);
|
936
|
+
assert.equal(cookies[0].value,11);
|
937
|
+
},
|
938
|
+
},
|
939
|
+
},
|
940
|
+
},
|
941
|
+
},
|
942
|
+
})
|
943
|
+
.addBatch({
|
944
|
+
"JSON": {
|
945
|
+
"serialization": {
|
946
|
+
topic: function() {
|
947
|
+
var c = Cookie.parse('alpha=beta; Domain=example.com; Path=/foo; Expires=Tue, 19 Jan 2038 03:14:07 GMT; HttpOnly');
|
948
|
+
return JSON.stringify(c);
|
949
|
+
},
|
950
|
+
"gives a string": function(str) {
|
951
|
+
assert.equal(typeof str, "string");
|
952
|
+
},
|
953
|
+
"date is in ISO format": function(str) {
|
954
|
+
assert.match(str, /"expires":"2038-01-19T03:14:07\.000Z"/, 'expires is in ISO format');
|
955
|
+
},
|
956
|
+
},
|
957
|
+
"deserialization": {
|
958
|
+
topic: function() {
|
959
|
+
var json = '{"key":"alpha","value":"beta","domain":"example.com","path":"/foo","expires":"2038-01-19T03:14:07.000Z","httpOnly":true,"lastAccessed":2000000000123}';
|
960
|
+
return Cookie.fromJSON(json);
|
961
|
+
},
|
962
|
+
"works": function(c) {
|
963
|
+
assert.ok(c);
|
964
|
+
},
|
965
|
+
"key": function(c) { assert.equal(c.key, "alpha") },
|
966
|
+
"value": function(c) { assert.equal(c.value, "beta") },
|
967
|
+
"domain": function(c) { assert.equal(c.domain, "example.com") },
|
968
|
+
"path": function(c) { assert.equal(c.path, "/foo") },
|
969
|
+
"httpOnly": function(c) { assert.strictEqual(c.httpOnly, true) },
|
970
|
+
"secure": function(c) { assert.strictEqual(c.secure, false) },
|
971
|
+
"hostOnly": function(c) { assert.strictEqual(c.hostOnly, null) },
|
972
|
+
"expires is a date object": function(c) {
|
973
|
+
assert.equal(c.expires.getTime(), 2147483647000);
|
974
|
+
},
|
975
|
+
"lastAccessed is a date object": function(c) {
|
976
|
+
assert.equal(c.lastAccessed.getTime(), 2000000000123);
|
977
|
+
},
|
978
|
+
"creation defaulted": function(c) {
|
979
|
+
assert.ok(c.creation.getTime());
|
980
|
+
}
|
981
|
+
},
|
982
|
+
"null deserialization": {
|
983
|
+
topic: function() {
|
984
|
+
return Cookie.fromJSON(null);
|
985
|
+
},
|
986
|
+
"is null": function(cookie) {
|
987
|
+
assert.equal(cookie,null);
|
988
|
+
},
|
989
|
+
},
|
990
|
+
},
|
991
|
+
"expiry deserialization": {
|
992
|
+
"Infinity": {
|
993
|
+
topic: Cookie.fromJSON.bind(null, '{"expires":"Infinity"}'),
|
994
|
+
"is infinite": function(c) {
|
995
|
+
assert.strictEqual(c.expires, "Infinity");
|
996
|
+
assert.equal(c.expires, Infinity);
|
997
|
+
},
|
998
|
+
},
|
999
|
+
},
|
1000
|
+
"maxAge serialization": {
|
1001
|
+
topic: function() {
|
1002
|
+
return function(toSet) {
|
1003
|
+
var c = new Cookie();
|
1004
|
+
c.key = 'foo'; c.value = 'bar';
|
1005
|
+
c.setMaxAge(toSet);
|
1006
|
+
return JSON.stringify(c);
|
1007
|
+
};
|
1008
|
+
},
|
1009
|
+
"zero": {
|
1010
|
+
topic: function(f) { return f(0) },
|
1011
|
+
"looks good": function(str) {
|
1012
|
+
assert.match(str, /"maxAge":0/);
|
1013
|
+
},
|
1014
|
+
},
|
1015
|
+
"Infinity": {
|
1016
|
+
topic: function(f) { return f(Infinity) },
|
1017
|
+
"looks good": function(str) {
|
1018
|
+
assert.match(str, /"maxAge":"Infinity"/);
|
1019
|
+
},
|
1020
|
+
},
|
1021
|
+
"-Infinity": {
|
1022
|
+
topic: function(f) { return f(-Infinity) },
|
1023
|
+
"looks good": function(str) {
|
1024
|
+
assert.match(str, /"maxAge":"-Infinity"/);
|
1025
|
+
},
|
1026
|
+
},
|
1027
|
+
"null": {
|
1028
|
+
topic: function(f) { return f(null) },
|
1029
|
+
"looks good": function(str) {
|
1030
|
+
assert.match(str, /"maxAge":null/);
|
1031
|
+
},
|
1032
|
+
},
|
1033
|
+
},
|
1034
|
+
"maxAge deserialization": {
|
1035
|
+
"number": {
|
1036
|
+
topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":123}'),
|
1037
|
+
"is the number": function(c) {
|
1038
|
+
assert.strictEqual(c.maxAge, 123);
|
1039
|
+
},
|
1040
|
+
},
|
1041
|
+
"null": {
|
1042
|
+
topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":null}'),
|
1043
|
+
"is null": function(c) {
|
1044
|
+
assert.strictEqual(c.maxAge, null);
|
1045
|
+
},
|
1046
|
+
},
|
1047
|
+
"less than zero": {
|
1048
|
+
topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":-123}'),
|
1049
|
+
"is -123": function(c) {
|
1050
|
+
assert.strictEqual(c.maxAge, -123);
|
1051
|
+
},
|
1052
|
+
},
|
1053
|
+
"Infinity": {
|
1054
|
+
topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":"Infinity"}'),
|
1055
|
+
"is inf-as-string": function(c) {
|
1056
|
+
assert.strictEqual(c.maxAge, "Infinity");
|
1057
|
+
},
|
1058
|
+
},
|
1059
|
+
"-Infinity": {
|
1060
|
+
topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":"-Infinity"}'),
|
1061
|
+
"is inf-as-string": function(c) {
|
1062
|
+
assert.strictEqual(c.maxAge, "-Infinity");
|
1063
|
+
},
|
1064
|
+
},
|
1065
|
+
}
|
1066
|
+
})
|
1067
|
+
.addBatch({
|
1068
|
+
"permuteDomain": {
|
1069
|
+
"base case": {
|
1070
|
+
topic: tough.permuteDomain.bind(null,'example.com'),
|
1071
|
+
"got the domain": function(list) {
|
1072
|
+
assert.deepEqual(list, ['example.com']);
|
1073
|
+
},
|
1074
|
+
},
|
1075
|
+
"two levels": {
|
1076
|
+
topic: tough.permuteDomain.bind(null,'foo.bar.example.com'),
|
1077
|
+
"got three things": function(list) {
|
1078
|
+
assert.deepEqual(list, ['example.com','bar.example.com','foo.bar.example.com']);
|
1079
|
+
},
|
1080
|
+
},
|
1081
|
+
"invalid domain": {
|
1082
|
+
topic: tough.permuteDomain.bind(null,'foo.bar.example.localduhmain'),
|
1083
|
+
"got three things": function(list) {
|
1084
|
+
assert.equal(list, null);
|
1085
|
+
},
|
1086
|
+
},
|
1087
|
+
},
|
1088
|
+
"permutePath": {
|
1089
|
+
"base case": {
|
1090
|
+
topic: tough.permutePath.bind(null,'/'),
|
1091
|
+
"just slash": function(list) {
|
1092
|
+
assert.deepEqual(list,['/']);
|
1093
|
+
},
|
1094
|
+
},
|
1095
|
+
"single case": {
|
1096
|
+
topic: tough.permutePath.bind(null,'/foo'),
|
1097
|
+
"two things": function(list) {
|
1098
|
+
assert.deepEqual(list,['/foo','/']);
|
1099
|
+
},
|
1100
|
+
"path matching": function(list) {
|
1101
|
+
list.forEach(function(e) {
|
1102
|
+
assert.ok(tough.pathMatch('/foo',e));
|
1103
|
+
});
|
1104
|
+
},
|
1105
|
+
},
|
1106
|
+
"double case": {
|
1107
|
+
topic: tough.permutePath.bind(null,'/foo/bar'),
|
1108
|
+
"four things": function(list) {
|
1109
|
+
assert.deepEqual(list,['/foo/bar','/foo','/']);
|
1110
|
+
},
|
1111
|
+
"path matching": function(list) {
|
1112
|
+
list.forEach(function(e) {
|
1113
|
+
assert.ok(tough.pathMatch('/foo/bar',e));
|
1114
|
+
});
|
1115
|
+
},
|
1116
|
+
},
|
1117
|
+
"trailing slash": {
|
1118
|
+
topic: tough.permutePath.bind(null,'/foo/bar/'),
|
1119
|
+
"three things": function(list) {
|
1120
|
+
assert.deepEqual(list,['/foo/bar','/foo','/']);
|
1121
|
+
},
|
1122
|
+
"path matching": function(list) {
|
1123
|
+
list.forEach(function(e) {
|
1124
|
+
assert.ok(tough.pathMatch('/foo/bar/',e));
|
1125
|
+
});
|
1126
|
+
},
|
1127
|
+
},
|
1128
|
+
}
|
1129
|
+
})
|
1130
|
+
.addBatch({
|
1131
|
+
"Issue 1": {
|
1132
|
+
topic: function() {
|
1133
|
+
var cj = new CookieJar();
|
1134
|
+
cj.setCookie('hello=world; path=/some/path/', 'http://domain/some/path/file', function(err,cookie) {
|
1135
|
+
this.callback(err,{cj:cj, cookie:cookie});
|
1136
|
+
}.bind(this));
|
1137
|
+
},
|
1138
|
+
"stored a cookie": function(t) {
|
1139
|
+
assert.ok(t.cookie);
|
1140
|
+
},
|
1141
|
+
"cookie's path was modified to remove unnecessary slash": function(t) {
|
1142
|
+
assert.equal(t.cookie.path, '/some/path');
|
1143
|
+
},
|
1144
|
+
"getting it back": {
|
1145
|
+
topic: function(t) {
|
1146
|
+
t.cj.getCookies('http://domain/some/path/file', function(err,cookies) {
|
1147
|
+
this.callback(err, {cj:t.cj, cookies:cookies||[]});
|
1148
|
+
}.bind(this));
|
1149
|
+
},
|
1150
|
+
"got one cookie": function(t) {
|
1151
|
+
assert.lengthOf(t.cookies, 1);
|
1152
|
+
},
|
1153
|
+
"it's the right one": function(t) {
|
1154
|
+
var c = t.cookies[0];
|
1155
|
+
assert.equal(c.key, 'hello');
|
1156
|
+
assert.equal(c.value, 'world');
|
1157
|
+
},
|
1158
|
+
}
|
1159
|
+
}
|
1160
|
+
})
|
1161
|
+
.addBatch({
|
1162
|
+
"expiry option": {
|
1163
|
+
topic: function() {
|
1164
|
+
var cb = this.callback;
|
1165
|
+
var cj = new CookieJar();
|
1166
|
+
cj.setCookie('near=expiry; Domain=example.com; Path=/; Max-Age=1','http://www.example.com',at(-1), function(err,cookie) {
|
1167
|
+
|
1168
|
+
cb(err, {cj:cj, cookie:cookie});
|
1169
|
+
});
|
1170
|
+
},
|
1171
|
+
"set the cookie": function(t) {
|
1172
|
+
assert.ok(t.cookie, "didn't set?!");
|
1173
|
+
assert.equal(t.cookie.key, 'near');
|
1174
|
+
},
|
1175
|
+
"then, retrieving": {
|
1176
|
+
topic: function(t) {
|
1177
|
+
var cb = this.callback;
|
1178
|
+
setTimeout(function() {
|
1179
|
+
t.cj.getCookies('http://www.example.com', {http:true, expire:false}, function(err,cookies) {
|
1180
|
+
t.cookies = cookies;
|
1181
|
+
cb(err,t);
|
1182
|
+
});
|
1183
|
+
},2000);
|
1184
|
+
},
|
1185
|
+
"got the cookie": function(t) {
|
1186
|
+
assert.lengthOf(t.cookies, 1);
|
1187
|
+
assert.equal(t.cookies[0].key, 'near');
|
1188
|
+
},
|
1189
|
+
}
|
1190
|
+
}
|
1191
|
+
})
|
1192
|
+
.addBatch({
|
1193
|
+
"trailing semi-colon set into cj": {
|
1194
|
+
topic: function () {
|
1195
|
+
var cb = this.callback;
|
1196
|
+
var cj = new CookieJar();
|
1197
|
+
var ex = 'http://www.example.com';
|
1198
|
+
var tasks = [];
|
1199
|
+
tasks.push(function(next) {
|
1200
|
+
cj.setCookie('broken_path=testme; path=/;',ex,at(-1),next);
|
1201
|
+
});
|
1202
|
+
tasks.push(function(next) {
|
1203
|
+
cj.setCookie('b=2; Path=/;;;;',ex,at(-1),next);
|
1204
|
+
});
|
1205
|
+
async.parallel(tasks, function (err, cookies) {
|
1206
|
+
cb(null, {
|
1207
|
+
cj: cj,
|
1208
|
+
cookies: cookies
|
1209
|
+
});
|
1210
|
+
});
|
1211
|
+
},
|
1212
|
+
"check number of cookies": function (t) {
|
1213
|
+
assert.lengthOf(t.cookies, 2, "didn't set");
|
1214
|
+
},
|
1215
|
+
"check *broken_path* was set properly": function (t) {
|
1216
|
+
assert.equal(t.cookies[0].key, "broken_path");
|
1217
|
+
assert.equal(t.cookies[0].value, "testme");
|
1218
|
+
assert.equal(t.cookies[0].path, "/");
|
1219
|
+
},
|
1220
|
+
"check *b* was set properly": function (t) {
|
1221
|
+
assert.equal(t.cookies[1].key, "b");
|
1222
|
+
assert.equal(t.cookies[1].value, "2");
|
1223
|
+
assert.equal(t.cookies[1].path, "/");
|
1224
|
+
},
|
1225
|
+
"retrieve the cookie": {
|
1226
|
+
topic: function (t) {
|
1227
|
+
var cb = this.callback;
|
1228
|
+
t.cj.getCookies('http://www.example.com', {}, function (err, cookies) {
|
1229
|
+
t.cookies = cookies;
|
1230
|
+
cb(err, t);
|
1231
|
+
});
|
1232
|
+
},
|
1233
|
+
"get the cookie": function(t) {
|
1234
|
+
assert.lengthOf(t.cookies, 2);
|
1235
|
+
assert.equal(t.cookies[0].key, 'broken_path');
|
1236
|
+
assert.equal(t.cookies[0].value, 'testme');
|
1237
|
+
assert.equal(t.cookies[1].key, "b");
|
1238
|
+
assert.equal(t.cookies[1].value, "2");
|
1239
|
+
assert.equal(t.cookies[1].path, "/");
|
1240
|
+
},
|
1241
|
+
},
|
1242
|
+
}
|
1243
|
+
})
|
1244
|
+
.addBatch({
|
1245
|
+
"Constructor":{
|
1246
|
+
topic: function () {
|
1247
|
+
return new Cookie({
|
1248
|
+
key: 'test',
|
1249
|
+
value: 'b',
|
1250
|
+
maxAge: 60
|
1251
|
+
});
|
1252
|
+
},
|
1253
|
+
'check for key property': function (c) {
|
1254
|
+
assert.ok(c);
|
1255
|
+
assert.equal(c.key, 'test');
|
1256
|
+
},
|
1257
|
+
'check for value property': function (c) {
|
1258
|
+
assert.equal(c.value, 'b');
|
1259
|
+
},
|
1260
|
+
'check for maxAge': function (c) {
|
1261
|
+
assert.equal(c.maxAge, 60);
|
1262
|
+
},
|
1263
|
+
'check for default values for unspecified properties': function (c) {
|
1264
|
+
assert.equal(c.expires, "Infinity");
|
1265
|
+
assert.equal(c.secure, false);
|
1266
|
+
assert.equal(c.httpOnly, false);
|
1267
|
+
}
|
1268
|
+
}
|
1269
|
+
})
|
1270
|
+
.addBatch({
|
1271
|
+
"allPaths option": {
|
1272
|
+
topic: function() {
|
1273
|
+
var cj = new CookieJar();
|
1274
|
+
var tasks = [];
|
1275
|
+
tasks.push(cj.setCookie.bind(cj, 'nopath_dom=qq; Path=/; Domain=example.com', 'http://example.com', {}));
|
1276
|
+
tasks.push(cj.setCookie.bind(cj, 'path_dom=qq; Path=/foo; Domain=example.com', 'http://example.com', {}));
|
1277
|
+
tasks.push(cj.setCookie.bind(cj, 'nopath_host=qq; Path=/', 'http://www.example.com', {}));
|
1278
|
+
tasks.push(cj.setCookie.bind(cj, 'path_host=qq; Path=/foo', 'http://www.example.com', {}));
|
1279
|
+
tasks.push(cj.setCookie.bind(cj, 'other=qq; Path=/', 'http://other.example.com/', {}));
|
1280
|
+
tasks.push(cj.setCookie.bind(cj, 'other2=qq; Path=/foo', 'http://other.example.com/foo', {}));
|
1281
|
+
var cb = this.callback;
|
1282
|
+
async.parallel(tasks, function(err,results) {
|
1283
|
+
cb(err, {cj:cj, cookies: results});
|
1284
|
+
});
|
1285
|
+
},
|
1286
|
+
"all set": function(t) {
|
1287
|
+
assert.equal(t.cookies.length, 6);
|
1288
|
+
assert.ok(t.cookies.every(function(c) { return !!c }));
|
1289
|
+
},
|
1290
|
+
"getting without allPaths": {
|
1291
|
+
topic: function(t) {
|
1292
|
+
var cb = this.callback;
|
1293
|
+
var cj = t.cj;
|
1294
|
+
cj.getCookies('http://www.example.com/', {}, function(err,cookies) {
|
1295
|
+
cb(err, {cj:cj, cookies:cookies});
|
1296
|
+
});
|
1297
|
+
},
|
1298
|
+
"found just two cookies": function(t) {
|
1299
|
+
assert.equal(t.cookies.length, 2);
|
1300
|
+
},
|
1301
|
+
"all are path=/": function(t) {
|
1302
|
+
assert.ok(t.cookies.every(function(c) { return c.path === '/' }));
|
1303
|
+
},
|
1304
|
+
"no 'other' cookies": function(t) {
|
1305
|
+
assert.ok(!t.cookies.some(function(c) { return (/^other/).test(c.name) }));
|
1306
|
+
},
|
1307
|
+
},
|
1308
|
+
"getting without allPaths for /foo": {
|
1309
|
+
topic: function(t) {
|
1310
|
+
var cb = this.callback;
|
1311
|
+
var cj = t.cj;
|
1312
|
+
cj.getCookies('http://www.example.com/foo', {}, function(err,cookies) {
|
1313
|
+
cb(err, {cj:cj, cookies:cookies});
|
1314
|
+
});
|
1315
|
+
},
|
1316
|
+
"found four cookies": function(t) {
|
1317
|
+
assert.equal(t.cookies.length, 4);
|
1318
|
+
},
|
1319
|
+
"no 'other' cookies": function(t) {
|
1320
|
+
assert.ok(!t.cookies.some(function(c) { return (/^other/).test(c.name) }));
|
1321
|
+
},
|
1322
|
+
},
|
1323
|
+
"getting with allPaths:true": {
|
1324
|
+
topic: function(t) {
|
1325
|
+
var cb = this.callback;
|
1326
|
+
var cj = t.cj;
|
1327
|
+
cj.getCookies('http://www.example.com/', {allPaths:true}, function(err,cookies) {
|
1328
|
+
cb(err, {cj:cj, cookies:cookies});
|
1329
|
+
});
|
1330
|
+
},
|
1331
|
+
"found four cookies": function(t) {
|
1332
|
+
assert.equal(t.cookies.length, 4);
|
1333
|
+
},
|
1334
|
+
"no 'other' cookies": function(t) {
|
1335
|
+
assert.ok(!t.cookies.some(function(c) { return (/^other/).test(c.name) }));
|
1336
|
+
},
|
1337
|
+
},
|
1338
|
+
}
|
1339
|
+
})
|
1340
|
+
.export(module);
|