select_all-rails 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +6 -0
- data/README.md +8 -7
- data/lib/select_all/rails/version.rb +1 -1
- data/node_modules/.bin/acorn +71 -0
- data/node_modules/.bin/escodegen +77 -0
- data/node_modules/.bin/esgenerate +64 -0
- data/node_modules/.bin/esparse +126 -0
- data/node_modules/.bin/esvalidate +199 -0
- data/node_modules/.bin/har-validator +56 -0
- data/node_modules/.bin/sshpk-conv +201 -0
- data/node_modules/.bin/sshpk-sign +191 -0
- data/node_modules/.bin/sshpk-verify +166 -0
- data/node_modules/.bin/uuid +26 -0
- data/node_modules/abab/CHANGELOG.md +11 -0
- data/node_modules/abab/README.md +52 -0
- data/node_modules/abab/index.js +9 -0
- data/node_modules/abab/lib/atob.js +109 -0
- data/node_modules/abab/lib/btoa.js +65 -0
- data/node_modules/abab/package.json +106 -0
- data/node_modules/acorn-globals/LICENSE +19 -0
- data/node_modules/acorn-globals/README.md +76 -0
- data/node_modules/acorn-globals/index.js +180 -0
- data/node_modules/acorn-globals/package.json +100 -0
- data/node_modules/acorn/.editorconfig +7 -0
- data/node_modules/acorn/.gitattributes +1 -0
- data/node_modules/acorn/.npmignore +3 -0
- data/node_modules/acorn/.tern-project +6 -0
- data/node_modules/acorn/.travis.yml +6 -0
- data/node_modules/acorn/AUTHORS +43 -0
- data/node_modules/acorn/LICENSE +19 -0
- data/node_modules/acorn/README.md +396 -0
- data/node_modules/acorn/bin/acorn +71 -0
- data/node_modules/acorn/bin/build-acorn.js +82 -0
- data/node_modules/acorn/bin/generate-identifier-regex.js +47 -0
- data/node_modules/acorn/bin/update_authors.sh +6 -0
- data/node_modules/acorn/dist/.keep +0 -0
- data/node_modules/acorn/dist/acorn.js +3340 -0
- data/node_modules/acorn/dist/acorn_loose.js +1300 -0
- data/node_modules/acorn/dist/walk.js +377 -0
- data/node_modules/acorn/package.json +222 -0
- data/node_modules/acorn/src/bin/acorn.js +59 -0
- data/node_modules/acorn/src/expression.js +707 -0
- data/node_modules/acorn/src/identifier.js +90 -0
- data/node_modules/acorn/src/index.js +67 -0
- data/node_modules/acorn/src/location.js +24 -0
- data/node_modules/acorn/src/locutil.js +42 -0
- data/node_modules/acorn/src/loose/acorn_loose.js +0 -0
- data/node_modules/acorn/src/loose/expression.js +501 -0
- data/node_modules/acorn/src/loose/index.js +50 -0
- data/node_modules/acorn/src/loose/parseutil.js +1 -0
- data/node_modules/acorn/src/loose/state.js +160 -0
- data/node_modules/acorn/src/loose/statement.js +420 -0
- data/node_modules/acorn/src/loose/tokenize.js +108 -0
- data/node_modules/acorn/src/lval.js +215 -0
- data/node_modules/acorn/src/node.js +50 -0
- data/node_modules/acorn/src/options.js +121 -0
- data/node_modules/acorn/src/parseutil.js +102 -0
- data/node_modules/acorn/src/state.js +104 -0
- data/node_modules/acorn/src/statement.js +626 -0
- data/node_modules/acorn/src/tokencontext.js +109 -0
- data/node_modules/acorn/src/tokenize.js +682 -0
- data/node_modules/acorn/src/tokentype.js +147 -0
- data/node_modules/acorn/src/util.js +9 -0
- data/node_modules/acorn/src/walk/index.js +340 -0
- data/node_modules/acorn/src/whitespace.js +12 -0
- data/node_modules/amdefine/LICENSE +58 -0
- data/node_modules/amdefine/README.md +171 -0
- data/node_modules/amdefine/amdefine.js +301 -0
- data/node_modules/amdefine/intercept.js +36 -0
- data/node_modules/amdefine/package.json +86 -0
- data/node_modules/ansi-regex/index.js +4 -0
- data/node_modules/ansi-regex/license +21 -0
- data/node_modules/ansi-regex/package.json +121 -0
- data/node_modules/ansi-regex/readme.md +31 -0
- data/node_modules/ansi-styles/index.js +65 -0
- data/node_modules/ansi-styles/license +21 -0
- data/node_modules/ansi-styles/package.json +114 -0
- data/node_modules/ansi-styles/readme.md +86 -0
- data/node_modules/array-equal/.npmignore +1 -0
- data/node_modules/array-equal/LICENSE +22 -0
- data/node_modules/array-equal/README.md +11 -0
- data/node_modules/array-equal/component.json +10 -0
- data/node_modules/array-equal/index.js +9 -0
- data/node_modules/array-equal/package.json +75 -0
- data/node_modules/asn1/.npmignore +2 -0
- data/node_modules/asn1/.travis.yml +4 -0
- data/node_modules/asn1/LICENSE +19 -0
- data/node_modules/asn1/README.md +50 -0
- data/node_modules/asn1/lib/ber/errors.js +13 -0
- data/node_modules/asn1/lib/ber/index.js +27 -0
- data/node_modules/asn1/lib/ber/reader.js +261 -0
- data/node_modules/asn1/lib/ber/types.js +36 -0
- data/node_modules/asn1/lib/ber/writer.js +316 -0
- data/node_modules/asn1/lib/index.js +20 -0
- data/node_modules/asn1/package.json +98 -0
- data/node_modules/asn1/tst/ber/reader.test.js +208 -0
- data/node_modules/asn1/tst/ber/writer.test.js +370 -0
- data/node_modules/assert-plus/AUTHORS +6 -0
- data/node_modules/assert-plus/CHANGES.md +8 -0
- data/node_modules/assert-plus/README.md +155 -0
- data/node_modules/assert-plus/assert.js +206 -0
- data/node_modules/assert-plus/package.json +115 -0
- data/node_modules/assertion-error/.npmignore +11 -0
- data/node_modules/assertion-error/History.md +19 -0
- data/node_modules/assertion-error/README.md +41 -0
- data/node_modules/assertion-error/index.js +116 -0
- data/node_modules/assertion-error/package.json +95 -0
- data/node_modules/asynckit/LICENSE +21 -0
- data/node_modules/asynckit/README.md +233 -0
- data/node_modules/asynckit/bench.js +76 -0
- data/node_modules/asynckit/index.js +6 -0
- data/node_modules/asynckit/lib/abort.js +29 -0
- data/node_modules/asynckit/lib/async.js +34 -0
- data/node_modules/asynckit/lib/defer.js +26 -0
- data/node_modules/asynckit/lib/iterate.js +75 -0
- data/node_modules/asynckit/lib/readable_asynckit.js +91 -0
- data/node_modules/asynckit/lib/readable_parallel.js +25 -0
- data/node_modules/asynckit/lib/readable_serial.js +25 -0
- data/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
- data/node_modules/asynckit/lib/state.js +37 -0
- data/node_modules/asynckit/lib/streamify.js +141 -0
- data/node_modules/asynckit/lib/terminator.js +29 -0
- data/node_modules/asynckit/package.json +126 -0
- data/node_modules/asynckit/parallel.js +43 -0
- data/node_modules/asynckit/serial.js +17 -0
- data/node_modules/asynckit/serialOrdered.js +75 -0
- data/node_modules/asynckit/stream.js +21 -0
- data/node_modules/aws-sign2/LICENSE +55 -0
- data/node_modules/aws-sign2/README.md +4 -0
- data/node_modules/aws-sign2/index.js +212 -0
- data/node_modules/aws-sign2/package.json +81 -0
- data/node_modules/aws4/.npmignore +4 -0
- data/node_modules/aws4/.tern-port +1 -0
- data/node_modules/aws4/.travis.yml +5 -0
- data/node_modules/aws4/LICENSE +19 -0
- data/node_modules/aws4/README.md +523 -0
- data/node_modules/aws4/aws4.js +323 -0
- data/node_modules/aws4/lru.js +96 -0
- data/node_modules/aws4/package.json +140 -0
- data/node_modules/bcrypt-pbkdf/README.md +39 -0
- data/node_modules/bcrypt-pbkdf/index.js +559 -0
- data/node_modules/bcrypt-pbkdf/package.json +72 -0
- data/node_modules/boom/.npmignore +18 -0
- data/node_modules/boom/.travis.yml +8 -0
- data/node_modules/boom/CONTRIBUTING.md +1 -0
- data/node_modules/boom/LICENSE +28 -0
- data/node_modules/boom/README.md +652 -0
- data/node_modules/boom/images/boom.png +0 -0
- data/node_modules/boom/lib/index.js +318 -0
- data/node_modules/boom/package.json +98 -0
- data/node_modules/boom/test/index.js +654 -0
- data/node_modules/caseless/LICENSE +28 -0
- data/node_modules/caseless/README.md +45 -0
- data/node_modules/caseless/index.js +66 -0
- data/node_modules/caseless/package.json +96 -0
- data/node_modules/caseless/test.js +40 -0
- data/node_modules/chai/.npmignore +14 -0
- data/node_modules/chai/CODE_OF_CONDUCT.md +58 -0
- data/node_modules/chai/CONTRIBUTING.md +214 -0
- data/node_modules/chai/History.md +1059 -0
- data/node_modules/chai/README.md +83 -0
- data/node_modules/chai/ReleaseNotes.md +737 -0
- data/node_modules/chai/bower.json +26 -0
- data/node_modules/chai/chai.js +6142 -0
- data/node_modules/chai/index.js +1 -0
- data/node_modules/chai/karma.conf.js +28 -0
- data/node_modules/chai/karma.sauce.js +41 -0
- data/node_modules/chai/lib/chai.js +93 -0
- data/node_modules/chai/lib/chai/assertion.js +131 -0
- data/node_modules/chai/lib/chai/config.js +55 -0
- data/node_modules/chai/lib/chai/core/assertions.js +1860 -0
- data/node_modules/chai/lib/chai/interface/assert.js +1645 -0
- data/node_modules/chai/lib/chai/interface/expect.js +34 -0
- data/node_modules/chai/lib/chai/interface/should.js +201 -0
- data/node_modules/chai/lib/chai/utils/addChainableMethod.js +112 -0
- data/node_modules/chai/lib/chai/utils/addMethod.js +44 -0
- data/node_modules/chai/lib/chai/utils/addProperty.js +48 -0
- data/node_modules/chai/lib/chai/utils/expectTypes.js +42 -0
- data/node_modules/chai/lib/chai/utils/flag.js +33 -0
- data/node_modules/chai/lib/chai/utils/getActual.js +20 -0
- data/node_modules/chai/lib/chai/utils/getEnumerableProperties.js +26 -0
- data/node_modules/chai/lib/chai/utils/getMessage.js +51 -0
- data/node_modules/chai/lib/chai/utils/getName.js +22 -0
- data/node_modules/chai/lib/chai/utils/getPathInfo.js +111 -0
- data/node_modules/chai/lib/chai/utils/getPathValue.js +43 -0
- data/node_modules/chai/lib/chai/utils/getProperties.js +36 -0
- data/node_modules/chai/lib/chai/utils/hasProperty.js +64 -0
- data/node_modules/chai/lib/chai/utils/index.js +130 -0
- data/node_modules/chai/lib/chai/utils/inspect.js +335 -0
- data/node_modules/chai/lib/chai/utils/objDisplay.js +50 -0
- data/node_modules/chai/lib/chai/utils/overwriteChainableMethod.js +54 -0
- data/node_modules/chai/lib/chai/utils/overwriteMethod.js +52 -0
- data/node_modules/chai/lib/chai/utils/overwriteProperty.js +55 -0
- data/node_modules/chai/lib/chai/utils/test.js +28 -0
- data/node_modules/chai/lib/chai/utils/transferFlags.js +45 -0
- data/node_modules/chai/package.json +128 -0
- data/node_modules/chai/sauce.browsers.js +128 -0
- data/node_modules/chalk/index.js +116 -0
- data/node_modules/chalk/license +21 -0
- data/node_modules/chalk/package.json +140 -0
- data/node_modules/chalk/readme.md +213 -0
- data/node_modules/combined-stream/License +19 -0
- data/node_modules/combined-stream/Readme.md +138 -0
- data/node_modules/combined-stream/lib/combined_stream.js +188 -0
- data/node_modules/combined-stream/package.json +101 -0
- data/node_modules/commander/History.md +261 -0
- data/node_modules/commander/LICENSE +22 -0
- data/node_modules/commander/Readme.md +351 -0
- data/node_modules/commander/index.js +1110 -0
- data/node_modules/commander/package.json +104 -0
- data/node_modules/content-type-parser/LICENSE.txt +19 -0
- data/node_modules/content-type-parser/README.md +60 -0
- data/node_modules/content-type-parser/lib/content-type-parser.js +103 -0
- data/node_modules/content-type-parser/package.json +96 -0
- data/node_modules/cryptiles/.npmignore +18 -0
- data/node_modules/cryptiles/.travis.yml +8 -0
- data/node_modules/cryptiles/LICENSE +28 -0
- data/node_modules/cryptiles/README.md +16 -0
- data/node_modules/cryptiles/lib/index.js +68 -0
- data/node_modules/cryptiles/package.json +94 -0
- data/node_modules/cryptiles/test/index.js +102 -0
- data/node_modules/cssom/LICENSE.txt +20 -0
- data/node_modules/cssom/README.mdown +69 -0
- data/node_modules/cssom/lib/CSSDocumentRule.js +39 -0
- data/node_modules/cssom/lib/CSSFontFaceRule.js +36 -0
- data/node_modules/cssom/lib/CSSImportRule.js +132 -0
- data/node_modules/cssom/lib/CSSKeyframeRule.js +37 -0
- data/node_modules/cssom/lib/CSSKeyframesRule.js +39 -0
- data/node_modules/cssom/lib/CSSMediaRule.js +41 -0
- data/node_modules/cssom/lib/CSSRule.js +43 -0
- data/node_modules/cssom/lib/CSSStyleDeclaration.js +148 -0
- data/node_modules/cssom/lib/CSSStyleRule.js +190 -0
- data/node_modules/cssom/lib/CSSStyleSheet.js +88 -0
- data/node_modules/cssom/lib/CSSValue.js +43 -0
- data/node_modules/cssom/lib/CSSValueExpression.js +344 -0
- data/node_modules/cssom/lib/MatcherList.js +62 -0
- data/node_modules/cssom/lib/MediaList.js +61 -0
- data/node_modules/cssom/lib/StyleSheet.js +17 -0
- data/node_modules/cssom/lib/clone.js +76 -0
- data/node_modules/cssom/lib/index.js +19 -0
- data/node_modules/cssom/lib/parse.js +381 -0
- data/node_modules/cssom/package.json +96 -0
- data/node_modules/cssstyle/.npmignore +1 -0
- data/node_modules/cssstyle/MIT-LICENSE.txt +20 -0
- data/node_modules/cssstyle/README.md +27 -0
- data/node_modules/cssstyle/lib/CSSStyleDeclaration.js +233 -0
- data/node_modules/cssstyle/lib/parsers.js +670 -0
- data/node_modules/cssstyle/lib/properties.js +5858 -0
- data/node_modules/cssstyle/lib/properties/alignmentBaseline.js +12 -0
- data/node_modules/cssstyle/lib/properties/azimuth.js +65 -0
- data/node_modules/cssstyle/lib/properties/background.js +24 -0
- data/node_modules/cssstyle/lib/properties/backgroundAttachment.js +22 -0
- data/node_modules/cssstyle/lib/properties/backgroundClip.js +12 -0
- data/node_modules/cssstyle/lib/properties/backgroundColor.js +33 -0
- data/node_modules/cssstyle/lib/properties/backgroundImage.js +29 -0
- data/node_modules/cssstyle/lib/properties/backgroundOrigin.js +12 -0
- data/node_modules/cssstyle/lib/properties/backgroundPosition.js +56 -0
- data/node_modules/cssstyle/lib/properties/backgroundPositionX.js +12 -0
- data/node_modules/cssstyle/lib/properties/backgroundPositionY.js +12 -0
- data/node_modules/cssstyle/lib/properties/backgroundRepeat.js +25 -0
- data/node_modules/cssstyle/lib/properties/backgroundRepeatX.js +12 -0
- data/node_modules/cssstyle/lib/properties/backgroundRepeatY.js +12 -0
- data/node_modules/cssstyle/lib/properties/backgroundSize.js +12 -0
- data/node_modules/cssstyle/lib/properties/baselineShift.js +12 -0
- data/node_modules/cssstyle/lib/properties/border.js +49 -0
- data/node_modules/cssstyle/lib/properties/borderBottom.js +23 -0
- data/node_modules/cssstyle/lib/properties/borderBottomColor.js +16 -0
- data/node_modules/cssstyle/lib/properties/borderBottomLeftRadius.js +12 -0
- data/node_modules/cssstyle/lib/properties/borderBottomRightRadius.js +12 -0
- data/node_modules/cssstyle/lib/properties/borderBottomStyle.js +21 -0
- data/node_modules/cssstyle/lib/properties/borderBottomWidth.js +16 -0
- data/node_modules/cssstyle/lib/properties/borderCollapse.js +25 -0
- data/node_modules/cssstyle/lib/properties/borderColor.js +28 -0
- data/node_modules/cssstyle/lib/properties/borderImage.js +12 -0
- data/node_modules/cssstyle/lib/properties/borderImageOutset.js +12 -0
- data/node_modules/cssstyle/lib/properties/borderImageRepeat.js +12 -0
- data/node_modules/cssstyle/lib/properties/borderImageSlice.js +12 -0
- data/node_modules/cssstyle/lib/properties/borderImageSource.js +12 -0
- data/node_modules/cssstyle/lib/properties/borderImageWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/borderLeft.js +23 -0
- data/node_modules/cssstyle/lib/properties/borderLeftColor.js +16 -0
- data/node_modules/cssstyle/lib/properties/borderLeftStyle.js +21 -0
- data/node_modules/cssstyle/lib/properties/borderLeftWidth.js +16 -0
- data/node_modules/cssstyle/lib/properties/borderRadius.js +12 -0
- data/node_modules/cssstyle/lib/properties/borderRight.js +23 -0
- data/node_modules/cssstyle/lib/properties/borderRightColor.js +16 -0
- data/node_modules/cssstyle/lib/properties/borderRightStyle.js +21 -0
- data/node_modules/cssstyle/lib/properties/borderRightWidth.js +16 -0
- data/node_modules/cssstyle/lib/properties/borderSpacing.js +42 -0
- data/node_modules/cssstyle/lib/properties/borderStyle.js +27 -0
- data/node_modules/cssstyle/lib/properties/borderTop.js +22 -0
- data/node_modules/cssstyle/lib/properties/borderTopColor.js +16 -0
- data/node_modules/cssstyle/lib/properties/borderTopLeftRadius.js +12 -0
- data/node_modules/cssstyle/lib/properties/borderTopRightRadius.js +12 -0
- data/node_modules/cssstyle/lib/properties/borderTopStyle.js +21 -0
- data/node_modules/cssstyle/lib/properties/borderTopWidth.js +17 -0
- data/node_modules/cssstyle/lib/properties/borderWidth.js +47 -0
- data/node_modules/cssstyle/lib/properties/bottom.js +14 -0
- data/node_modules/cssstyle/lib/properties/boxShadow.js +12 -0
- data/node_modules/cssstyle/lib/properties/boxSizing.js +12 -0
- data/node_modules/cssstyle/lib/properties/captionSide.js +12 -0
- data/node_modules/cssstyle/lib/properties/clear.js +16 -0
- data/node_modules/cssstyle/lib/properties/clip.js +49 -0
- data/node_modules/cssstyle/lib/properties/color.js +14 -0
- data/node_modules/cssstyle/lib/properties/colorInterpolation.js +12 -0
- data/node_modules/cssstyle/lib/properties/colorInterpolationFilters.js +12 -0
- data/node_modules/cssstyle/lib/properties/colorProfile.js +12 -0
- data/node_modules/cssstyle/lib/properties/colorRendering.js +12 -0
- data/node_modules/cssstyle/lib/properties/content.js +12 -0
- data/node_modules/cssstyle/lib/properties/counterIncrement.js +12 -0
- data/node_modules/cssstyle/lib/properties/counterReset.js +12 -0
- data/node_modules/cssstyle/lib/properties/cssFloat.js +12 -0
- data/node_modules/cssstyle/lib/properties/cue.js +12 -0
- data/node_modules/cssstyle/lib/properties/cueAfter.js +12 -0
- data/node_modules/cssstyle/lib/properties/cueBefore.js +12 -0
- data/node_modules/cssstyle/lib/properties/cursor.js +12 -0
- data/node_modules/cssstyle/lib/properties/direction.js +12 -0
- data/node_modules/cssstyle/lib/properties/display.js +12 -0
- data/node_modules/cssstyle/lib/properties/dominantBaseline.js +12 -0
- data/node_modules/cssstyle/lib/properties/elevation.js +12 -0
- data/node_modules/cssstyle/lib/properties/emptyCells.js +12 -0
- data/node_modules/cssstyle/lib/properties/enableBackground.js +12 -0
- data/node_modules/cssstyle/lib/properties/fill.js +12 -0
- data/node_modules/cssstyle/lib/properties/fillOpacity.js +12 -0
- data/node_modules/cssstyle/lib/properties/fillRule.js +12 -0
- data/node_modules/cssstyle/lib/properties/filter.js +12 -0
- data/node_modules/cssstyle/lib/properties/floodColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/floodOpacity.js +12 -0
- data/node_modules/cssstyle/lib/properties/font.js +40 -0
- data/node_modules/cssstyle/lib/properties/fontFamily.js +33 -0
- data/node_modules/cssstyle/lib/properties/fontSize.js +25 -0
- data/node_modules/cssstyle/lib/properties/fontSizeAdjust.js +12 -0
- data/node_modules/cssstyle/lib/properties/fontStretch.js +12 -0
- data/node_modules/cssstyle/lib/properties/fontStyle.js +18 -0
- data/node_modules/cssstyle/lib/properties/fontVariant.js +18 -0
- data/node_modules/cssstyle/lib/properties/fontWeight.js +18 -0
- data/node_modules/cssstyle/lib/properties/glyphOrientationHorizontal.js +12 -0
- data/node_modules/cssstyle/lib/properties/glyphOrientationVertical.js +12 -0
- data/node_modules/cssstyle/lib/properties/height.js +24 -0
- data/node_modules/cssstyle/lib/properties/imageRendering.js +12 -0
- data/node_modules/cssstyle/lib/properties/kerning.js +12 -0
- data/node_modules/cssstyle/lib/properties/left.js +14 -0
- data/node_modules/cssstyle/lib/properties/letterSpacing.js +12 -0
- data/node_modules/cssstyle/lib/properties/lightingColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/lineHeight.js +21 -0
- data/node_modules/cssstyle/lib/properties/listStyle.js +12 -0
- data/node_modules/cssstyle/lib/properties/listStyleImage.js +12 -0
- data/node_modules/cssstyle/lib/properties/listStylePosition.js +12 -0
- data/node_modules/cssstyle/lib/properties/listStyleType.js +12 -0
- data/node_modules/cssstyle/lib/properties/margin.js +59 -0
- data/node_modules/cssstyle/lib/properties/marginBottom.js +13 -0
- data/node_modules/cssstyle/lib/properties/marginLeft.js +13 -0
- data/node_modules/cssstyle/lib/properties/marginRight.js +13 -0
- data/node_modules/cssstyle/lib/properties/marginTop.js +13 -0
- data/node_modules/cssstyle/lib/properties/marker.js +12 -0
- data/node_modules/cssstyle/lib/properties/markerEnd.js +12 -0
- data/node_modules/cssstyle/lib/properties/markerMid.js +12 -0
- data/node_modules/cssstyle/lib/properties/markerOffset.js +12 -0
- data/node_modules/cssstyle/lib/properties/markerStart.js +12 -0
- data/node_modules/cssstyle/lib/properties/marks.js +12 -0
- data/node_modules/cssstyle/lib/properties/mask.js +12 -0
- data/node_modules/cssstyle/lib/properties/maxHeight.js +12 -0
- data/node_modules/cssstyle/lib/properties/maxWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/minHeight.js +12 -0
- data/node_modules/cssstyle/lib/properties/minWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/opacity.js +14 -0
- data/node_modules/cssstyle/lib/properties/orphans.js +12 -0
- data/node_modules/cssstyle/lib/properties/outline.js +12 -0
- data/node_modules/cssstyle/lib/properties/outlineColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/outlineOffset.js +12 -0
- data/node_modules/cssstyle/lib/properties/outlineStyle.js +12 -0
- data/node_modules/cssstyle/lib/properties/outlineWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/overflow.js +12 -0
- data/node_modules/cssstyle/lib/properties/overflowX.js +12 -0
- data/node_modules/cssstyle/lib/properties/overflowY.js +12 -0
- data/node_modules/cssstyle/lib/properties/padding.js +52 -0
- data/node_modules/cssstyle/lib/properties/paddingBottom.js +13 -0
- data/node_modules/cssstyle/lib/properties/paddingLeft.js +13 -0
- data/node_modules/cssstyle/lib/properties/paddingRight.js +13 -0
- data/node_modules/cssstyle/lib/properties/paddingTop.js +13 -0
- data/node_modules/cssstyle/lib/properties/page.js +12 -0
- data/node_modules/cssstyle/lib/properties/pageBreakAfter.js +12 -0
- data/node_modules/cssstyle/lib/properties/pageBreakBefore.js +12 -0
- data/node_modules/cssstyle/lib/properties/pageBreakInside.js +12 -0
- data/node_modules/cssstyle/lib/properties/pause.js +12 -0
- data/node_modules/cssstyle/lib/properties/pauseAfter.js +12 -0
- data/node_modules/cssstyle/lib/properties/pauseBefore.js +12 -0
- data/node_modules/cssstyle/lib/properties/pitch.js +12 -0
- data/node_modules/cssstyle/lib/properties/pitchRange.js +12 -0
- data/node_modules/cssstyle/lib/properties/playDuring.js +12 -0
- data/node_modules/cssstyle/lib/properties/pointerEvents.js +12 -0
- data/node_modules/cssstyle/lib/properties/position.js +12 -0
- data/node_modules/cssstyle/lib/properties/quotes.js +12 -0
- data/node_modules/cssstyle/lib/properties/resize.js +12 -0
- data/node_modules/cssstyle/lib/properties/richness.js +12 -0
- data/node_modules/cssstyle/lib/properties/right.js +14 -0
- data/node_modules/cssstyle/lib/properties/shapeRendering.js +12 -0
- data/node_modules/cssstyle/lib/properties/size.js +12 -0
- data/node_modules/cssstyle/lib/properties/speak.js +12 -0
- data/node_modules/cssstyle/lib/properties/speakHeader.js +12 -0
- data/node_modules/cssstyle/lib/properties/speakNumeral.js +12 -0
- data/node_modules/cssstyle/lib/properties/speakPunctuation.js +12 -0
- data/node_modules/cssstyle/lib/properties/speechRate.js +12 -0
- data/node_modules/cssstyle/lib/properties/src.js +12 -0
- data/node_modules/cssstyle/lib/properties/stopColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/stopOpacity.js +12 -0
- data/node_modules/cssstyle/lib/properties/stress.js +12 -0
- data/node_modules/cssstyle/lib/properties/stroke.js +12 -0
- data/node_modules/cssstyle/lib/properties/strokeDasharray.js +12 -0
- data/node_modules/cssstyle/lib/properties/strokeDashoffset.js +12 -0
- data/node_modules/cssstyle/lib/properties/strokeLinecap.js +12 -0
- data/node_modules/cssstyle/lib/properties/strokeLinejoin.js +12 -0
- data/node_modules/cssstyle/lib/properties/strokeMiterlimit.js +12 -0
- data/node_modules/cssstyle/lib/properties/strokeOpacity.js +12 -0
- data/node_modules/cssstyle/lib/properties/strokeWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/tableLayout.js +12 -0
- data/node_modules/cssstyle/lib/properties/textAlign.js +12 -0
- data/node_modules/cssstyle/lib/properties/textAnchor.js +12 -0
- data/node_modules/cssstyle/lib/properties/textDecoration.js +12 -0
- data/node_modules/cssstyle/lib/properties/textIndent.js +12 -0
- data/node_modules/cssstyle/lib/properties/textLineThrough.js +12 -0
- data/node_modules/cssstyle/lib/properties/textLineThroughColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/textLineThroughMode.js +12 -0
- data/node_modules/cssstyle/lib/properties/textLineThroughStyle.js +12 -0
- data/node_modules/cssstyle/lib/properties/textLineThroughWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/textOverflow.js +12 -0
- data/node_modules/cssstyle/lib/properties/textOverline.js +12 -0
- data/node_modules/cssstyle/lib/properties/textOverlineColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/textOverlineMode.js +12 -0
- data/node_modules/cssstyle/lib/properties/textOverlineStyle.js +12 -0
- data/node_modules/cssstyle/lib/properties/textOverlineWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/textRendering.js +12 -0
- data/node_modules/cssstyle/lib/properties/textShadow.js +12 -0
- data/node_modules/cssstyle/lib/properties/textTransform.js +12 -0
- data/node_modules/cssstyle/lib/properties/textUnderline.js +12 -0
- data/node_modules/cssstyle/lib/properties/textUnderlineColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/textUnderlineMode.js +12 -0
- data/node_modules/cssstyle/lib/properties/textUnderlineStyle.js +12 -0
- data/node_modules/cssstyle/lib/properties/textUnderlineWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/top.js +14 -0
- data/node_modules/cssstyle/lib/properties/unicodeBidi.js +12 -0
- data/node_modules/cssstyle/lib/properties/unicodeRange.js +12 -0
- data/node_modules/cssstyle/lib/properties/vectorEffect.js +12 -0
- data/node_modules/cssstyle/lib/properties/verticalAlign.js +12 -0
- data/node_modules/cssstyle/lib/properties/visibility.js +12 -0
- data/node_modules/cssstyle/lib/properties/voiceFamily.js +12 -0
- data/node_modules/cssstyle/lib/properties/volume.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitAnimation.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitAnimationDelay.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitAnimationDirection.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitAnimationDuration.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitAnimationFillMode.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitAnimationIterationCount.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitAnimationName.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitAnimationPlayState.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitAnimationTimingFunction.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitAppearance.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitAspectRatio.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBackfaceVisibility.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBackgroundClip.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBackgroundComposite.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBackgroundOrigin.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBackgroundSize.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderAfter.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderAfterColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderAfterStyle.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderAfterWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderBefore.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderBeforeColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderBeforeStyle.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderBeforeWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderEnd.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderEndColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderEndStyle.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderEndWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderFit.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderHorizontalSpacing.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderImage.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderRadius.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderStart.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderStartColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderStartStyle.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderStartWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBorderVerticalSpacing.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBoxAlign.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBoxDirection.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBoxFlex.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBoxFlexGroup.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBoxLines.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBoxOrdinalGroup.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBoxOrient.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBoxPack.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBoxReflect.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitBoxShadow.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitColorCorrection.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitColumnAxis.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitColumnBreakAfter.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitColumnBreakBefore.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitColumnBreakInside.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitColumnCount.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitColumnGap.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitColumnRule.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitColumnRuleColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/webkitColumnRuleStyle.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitColumnRuleWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitColumnSpan.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitColumnWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitColumns.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFilter.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFlexAlign.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFlexDirection.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFlexFlow.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFlexItemAlign.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFlexLinePack.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFlexOrder.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFlexPack.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFlexWrap.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFlowFrom.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFlowInto.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFontFeatureSettings.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFontKerning.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFontSizeDelta.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFontSmoothing.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitFontVariantLigatures.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitHighlight.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitHyphenateCharacter.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitHyphenateLimitAfter.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitHyphenateLimitBefore.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitHyphenateLimitLines.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitHyphens.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitLineAlign.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitLineBoxContain.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitLineBreak.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitLineClamp.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitLineGrid.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitLineSnap.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitLocale.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitLogicalHeight.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitLogicalWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarginAfter.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarginAfterCollapse.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarginBefore.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarginBeforeCollapse.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarginBottomCollapse.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarginCollapse.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarginEnd.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarginStart.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarginTopCollapse.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarquee.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarqueeDirection.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarqueeIncrement.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarqueeRepetition.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarqueeSpeed.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMarqueeStyle.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMask.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskAttachment.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskBoxImage.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskBoxImageOutset.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskBoxImageRepeat.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskBoxImageSlice.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskBoxImageSource.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskBoxImageWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskClip.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskComposite.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskImage.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskOrigin.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskPosition.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskPositionX.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskPositionY.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskRepeat.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskRepeatX.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskRepeatY.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaskSize.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMatchNearestMailBlockquoteColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/webkitMaxLogicalHeight.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMaxLogicalWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMinLogicalHeight.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitMinLogicalWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitNbspMode.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitOverflowScrolling.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitPaddingAfter.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitPaddingBefore.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitPaddingEnd.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitPaddingStart.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitPerspective.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitPerspectiveOrigin.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitPerspectiveOriginX.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitPerspectiveOriginY.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitPrintColorAdjust.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitRegionBreakAfter.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitRegionBreakBefore.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitRegionBreakInside.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitRegionOverflow.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitRtlOrdering.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitSvgShadow.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTapHighlightColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/webkitTextCombine.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTextDecorationsInEffect.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTextEmphasis.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTextEmphasisColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/webkitTextEmphasisPosition.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTextEmphasisStyle.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTextFillColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/webkitTextOrientation.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTextSecurity.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTextSizeAdjust.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTextStroke.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTextStrokeColor.js +14 -0
- data/node_modules/cssstyle/lib/properties/webkitTextStrokeWidth.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTransform.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTransformOrigin.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTransformOriginX.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTransformOriginY.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTransformOriginZ.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTransformStyle.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTransition.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTransitionDelay.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTransitionDuration.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTransitionProperty.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitTransitionTimingFunction.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitUserDrag.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitUserModify.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitUserSelect.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitWrap.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitWrapFlow.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitWrapMargin.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitWrapPadding.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitWrapShapeInside.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitWrapShapeOutside.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitWrapThrough.js +12 -0
- data/node_modules/cssstyle/lib/properties/webkitWritingMode.js +12 -0
- data/node_modules/cssstyle/lib/properties/whiteSpace.js +12 -0
- data/node_modules/cssstyle/lib/properties/widows.js +12 -0
- data/node_modules/cssstyle/lib/properties/width.js +24 -0
- data/node_modules/cssstyle/lib/properties/wordBreak.js +12 -0
- data/node_modules/cssstyle/lib/properties/wordSpacing.js +12 -0
- data/node_modules/cssstyle/lib/properties/wordWrap.js +12 -0
- data/node_modules/cssstyle/lib/properties/writingMode.js +12 -0
- data/node_modules/cssstyle/lib/properties/zIndex.js +12 -0
- data/node_modules/cssstyle/lib/properties/zoom.js +12 -0
- data/node_modules/cssstyle/package.json +109 -0
- data/node_modules/cssstyle/scripts/generate_properties.js +302 -0
- data/node_modules/cssstyle/scripts/run_tests.sh +4 -0
- data/node_modules/cssstyle/tests/tests.js +405 -0
- data/node_modules/dashdash/CHANGES.md +364 -0
- data/node_modules/dashdash/LICENSE.txt +24 -0
- data/node_modules/dashdash/README.md +574 -0
- data/node_modules/dashdash/etc/dashdash.bash_completion.in +389 -0
- data/node_modules/dashdash/lib/dashdash.js +1055 -0
- data/node_modules/dashdash/node_modules/assert-plus/AUTHORS +6 -0
- data/node_modules/dashdash/node_modules/assert-plus/CHANGES.md +14 -0
- data/node_modules/dashdash/node_modules/assert-plus/README.md +162 -0
- data/node_modules/dashdash/node_modules/assert-plus/assert.js +211 -0
- data/node_modules/dashdash/node_modules/assert-plus/package.json +115 -0
- data/node_modules/dashdash/package.json +125 -0
- data/node_modules/deep-eql/.npmignore +11 -0
- data/node_modules/deep-eql/History.md +28 -0
- data/node_modules/deep-eql/README.md +52 -0
- data/node_modules/deep-eql/index.js +1 -0
- data/node_modules/deep-eql/karma.conf.js +20 -0
- data/node_modules/deep-eql/lib/eql.js +257 -0
- data/node_modules/deep-eql/node_modules/type-detect/.npmignore +11 -0
- data/node_modules/deep-eql/node_modules/type-detect/History.md +18 -0
- data/node_modules/deep-eql/node_modules/type-detect/README.md +193 -0
- data/node_modules/deep-eql/node_modules/type-detect/index.js +1 -0
- data/node_modules/deep-eql/node_modules/type-detect/lib/type.js +142 -0
- data/node_modules/deep-eql/node_modules/type-detect/package.json +91 -0
- data/node_modules/deep-eql/package.json +98 -0
- data/node_modules/deep-is/.npmignore +1 -0
- data/node_modules/deep-is/.travis.yml +6 -0
- data/node_modules/deep-is/LICENSE +22 -0
- data/node_modules/deep-is/README.markdown +70 -0
- data/node_modules/deep-is/example/cmp.js +11 -0
- data/node_modules/deep-is/index.js +102 -0
- data/node_modules/deep-is/package.json +120 -0
- data/node_modules/deep-is/test/NaN.js +16 -0
- data/node_modules/deep-is/test/cmp.js +23 -0
- data/node_modules/deep-is/test/neg-vs-pos-0.js +15 -0
- data/node_modules/delayed-stream/.npmignore +1 -0
- data/node_modules/delayed-stream/License +19 -0
- data/node_modules/delayed-stream/Makefile +7 -0
- data/node_modules/delayed-stream/Readme.md +141 -0
- data/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
- data/node_modules/delayed-stream/package.json +97 -0
- data/node_modules/ecc-jsbn/.npmignore +15 -0
- data/node_modules/ecc-jsbn/LICENSE +21 -0
- data/node_modules/ecc-jsbn/README.md +8 -0
- data/node_modules/ecc-jsbn/index.js +57 -0
- data/node_modules/ecc-jsbn/lib/LICENSE-jsbn +40 -0
- data/node_modules/ecc-jsbn/lib/ec.js +561 -0
- data/node_modules/ecc-jsbn/lib/sec.js +170 -0
- data/node_modules/ecc-jsbn/package.json +90 -0
- data/node_modules/ecc-jsbn/test.js +14 -0
- data/node_modules/escape-string-regexp/index.js +11 -0
- data/node_modules/escape-string-regexp/license +21 -0
- data/node_modules/escape-string-regexp/package.json +109 -0
- data/node_modules/escape-string-regexp/readme.md +27 -0
- data/node_modules/escodegen/LICENSE.BSD +19 -0
- data/node_modules/escodegen/LICENSE.source-map +27 -0
- data/node_modules/escodegen/README.md +116 -0
- data/node_modules/escodegen/bin/escodegen.js +77 -0
- data/node_modules/escodegen/bin/esgenerate.js +64 -0
- data/node_modules/escodegen/escodegen.js +2607 -0
- data/node_modules/escodegen/package.json +122 -0
- data/node_modules/esprima/ChangeLog +174 -0
- data/node_modules/esprima/LICENSE.BSD +21 -0
- data/node_modules/esprima/README.md +27 -0
- data/node_modules/esprima/bin/esparse.js +126 -0
- data/node_modules/esprima/bin/esvalidate.js +199 -0
- data/node_modules/esprima/esprima.js +5740 -0
- data/node_modules/esprima/package.json +153 -0
- data/node_modules/estraverse/.editorconfig +10 -0
- data/node_modules/estraverse/.jshintrc +16 -0
- data/node_modules/estraverse/LICENSE.BSD +19 -0
- data/node_modules/estraverse/README.md +124 -0
- data/node_modules/estraverse/estraverse.js +845 -0
- data/node_modules/estraverse/gulpfile.js +70 -0
- data/node_modules/estraverse/package.json +95 -0
- data/node_modules/esutils/LICENSE.BSD +19 -0
- data/node_modules/esutils/README.md +169 -0
- data/node_modules/esutils/lib/ast.js +144 -0
- data/node_modules/esutils/lib/code.js +135 -0
- data/node_modules/esutils/lib/keyword.js +165 -0
- data/node_modules/esutils/lib/utils.js +33 -0
- data/node_modules/esutils/package.json +105 -0
- data/node_modules/extend/.eslintrc +192 -0
- data/node_modules/extend/.jscs.json +104 -0
- data/node_modules/extend/.npmignore +1 -0
- data/node_modules/extend/.travis.yml +44 -0
- data/node_modules/extend/CHANGELOG.md +69 -0
- data/node_modules/extend/LICENSE +23 -0
- data/node_modules/extend/README.md +62 -0
- data/node_modules/extend/component.json +32 -0
- data/node_modules/extend/index.js +86 -0
- data/node_modules/extend/package.json +106 -0
- data/node_modules/extsprintf/.gitmodules +6 -0
- data/node_modules/extsprintf/LICENSE +19 -0
- data/node_modules/extsprintf/Makefile +23 -0
- data/node_modules/extsprintf/Makefile.deps +39 -0
- data/node_modules/extsprintf/Makefile.targ +285 -0
- data/node_modules/extsprintf/README.md +39 -0
- data/node_modules/extsprintf/examples/simple.js +2 -0
- data/node_modules/extsprintf/jsl.node.conf +137 -0
- data/node_modules/extsprintf/lib/extsprintf.js +166 -0
- data/node_modules/extsprintf/package.json +74 -0
- data/node_modules/fast-levenshtein/LICENSE.md +25 -0
- data/node_modules/fast-levenshtein/README.md +104 -0
- data/node_modules/fast-levenshtein/levenshtein.js +102 -0
- data/node_modules/fast-levenshtein/package.json +108 -0
- data/node_modules/forever-agent/LICENSE +55 -0
- data/node_modules/forever-agent/README.md +4 -0
- data/node_modules/forever-agent/index.js +138 -0
- data/node_modules/forever-agent/package.json +88 -0
- data/node_modules/form-data/License +19 -0
- data/node_modules/form-data/README.md +217 -0
- data/node_modules/form-data/lib/browser.js +2 -0
- data/node_modules/form-data/lib/form_data.js +440 -0
- data/node_modules/form-data/lib/populate.js +10 -0
- data/node_modules/form-data/package.json +145 -0
- data/node_modules/generate-function/.npmignore +1 -0
- data/node_modules/generate-function/.travis.yml +3 -0
- data/node_modules/generate-function/README.md +72 -0
- data/node_modules/generate-function/example.js +27 -0
- data/node_modules/generate-function/index.js +61 -0
- data/node_modules/generate-function/package.json +87 -0
- data/node_modules/generate-function/test.js +33 -0
- data/node_modules/generate-object-property/.npmignore +1 -0
- data/node_modules/generate-object-property/.travis.yml +3 -0
- data/node_modules/generate-object-property/LICENSE +21 -0
- data/node_modules/generate-object-property/README.md +19 -0
- data/node_modules/generate-object-property/index.js +12 -0
- data/node_modules/generate-object-property/package.json +84 -0
- data/node_modules/generate-object-property/test.js +12 -0
- data/node_modules/getpass/.npmignore +8 -0
- data/node_modules/getpass/.travis.yml +9 -0
- data/node_modules/getpass/LICENSE +18 -0
- data/node_modules/getpass/README.md +32 -0
- data/node_modules/getpass/lib/index.js +123 -0
- data/node_modules/getpass/node_modules/assert-plus/AUTHORS +6 -0
- data/node_modules/getpass/node_modules/assert-plus/CHANGES.md +14 -0
- data/node_modules/getpass/node_modules/assert-plus/README.md +162 -0
- data/node_modules/getpass/node_modules/assert-plus/assert.js +211 -0
- data/node_modules/getpass/node_modules/assert-plus/package.json +115 -0
- data/node_modules/getpass/package.json +90 -0
- data/node_modules/graceful-readlink/.npmignore +3 -0
- data/node_modules/graceful-readlink/.travis.yml +5 -0
- data/node_modules/graceful-readlink/LICENSE +22 -0
- data/node_modules/graceful-readlink/README.md +17 -0
- data/node_modules/graceful-readlink/index.js +12 -0
- data/node_modules/graceful-readlink/package.json +83 -0
- data/node_modules/har-validator/LICENSE +13 -0
- data/node_modules/har-validator/README.md +309 -0
- data/node_modules/har-validator/bin/har-validator +56 -0
- data/node_modules/har-validator/lib/async.js +14 -0
- data/node_modules/har-validator/lib/error.js +10 -0
- data/node_modules/har-validator/lib/index.js +22 -0
- data/node_modules/har-validator/lib/runner.js +29 -0
- data/node_modules/har-validator/lib/schemas/cache.json +13 -0
- data/node_modules/har-validator/lib/schemas/cacheEntry.json +31 -0
- data/node_modules/har-validator/lib/schemas/content.json +27 -0
- data/node_modules/har-validator/lib/schemas/cookie.json +34 -0
- data/node_modules/har-validator/lib/schemas/creator.json +18 -0
- data/node_modules/har-validator/lib/schemas/entry.json +51 -0
- data/node_modules/har-validator/lib/schemas/har.json +11 -0
- data/node_modules/har-validator/lib/schemas/index.js +49 -0
- data/node_modules/har-validator/lib/schemas/log.json +34 -0
- data/node_modules/har-validator/lib/schemas/page.json +30 -0
- data/node_modules/har-validator/lib/schemas/pageTimings.json +16 -0
- data/node_modules/har-validator/lib/schemas/postData.json +41 -0
- data/node_modules/har-validator/lib/schemas/record.json +18 -0
- data/node_modules/har-validator/lib/schemas/request.json +55 -0
- data/node_modules/har-validator/lib/schemas/response.json +52 -0
- data/node_modules/har-validator/lib/schemas/timings.json +40 -0
- data/node_modules/har-validator/package.json +120 -0
- data/node_modules/has-ansi/index.js +4 -0
- data/node_modules/has-ansi/license +21 -0
- data/node_modules/has-ansi/package.json +118 -0
- data/node_modules/has-ansi/readme.md +36 -0
- data/node_modules/hawk/.npmignore +20 -0
- data/node_modules/hawk/.travis.yml +5 -0
- data/node_modules/hawk/LICENSE +28 -0
- data/node_modules/hawk/README.md +634 -0
- data/node_modules/hawk/bower.json +24 -0
- data/node_modules/hawk/component.json +19 -0
- data/node_modules/hawk/dist/client.js +343 -0
- data/node_modules/hawk/example/usage.js +78 -0
- data/node_modules/hawk/images/hawk.png +0 -0
- data/node_modules/hawk/images/logo.png +0 -0
- data/node_modules/hawk/lib/browser.js +637 -0
- data/node_modules/hawk/lib/client.js +369 -0
- data/node_modules/hawk/lib/crypto.js +126 -0
- data/node_modules/hawk/lib/index.js +15 -0
- data/node_modules/hawk/lib/server.js +548 -0
- data/node_modules/hawk/lib/utils.js +184 -0
- data/node_modules/hawk/package.json +101 -0
- data/node_modules/hawk/test/browser.js +1492 -0
- data/node_modules/hawk/test/client.js +440 -0
- data/node_modules/hawk/test/crypto.js +70 -0
- data/node_modules/hawk/test/index.js +378 -0
- data/node_modules/hawk/test/readme.js +95 -0
- data/node_modules/hawk/test/server.js +1329 -0
- data/node_modules/hawk/test/uri.js +838 -0
- data/node_modules/hawk/test/utils.js +149 -0
- data/node_modules/hoek/.npmignore +18 -0
- data/node_modules/hoek/.travis.yml +7 -0
- data/node_modules/hoek/CONTRIBUTING.md +1 -0
- data/node_modules/hoek/LICENSE +31 -0
- data/node_modules/hoek/README.md +584 -0
- data/node_modules/hoek/images/hoek.png +0 -0
- data/node_modules/hoek/lib/escape.js +132 -0
- data/node_modules/hoek/lib/index.js +993 -0
- data/node_modules/hoek/package.json +96 -0
- data/node_modules/hoek/test/escaper.js +88 -0
- data/node_modules/hoek/test/index.js +2513 -0
- data/node_modules/hoek/test/modules/ignore.txt +0 -0
- data/node_modules/hoek/test/modules/test1.js +1 -0
- data/node_modules/hoek/test/modules/test2.js +1 -0
- data/node_modules/hoek/test/modules/test3.js +1 -0
- data/node_modules/html-encoding-sniffer/LICENSE.txt +19 -0
- data/node_modules/html-encoding-sniffer/README.md +38 -0
- data/node_modules/html-encoding-sniffer/lib/html-encoding-sniffer.js +302 -0
- data/node_modules/html-encoding-sniffer/package.json +98 -0
- data/node_modules/http-signature/.dir-locals.el +6 -0
- data/node_modules/http-signature/.npmignore +7 -0
- data/node_modules/http-signature/CHANGES.md +46 -0
- data/node_modules/http-signature/LICENSE +18 -0
- data/node_modules/http-signature/README.md +79 -0
- data/node_modules/http-signature/http_signing.md +363 -0
- data/node_modules/http-signature/lib/index.js +29 -0
- data/node_modules/http-signature/lib/parser.js +318 -0
- data/node_modules/http-signature/lib/signer.js +399 -0
- data/node_modules/http-signature/lib/utils.js +112 -0
- data/node_modules/http-signature/lib/verify.js +88 -0
- data/node_modules/http-signature/package.json +116 -0
- data/node_modules/iconv-lite/.npmignore +6 -0
- data/node_modules/iconv-lite/.travis.yml +22 -0
- data/node_modules/iconv-lite/Changelog.md +108 -0
- data/node_modules/iconv-lite/LICENSE +21 -0
- data/node_modules/iconv-lite/README.md +159 -0
- data/node_modules/iconv-lite/encodings/dbcs-codec.js +554 -0
- data/node_modules/iconv-lite/encodings/dbcs-data.js +176 -0
- data/node_modules/iconv-lite/encodings/index.js +22 -0
- data/node_modules/iconv-lite/encodings/internal.js +187 -0
- data/node_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
- data/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- data/node_modules/iconv-lite/encodings/sbcs-data.js +169 -0
- data/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- data/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- data/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- data/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- data/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- data/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- data/node_modules/iconv-lite/encodings/tables/gbk-added.json +55 -0
- data/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- data/node_modules/iconv-lite/encodings/utf16.js +176 -0
- data/node_modules/iconv-lite/encodings/utf7.js +289 -0
- data/node_modules/iconv-lite/lib/bom-handling.js +52 -0
- data/node_modules/iconv-lite/lib/extend-node.js +214 -0
- data/node_modules/iconv-lite/lib/index.d.ts +31 -0
- data/node_modules/iconv-lite/lib/index.js +141 -0
- data/node_modules/iconv-lite/lib/streams.js +120 -0
- data/node_modules/iconv-lite/package.json +158 -0
- data/node_modules/is-my-json-valid/.npmignore +2 -0
- data/node_modules/is-my-json-valid/.travis.yml +3 -0
- data/node_modules/is-my-json-valid/LICENSE +21 -0
- data/node_modules/is-my-json-valid/README.md +173 -0
- data/node_modules/is-my-json-valid/example.js +18 -0
- data/node_modules/is-my-json-valid/formats.js +14 -0
- data/node_modules/is-my-json-valid/index.js +594 -0
- data/node_modules/is-my-json-valid/package.json +116 -0
- data/node_modules/is-my-json-valid/require.js +12 -0
- data/node_modules/is-my-json-valid/test/fixtures/cosmic.js +84 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/additionalItems.json +82 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/additionalProperties.json +88 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/allOf.json +112 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/anyOf.json +68 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/bignum.json +107 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/default.json +49 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/definitions.json +32 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/dependencies.json +113 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/enum.json +72 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/format.json +143 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/items.json +46 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/maxItems.json +28 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/maxLength.json +28 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/maxProperties.json +28 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/maximum.json +42 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/minItems.json +28 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/minLength.json +28 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/minProperties.json +28 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/minimum.json +42 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/multipleOf.json +96 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/not.json +96 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/nullAndFormat.json +18 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/nullAndObject.json +18 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/oneOf.json +68 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/pattern.json +23 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/patternProperties.json +110 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/properties.json +92 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/ref.json +128 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/refRemote.json +74 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/required.json +39 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/type.json +330 -0
- data/node_modules/is-my-json-valid/test/json-schema-draft4/uniqueItems.json +79 -0
- data/node_modules/is-my-json-valid/test/json-schema.js +23 -0
- data/node_modules/is-my-json-valid/test/misc.js +471 -0
- data/node_modules/is-property/.npmignore +17 -0
- data/node_modules/is-property/LICENSE +22 -0
- data/node_modules/is-property/README.md +28 -0
- data/node_modules/is-property/is-property.js +5 -0
- data/node_modules/is-property/package.json +92 -0
- data/node_modules/is-typedarray/LICENSE.md +18 -0
- data/node_modules/is-typedarray/README.md +16 -0
- data/node_modules/is-typedarray/index.js +41 -0
- data/node_modules/is-typedarray/package.json +90 -0
- data/node_modules/is-typedarray/test.js +34 -0
- data/node_modules/isstream/.jshintrc +59 -0
- data/node_modules/isstream/.npmignore +1 -0
- data/node_modules/isstream/.travis.yml +12 -0
- data/node_modules/isstream/LICENSE.md +11 -0
- data/node_modules/isstream/README.md +66 -0
- data/node_modules/isstream/isstream.js +27 -0
- data/node_modules/isstream/package.json +93 -0
- data/node_modules/isstream/test.js +168 -0
- data/node_modules/jodid25519/.npmignore +11 -0
- data/node_modules/jodid25519/.travis.yml +7 -0
- data/node_modules/jodid25519/AUTHORS.md +3 -0
- data/node_modules/jodid25519/LICENSE +23 -0
- data/node_modules/jodid25519/README.md +51 -0
- data/node_modules/jodid25519/almond.0 +42 -0
- data/node_modules/jodid25519/almond.1 +13 -0
- data/node_modules/jodid25519/index.js +35 -0
- data/node_modules/jodid25519/jsdoc.json +19 -0
- data/node_modules/jodid25519/lib/core.js +481 -0
- data/node_modules/jodid25519/lib/curve255.js +221 -0
- data/node_modules/jodid25519/lib/dh.js +111 -0
- data/node_modules/jodid25519/lib/eddsa.js +573 -0
- data/node_modules/jodid25519/lib/utils.js +198 -0
- data/node_modules/jodid25519/package.json +104 -0
- data/node_modules/jquery/AUTHORS.txt +295 -0
- data/node_modules/jquery/LICENSE.txt +36 -0
- data/node_modules/jquery/README.md +65 -0
- data/node_modules/jquery/bower.json +14 -0
- data/node_modules/jquery/dist/core.js +482 -0
- data/node_modules/jquery/dist/jquery.js +10220 -0
- data/node_modules/jquery/dist/jquery.min.js +4 -0
- data/node_modules/jquery/dist/jquery.min.map +1 -0
- data/node_modules/jquery/dist/jquery.slim.js +8107 -0
- data/node_modules/jquery/dist/jquery.slim.min.js +4 -0
- data/node_modules/jquery/dist/jquery.slim.min.map +1 -0
- data/node_modules/jquery/external/sizzle/LICENSE.txt +36 -0
- data/node_modules/jquery/external/sizzle/dist/sizzle.js +2272 -0
- data/node_modules/jquery/external/sizzle/dist/sizzle.min.js +3 -0
- data/node_modules/jquery/external/sizzle/dist/sizzle.min.map +1 -0
- data/node_modules/jquery/package.json +169 -0
- data/node_modules/jquery/src/.eslintrc.json +18 -0
- data/node_modules/jquery/src/ajax.js +855 -0
- data/node_modules/jquery/src/ajax/jsonp.js +102 -0
- data/node_modules/jquery/src/ajax/load.js +76 -0
- data/node_modules/jquery/src/ajax/parseXML.js +30 -0
- data/node_modules/jquery/src/ajax/script.js +77 -0
- data/node_modules/jquery/src/ajax/var/location.js +5 -0
- data/node_modules/jquery/src/ajax/var/nonce.js +7 -0
- data/node_modules/jquery/src/ajax/var/rquery.js +5 -0
- data/node_modules/jquery/src/ajax/xhr.js +169 -0
- data/node_modules/jquery/src/attributes.js +13 -0
- data/node_modules/jquery/src/attributes/attr.js +140 -0
- data/node_modules/jquery/src/attributes/classes.js +174 -0
- data/node_modules/jquery/src/attributes/prop.js +143 -0
- data/node_modules/jquery/src/attributes/support.js +33 -0
- data/node_modules/jquery/src/attributes/val.js +188 -0
- data/node_modules/jquery/src/callbacks.js +234 -0
- data/node_modules/jquery/src/core.js +482 -0
- data/node_modules/jquery/src/core/DOMEval.js +16 -0
- data/node_modules/jquery/src/core/access.js +70 -0
- data/node_modules/jquery/src/core/init.js +127 -0
- data/node_modules/jquery/src/core/parseHTML.js +65 -0
- data/node_modules/jquery/src/core/ready-no-deferred.js +105 -0
- data/node_modules/jquery/src/core/ready.js +95 -0
- data/node_modules/jquery/src/core/readyException.js +13 -0
- data/node_modules/jquery/src/core/stripAndCollapse.js +14 -0
- data/node_modules/jquery/src/core/support.js +20 -0
- data/node_modules/jquery/src/core/var/rsingleTag.js +6 -0
- data/node_modules/jquery/src/css.js +426 -0
- data/node_modules/jquery/src/css/addGetHookIf.js +26 -0
- data/node_modules/jquery/src/css/adjustCSS.js +71 -0
- data/node_modules/jquery/src/css/curCSS.js +59 -0
- data/node_modules/jquery/src/css/hiddenVisibleSelectors.js +15 -0
- data/node_modules/jquery/src/css/showHide.js +105 -0
- data/node_modules/jquery/src/css/support.js +89 -0
- data/node_modules/jquery/src/css/var/cssExpand.js +5 -0
- data/node_modules/jquery/src/css/var/getStyles.js +17 -0
- data/node_modules/jquery/src/css/var/isHiddenWithinTree.js +34 -0
- data/node_modules/jquery/src/css/var/rmargin.js +5 -0
- data/node_modules/jquery/src/css/var/rnumnonpx.js +7 -0
- data/node_modules/jquery/src/css/var/swap.js +26 -0
- data/node_modules/jquery/src/data.js +179 -0
- data/node_modules/jquery/src/data/Data.js +161 -0
- data/node_modules/jquery/src/data/var/acceptData.js +19 -0
- data/node_modules/jquery/src/data/var/dataPriv.js +7 -0
- data/node_modules/jquery/src/data/var/dataUser.js +7 -0
- data/node_modules/jquery/src/deferred.js +389 -0
- data/node_modules/jquery/src/deferred/exceptionHook.js +21 -0
- data/node_modules/jquery/src/deprecated.js +30 -0
- data/node_modules/jquery/src/dimensions.js +56 -0
- data/node_modules/jquery/src/effects.js +693 -0
- data/node_modules/jquery/src/effects/Tween.js +123 -0
- data/node_modules/jquery/src/effects/animatedSelector.js +15 -0
- data/node_modules/jquery/src/event.js +745 -0
- data/node_modules/jquery/src/event/ajax.js +22 -0
- data/node_modules/jquery/src/event/alias.js +29 -0
- data/node_modules/jquery/src/event/focusin.js +55 -0
- data/node_modules/jquery/src/event/support.js +11 -0
- data/node_modules/jquery/src/event/trigger.js +185 -0
- data/node_modules/jquery/src/exports/amd.js +26 -0
- data/node_modules/jquery/src/exports/global.js +34 -0
- data/node_modules/jquery/src/jquery.js +41 -0
- data/node_modules/jquery/src/manipulation.js +486 -0
- data/node_modules/jquery/src/manipulation/_evalUrl.js +23 -0
- data/node_modules/jquery/src/manipulation/buildFragment.js +104 -0
- data/node_modules/jquery/src/manipulation/getAll.js +31 -0
- data/node_modules/jquery/src/manipulation/setGlobalEval.js +22 -0
- data/node_modules/jquery/src/manipulation/support.js +35 -0
- data/node_modules/jquery/src/manipulation/var/rcheckableType.js +5 -0
- data/node_modules/jquery/src/manipulation/var/rscriptType.js +5 -0
- data/node_modules/jquery/src/manipulation/var/rtagName.js +5 -0
- data/node_modules/jquery/src/manipulation/wrapMap.js +29 -0
- data/node_modules/jquery/src/offset.js +232 -0
- data/node_modules/jquery/src/queue.js +145 -0
- data/node_modules/jquery/src/queue/delay.js +24 -0
- data/node_modules/jquery/src/selector-native.js +237 -0
- data/node_modules/jquery/src/selector-sizzle.js +19 -0
- data/node_modules/jquery/src/selector.js +3 -0
- data/node_modules/jquery/src/serialize.js +130 -0
- data/node_modules/jquery/src/traversing.js +178 -0
- data/node_modules/jquery/src/traversing/findFilter.js +106 -0
- data/node_modules/jquery/src/traversing/var/dir.js +22 -0
- data/node_modules/jquery/src/traversing/var/rneedsContext.js +8 -0
- data/node_modules/jquery/src/traversing/var/siblings.js +17 -0
- data/node_modules/jquery/src/var/ObjectFunctionString.js +7 -0
- data/node_modules/jquery/src/var/arr.js +5 -0
- data/node_modules/jquery/src/var/class2type.js +6 -0
- data/node_modules/jquery/src/var/concat.js +7 -0
- data/node_modules/jquery/src/var/document.js +5 -0
- data/node_modules/jquery/src/var/documentElement.js +7 -0
- data/node_modules/jquery/src/var/fnToString.js +7 -0
- data/node_modules/jquery/src/var/getProto.js +5 -0
- data/node_modules/jquery/src/var/hasOwn.js +7 -0
- data/node_modules/jquery/src/var/indexOf.js +7 -0
- data/node_modules/jquery/src/var/pnum.js +5 -0
- data/node_modules/jquery/src/var/push.js +7 -0
- data/node_modules/jquery/src/var/rcssNum.js +9 -0
- data/node_modules/jquery/src/var/rnothtmlwhite.js +8 -0
- data/node_modules/jquery/src/var/slice.js +7 -0
- data/node_modules/jquery/src/var/support.js +6 -0
- data/node_modules/jquery/src/var/toString.js +7 -0
- data/node_modules/jquery/src/wrap.js +77 -0
- data/node_modules/jsbn/.npmignore +2 -0
- data/node_modules/jsbn/LICENSE +40 -0
- data/node_modules/jsbn/README.md +175 -0
- data/node_modules/jsbn/example.html +12 -0
- data/node_modules/jsbn/example.js +3 -0
- data/node_modules/jsbn/index.js +1358 -0
- data/node_modules/jsbn/package.json +87 -0
- data/node_modules/jsdom-global/.npmignore +1 -0
- data/node_modules/jsdom-global/.travis.yml +6 -0
- data/node_modules/jsdom-global/HISTORY.md +85 -0
- data/node_modules/jsdom-global/README.md +137 -0
- data/node_modules/jsdom-global/browser.js +10 -0
- data/node_modules/jsdom-global/index.js +46 -0
- data/node_modules/jsdom-global/keys.js +187 -0
- data/node_modules/jsdom-global/package.json +95 -0
- data/node_modules/jsdom-global/register.js +1 -0
- data/node_modules/jsdom-global/test.js +22 -0
- data/node_modules/jsdom/Changelog.md +1254 -0
- data/node_modules/jsdom/LICENSE.txt +22 -0
- data/node_modules/jsdom/README.md +592 -0
- data/node_modules/jsdom/lib/jsdom.js +456 -0
- data/node_modules/jsdom/lib/jsdom/browser/Window.js +502 -0
- data/node_modules/jsdom/lib/jsdom/browser/default-stylesheet.js +1129 -0
- data/node_modules/jsdom/lib/jsdom/browser/documentAdapter.js +73 -0
- data/node_modules/jsdom/lib/jsdom/browser/documentfeatures.js +47 -0
- data/node_modules/jsdom/lib/jsdom/browser/domtohtml.js +19 -0
- data/node_modules/jsdom/lib/jsdom/browser/htmltodom.js +323 -0
- data/node_modules/jsdom/lib/jsdom/browser/not-implemented.js +13 -0
- data/node_modules/jsdom/lib/jsdom/browser/resource-loader.js +275 -0
- data/node_modules/jsdom/lib/jsdom/level2/style.js +69 -0
- data/node_modules/jsdom/lib/jsdom/level3/xpath.js +1874 -0
- data/node_modules/jsdom/lib/jsdom/living/attributes.js +468 -0
- data/node_modules/jsdom/lib/jsdom/living/attributes/Attr-impl.js +87 -0
- data/node_modules/jsdom/lib/jsdom/living/blob-symbols.js +6 -0
- data/node_modules/jsdom/lib/jsdom/living/blob.js +73 -0
- data/node_modules/jsdom/lib/jsdom/living/dom-token-list.js +222 -0
- data/node_modules/jsdom/lib/jsdom/living/domparsing/DOMParser-impl.js +61 -0
- data/node_modules/jsdom/lib/jsdom/living/events/CustomEvent-impl.js +18 -0
- data/node_modules/jsdom/lib/jsdom/living/events/ErrorEvent-impl.js +11 -0
- data/node_modules/jsdom/lib/jsdom/living/events/Event-impl.js +77 -0
- data/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js +303 -0
- data/node_modules/jsdom/lib/jsdom/living/events/FocusEvent-impl.js +4 -0
- data/node_modules/jsdom/lib/jsdom/living/events/HashChangeEvent-impl.js +11 -0
- data/node_modules/jsdom/lib/jsdom/living/events/KeyboardEvent-impl.js +21 -0
- data/node_modules/jsdom/lib/jsdom/living/events/MessageEvent-impl.js +22 -0
- data/node_modules/jsdom/lib/jsdom/living/events/MouseEvent-impl.js +28 -0
- data/node_modules/jsdom/lib/jsdom/living/events/PopStateEvent-impl.js +4 -0
- data/node_modules/jsdom/lib/jsdom/living/events/ProgressEvent-impl.js +11 -0
- data/node_modules/jsdom/lib/jsdom/living/events/TouchEvent-impl.js +11 -0
- data/node_modules/jsdom/lib/jsdom/living/events/UIEvent-impl.js +19 -0
- data/node_modules/jsdom/lib/jsdom/living/file-reader.js +133 -0
- data/node_modules/jsdom/lib/jsdom/living/file-symbols.js +4 -0
- data/node_modules/jsdom/lib/jsdom/living/file.js +22 -0
- data/node_modules/jsdom/lib/jsdom/living/filelist-symbols.js +3 -0
- data/node_modules/jsdom/lib/jsdom/living/filelist.js +21 -0
- data/node_modules/jsdom/lib/jsdom/living/form-data-symbols.js +3 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/.gitkeep +0 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/AddEventListenerOptions.js +34 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/Attr.js +169 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/CharacterData.js +189 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/ChildNode.js +92 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/Comment.js +92 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/CustomEvent.js +122 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/CustomEventInit.js +34 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/DOMImplementation.js +143 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/DOMParser.js +97 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/Document.js +712 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/DocumentFragment.js +91 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/DocumentType.js +110 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/Element.js +552 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/ElementCSSInlineStyle.js +88 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/ElementContentEditable.js +77 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/ErrorEvent.js +137 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/ErrorEventInit.js +56 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/Event.js +251 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/EventInit.js +40 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/EventListenerOptions.js +32 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/EventModifierInit.js +146 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js +130 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/FocusEvent.js +104 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/FocusEventInit.js +34 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/FormData.js +179 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/GlobalEventHandlers.js +770 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLAnchorElement.js +228 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLAppletElement.js +225 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLAreaElement.js +167 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLAudioElement.js +82 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLBRElement.js +95 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLBaseElement.js +107 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLBodyElement.js +164 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLButtonElement.js +189 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLCanvasElement.js +181 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLDListElement.js +98 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLDataElement.js +95 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLDataListElement.js +82 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLDialogElement.js +98 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLDirectoryElement.js +98 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLDivElement.js +95 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLElement.js +205 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLEmbedElement.js +159 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLFieldSetElement.js +119 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLFontElement.js +121 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLFormElement.js +211 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLFrameElement.js +203 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLFrameSetElement.js +112 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLHRElement.js +150 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLHeadElement.js +82 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLHeadingElement.js +95 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLHtmlElement.js +95 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLHyperlinkElementUtils.js +205 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLIFrameElement.js +278 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLImageElement.js +326 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLInputElement.js +583 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLLIElement.js +108 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLLabelElement.js +103 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLLegendElement.js +103 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLLinkElement.js +206 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLMapElement.js +103 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLMediaElement.js +505 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLMenuElement.js +124 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLMetaElement.js +134 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLMeterElement.js +82 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLModElement.js +108 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLOListElement.js +140 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLObjectElement.js +309 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLOptGroupElement.js +111 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLOptionElement.js +178 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLOutputElement.js +95 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLParagraphElement.js +95 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLParamElement.js +134 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLPreElement.js +95 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLProgressElement.js +82 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLQuoteElement.js +95 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLScriptElement.js +204 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLSelectElement.js +260 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLSourceElement.js +146 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLSpanElement.js +82 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLStyleElement.js +125 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTableCaptionElement.js +95 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTableCellElement.js +245 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTableColElement.js +161 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTableDataCellElement.js +95 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTableElement.js +357 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTableHeaderCellElement.js +121 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTableRowElement.js +202 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTableSectionElement.js +173 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTemplateElement.js +90 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTextAreaElement.js +415 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTimeElement.js +95 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTitleElement.js +94 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTrackElement.js +193 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLUListElement.js +111 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLUnknownElement.js +82 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HTMLVideoElement.js +138 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HashChangeEvent.js +113 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/HashChangeEventInit.js +38 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/History.js +179 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/KeyboardEvent.js +269 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/KeyboardEventInit.js +90 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/LinkStyle.js +85 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/Location.js +227 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/MessageEvent.js +164 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/MessageEventInit.js +56 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/MouseEvent.js +234 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/MouseEventInit.js +82 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/Navigator.js +96 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/NavigatorConcurrentHardware.js +85 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/NavigatorCookies.js +85 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/NavigatorID.js +149 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/NavigatorLanguage.js +93 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/NavigatorOnLine.js +85 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/NavigatorPlugins.js +88 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/Node.js +512 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/NonDocumentTypeChildNode.js +93 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/NonElementParentNode.js +92 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/ParentNode.js +139 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/PopStateEvent.js +105 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/PopStateEventInit.js +32 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/ProcessingInstruction.js +90 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/ProgressEvent.js +122 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/ProgressEventInit.js +50 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/ScrollIntoViewOptions.js +42 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/ScrollOptions.js +32 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/Text.js +107 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/TouchEvent.js +138 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/TreeWalker.js +189 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/UIEvent.js +134 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/UIEventInit.js +42 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/Window.js +1 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/WindowEventHandlers.js +242 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/XMLDocument.js +82 -0
- data/node_modules/jsdom/lib/jsdom/living/generated/utils.js +40 -0
- data/node_modules/jsdom/lib/jsdom/living/helpers/document-base-url.js +53 -0
- data/node_modules/jsdom/lib/jsdom/living/helpers/focusing.js +74 -0
- data/node_modules/jsdom/lib/jsdom/living/helpers/form-controls.js +43 -0
- data/node_modules/jsdom/lib/jsdom/living/helpers/internal-constants.js +13 -0
- data/node_modules/jsdom/lib/jsdom/living/helpers/ordered-set-parser.js +5 -0
- data/node_modules/jsdom/lib/jsdom/living/helpers/proxied-window-event-handlers.js +11 -0
- data/node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js +68 -0
- data/node_modules/jsdom/lib/jsdom/living/helpers/selectors.js +30 -0
- data/node_modules/jsdom/lib/jsdom/living/helpers/stylesheets.js +78 -0
- data/node_modules/jsdom/lib/jsdom/living/helpers/traversal.js +51 -0
- data/node_modules/jsdom/lib/jsdom/living/helpers/validate-names.js +62 -0
- data/node_modules/jsdom/lib/jsdom/living/html-collection.js +109 -0
- data/node_modules/jsdom/lib/jsdom/living/index.js +57 -0
- data/node_modules/jsdom/lib/jsdom/living/named-properties-window.js +139 -0
- data/node_modules/jsdom/lib/jsdom/living/navigator/Navigator-impl.js +24 -0
- data/node_modules/jsdom/lib/jsdom/living/navigator/NavigatorConcurrentHardware-impl.js +8 -0
- data/node_modules/jsdom/lib/jsdom/living/navigator/NavigatorCookies-impl.js +7 -0
- data/node_modules/jsdom/lib/jsdom/living/navigator/NavigatorID-impl.js +37 -0
- data/node_modules/jsdom/lib/jsdom/living/navigator/NavigatorLanguage-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/navigator/NavigatorOnLine-impl.js +7 -0
- data/node_modules/jsdom/lib/jsdom/living/navigator/NavigatorPlugins-impl.js +7 -0
- data/node_modules/jsdom/lib/jsdom/living/node-document-position.js +10 -0
- data/node_modules/jsdom/lib/jsdom/living/node-filter.js +47 -0
- data/node_modules/jsdom/lib/jsdom/living/node-iterator.js +232 -0
- data/node_modules/jsdom/lib/jsdom/living/node-list.js +85 -0
- data/node_modules/jsdom/lib/jsdom/living/node-type.js +16 -0
- data/node_modules/jsdom/lib/jsdom/living/node.js +189 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/CharacterData-impl.js +78 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/ChildNode-impl.js +15 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/Comment-impl.js +17 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/DOMImplementation-impl.js +176 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js +777 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/DocumentFragment-impl.js +21 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/DocumentType-impl.js +26 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/Element-impl.js +491 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/ElementCSSInlineStyle-impl.js +7 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/ElementContentEditable-impl.js +7 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/GlobalEventHandlers-impl.js +7 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLAnchorElement-impl.js +25 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLAppletElement-impl.js +26 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLAreaElement-impl.js +18 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLAudioElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLBRElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLBaseElement-impl.js +27 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLBodyElement-impl.js +30 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLButtonElement-impl.js +58 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLCanvasElement-impl.js +134 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLDListElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLDataElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLDataListElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLDialogElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLDirectoryElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLDivElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLElement-impl.js +144 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLEmbedElement-impl.js +18 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLFieldSetElement-impl.js +14 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLFontElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLFormElement-impl.js +125 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLFrameElement-impl.js +181 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLFrameSetElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLHRElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLHeadElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLHeadingElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLHtmlElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLHyperlinkElementUtils-impl.js +275 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLIFrameElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLImageElement-impl.js +93 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLInputElement-impl.js +396 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLLIElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLLabelElement-impl.js +72 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLLegendElement-impl.js +14 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLLinkElement-impl.js +76 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLMapElement-impl.js +13 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLMediaElement-impl.js +140 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLMenuElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLMetaElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLMeterElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLModElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLOListElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLObjectElement-impl.js +35 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLOptGroupElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLOptionElement-impl.js +122 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLOutputElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLParagraphElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLParamElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLPreElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLProgressElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLQuoteElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLScriptElement-impl.js +139 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLSelectElement-impl.js +174 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLSourceElement-impl.js +18 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLSpanElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLStyleElement-impl.js +33 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableCaptionElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableCellElement-impl.js +56 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableColElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableDataCellElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableElement-impl.js +148 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableHeaderCellElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableRowElement-impl.js +70 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableSectionElement-impl.js +54 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTemplateElement-impl.js +33 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTextAreaElement-impl.js +184 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTimeElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTitleElement-impl.js +18 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTrackElement-impl.js +21 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLUListElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLUnknownElement-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLVideoElement-impl.js +26 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/LinkStyle-impl.js +16 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/Node-impl.js +475 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/NonDocumentTypeChildNode-impl.js +28 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/NonElementParentNode-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/ParentNode-impl.js +91 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/ProcessingInstruction-impl.js +22 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/Text-impl.js +48 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/WindowEventHandlers-impl.js +9 -0
- data/node_modules/jsdom/lib/jsdom/living/nodes/XMLDocument-impl.js +4 -0
- data/node_modules/jsdom/lib/jsdom/living/post-message.js +36 -0
- data/node_modules/jsdom/lib/jsdom/living/register-elements.js +306 -0
- data/node_modules/jsdom/lib/jsdom/living/traversal/TreeWalker-impl.js +257 -0
- data/node_modules/jsdom/lib/jsdom/living/window/History-impl.js +145 -0
- data/node_modules/jsdom/lib/jsdom/living/window/History.idl +12 -0
- data/node_modules/jsdom/lib/jsdom/living/window/Location-impl.js +235 -0
- data/node_modules/jsdom/lib/jsdom/living/window/navigation.js +103 -0
- data/node_modules/jsdom/lib/jsdom/living/xhr-sync-worker.js +50 -0
- data/node_modules/jsdom/lib/jsdom/living/xhr-utils.js +327 -0
- data/node_modules/jsdom/lib/jsdom/living/xhr/FormData-impl.js +182 -0
- data/node_modules/jsdom/lib/jsdom/living/xmlhttprequest-event-target.js +23 -0
- data/node_modules/jsdom/lib/jsdom/living/xmlhttprequest-symbols.js +4 -0
- data/node_modules/jsdom/lib/jsdom/living/xmlhttprequest-upload.js +17 -0
- data/node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js +1016 -0
- data/node_modules/jsdom/lib/jsdom/named-properties-tracker.js +156 -0
- data/node_modules/jsdom/lib/jsdom/utils.js +242 -0
- data/node_modules/jsdom/lib/jsdom/virtual-console.js +34 -0
- data/node_modules/jsdom/lib/jsdom/vm-shim.js +106 -0
- data/node_modules/jsdom/lib/jsdom/web-idl/DOMException.js +41 -0
- data/node_modules/jsdom/lib/jsdom/web-idl/dom-exception-table.json +134 -0
- data/node_modules/jsdom/node_modules/request/CHANGELOG.md +662 -0
- data/node_modules/jsdom/node_modules/request/LICENSE +55 -0
- data/node_modules/jsdom/node_modules/request/README.md +1098 -0
- data/node_modules/jsdom/node_modules/request/index.js +156 -0
- data/node_modules/jsdom/node_modules/request/lib/auth.js +168 -0
- data/node_modules/jsdom/node_modules/request/lib/cookies.js +39 -0
- data/node_modules/jsdom/node_modules/request/lib/getProxyFromURI.js +79 -0
- data/node_modules/jsdom/node_modules/request/lib/har.js +215 -0
- data/node_modules/jsdom/node_modules/request/lib/helpers.js +65 -0
- data/node_modules/jsdom/node_modules/request/lib/multipart.js +112 -0
- data/node_modules/jsdom/node_modules/request/lib/oauth.js +147 -0
- data/node_modules/jsdom/node_modules/request/lib/querystring.js +51 -0
- data/node_modules/jsdom/node_modules/request/lib/redirect.js +157 -0
- data/node_modules/jsdom/node_modules/request/lib/tunnel.js +176 -0
- data/node_modules/jsdom/node_modules/request/package.json +163 -0
- data/node_modules/jsdom/node_modules/request/request.js +1475 -0
- data/node_modules/jsdom/package.json +184 -0
- data/node_modules/json-schema/README.md +5 -0
- data/node_modules/json-schema/draft-00/hyper-schema +68 -0
- data/node_modules/json-schema/draft-00/json-ref +26 -0
- data/node_modules/json-schema/draft-00/links +33 -0
- data/node_modules/json-schema/draft-00/schema +155 -0
- data/node_modules/json-schema/draft-01/hyper-schema +68 -0
- data/node_modules/json-schema/draft-01/json-ref +26 -0
- data/node_modules/json-schema/draft-01/links +33 -0
- data/node_modules/json-schema/draft-01/schema +155 -0
- data/node_modules/json-schema/draft-02/hyper-schema +68 -0
- data/node_modules/json-schema/draft-02/json-ref +26 -0
- data/node_modules/json-schema/draft-02/links +35 -0
- data/node_modules/json-schema/draft-02/schema +166 -0
- data/node_modules/json-schema/draft-03/examples/address +20 -0
- data/node_modules/json-schema/draft-03/examples/calendar +53 -0
- data/node_modules/json-schema/draft-03/examples/card +105 -0
- data/node_modules/json-schema/draft-03/examples/geo +8 -0
- data/node_modules/json-schema/draft-03/examples/interfaces +23 -0
- data/node_modules/json-schema/draft-03/hyper-schema +60 -0
- data/node_modules/json-schema/draft-03/json-ref +26 -0
- data/node_modules/json-schema/draft-03/links +35 -0
- data/node_modules/json-schema/draft-03/schema +174 -0
- data/node_modules/json-schema/draft-04/hyper-schema +60 -0
- data/node_modules/json-schema/draft-04/links +41 -0
- data/node_modules/json-schema/draft-04/schema +189 -0
- data/node_modules/json-schema/draft-zyp-json-schema-03.xml +1120 -0
- data/node_modules/json-schema/draft-zyp-json-schema-04.xml +1072 -0
- data/node_modules/json-schema/lib/links.js +66 -0
- data/node_modules/json-schema/lib/validate.js +273 -0
- data/node_modules/json-schema/package.json +100 -0
- data/node_modules/json-schema/test/tests.js +95 -0
- data/node_modules/json-stringify-safe/.npmignore +1 -0
- data/node_modules/json-stringify-safe/CHANGELOG.md +14 -0
- data/node_modules/json-stringify-safe/LICENSE +15 -0
- data/node_modules/json-stringify-safe/Makefile +35 -0
- data/node_modules/json-stringify-safe/README.md +52 -0
- data/node_modules/json-stringify-safe/package.json +102 -0
- data/node_modules/json-stringify-safe/stringify.js +27 -0
- data/node_modules/json-stringify-safe/test/mocha.opts +2 -0
- data/node_modules/json-stringify-safe/test/stringify_test.js +246 -0
- data/node_modules/jsonpointer/.travis.yml +7 -0
- data/node_modules/jsonpointer/LICENSE.md +21 -0
- data/node_modules/jsonpointer/README.md +39 -0
- data/node_modules/jsonpointer/benchmark.js +56 -0
- data/node_modules/jsonpointer/jsonpointer.js +93 -0
- data/node_modules/jsonpointer/package.json +109 -0
- data/node_modules/jsonpointer/test.js +131 -0
- data/node_modules/jsprim/CHANGES.md +39 -0
- data/node_modules/jsprim/LICENSE +19 -0
- data/node_modules/jsprim/README.md +237 -0
- data/node_modules/jsprim/lib/jsprim.js +488 -0
- data/node_modules/jsprim/package.json +85 -0
- data/node_modules/levn/LICENSE +22 -0
- data/node_modules/levn/README.md +196 -0
- data/node_modules/levn/lib/cast.js +298 -0
- data/node_modules/levn/lib/coerce.js +285 -0
- data/node_modules/levn/lib/index.js +22 -0
- data/node_modules/levn/lib/parse-string.js +113 -0
- data/node_modules/levn/lib/parse.js +102 -0
- data/node_modules/levn/package.json +108 -0
- data/node_modules/mime-db/HISTORY.md +375 -0
- data/node_modules/mime-db/LICENSE +22 -0
- data/node_modules/mime-db/README.md +82 -0
- data/node_modules/mime-db/db.json +6712 -0
- data/node_modules/mime-db/index.js +11 -0
- data/node_modules/mime-db/package.json +137 -0
- data/node_modules/mime-types/HISTORY.md +210 -0
- data/node_modules/mime-types/LICENSE +23 -0
- data/node_modules/mime-types/README.md +103 -0
- data/node_modules/mime-types/index.js +188 -0
- data/node_modules/mime-types/package.json +127 -0
- data/node_modules/nwmatcher/LICENSE +22 -0
- data/node_modules/nwmatcher/README.md +107 -0
- data/node_modules/nwmatcher/package.json +99 -0
- data/node_modules/nwmatcher/src/modules/nwmatcher-cache.js +187 -0
- data/node_modules/nwmatcher/src/modules/nwmatcher-jquery.js +126 -0
- data/node_modules/nwmatcher/src/modules/nwmatcher-pseudos.js +273 -0
- data/node_modules/nwmatcher/src/modules/nwmatcher-shortcuts.js +35 -0
- data/node_modules/nwmatcher/src/modules/nwmatcher-traversal.js +90 -0
- data/node_modules/nwmatcher/src/modules/nwmatcher-webforms.js +104 -0
- data/node_modules/nwmatcher/src/nwmatcher-base.js +785 -0
- data/node_modules/nwmatcher/src/nwmatcher-noqsa.js +962 -0
- data/node_modules/nwmatcher/src/nwmatcher.js +1780 -0
- data/node_modules/oauth-sign/LICENSE +55 -0
- data/node_modules/oauth-sign/README.md +4 -0
- data/node_modules/oauth-sign/index.js +136 -0
- data/node_modules/oauth-sign/package.json +98 -0
- data/node_modules/optionator/CHANGELOG.md +52 -0
- data/node_modules/optionator/LICENSE +22 -0
- data/node_modules/optionator/README.md +236 -0
- data/node_modules/optionator/lib/help.js +247 -0
- data/node_modules/optionator/lib/index.js +465 -0
- data/node_modules/optionator/lib/util.js +54 -0
- data/node_modules/optionator/package.json +109 -0
- data/node_modules/parse5/CHANGELOG.md +69 -0
- data/node_modules/parse5/LICENSE +19 -0
- data/node_modules/parse5/README.md +247 -0
- data/node_modules/parse5/docs/build/index.md +963 -0
- data/node_modules/parse5/index.js +12 -0
- data/node_modules/parse5/lib/common/doctype.js +134 -0
- data/node_modules/parse5/lib/common/foreign_content.js +257 -0
- data/node_modules/parse5/lib/common/html.js +268 -0
- data/node_modules/parse5/lib/common/unicode.js +48 -0
- data/node_modules/parse5/lib/common/utils.js +13 -0
- data/node_modules/parse5/lib/jsdom/jsdom_parser.js +39 -0
- data/node_modules/parse5/lib/jsdom/parsing_unit.js +53 -0
- data/node_modules/parse5/lib/serialization/serializer.js +178 -0
- data/node_modules/parse5/lib/simple_api/simple_api_parser.js +107 -0
- data/node_modules/parse5/lib/simple_api/tokenizer_proxy.js +122 -0
- data/node_modules/parse5/lib/tokenization/location_info_mixin.js +80 -0
- data/node_modules/parse5/lib/tokenization/named_entity_trie.js +6 -0
- data/node_modules/parse5/lib/tokenization/preprocessor.js +115 -0
- data/node_modules/parse5/lib/tokenization/tokenizer.js +2317 -0
- data/node_modules/parse5/lib/tree_adapters/default.js +200 -0
- data/node_modules/parse5/lib/tree_adapters/htmlparser2.js +317 -0
- data/node_modules/parse5/lib/tree_construction/formatting_element_list.js +167 -0
- data/node_modules/parse5/lib/tree_construction/location_info_mixin.js +197 -0
- data/node_modules/parse5/lib/tree_construction/open_element_stack.js +379 -0
- data/node_modules/parse5/lib/tree_construction/parser.js +2827 -0
- data/node_modules/parse5/package.json +125 -0
- data/node_modules/pinkie-promise/index.js +3 -0
- data/node_modules/pinkie-promise/license +21 -0
- data/node_modules/pinkie-promise/package.json +102 -0
- data/node_modules/pinkie-promise/readme.md +28 -0
- data/node_modules/pinkie/index.js +292 -0
- data/node_modules/pinkie/license +21 -0
- data/node_modules/pinkie/package.json +100 -0
- data/node_modules/pinkie/readme.md +83 -0
- data/node_modules/prelude-ls/CHANGELOG.md +99 -0
- data/node_modules/prelude-ls/LICENSE +22 -0
- data/node_modules/prelude-ls/README.md +15 -0
- data/node_modules/prelude-ls/lib/Func.js +65 -0
- data/node_modules/prelude-ls/lib/List.js +686 -0
- data/node_modules/prelude-ls/lib/Num.js +130 -0
- data/node_modules/prelude-ls/lib/Obj.js +154 -0
- data/node_modules/prelude-ls/lib/Str.js +92 -0
- data/node_modules/prelude-ls/lib/index.js +178 -0
- data/node_modules/prelude-ls/package.json +116 -0
- data/node_modules/punycode/LICENSE-MIT.txt +20 -0
- data/node_modules/punycode/README.md +176 -0
- data/node_modules/punycode/package.json +127 -0
- data/node_modules/punycode/punycode.js +533 -0
- data/node_modules/qs/.eslintignore +1 -0
- data/node_modules/qs/.eslintrc +19 -0
- data/node_modules/qs/CHANGELOG.md +144 -0
- data/node_modules/qs/CONTRIBUTING.md +1 -0
- data/node_modules/qs/LICENSE +28 -0
- data/node_modules/qs/README.md +398 -0
- data/node_modules/qs/dist/qs.js +574 -0
- data/node_modules/qs/lib/formats.js +18 -0
- data/node_modules/qs/lib/index.js +11 -0
- data/node_modules/qs/lib/parse.js +166 -0
- data/node_modules/qs/lib/stringify.js +187 -0
- data/node_modules/qs/lib/utils.js +180 -0
- data/node_modules/qs/package.json +121 -0
- data/node_modules/qs/test/.eslintrc +9 -0
- data/node_modules/qs/test/index.js +7 -0
- data/node_modules/qs/test/parse.js +459 -0
- data/node_modules/qs/test/stringify.js +538 -0
- data/node_modules/qs/test/utils.js +22 -0
- data/node_modules/sax/LICENSE +41 -0
- data/node_modules/sax/LICENSE-W3C.html +188 -0
- data/node_modules/sax/README.md +225 -0
- data/node_modules/sax/lib/sax.js +1576 -0
- data/node_modules/sax/package.json +133 -0
- data/node_modules/sntp/.npmignore +18 -0
- data/node_modules/sntp/.travis.yml +5 -0
- data/node_modules/sntp/LICENSE +28 -0
- data/node_modules/sntp/Makefile +9 -0
- data/node_modules/sntp/README.md +68 -0
- data/node_modules/sntp/examples/offset.js +16 -0
- data/node_modules/sntp/examples/time.js +25 -0
- data/node_modules/sntp/index.js +1 -0
- data/node_modules/sntp/lib/index.js +412 -0
- data/node_modules/sntp/package.json +98 -0
- data/node_modules/sntp/test/index.js +435 -0
- data/node_modules/source-map/.npmignore +2 -0
- data/node_modules/source-map/.travis.yml +4 -0
- data/node_modules/source-map/CHANGELOG.md +201 -0
- data/node_modules/source-map/LICENSE +28 -0
- data/node_modules/source-map/Makefile.dryice.js +166 -0
- data/node_modules/source-map/README.md +479 -0
- data/node_modules/source-map/build/assert-shim.js +56 -0
- data/node_modules/source-map/build/mini-require.js +152 -0
- data/node_modules/source-map/build/prefix-source-map.jsm +20 -0
- data/node_modules/source-map/build/prefix-utils.jsm +18 -0
- data/node_modules/source-map/build/suffix-browser.js +8 -0
- data/node_modules/source-map/build/suffix-source-map.jsm +6 -0
- data/node_modules/source-map/build/suffix-utils.jsm +21 -0
- data/node_modules/source-map/build/test-prefix.js +8 -0
- data/node_modules/source-map/build/test-suffix.js +3 -0
- data/node_modules/source-map/lib/source-map.js +8 -0
- data/node_modules/source-map/lib/source-map/array-set.js +97 -0
- data/node_modules/source-map/lib/source-map/base64-vlq.js +142 -0
- data/node_modules/source-map/lib/source-map/base64.js +42 -0
- data/node_modules/source-map/lib/source-map/basic-source-map-consumer.js +420 -0
- data/node_modules/source-map/lib/source-map/binary-search.js +80 -0
- data/node_modules/source-map/lib/source-map/indexed-source-map-consumer.js +303 -0
- data/node_modules/source-map/lib/source-map/mapping-list.js +86 -0
- data/node_modules/source-map/lib/source-map/source-map-consumer.js +222 -0
- data/node_modules/source-map/lib/source-map/source-map-generator.js +400 -0
- data/node_modules/source-map/lib/source-map/source-node.js +414 -0
- data/node_modules/source-map/lib/source-map/util.js +319 -0
- data/node_modules/source-map/package.json +223 -0
- data/node_modules/source-map/test/run-tests.js +62 -0
- data/node_modules/source-map/test/source-map/test-api.js +26 -0
- data/node_modules/source-map/test/source-map/test-array-set.js +104 -0
- data/node_modules/source-map/test/source-map/test-base64-vlq.js +23 -0
- data/node_modules/source-map/test/source-map/test-base64.js +35 -0
- data/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
- data/node_modules/source-map/test/source-map/test-dog-fooding.js +84 -0
- data/node_modules/source-map/test/source-map/test-source-map-consumer.js +874 -0
- data/node_modules/source-map/test/source-map/test-source-map-generator.js +679 -0
- data/node_modules/source-map/test/source-map/test-source-node.js +612 -0
- data/node_modules/source-map/test/source-map/test-util.js +216 -0
- data/node_modules/source-map/test/source-map/util.js +299 -0
- data/node_modules/sshpk/.npmignore +9 -0
- data/node_modules/sshpk/.travis.yml +11 -0
- data/node_modules/sshpk/LICENSE +18 -0
- data/node_modules/sshpk/README.md +666 -0
- data/node_modules/sshpk/bin/sshpk-conv +201 -0
- data/node_modules/sshpk/bin/sshpk-sign +191 -0
- data/node_modules/sshpk/bin/sshpk-verify +166 -0
- data/node_modules/sshpk/lib/algs.js +168 -0
- data/node_modules/sshpk/lib/certificate.js +291 -0
- data/node_modules/sshpk/lib/dhe.js +311 -0
- data/node_modules/sshpk/lib/ed-compat.js +96 -0
- data/node_modules/sshpk/lib/errors.js +84 -0
- data/node_modules/sshpk/lib/fingerprint.js +161 -0
- data/node_modules/sshpk/lib/formats/auto.js +73 -0
- data/node_modules/sshpk/lib/formats/openssh-cert.js +289 -0
- data/node_modules/sshpk/lib/formats/pem.js +186 -0
- data/node_modules/sshpk/lib/formats/pkcs1.js +320 -0
- data/node_modules/sshpk/lib/formats/pkcs8.js +505 -0
- data/node_modules/sshpk/lib/formats/rfc4253.js +146 -0
- data/node_modules/sshpk/lib/formats/ssh-private.js +261 -0
- data/node_modules/sshpk/lib/formats/ssh.js +114 -0
- data/node_modules/sshpk/lib/formats/x509-pem.js +77 -0
- data/node_modules/sshpk/lib/formats/x509.js +484 -0
- data/node_modules/sshpk/lib/identity.js +255 -0
- data/node_modules/sshpk/lib/index.js +38 -0
- data/node_modules/sshpk/lib/key.js +270 -0
- data/node_modules/sshpk/lib/private-key.js +231 -0
- data/node_modules/sshpk/lib/signature.js +245 -0
- data/node_modules/sshpk/lib/ssh-buffer.js +148 -0
- data/node_modules/sshpk/lib/utils.js +288 -0
- data/node_modules/sshpk/man/man1/sshpk-conv.1 +135 -0
- data/node_modules/sshpk/man/man1/sshpk-sign.1 +81 -0
- data/node_modules/sshpk/man/man1/sshpk-verify.1 +68 -0
- data/node_modules/sshpk/node_modules/assert-plus/AUTHORS +6 -0
- data/node_modules/sshpk/node_modules/assert-plus/CHANGES.md +14 -0
- data/node_modules/sshpk/node_modules/assert-plus/README.md +162 -0
- data/node_modules/sshpk/node_modules/assert-plus/assert.js +211 -0
- data/node_modules/sshpk/node_modules/assert-plus/package.json +115 -0
- data/node_modules/sshpk/package.json +135 -0
- data/node_modules/stringstream/.npmignore +15 -0
- data/node_modules/stringstream/.travis.yml +4 -0
- data/node_modules/stringstream/LICENSE.txt +22 -0
- data/node_modules/stringstream/README.md +38 -0
- data/node_modules/stringstream/example.js +27 -0
- data/node_modules/stringstream/package.json +85 -0
- data/node_modules/stringstream/stringstream.js +102 -0
- data/node_modules/strip-ansi/index.js +6 -0
- data/node_modules/strip-ansi/license +21 -0
- data/node_modules/strip-ansi/package.json +123 -0
- data/node_modules/strip-ansi/readme.md +33 -0
- data/node_modules/supports-color/index.js +50 -0
- data/node_modules/supports-color/license +21 -0
- data/node_modules/supports-color/package.json +113 -0
- data/node_modules/supports-color/readme.md +36 -0
- data/node_modules/symbol-tree/.jscsrc +55 -0
- data/node_modules/symbol-tree/.npmignore +6 -0
- data/node_modules/symbol-tree/LICENSE +21 -0
- data/node_modules/symbol-tree/README.md +68 -0
- data/node_modules/symbol-tree/api.md +441 -0
- data/node_modules/symbol-tree/lib/SymbolTree.js +834 -0
- data/node_modules/symbol-tree/lib/SymbolTreeNode.js +54 -0
- data/node_modules/symbol-tree/lib/TreeIterator.js +69 -0
- data/node_modules/symbol-tree/lib/TreePosition.js +10 -0
- data/node_modules/symbol-tree/package.json +121 -0
- data/node_modules/symbol-tree/test/SymbolTree.js +1189 -0
- data/node_modules/tough-cookie/LICENSE +27 -0
- data/node_modules/tough-cookie/README.md +506 -0
- data/node_modules/tough-cookie/lib/cookie.js +1336 -0
- data/node_modules/tough-cookie/lib/memstore.js +170 -0
- data/node_modules/tough-cookie/lib/pathMatch.js +61 -0
- data/node_modules/tough-cookie/lib/permuteDomain.js +56 -0
- data/node_modules/tough-cookie/lib/pubsuffix.js +98 -0
- data/node_modules/tough-cookie/lib/store.js +71 -0
- data/node_modules/tough-cookie/package.json +136 -0
- data/node_modules/tr46/.npmignore +4 -0
- data/node_modules/tr46/index.js +193 -0
- data/node_modules/tr46/lib/.gitkeep +0 -0
- data/node_modules/tr46/lib/mappingTable.json +1 -0
- data/node_modules/tr46/package.json +91 -0
- data/node_modules/tunnel-agent/LICENSE +55 -0
- data/node_modules/tunnel-agent/README.md +4 -0
- data/node_modules/tunnel-agent/index.js +243 -0
- data/node_modules/tunnel-agent/package.json +100 -0
- data/node_modules/tweetnacl/.npmignore +4 -0
- data/node_modules/tweetnacl/CHANGELOG.md +209 -0
- data/node_modules/tweetnacl/COPYING.txt +9 -0
- data/node_modules/tweetnacl/ISSUE_TEMPLATE.md +3 -0
- data/node_modules/tweetnacl/README.md +477 -0
- data/node_modules/tweetnacl/nacl-fast.js +2388 -0
- data/node_modules/tweetnacl/nacl-fast.min.js +2 -0
- data/node_modules/tweetnacl/nacl.d.ts +98 -0
- data/node_modules/tweetnacl/nacl.js +1175 -0
- data/node_modules/tweetnacl/nacl.min.js +1 -0
- data/node_modules/tweetnacl/package.json +121 -0
- data/node_modules/type-check/LICENSE +22 -0
- data/node_modules/type-check/README.md +210 -0
- data/node_modules/type-check/lib/check.js +126 -0
- data/node_modules/type-check/lib/index.js +16 -0
- data/node_modules/type-check/lib/parse-type.js +196 -0
- data/node_modules/type-check/package.json +102 -0
- data/node_modules/type-detect/.npmignore +11 -0
- data/node_modules/type-detect/History.md +52 -0
- data/node_modules/type-detect/README.md +226 -0
- data/node_modules/type-detect/ReleaseNotes.md +46 -0
- data/node_modules/type-detect/index.js +1 -0
- data/node_modules/type-detect/lib/type.js +134 -0
- data/node_modules/type-detect/package.json +93 -0
- data/node_modules/uuid/.npmignore +8 -0
- data/node_modules/uuid/.travis.yml +5 -0
- data/node_modules/uuid/AUTHORS +5 -0
- data/node_modules/uuid/HISTORY.md +28 -0
- data/node_modules/uuid/LICENSE.md +21 -0
- data/node_modules/uuid/README.md +132 -0
- data/node_modules/uuid/bin/uuid +26 -0
- data/node_modules/uuid/index.js +8 -0
- data/node_modules/uuid/lib/bytesToUuid.js +23 -0
- data/node_modules/uuid/lib/rng-browser.js +33 -0
- data/node_modules/uuid/lib/rng.js +10 -0
- data/node_modules/uuid/package.json +122 -0
- data/node_modules/uuid/test/mocha.opts +3 -0
- data/node_modules/uuid/test/test.js +96 -0
- data/node_modules/uuid/v1.js +103 -0
- data/node_modules/uuid/v4.js +29 -0
- data/node_modules/verror/.gitmodules +0 -0
- data/node_modules/verror/.npmignore +1 -0
- data/node_modules/verror/LICENSE +19 -0
- data/node_modules/verror/Makefile +35 -0
- data/node_modules/verror/Makefile.targ +285 -0
- data/node_modules/verror/README.md +120 -0
- data/node_modules/verror/examples/levels-verror.js +36 -0
- data/node_modules/verror/examples/levels-werror.js +34 -0
- data/node_modules/verror/examples/varargs.js +6 -0
- data/node_modules/verror/examples/verror.js +13 -0
- data/node_modules/verror/examples/werror.js +14 -0
- data/node_modules/verror/jsl.node.conf +139 -0
- data/node_modules/verror/lib/verror.js +157 -0
- data/node_modules/verror/package.json +78 -0
- data/node_modules/verror/tests/tst.inherit.js +100 -0
- data/node_modules/verror/tests/tst.verror.js +156 -0
- data/node_modules/verror/tests/tst.werror.js +179 -0
- data/node_modules/webidl-conversions/LICENSE.md +12 -0
- data/node_modules/webidl-conversions/README.md +53 -0
- data/node_modules/webidl-conversions/lib/index.js +189 -0
- data/node_modules/webidl-conversions/package.json +96 -0
- data/node_modules/whatwg-encoding/LICENSE.txt +19 -0
- data/node_modules/whatwg-encoding/lib/labels-to-names.json +207 -0
- data/node_modules/whatwg-encoding/lib/supported-names.json +37 -0
- data/node_modules/whatwg-encoding/lib/whatwg-encoding.js +47 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/.npmignore +6 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/.travis.yml +20 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/Changelog.md +93 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/LICENSE +21 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/README.md +157 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/dbcs-codec.js +554 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/dbcs-data.js +170 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/index.js +22 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/internal.js +187 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-data.js +169 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/gbk-added.json +55 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/utf16.js +174 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/utf7.js +289 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/lib/bom-handling.js +52 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/lib/extend-node.js +214 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/lib/index.js +141 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/lib/streams.js +120 -0
- data/node_modules/whatwg-encoding/node_modules/iconv-lite/package.json +153 -0
- data/node_modules/whatwg-encoding/package.json +101 -0
- data/node_modules/whatwg-url/.eslintignore +3 -0
- data/node_modules/whatwg-url/LICENSE.txt +21 -0
- data/node_modules/whatwg-url/README.md +66 -0
- data/node_modules/whatwg-url/lib/URL-impl.js +216 -0
- data/node_modules/whatwg-url/lib/URL.js +209 -0
- data/node_modules/whatwg-url/lib/public-api.js +11 -0
- data/node_modules/whatwg-url/lib/url-state-machine.js +1173 -0
- data/node_modules/whatwg-url/lib/utils.js +20 -0
- data/node_modules/whatwg-url/package.json +103 -0
- data/node_modules/wordwrap/LICENSE +18 -0
- data/node_modules/wordwrap/README.markdown +70 -0
- data/node_modules/wordwrap/example/center.js +10 -0
- data/node_modules/wordwrap/example/meat.js +3 -0
- data/node_modules/wordwrap/index.js +76 -0
- data/node_modules/wordwrap/package.json +94 -0
- data/node_modules/wordwrap/test/break.js +32 -0
- data/node_modules/wordwrap/test/idleness.txt +63 -0
- data/node_modules/wordwrap/test/wrap.js +33 -0
- data/node_modules/xml-name-validator/LICENSE.txt +19 -0
- data/node_modules/xml-name-validator/README.md +36 -0
- data/node_modules/xml-name-validator/lib/generated-parser.js +504 -0
- data/node_modules/xml-name-validator/lib/grammar.pegjs +35 -0
- data/node_modules/xml-name-validator/lib/xml-name-validator.js +17 -0
- data/node_modules/xml-name-validator/package.json +97 -0
- data/node_modules/xtend/.jshintrc +30 -0
- data/node_modules/xtend/.npmignore +1 -0
- data/node_modules/xtend/LICENCE +19 -0
- data/node_modules/xtend/Makefile +4 -0
- data/node_modules/xtend/README.md +32 -0
- data/node_modules/xtend/immutable.js +19 -0
- data/node_modules/xtend/mutable.js +17 -0
- data/node_modules/xtend/package.json +117 -0
- data/node_modules/xtend/test.js +83 -0
- data/package.json +32 -0
- data/vendor/assets/javascripts/select_all.js +1 -1
- metadata +1870 -2
@@ -0,0 +1,184 @@
|
|
1
|
+
// Load modules
|
2
|
+
|
3
|
+
var Sntp = require('sntp');
|
4
|
+
var Boom = require('boom');
|
5
|
+
|
6
|
+
|
7
|
+
// Declare internals
|
8
|
+
|
9
|
+
var internals = {};
|
10
|
+
|
11
|
+
|
12
|
+
exports.version = function () {
|
13
|
+
|
14
|
+
return require('../package.json').version;
|
15
|
+
};
|
16
|
+
|
17
|
+
|
18
|
+
exports.limits = {
|
19
|
+
maxMatchLength: 4096 // Limit the length of uris and headers to avoid a DoS attack on string matching
|
20
|
+
};
|
21
|
+
|
22
|
+
|
23
|
+
// Extract host and port from request
|
24
|
+
|
25
|
+
// $1 $2
|
26
|
+
internals.hostHeaderRegex = /^(?:(?:\r\n)?\s)*((?:[^:]+)|(?:\[[^\]]+\]))(?::(\d+))?(?:(?:\r\n)?\s)*$/; // (IPv4, hostname)|(IPv6)
|
27
|
+
|
28
|
+
|
29
|
+
exports.parseHost = function (req, hostHeaderName) {
|
30
|
+
|
31
|
+
hostHeaderName = (hostHeaderName ? hostHeaderName.toLowerCase() : 'host');
|
32
|
+
var hostHeader = req.headers[hostHeaderName];
|
33
|
+
if (!hostHeader) {
|
34
|
+
return null;
|
35
|
+
}
|
36
|
+
|
37
|
+
if (hostHeader.length > exports.limits.maxMatchLength) {
|
38
|
+
return null;
|
39
|
+
}
|
40
|
+
|
41
|
+
var hostParts = hostHeader.match(internals.hostHeaderRegex);
|
42
|
+
if (!hostParts) {
|
43
|
+
return null;
|
44
|
+
}
|
45
|
+
|
46
|
+
return {
|
47
|
+
name: hostParts[1],
|
48
|
+
port: (hostParts[2] ? hostParts[2] : (req.connection && req.connection.encrypted ? 443 : 80))
|
49
|
+
};
|
50
|
+
};
|
51
|
+
|
52
|
+
|
53
|
+
// Parse Content-Type header content
|
54
|
+
|
55
|
+
exports.parseContentType = function (header) {
|
56
|
+
|
57
|
+
if (!header) {
|
58
|
+
return '';
|
59
|
+
}
|
60
|
+
|
61
|
+
return header.split(';')[0].trim().toLowerCase();
|
62
|
+
};
|
63
|
+
|
64
|
+
|
65
|
+
// Convert node's to request configuration object
|
66
|
+
|
67
|
+
exports.parseRequest = function (req, options) {
|
68
|
+
|
69
|
+
if (!req.headers) {
|
70
|
+
return req;
|
71
|
+
}
|
72
|
+
|
73
|
+
// Obtain host and port information
|
74
|
+
|
75
|
+
var host;
|
76
|
+
if (!options.host ||
|
77
|
+
!options.port) {
|
78
|
+
|
79
|
+
host = exports.parseHost(req, options.hostHeaderName);
|
80
|
+
if (!host) {
|
81
|
+
return new Error('Invalid Host header');
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
var request = {
|
86
|
+
method: req.method,
|
87
|
+
url: req.url,
|
88
|
+
host: options.host || host.name,
|
89
|
+
port: options.port || host.port,
|
90
|
+
authorization: req.headers.authorization,
|
91
|
+
contentType: req.headers['content-type'] || ''
|
92
|
+
};
|
93
|
+
|
94
|
+
return request;
|
95
|
+
};
|
96
|
+
|
97
|
+
|
98
|
+
exports.now = function (localtimeOffsetMsec) {
|
99
|
+
|
100
|
+
return Sntp.now() + (localtimeOffsetMsec || 0);
|
101
|
+
};
|
102
|
+
|
103
|
+
|
104
|
+
exports.nowSecs = function (localtimeOffsetMsec) {
|
105
|
+
|
106
|
+
return Math.floor(exports.now(localtimeOffsetMsec) / 1000);
|
107
|
+
};
|
108
|
+
|
109
|
+
|
110
|
+
internals.authHeaderRegex = /^(\w+)(?:\s+(.*))?$/; // Header: scheme[ something]
|
111
|
+
internals.attributeRegex = /^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~]+$/; // !#$%&'()*+,-./:;<=>?@[]^_`{|}~ and space, a-z, A-Z, 0-9
|
112
|
+
|
113
|
+
|
114
|
+
// Parse Hawk HTTP Authorization header
|
115
|
+
|
116
|
+
exports.parseAuthorizationHeader = function (header, keys) {
|
117
|
+
|
118
|
+
keys = keys || ['id', 'ts', 'nonce', 'hash', 'ext', 'mac', 'app', 'dlg'];
|
119
|
+
|
120
|
+
if (!header) {
|
121
|
+
return Boom.unauthorized(null, 'Hawk');
|
122
|
+
}
|
123
|
+
|
124
|
+
if (header.length > exports.limits.maxMatchLength) {
|
125
|
+
return Boom.badRequest('Header length too long');
|
126
|
+
}
|
127
|
+
|
128
|
+
var headerParts = header.match(internals.authHeaderRegex);
|
129
|
+
if (!headerParts) {
|
130
|
+
return Boom.badRequest('Invalid header syntax');
|
131
|
+
}
|
132
|
+
|
133
|
+
var scheme = headerParts[1];
|
134
|
+
if (scheme.toLowerCase() !== 'hawk') {
|
135
|
+
return Boom.unauthorized(null, 'Hawk');
|
136
|
+
}
|
137
|
+
|
138
|
+
var attributesString = headerParts[2];
|
139
|
+
if (!attributesString) {
|
140
|
+
return Boom.badRequest('Invalid header syntax');
|
141
|
+
}
|
142
|
+
|
143
|
+
var attributes = {};
|
144
|
+
var errorMessage = '';
|
145
|
+
var verify = attributesString.replace(/(\w+)="([^"\\]*)"\s*(?:,\s*|$)/g, function ($0, $1, $2) {
|
146
|
+
|
147
|
+
// Check valid attribute names
|
148
|
+
|
149
|
+
if (keys.indexOf($1) === -1) {
|
150
|
+
errorMessage = 'Unknown attribute: ' + $1;
|
151
|
+
return;
|
152
|
+
}
|
153
|
+
|
154
|
+
// Allowed attribute value characters
|
155
|
+
|
156
|
+
if ($2.match(internals.attributeRegex) === null) {
|
157
|
+
errorMessage = 'Bad attribute value: ' + $1;
|
158
|
+
return;
|
159
|
+
}
|
160
|
+
|
161
|
+
// Check for duplicates
|
162
|
+
|
163
|
+
if (attributes.hasOwnProperty($1)) {
|
164
|
+
errorMessage = 'Duplicate attribute: ' + $1;
|
165
|
+
return;
|
166
|
+
}
|
167
|
+
|
168
|
+
attributes[$1] = $2;
|
169
|
+
return '';
|
170
|
+
});
|
171
|
+
|
172
|
+
if (verify !== '') {
|
173
|
+
return Boom.badRequest(errorMessage || 'Bad header format');
|
174
|
+
}
|
175
|
+
|
176
|
+
return attributes;
|
177
|
+
};
|
178
|
+
|
179
|
+
|
180
|
+
exports.unauthorized = function (message, attributes) {
|
181
|
+
|
182
|
+
return Boom.unauthorized(message, 'Hawk', attributes);
|
183
|
+
};
|
184
|
+
|
@@ -0,0 +1,101 @@
|
|
1
|
+
{
|
2
|
+
"_args": [
|
3
|
+
[
|
4
|
+
{
|
5
|
+
"raw": "hawk@~3.1.3",
|
6
|
+
"scope": null,
|
7
|
+
"escapedName": "hawk",
|
8
|
+
"name": "hawk",
|
9
|
+
"rawSpec": "~3.1.3",
|
10
|
+
"spec": ">=3.1.3 <3.2.0",
|
11
|
+
"type": "range"
|
12
|
+
},
|
13
|
+
"/home/baldor/Ubuntu bkp/project/select_all/select_all-rails/node_modules/jsdom/node_modules/request"
|
14
|
+
]
|
15
|
+
],
|
16
|
+
"_from": "hawk@>=3.1.3 <3.2.0",
|
17
|
+
"_id": "hawk@3.1.3",
|
18
|
+
"_inCache": true,
|
19
|
+
"_location": "/hawk",
|
20
|
+
"_nodeVersion": "5.4.1",
|
21
|
+
"_npmUser": {
|
22
|
+
"name": "hueniverse",
|
23
|
+
"email": "eran@hammer.io"
|
24
|
+
},
|
25
|
+
"_npmVersion": "3.3.12",
|
26
|
+
"_phantomChildren": {},
|
27
|
+
"_requested": {
|
28
|
+
"raw": "hawk@~3.1.3",
|
29
|
+
"scope": null,
|
30
|
+
"escapedName": "hawk",
|
31
|
+
"name": "hawk",
|
32
|
+
"rawSpec": "~3.1.3",
|
33
|
+
"spec": ">=3.1.3 <3.2.0",
|
34
|
+
"type": "range"
|
35
|
+
},
|
36
|
+
"_requiredBy": [
|
37
|
+
"/jsdom/request"
|
38
|
+
],
|
39
|
+
"_resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz",
|
40
|
+
"_shasum": "078444bd7c1640b0fe540d2c9b73d59678e8e1c4",
|
41
|
+
"_shrinkwrap": null,
|
42
|
+
"_spec": "hawk@~3.1.3",
|
43
|
+
"_where": "/home/baldor/Ubuntu bkp/project/select_all/select_all-rails/node_modules/jsdom/node_modules/request",
|
44
|
+
"author": {
|
45
|
+
"name": "Eran Hammer",
|
46
|
+
"email": "eran@hammer.io",
|
47
|
+
"url": "http://hueniverse.com"
|
48
|
+
},
|
49
|
+
"browser": "./lib/browser.js",
|
50
|
+
"bugs": {
|
51
|
+
"url": "https://github.com/hueniverse/hawk/issues"
|
52
|
+
},
|
53
|
+
"contributors": [],
|
54
|
+
"dependencies": {
|
55
|
+
"boom": "2.x.x",
|
56
|
+
"cryptiles": "2.x.x",
|
57
|
+
"hoek": "2.x.x",
|
58
|
+
"sntp": "1.x.x"
|
59
|
+
},
|
60
|
+
"description": "HTTP Hawk Authentication Scheme",
|
61
|
+
"devDependencies": {
|
62
|
+
"code": "1.x.x",
|
63
|
+
"lab": "5.x.x"
|
64
|
+
},
|
65
|
+
"directories": {},
|
66
|
+
"dist": {
|
67
|
+
"shasum": "078444bd7c1640b0fe540d2c9b73d59678e8e1c4",
|
68
|
+
"tarball": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz"
|
69
|
+
},
|
70
|
+
"engines": {
|
71
|
+
"node": ">=0.10.32"
|
72
|
+
},
|
73
|
+
"gitHead": "2f0b93b34ed9b0ebc865838ef70c6a4035591430",
|
74
|
+
"homepage": "https://github.com/hueniverse/hawk#readme",
|
75
|
+
"keywords": [
|
76
|
+
"http",
|
77
|
+
"authentication",
|
78
|
+
"scheme",
|
79
|
+
"hawk"
|
80
|
+
],
|
81
|
+
"license": "BSD-3-Clause",
|
82
|
+
"main": "lib/index.js",
|
83
|
+
"maintainers": [
|
84
|
+
{
|
85
|
+
"name": "hueniverse",
|
86
|
+
"email": "eran@hueniverse.com"
|
87
|
+
}
|
88
|
+
],
|
89
|
+
"name": "hawk",
|
90
|
+
"optionalDependencies": {},
|
91
|
+
"readme": "ERROR: No README data found!",
|
92
|
+
"repository": {
|
93
|
+
"type": "git",
|
94
|
+
"url": "git://github.com/hueniverse/hawk.git"
|
95
|
+
},
|
96
|
+
"scripts": {
|
97
|
+
"test": "lab -a code -t 100 -L",
|
98
|
+
"test-cov-html": "lab -a code -r html -o coverage.html"
|
99
|
+
},
|
100
|
+
"version": "3.1.3"
|
101
|
+
}
|
@@ -0,0 +1,1492 @@
|
|
1
|
+
// Load modules
|
2
|
+
|
3
|
+
var Url = require('url');
|
4
|
+
var Code = require('code');
|
5
|
+
var Hawk = require('../lib');
|
6
|
+
var Hoek = require('hoek');
|
7
|
+
var Lab = require('lab');
|
8
|
+
var Browser = require('../lib/browser');
|
9
|
+
|
10
|
+
|
11
|
+
// Declare internals
|
12
|
+
|
13
|
+
var internals = {};
|
14
|
+
|
15
|
+
|
16
|
+
// Test shortcuts
|
17
|
+
|
18
|
+
var lab = exports.lab = Lab.script();
|
19
|
+
var describe = lab.experiment;
|
20
|
+
var it = lab.test;
|
21
|
+
var expect = Code.expect;
|
22
|
+
|
23
|
+
|
24
|
+
describe('Browser', function () {
|
25
|
+
|
26
|
+
var credentialsFunc = function (id, callback) {
|
27
|
+
|
28
|
+
var credentials = {
|
29
|
+
id: id,
|
30
|
+
key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
|
31
|
+
algorithm: (id === '1' ? 'sha1' : 'sha256'),
|
32
|
+
user: 'steve'
|
33
|
+
};
|
34
|
+
|
35
|
+
return callback(null, credentials);
|
36
|
+
};
|
37
|
+
|
38
|
+
it('should generate a bewit then successfully authenticate it', function (done) {
|
39
|
+
|
40
|
+
var req = {
|
41
|
+
method: 'GET',
|
42
|
+
url: '/resource/4?a=1&b=2',
|
43
|
+
host: 'example.com',
|
44
|
+
port: 80
|
45
|
+
};
|
46
|
+
|
47
|
+
credentialsFunc('123456', function (err, credentials1) {
|
48
|
+
|
49
|
+
var bewit = Browser.client.bewit('http://example.com/resource/4?a=1&b=2', { credentials: credentials1, ttlSec: 60 * 60 * 24 * 365 * 100, ext: 'some-app-data' });
|
50
|
+
req.url += '&bewit=' + bewit;
|
51
|
+
|
52
|
+
Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials2, attributes) {
|
53
|
+
|
54
|
+
expect(err).to.not.exist();
|
55
|
+
expect(credentials2.user).to.equal('steve');
|
56
|
+
expect(attributes.ext).to.equal('some-app-data');
|
57
|
+
done();
|
58
|
+
});
|
59
|
+
});
|
60
|
+
});
|
61
|
+
|
62
|
+
it('should generate a bewit then successfully authenticate it (no ext)', function (done) {
|
63
|
+
|
64
|
+
var req = {
|
65
|
+
method: 'GET',
|
66
|
+
url: '/resource/4?a=1&b=2',
|
67
|
+
host: 'example.com',
|
68
|
+
port: 80
|
69
|
+
};
|
70
|
+
|
71
|
+
credentialsFunc('123456', function (err, credentials1) {
|
72
|
+
|
73
|
+
var bewit = Browser.client.bewit('http://example.com/resource/4?a=1&b=2', { credentials: credentials1, ttlSec: 60 * 60 * 24 * 365 * 100 });
|
74
|
+
req.url += '&bewit=' + bewit;
|
75
|
+
|
76
|
+
Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials2, attributes) {
|
77
|
+
|
78
|
+
expect(err).to.not.exist();
|
79
|
+
expect(credentials2.user).to.equal('steve');
|
80
|
+
done();
|
81
|
+
});
|
82
|
+
});
|
83
|
+
});
|
84
|
+
|
85
|
+
describe('bewit()', function () {
|
86
|
+
|
87
|
+
it('returns a valid bewit value', function (done) {
|
88
|
+
|
89
|
+
var credentials = {
|
90
|
+
id: '123456',
|
91
|
+
key: '2983d45yun89q',
|
92
|
+
algorithm: 'sha256'
|
93
|
+
};
|
94
|
+
|
95
|
+
var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
|
96
|
+
expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdca3NjeHdOUjJ0SnBQMVQxekRMTlBiQjVVaUtJVTl0T1NKWFRVZEc3WDloOD1ceGFuZHlhbmR6');
|
97
|
+
done();
|
98
|
+
});
|
99
|
+
|
100
|
+
it('returns a valid bewit value (explicit HTTP port)', function (done) {
|
101
|
+
|
102
|
+
var credentials = {
|
103
|
+
id: '123456',
|
104
|
+
key: '2983d45yun89q',
|
105
|
+
algorithm: 'sha256'
|
106
|
+
};
|
107
|
+
|
108
|
+
var bewit = Browser.client.bewit('http://example.com:8080/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
|
109
|
+
expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdcaFpiSjNQMmNLRW80a3kwQzhqa1pBa1J5Q1p1ZWc0V1NOYnhWN3ZxM3hIVT1ceGFuZHlhbmR6');
|
110
|
+
done();
|
111
|
+
});
|
112
|
+
|
113
|
+
it('returns a valid bewit value (explicit HTTPS port)', function (done) {
|
114
|
+
|
115
|
+
var credentials = {
|
116
|
+
id: '123456',
|
117
|
+
key: '2983d45yun89q',
|
118
|
+
algorithm: 'sha256'
|
119
|
+
};
|
120
|
+
|
121
|
+
var bewit = Browser.client.bewit('https://example.com:8043/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
|
122
|
+
expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdcL2t4UjhwK0xSaTdvQTRnUXc3cWlxa3BiVHRKYkR4OEtRMC9HRUwvVytTUT1ceGFuZHlhbmR6');
|
123
|
+
done();
|
124
|
+
});
|
125
|
+
|
126
|
+
it('returns a valid bewit value (null ext)', function (done) {
|
127
|
+
|
128
|
+
var credentials = {
|
129
|
+
id: '123456',
|
130
|
+
key: '2983d45yun89q',
|
131
|
+
algorithm: 'sha256'
|
132
|
+
};
|
133
|
+
|
134
|
+
var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: null });
|
135
|
+
expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdcSUdZbUxnSXFMckNlOEN4dktQczRKbFdJQStValdKSm91d2dBUmlWaENBZz1c');
|
136
|
+
done();
|
137
|
+
});
|
138
|
+
|
139
|
+
it('errors on invalid options', function (done) {
|
140
|
+
|
141
|
+
var credentials = {
|
142
|
+
id: '123456',
|
143
|
+
key: '2983d45yun89q',
|
144
|
+
algorithm: 'sha256'
|
145
|
+
};
|
146
|
+
|
147
|
+
var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', 4);
|
148
|
+
expect(bewit).to.equal('');
|
149
|
+
done();
|
150
|
+
});
|
151
|
+
|
152
|
+
it('errors on missing uri', function (done) {
|
153
|
+
|
154
|
+
var credentials = {
|
155
|
+
id: '123456',
|
156
|
+
key: '2983d45yun89q',
|
157
|
+
algorithm: 'sha256'
|
158
|
+
};
|
159
|
+
|
160
|
+
var bewit = Browser.client.bewit('', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
|
161
|
+
expect(bewit).to.equal('');
|
162
|
+
done();
|
163
|
+
});
|
164
|
+
|
165
|
+
it('errors on invalid uri', function (done) {
|
166
|
+
|
167
|
+
var credentials = {
|
168
|
+
id: '123456',
|
169
|
+
key: '2983d45yun89q',
|
170
|
+
algorithm: 'sha256'
|
171
|
+
};
|
172
|
+
|
173
|
+
var bewit = Browser.client.bewit(5, { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
|
174
|
+
expect(bewit).to.equal('');
|
175
|
+
done();
|
176
|
+
});
|
177
|
+
|
178
|
+
it('errors on invalid credentials (id)', function (done) {
|
179
|
+
|
180
|
+
var credentials = {
|
181
|
+
key: '2983d45yun89q',
|
182
|
+
algorithm: 'sha256'
|
183
|
+
};
|
184
|
+
|
185
|
+
var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 3000, ext: 'xandyandz' });
|
186
|
+
expect(bewit).to.equal('');
|
187
|
+
done();
|
188
|
+
});
|
189
|
+
|
190
|
+
it('errors on missing credentials', function (done) {
|
191
|
+
|
192
|
+
var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', { ttlSec: 3000, ext: 'xandyandz' });
|
193
|
+
expect(bewit).to.equal('');
|
194
|
+
done();
|
195
|
+
});
|
196
|
+
|
197
|
+
it('errors on invalid credentials (key)', function (done) {
|
198
|
+
|
199
|
+
var credentials = {
|
200
|
+
id: '123456',
|
201
|
+
algorithm: 'sha256'
|
202
|
+
};
|
203
|
+
|
204
|
+
var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 3000, ext: 'xandyandz' });
|
205
|
+
expect(bewit).to.equal('');
|
206
|
+
done();
|
207
|
+
});
|
208
|
+
|
209
|
+
it('errors on invalid algorithm', function (done) {
|
210
|
+
|
211
|
+
var credentials = {
|
212
|
+
id: '123456',
|
213
|
+
key: '2983d45yun89q',
|
214
|
+
algorithm: 'hmac-sha-0'
|
215
|
+
};
|
216
|
+
|
217
|
+
var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, ext: 'xandyandz' });
|
218
|
+
expect(bewit).to.equal('');
|
219
|
+
done();
|
220
|
+
});
|
221
|
+
|
222
|
+
it('errors on missing options', function (done) {
|
223
|
+
|
224
|
+
var credentials = {
|
225
|
+
id: '123456',
|
226
|
+
key: '2983d45yun89q',
|
227
|
+
algorithm: 'hmac-sha-0'
|
228
|
+
};
|
229
|
+
|
230
|
+
var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow');
|
231
|
+
expect(bewit).to.equal('');
|
232
|
+
done();
|
233
|
+
});
|
234
|
+
});
|
235
|
+
|
236
|
+
it('generates a header then successfully parse it (configuration)', function (done) {
|
237
|
+
|
238
|
+
var req = {
|
239
|
+
method: 'GET',
|
240
|
+
url: '/resource/4?filter=a',
|
241
|
+
host: 'example.com',
|
242
|
+
port: 8080
|
243
|
+
};
|
244
|
+
|
245
|
+
credentialsFunc('123456', function (err, credentials1) {
|
246
|
+
|
247
|
+
req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data' }).field;
|
248
|
+
expect(req.authorization).to.exist();
|
249
|
+
|
250
|
+
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
|
251
|
+
|
252
|
+
expect(err).to.not.exist();
|
253
|
+
expect(credentials2.user).to.equal('steve');
|
254
|
+
expect(artifacts.ext).to.equal('some-app-data');
|
255
|
+
done();
|
256
|
+
});
|
257
|
+
});
|
258
|
+
});
|
259
|
+
|
260
|
+
it('generates a header then successfully parse it (node request)', function (done) {
|
261
|
+
|
262
|
+
var req = {
|
263
|
+
method: 'POST',
|
264
|
+
url: '/resource/4?filter=a',
|
265
|
+
headers: {
|
266
|
+
host: 'example.com:8080',
|
267
|
+
'content-type': 'text/plain;x=y'
|
268
|
+
}
|
269
|
+
};
|
270
|
+
|
271
|
+
var payload = 'some not so random text';
|
272
|
+
|
273
|
+
credentialsFunc('123456', function (err, credentials1) {
|
274
|
+
|
275
|
+
var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
|
276
|
+
req.headers.authorization = reqHeader.field;
|
277
|
+
|
278
|
+
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
|
279
|
+
|
280
|
+
expect(err).to.not.exist();
|
281
|
+
expect(credentials2.user).to.equal('steve');
|
282
|
+
expect(artifacts.ext).to.equal('some-app-data');
|
283
|
+
expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
|
284
|
+
|
285
|
+
var res = {
|
286
|
+
headers: {
|
287
|
+
'content-type': 'text/plain'
|
288
|
+
},
|
289
|
+
getResponseHeader: function (header) {
|
290
|
+
|
291
|
+
return res.headers[header.toLowerCase()];
|
292
|
+
}
|
293
|
+
};
|
294
|
+
|
295
|
+
res.headers['server-authorization'] = Hawk.server.header(credentials2, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
|
296
|
+
expect(res.headers['server-authorization']).to.exist();
|
297
|
+
|
298
|
+
expect(Browser.client.authenticate(res, credentials2, artifacts, { payload: 'some reply' })).to.equal(true);
|
299
|
+
done();
|
300
|
+
});
|
301
|
+
});
|
302
|
+
});
|
303
|
+
|
304
|
+
it('generates a header then successfully parse it (browserify)', function (done) {
|
305
|
+
|
306
|
+
var req = {
|
307
|
+
method: 'POST',
|
308
|
+
url: '/resource/4?filter=a',
|
309
|
+
headers: {
|
310
|
+
host: 'example.com:8080',
|
311
|
+
'content-type': 'text/plain;x=y'
|
312
|
+
}
|
313
|
+
};
|
314
|
+
|
315
|
+
var payload = 'some not so random text';
|
316
|
+
|
317
|
+
credentialsFunc('123456', function (err, credentials1) {
|
318
|
+
|
319
|
+
var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
|
320
|
+
req.headers.authorization = reqHeader.field;
|
321
|
+
|
322
|
+
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
|
323
|
+
|
324
|
+
expect(err).to.not.exist();
|
325
|
+
expect(credentials2.user).to.equal('steve');
|
326
|
+
expect(artifacts.ext).to.equal('some-app-data');
|
327
|
+
expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
|
328
|
+
|
329
|
+
var res = {
|
330
|
+
headers: {
|
331
|
+
'content-type': 'text/plain'
|
332
|
+
},
|
333
|
+
getHeader: function (header) {
|
334
|
+
|
335
|
+
return res.headers[header.toLowerCase()];
|
336
|
+
}
|
337
|
+
};
|
338
|
+
|
339
|
+
res.headers['server-authorization'] = Hawk.server.header(credentials2, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
|
340
|
+
expect(res.headers['server-authorization']).to.exist();
|
341
|
+
|
342
|
+
expect(Browser.client.authenticate(res, credentials2, artifacts, { payload: 'some reply' })).to.equal(true);
|
343
|
+
done();
|
344
|
+
});
|
345
|
+
});
|
346
|
+
});
|
347
|
+
|
348
|
+
it('generates a header then successfully parse it (time offset)', function (done) {
|
349
|
+
|
350
|
+
var req = {
|
351
|
+
method: 'GET',
|
352
|
+
url: '/resource/4?filter=a',
|
353
|
+
host: 'example.com',
|
354
|
+
port: 8080
|
355
|
+
};
|
356
|
+
|
357
|
+
credentialsFunc('123456', function (err, credentials1) {
|
358
|
+
|
359
|
+
req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', localtimeOffsetMsec: 100000 }).field;
|
360
|
+
expect(req.authorization).to.exist();
|
361
|
+
|
362
|
+
Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 100000 }, function (err, credentials2, artifacts) {
|
363
|
+
|
364
|
+
expect(err).to.not.exist();
|
365
|
+
expect(credentials2.user).to.equal('steve');
|
366
|
+
expect(artifacts.ext).to.equal('some-app-data');
|
367
|
+
done();
|
368
|
+
});
|
369
|
+
});
|
370
|
+
});
|
371
|
+
|
372
|
+
it('generates a header then successfully parse it (no server header options)', function (done) {
|
373
|
+
|
374
|
+
var req = {
|
375
|
+
method: 'POST',
|
376
|
+
url: '/resource/4?filter=a',
|
377
|
+
headers: {
|
378
|
+
host: 'example.com:8080',
|
379
|
+
'content-type': 'text/plain;x=y'
|
380
|
+
}
|
381
|
+
};
|
382
|
+
|
383
|
+
var payload = 'some not so random text';
|
384
|
+
|
385
|
+
credentialsFunc('123456', function (err, credentials1) {
|
386
|
+
|
387
|
+
var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
|
388
|
+
req.headers.authorization = reqHeader.field;
|
389
|
+
|
390
|
+
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
|
391
|
+
|
392
|
+
expect(err).to.not.exist();
|
393
|
+
expect(credentials2.user).to.equal('steve');
|
394
|
+
expect(artifacts.ext).to.equal('some-app-data');
|
395
|
+
expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
|
396
|
+
|
397
|
+
var res = {
|
398
|
+
headers: {
|
399
|
+
'content-type': 'text/plain'
|
400
|
+
},
|
401
|
+
getResponseHeader: function (header) {
|
402
|
+
|
403
|
+
return res.headers[header.toLowerCase()];
|
404
|
+
}
|
405
|
+
};
|
406
|
+
|
407
|
+
res.headers['server-authorization'] = Hawk.server.header(credentials2, artifacts);
|
408
|
+
expect(res.headers['server-authorization']).to.exist();
|
409
|
+
|
410
|
+
expect(Browser.client.authenticate(res, credentials2, artifacts)).to.equal(true);
|
411
|
+
done();
|
412
|
+
});
|
413
|
+
});
|
414
|
+
});
|
415
|
+
|
416
|
+
it('generates a header then successfully parse it (no server header)', function (done) {
|
417
|
+
|
418
|
+
var req = {
|
419
|
+
method: 'POST',
|
420
|
+
url: '/resource/4?filter=a',
|
421
|
+
headers: {
|
422
|
+
host: 'example.com:8080',
|
423
|
+
'content-type': 'text/plain;x=y'
|
424
|
+
}
|
425
|
+
};
|
426
|
+
|
427
|
+
var payload = 'some not so random text';
|
428
|
+
|
429
|
+
credentialsFunc('123456', function (err, credentials1) {
|
430
|
+
|
431
|
+
var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
|
432
|
+
req.headers.authorization = reqHeader.field;
|
433
|
+
|
434
|
+
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
|
435
|
+
|
436
|
+
expect(err).to.not.exist();
|
437
|
+
expect(credentials2.user).to.equal('steve');
|
438
|
+
expect(artifacts.ext).to.equal('some-app-data');
|
439
|
+
expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
|
440
|
+
|
441
|
+
var res = {
|
442
|
+
headers: {
|
443
|
+
'content-type': 'text/plain'
|
444
|
+
},
|
445
|
+
getResponseHeader: function (header) {
|
446
|
+
|
447
|
+
return res.headers[header.toLowerCase()];
|
448
|
+
}
|
449
|
+
};
|
450
|
+
|
451
|
+
expect(Browser.client.authenticate(res, credentials2, artifacts)).to.equal(true);
|
452
|
+
done();
|
453
|
+
});
|
454
|
+
});
|
455
|
+
});
|
456
|
+
|
457
|
+
it('generates a header with stale ts and successfully authenticate on second call', function (done) {
|
458
|
+
|
459
|
+
var req = {
|
460
|
+
method: 'GET',
|
461
|
+
url: '/resource/4?filter=a',
|
462
|
+
host: 'example.com',
|
463
|
+
port: 8080
|
464
|
+
};
|
465
|
+
|
466
|
+
credentialsFunc('123456', function (err, credentials1) {
|
467
|
+
|
468
|
+
Browser.utils.setNtpOffset(60 * 60 * 1000);
|
469
|
+
var header = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data' });
|
470
|
+
req.authorization = header.field;
|
471
|
+
expect(req.authorization).to.exist();
|
472
|
+
|
473
|
+
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts2) {
|
474
|
+
|
475
|
+
expect(err).to.exist();
|
476
|
+
expect(err.message).to.equal('Stale timestamp');
|
477
|
+
|
478
|
+
var res = {
|
479
|
+
headers: {
|
480
|
+
'www-authenticate': err.output.headers['WWW-Authenticate']
|
481
|
+
},
|
482
|
+
getResponseHeader: function (lookup) {
|
483
|
+
|
484
|
+
return res.headers[lookup.toLowerCase()];
|
485
|
+
}
|
486
|
+
};
|
487
|
+
|
488
|
+
expect(Browser.utils.getNtpOffset()).to.equal(60 * 60 * 1000);
|
489
|
+
expect(Browser.client.authenticate(res, credentials2, header.artifacts)).to.equal(true);
|
490
|
+
expect(Browser.utils.getNtpOffset()).to.equal(0);
|
491
|
+
|
492
|
+
req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials2, ext: 'some-app-data' }).field;
|
493
|
+
expect(req.authorization).to.exist();
|
494
|
+
|
495
|
+
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials3, artifacts3) {
|
496
|
+
|
497
|
+
expect(err).to.not.exist();
|
498
|
+
expect(credentials3.user).to.equal('steve');
|
499
|
+
expect(artifacts3.ext).to.equal('some-app-data');
|
500
|
+
done();
|
501
|
+
});
|
502
|
+
});
|
503
|
+
});
|
504
|
+
});
|
505
|
+
|
506
|
+
it('generates a header with stale ts and successfully authenticate on second call (manual localStorage)', function (done) {
|
507
|
+
|
508
|
+
var req = {
|
509
|
+
method: 'GET',
|
510
|
+
url: '/resource/4?filter=a',
|
511
|
+
host: 'example.com',
|
512
|
+
port: 8080
|
513
|
+
};
|
514
|
+
|
515
|
+
credentialsFunc('123456', function (err, credentials1) {
|
516
|
+
|
517
|
+
var localStorage = new Browser.internals.LocalStorage();
|
518
|
+
|
519
|
+
Browser.utils.setStorage(localStorage);
|
520
|
+
|
521
|
+
Browser.utils.setNtpOffset(60 * 60 * 1000);
|
522
|
+
var header = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data' });
|
523
|
+
req.authorization = header.field;
|
524
|
+
expect(req.authorization).to.exist();
|
525
|
+
|
526
|
+
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts2) {
|
527
|
+
|
528
|
+
expect(err).to.exist();
|
529
|
+
expect(err.message).to.equal('Stale timestamp');
|
530
|
+
|
531
|
+
var res = {
|
532
|
+
headers: {
|
533
|
+
'www-authenticate': err.output.headers['WWW-Authenticate']
|
534
|
+
},
|
535
|
+
getResponseHeader: function (lookup) {
|
536
|
+
|
537
|
+
return res.headers[lookup.toLowerCase()];
|
538
|
+
}
|
539
|
+
};
|
540
|
+
|
541
|
+
expect(parseInt(localStorage.getItem('hawk_ntp_offset'))).to.equal(60 * 60 * 1000);
|
542
|
+
expect(Browser.utils.getNtpOffset()).to.equal(60 * 60 * 1000);
|
543
|
+
expect(Browser.client.authenticate(res, credentials2, header.artifacts)).to.equal(true);
|
544
|
+
expect(Browser.utils.getNtpOffset()).to.equal(0);
|
545
|
+
expect(parseInt(localStorage.getItem('hawk_ntp_offset'))).to.equal(0);
|
546
|
+
|
547
|
+
req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials2, ext: 'some-app-data' }).field;
|
548
|
+
expect(req.authorization).to.exist();
|
549
|
+
|
550
|
+
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials3, artifacts3) {
|
551
|
+
|
552
|
+
expect(err).to.not.exist();
|
553
|
+
expect(credentials3.user).to.equal('steve');
|
554
|
+
expect(artifacts3.ext).to.equal('some-app-data');
|
555
|
+
done();
|
556
|
+
});
|
557
|
+
});
|
558
|
+
});
|
559
|
+
});
|
560
|
+
|
561
|
+
it('generates a header then fails to parse it (missing server header hash)', function (done) {
|
562
|
+
|
563
|
+
var req = {
|
564
|
+
method: 'POST',
|
565
|
+
url: '/resource/4?filter=a',
|
566
|
+
headers: {
|
567
|
+
host: 'example.com:8080',
|
568
|
+
'content-type': 'text/plain;x=y'
|
569
|
+
}
|
570
|
+
};
|
571
|
+
|
572
|
+
var payload = 'some not so random text';
|
573
|
+
|
574
|
+
credentialsFunc('123456', function (err, credentials1) {
|
575
|
+
|
576
|
+
var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
|
577
|
+
req.headers.authorization = reqHeader.field;
|
578
|
+
|
579
|
+
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
|
580
|
+
|
581
|
+
expect(err).to.not.exist();
|
582
|
+
expect(credentials2.user).to.equal('steve');
|
583
|
+
expect(artifacts.ext).to.equal('some-app-data');
|
584
|
+
expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
|
585
|
+
|
586
|
+
var res = {
|
587
|
+
headers: {
|
588
|
+
'content-type': 'text/plain'
|
589
|
+
},
|
590
|
+
getResponseHeader: function (header) {
|
591
|
+
|
592
|
+
return res.headers[header.toLowerCase()];
|
593
|
+
}
|
594
|
+
};
|
595
|
+
|
596
|
+
res.headers['server-authorization'] = Hawk.server.header(credentials2, artifacts);
|
597
|
+
expect(res.headers['server-authorization']).to.exist();
|
598
|
+
|
599
|
+
expect(Browser.client.authenticate(res, credentials2, artifacts, { payload: 'some reply' })).to.equal(false);
|
600
|
+
done();
|
601
|
+
});
|
602
|
+
});
|
603
|
+
});
|
604
|
+
|
605
|
+
it('generates a header then successfully parse it (with hash)', function (done) {
|
606
|
+
|
607
|
+
var req = {
|
608
|
+
method: 'GET',
|
609
|
+
url: '/resource/4?filter=a',
|
610
|
+
host: 'example.com',
|
611
|
+
port: 8080
|
612
|
+
};
|
613
|
+
|
614
|
+
credentialsFunc('123456', function (err, credentials1) {
|
615
|
+
|
616
|
+
req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, payload: 'hola!', ext: 'some-app-data' }).field;
|
617
|
+
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
|
618
|
+
|
619
|
+
expect(err).to.not.exist();
|
620
|
+
expect(credentials2.user).to.equal('steve');
|
621
|
+
expect(artifacts.ext).to.equal('some-app-data');
|
622
|
+
done();
|
623
|
+
});
|
624
|
+
});
|
625
|
+
});
|
626
|
+
|
627
|
+
it('generates a header then successfully parse it then validate payload', function (done) {
|
628
|
+
|
629
|
+
var req = {
|
630
|
+
method: 'GET',
|
631
|
+
url: '/resource/4?filter=a',
|
632
|
+
host: 'example.com',
|
633
|
+
port: 8080
|
634
|
+
};
|
635
|
+
|
636
|
+
credentialsFunc('123456', function (err, credentials1) {
|
637
|
+
|
638
|
+
req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, payload: 'hola!', ext: 'some-app-data' }).field;
|
639
|
+
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
|
640
|
+
|
641
|
+
expect(err).to.not.exist();
|
642
|
+
expect(credentials2.user).to.equal('steve');
|
643
|
+
expect(artifacts.ext).to.equal('some-app-data');
|
644
|
+
expect(Hawk.server.authenticatePayload('hola!', credentials2, artifacts)).to.be.true();
|
645
|
+
expect(Hawk.server.authenticatePayload('hello!', credentials2, artifacts)).to.be.false();
|
646
|
+
done();
|
647
|
+
});
|
648
|
+
});
|
649
|
+
});
|
650
|
+
|
651
|
+
it('generates a header then successfully parse it (app)', function (done) {
|
652
|
+
|
653
|
+
var req = {
|
654
|
+
method: 'GET',
|
655
|
+
url: '/resource/4?filter=a',
|
656
|
+
host: 'example.com',
|
657
|
+
port: 8080
|
658
|
+
};
|
659
|
+
|
660
|
+
credentialsFunc('123456', function (err, credentials1) {
|
661
|
+
|
662
|
+
req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', app: 'asd23ased' }).field;
|
663
|
+
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
|
664
|
+
|
665
|
+
expect(err).to.not.exist();
|
666
|
+
expect(credentials2.user).to.equal('steve');
|
667
|
+
expect(artifacts.ext).to.equal('some-app-data');
|
668
|
+
expect(artifacts.app).to.equal('asd23ased');
|
669
|
+
done();
|
670
|
+
});
|
671
|
+
});
|
672
|
+
});
|
673
|
+
|
674
|
+
it('generates a header then successfully parse it (app, dlg)', function (done) {
|
675
|
+
|
676
|
+
var req = {
|
677
|
+
method: 'GET',
|
678
|
+
url: '/resource/4?filter=a',
|
679
|
+
host: 'example.com',
|
680
|
+
port: 8080
|
681
|
+
};
|
682
|
+
|
683
|
+
credentialsFunc('123456', function (err, credentials1) {
|
684
|
+
|
685
|
+
req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', app: 'asd23ased', dlg: '23434szr3q4d' }).field;
|
686
|
+
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
|
687
|
+
|
688
|
+
expect(err).to.not.exist();
|
689
|
+
expect(credentials2.user).to.equal('steve');
|
690
|
+
expect(artifacts.ext).to.equal('some-app-data');
|
691
|
+
expect(artifacts.app).to.equal('asd23ased');
|
692
|
+
expect(artifacts.dlg).to.equal('23434szr3q4d');
|
693
|
+
done();
|
694
|
+
});
|
695
|
+
});
|
696
|
+
});
|
697
|
+
|
698
|
+
it('generates a header then fail authentication due to bad hash', function (done) {
|
699
|
+
|
700
|
+
var req = {
|
701
|
+
method: 'GET',
|
702
|
+
url: '/resource/4?filter=a',
|
703
|
+
host: 'example.com',
|
704
|
+
port: 8080
|
705
|
+
};
|
706
|
+
|
707
|
+
credentialsFunc('123456', function (err, credentials1) {
|
708
|
+
|
709
|
+
req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, payload: 'hola!', ext: 'some-app-data' }).field;
|
710
|
+
Hawk.server.authenticate(req, credentialsFunc, { payload: 'byebye!' }, function (err, credentials2, artifacts) {
|
711
|
+
|
712
|
+
expect(err).to.exist();
|
713
|
+
expect(err.output.payload.message).to.equal('Bad payload hash');
|
714
|
+
done();
|
715
|
+
});
|
716
|
+
});
|
717
|
+
});
|
718
|
+
|
719
|
+
it('generates a header for one resource then fail to authenticate another', function (done) {
|
720
|
+
|
721
|
+
var req = {
|
722
|
+
method: 'GET',
|
723
|
+
url: '/resource/4?filter=a',
|
724
|
+
host: 'example.com',
|
725
|
+
port: 8080
|
726
|
+
};
|
727
|
+
|
728
|
+
credentialsFunc('123456', function (err, credentials1) {
|
729
|
+
|
730
|
+
req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data' }).field;
|
731
|
+
req.url = '/something/else';
|
732
|
+
|
733
|
+
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
|
734
|
+
|
735
|
+
expect(err).to.exist();
|
736
|
+
expect(credentials2).to.exist();
|
737
|
+
done();
|
738
|
+
});
|
739
|
+
});
|
740
|
+
});
|
741
|
+
|
742
|
+
describe('client', function () {
|
743
|
+
|
744
|
+
describe('header()', function () {
|
745
|
+
|
746
|
+
it('returns a valid authorization header (sha1)', function (done) {
|
747
|
+
|
748
|
+
var credentials = {
|
749
|
+
id: '123456',
|
750
|
+
key: '2983d45yun89q',
|
751
|
+
algorithm: 'sha1'
|
752
|
+
};
|
753
|
+
|
754
|
+
var header = Browser.client.header('http://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about' }).field;
|
755
|
+
expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="bsvY3IfUllw6V5rvk4tStEvpBhE=", ext="Bazinga!", mac="qbf1ZPG/r/e06F4ht+T77LXi5vw="');
|
756
|
+
done();
|
757
|
+
});
|
758
|
+
|
759
|
+
it('returns a valid authorization header (sha256)', function (done) {
|
760
|
+
|
761
|
+
var credentials = {
|
762
|
+
id: '123456',
|
763
|
+
key: '2983d45yun89q',
|
764
|
+
algorithm: 'sha256'
|
765
|
+
};
|
766
|
+
|
767
|
+
var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' }).field;
|
768
|
+
expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", ext="Bazinga!", mac="q1CwFoSHzPZSkbIvl0oYlD+91rBUEvFk763nMjMndj8="');
|
769
|
+
done();
|
770
|
+
});
|
771
|
+
|
772
|
+
it('returns a valid authorization header (empty payload)', function (done) {
|
773
|
+
|
774
|
+
var credentials = {
|
775
|
+
id: '123456',
|
776
|
+
key: '2983d45yun89q',
|
777
|
+
algorithm: 'sha1'
|
778
|
+
};
|
779
|
+
|
780
|
+
var header = Browser.client.header('http://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: '' }).field;
|
781
|
+
expect(header).to.equal('Hawk id=\"123456\", ts=\"1353809207\", nonce=\"Ygvqdz\", hash=\"404ghL7K+hfyhByKKejFBRGgTjU=\", ext=\"Bazinga!\", mac=\"Bh1sj1DOfFRWOdi3ww52nLCJdBE=\"');
|
782
|
+
done();
|
783
|
+
});
|
784
|
+
|
785
|
+
it('returns a valid authorization header (no ext)', function (done) {
|
786
|
+
|
787
|
+
var credentials = {
|
788
|
+
id: '123456',
|
789
|
+
key: '2983d45yun89q',
|
790
|
+
algorithm: 'sha256'
|
791
|
+
};
|
792
|
+
|
793
|
+
var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' }).field;
|
794
|
+
expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", mac="HTgtd0jPI6E4izx8e4OHdO36q00xFCU0FolNq3RiCYs="');
|
795
|
+
done();
|
796
|
+
});
|
797
|
+
|
798
|
+
it('returns a valid authorization header (null ext)', function (done) {
|
799
|
+
|
800
|
+
var credentials = {
|
801
|
+
id: '123456',
|
802
|
+
key: '2983d45yun89q',
|
803
|
+
algorithm: 'sha256'
|
804
|
+
};
|
805
|
+
|
806
|
+
var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain', ext: null }).field;
|
807
|
+
expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", mac="HTgtd0jPI6E4izx8e4OHdO36q00xFCU0FolNq3RiCYs="');
|
808
|
+
done();
|
809
|
+
});
|
810
|
+
|
811
|
+
it('returns a valid authorization header (uri object)', function (done) {
|
812
|
+
|
813
|
+
var credentials = {
|
814
|
+
id: '123456',
|
815
|
+
key: '2983d45yun89q',
|
816
|
+
algorithm: 'sha256'
|
817
|
+
};
|
818
|
+
|
819
|
+
var uri = Browser.utils.parseUri('https://example.net/somewhere/over/the/rainbow');
|
820
|
+
var header = Browser.client.header(uri, 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' }).field;
|
821
|
+
expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", mac="HTgtd0jPI6E4izx8e4OHdO36q00xFCU0FolNq3RiCYs="');
|
822
|
+
done();
|
823
|
+
});
|
824
|
+
|
825
|
+
it('errors on missing options', function (done) {
|
826
|
+
|
827
|
+
var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST');
|
828
|
+
expect(header.field).to.equal('');
|
829
|
+
expect(header.err).to.equal('Invalid argument type');
|
830
|
+
done();
|
831
|
+
});
|
832
|
+
|
833
|
+
it('errors on empty uri', function (done) {
|
834
|
+
|
835
|
+
var credentials = {
|
836
|
+
id: '123456',
|
837
|
+
key: '2983d45yun89q',
|
838
|
+
algorithm: 'sha256'
|
839
|
+
};
|
840
|
+
|
841
|
+
var header = Browser.client.header('', 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' });
|
842
|
+
expect(header.field).to.equal('');
|
843
|
+
expect(header.err).to.equal('Invalid argument type');
|
844
|
+
done();
|
845
|
+
});
|
846
|
+
|
847
|
+
it('errors on invalid uri', function (done) {
|
848
|
+
|
849
|
+
var credentials = {
|
850
|
+
id: '123456',
|
851
|
+
key: '2983d45yun89q',
|
852
|
+
algorithm: 'sha256'
|
853
|
+
};
|
854
|
+
|
855
|
+
var header = Browser.client.header(4, 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' });
|
856
|
+
expect(header.field).to.equal('');
|
857
|
+
expect(header.err).to.equal('Invalid argument type');
|
858
|
+
done();
|
859
|
+
});
|
860
|
+
|
861
|
+
it('errors on missing method', function (done) {
|
862
|
+
|
863
|
+
var credentials = {
|
864
|
+
id: '123456',
|
865
|
+
key: '2983d45yun89q',
|
866
|
+
algorithm: 'sha256'
|
867
|
+
};
|
868
|
+
|
869
|
+
var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', '', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' });
|
870
|
+
expect(header.field).to.equal('');
|
871
|
+
expect(header.err).to.equal('Invalid argument type');
|
872
|
+
done();
|
873
|
+
});
|
874
|
+
|
875
|
+
it('errors on invalid method', function (done) {
|
876
|
+
|
877
|
+
var credentials = {
|
878
|
+
id: '123456',
|
879
|
+
key: '2983d45yun89q',
|
880
|
+
algorithm: 'sha256'
|
881
|
+
};
|
882
|
+
|
883
|
+
var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 5, { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' });
|
884
|
+
expect(header.field).to.equal('');
|
885
|
+
expect(header.err).to.equal('Invalid argument type');
|
886
|
+
done();
|
887
|
+
});
|
888
|
+
|
889
|
+
it('errors on missing credentials', function (done) {
|
890
|
+
|
891
|
+
var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { ext: 'Bazinga!', timestamp: 1353809207 });
|
892
|
+
expect(header.field).to.equal('');
|
893
|
+
expect(header.err).to.equal('Invalid credentials object');
|
894
|
+
done();
|
895
|
+
});
|
896
|
+
|
897
|
+
it('errors on invalid credentials (id)', function (done) {
|
898
|
+
|
899
|
+
var credentials = {
|
900
|
+
key: '2983d45yun89q',
|
901
|
+
algorithm: 'sha256'
|
902
|
+
};
|
903
|
+
|
904
|
+
var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207 });
|
905
|
+
expect(header.field).to.equal('');
|
906
|
+
expect(header.err).to.equal('Invalid credentials object');
|
907
|
+
done();
|
908
|
+
});
|
909
|
+
|
910
|
+
it('errors on invalid credentials (key)', function (done) {
|
911
|
+
|
912
|
+
var credentials = {
|
913
|
+
id: '123456',
|
914
|
+
algorithm: 'sha256'
|
915
|
+
};
|
916
|
+
|
917
|
+
var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207 });
|
918
|
+
expect(header.field).to.equal('');
|
919
|
+
expect(header.err).to.equal('Invalid credentials object');
|
920
|
+
done();
|
921
|
+
});
|
922
|
+
|
923
|
+
it('errors on invalid algorithm', function (done) {
|
924
|
+
|
925
|
+
var credentials = {
|
926
|
+
id: '123456',
|
927
|
+
key: '2983d45yun89q',
|
928
|
+
algorithm: 'hmac-sha-0'
|
929
|
+
};
|
930
|
+
|
931
|
+
var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, payload: 'something, anything!', ext: 'Bazinga!', timestamp: 1353809207 });
|
932
|
+
expect(header.field).to.equal('');
|
933
|
+
expect(header.err).to.equal('Unknown algorithm');
|
934
|
+
done();
|
935
|
+
});
|
936
|
+
|
937
|
+
it('uses a pre-calculated payload hash', function (done) {
|
938
|
+
|
939
|
+
var credentials = {
|
940
|
+
id: '123456',
|
941
|
+
key: '2983d45yun89q',
|
942
|
+
algorithm: 'sha256'
|
943
|
+
};
|
944
|
+
|
945
|
+
var options = { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' };
|
946
|
+
options.hash = Browser.crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
|
947
|
+
var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', options).field;
|
948
|
+
expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", ext="Bazinga!", mac="q1CwFoSHzPZSkbIvl0oYlD+91rBUEvFk763nMjMndj8="');
|
949
|
+
done();
|
950
|
+
});
|
951
|
+
});
|
952
|
+
|
953
|
+
describe('authenticate()', function () {
|
954
|
+
|
955
|
+
it('skips tsm validation when missing ts', function (done) {
|
956
|
+
|
957
|
+
var res = {
|
958
|
+
headers: {
|
959
|
+
'www-authenticate': 'Hawk error="Stale timestamp"'
|
960
|
+
},
|
961
|
+
getResponseHeader: function (header) {
|
962
|
+
|
963
|
+
return res.headers[header.toLowerCase()];
|
964
|
+
}
|
965
|
+
};
|
966
|
+
|
967
|
+
var credentials = {
|
968
|
+
id: '123456',
|
969
|
+
key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
|
970
|
+
algorithm: 'sha256',
|
971
|
+
user: 'steve'
|
972
|
+
};
|
973
|
+
|
974
|
+
var artifacts = {
|
975
|
+
ts: 1402135580,
|
976
|
+
nonce: 'iBRB6t',
|
977
|
+
method: 'GET',
|
978
|
+
resource: '/resource/4?filter=a',
|
979
|
+
host: 'example.com',
|
980
|
+
port: '8080',
|
981
|
+
ext: 'some-app-data'
|
982
|
+
};
|
983
|
+
|
984
|
+
expect(Browser.client.authenticate(res, credentials, artifacts)).to.equal(true);
|
985
|
+
done();
|
986
|
+
});
|
987
|
+
|
988
|
+
it('returns false on invalid header', function (done) {
|
989
|
+
|
990
|
+
var res = {
|
991
|
+
headers: {
|
992
|
+
'server-authorization': 'Hawk mac="abc", bad="xyz"'
|
993
|
+
},
|
994
|
+
getResponseHeader: function (header) {
|
995
|
+
|
996
|
+
return res.headers[header.toLowerCase()];
|
997
|
+
}
|
998
|
+
};
|
999
|
+
|
1000
|
+
expect(Browser.client.authenticate(res, {})).to.equal(false);
|
1001
|
+
done();
|
1002
|
+
});
|
1003
|
+
|
1004
|
+
it('returns false on invalid mac', function (done) {
|
1005
|
+
|
1006
|
+
var res = {
|
1007
|
+
headers: {
|
1008
|
+
'content-type': 'text/plain',
|
1009
|
+
'server-authorization': 'Hawk mac="_IJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific"'
|
1010
|
+
},
|
1011
|
+
getResponseHeader: function (header) {
|
1012
|
+
|
1013
|
+
return res.headers[header.toLowerCase()];
|
1014
|
+
}
|
1015
|
+
};
|
1016
|
+
|
1017
|
+
var artifacts = {
|
1018
|
+
method: 'POST',
|
1019
|
+
host: 'example.com',
|
1020
|
+
port: '8080',
|
1021
|
+
resource: '/resource/4?filter=a',
|
1022
|
+
ts: '1362336900',
|
1023
|
+
nonce: 'eb5S_L',
|
1024
|
+
hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
|
1025
|
+
ext: 'some-app-data',
|
1026
|
+
app: undefined,
|
1027
|
+
dlg: undefined,
|
1028
|
+
mac: 'BlmSe8K+pbKIb6YsZCnt4E1GrYvY1AaYayNR82dGpIk=',
|
1029
|
+
id: '123456'
|
1030
|
+
};
|
1031
|
+
|
1032
|
+
var credentials = {
|
1033
|
+
id: '123456',
|
1034
|
+
key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
|
1035
|
+
algorithm: 'sha256',
|
1036
|
+
user: 'steve'
|
1037
|
+
};
|
1038
|
+
|
1039
|
+
expect(Browser.client.authenticate(res, credentials, artifacts)).to.equal(false);
|
1040
|
+
done();
|
1041
|
+
});
|
1042
|
+
|
1043
|
+
it('returns true on ignoring hash', function (done) {
|
1044
|
+
|
1045
|
+
var res = {
|
1046
|
+
headers: {
|
1047
|
+
'content-type': 'text/plain',
|
1048
|
+
'server-authorization': 'Hawk mac="XIJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific"'
|
1049
|
+
},
|
1050
|
+
getResponseHeader: function (header) {
|
1051
|
+
|
1052
|
+
return res.headers[header.toLowerCase()];
|
1053
|
+
}
|
1054
|
+
};
|
1055
|
+
|
1056
|
+
var artifacts = {
|
1057
|
+
method: 'POST',
|
1058
|
+
host: 'example.com',
|
1059
|
+
port: '8080',
|
1060
|
+
resource: '/resource/4?filter=a',
|
1061
|
+
ts: '1362336900',
|
1062
|
+
nonce: 'eb5S_L',
|
1063
|
+
hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
|
1064
|
+
ext: 'some-app-data',
|
1065
|
+
app: undefined,
|
1066
|
+
dlg: undefined,
|
1067
|
+
mac: 'BlmSe8K+pbKIb6YsZCnt4E1GrYvY1AaYayNR82dGpIk=',
|
1068
|
+
id: '123456'
|
1069
|
+
};
|
1070
|
+
|
1071
|
+
var credentials = {
|
1072
|
+
id: '123456',
|
1073
|
+
key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
|
1074
|
+
algorithm: 'sha256',
|
1075
|
+
user: 'steve'
|
1076
|
+
};
|
1077
|
+
|
1078
|
+
expect(Browser.client.authenticate(res, credentials, artifacts)).to.equal(true);
|
1079
|
+
done();
|
1080
|
+
});
|
1081
|
+
|
1082
|
+
it('errors on invalid WWW-Authenticate header format', function (done) {
|
1083
|
+
|
1084
|
+
var res = {
|
1085
|
+
headers: {
|
1086
|
+
'www-authenticate': 'Hawk ts="1362346425875", tsm="PhwayS28vtnn3qbv0mqRBYSXebN/zggEtucfeZ620Zo=", x="Stale timestamp"'
|
1087
|
+
},
|
1088
|
+
getResponseHeader: function (header) {
|
1089
|
+
|
1090
|
+
return res.headers[header.toLowerCase()];
|
1091
|
+
}
|
1092
|
+
};
|
1093
|
+
|
1094
|
+
expect(Browser.client.authenticate(res, {})).to.equal(false);
|
1095
|
+
done();
|
1096
|
+
});
|
1097
|
+
|
1098
|
+
it('errors on invalid WWW-Authenticate header format', function (done) {
|
1099
|
+
|
1100
|
+
var credentials = {
|
1101
|
+
id: '123456',
|
1102
|
+
key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
|
1103
|
+
algorithm: 'sha256',
|
1104
|
+
user: 'steve'
|
1105
|
+
};
|
1106
|
+
|
1107
|
+
var res = {
|
1108
|
+
headers: {
|
1109
|
+
'www-authenticate': 'Hawk ts="1362346425875", tsm="hwayS28vtnn3qbv0mqRBYSXebN/zggEtucfeZ620Zo=", error="Stale timestamp"'
|
1110
|
+
},
|
1111
|
+
getResponseHeader: function (header) {
|
1112
|
+
|
1113
|
+
return res.headers[header.toLowerCase()];
|
1114
|
+
}
|
1115
|
+
};
|
1116
|
+
|
1117
|
+
expect(Browser.client.authenticate(res, credentials)).to.equal(false);
|
1118
|
+
done();
|
1119
|
+
});
|
1120
|
+
});
|
1121
|
+
|
1122
|
+
describe('message()', function () {
|
1123
|
+
|
1124
|
+
it('generates an authorization then successfully parse it', function (done) {
|
1125
|
+
|
1126
|
+
credentialsFunc('123456', function (err, credentials1) {
|
1127
|
+
|
1128
|
+
var auth = Browser.client.message('example.com', 8080, 'some message', { credentials: credentials1 });
|
1129
|
+
expect(auth).to.exist();
|
1130
|
+
|
1131
|
+
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials2) {
|
1132
|
+
|
1133
|
+
expect(err).to.not.exist();
|
1134
|
+
expect(credentials2.user).to.equal('steve');
|
1135
|
+
done();
|
1136
|
+
});
|
1137
|
+
});
|
1138
|
+
});
|
1139
|
+
|
1140
|
+
it('generates an authorization using custom nonce/timestamp', function (done) {
|
1141
|
+
|
1142
|
+
credentialsFunc('123456', function (err, credentials) {
|
1143
|
+
|
1144
|
+
var auth = Browser.client.message('example.com', 8080, 'some message', { credentials: credentials, nonce: 'abc123', timestamp: 1398536270957 });
|
1145
|
+
expect(auth).to.exist();
|
1146
|
+
expect(auth.nonce).to.equal('abc123');
|
1147
|
+
expect(auth.ts).to.equal(1398536270957);
|
1148
|
+
done();
|
1149
|
+
});
|
1150
|
+
});
|
1151
|
+
|
1152
|
+
it('errors on missing host', function (done) {
|
1153
|
+
|
1154
|
+
credentialsFunc('123456', function (err, credentials) {
|
1155
|
+
|
1156
|
+
var auth = Browser.client.message(null, 8080, 'some message', { credentials: credentials });
|
1157
|
+
expect(auth).to.not.exist();
|
1158
|
+
done();
|
1159
|
+
});
|
1160
|
+
});
|
1161
|
+
|
1162
|
+
it('errors on invalid host', function (done) {
|
1163
|
+
|
1164
|
+
credentialsFunc('123456', function (err, credentials) {
|
1165
|
+
|
1166
|
+
var auth = Browser.client.message(5, 8080, 'some message', { credentials: credentials });
|
1167
|
+
expect(auth).to.not.exist();
|
1168
|
+
done();
|
1169
|
+
});
|
1170
|
+
});
|
1171
|
+
|
1172
|
+
it('errors on missing port', function (done) {
|
1173
|
+
|
1174
|
+
credentialsFunc('123456', function (err, credentials) {
|
1175
|
+
|
1176
|
+
var auth = Browser.client.message('example.com', 0, 'some message', { credentials: credentials });
|
1177
|
+
expect(auth).to.not.exist();
|
1178
|
+
done();
|
1179
|
+
});
|
1180
|
+
});
|
1181
|
+
|
1182
|
+
it('errors on invalid port', function (done) {
|
1183
|
+
|
1184
|
+
credentialsFunc('123456', function (err, credentials) {
|
1185
|
+
|
1186
|
+
var auth = Browser.client.message('example.com', 'a', 'some message', { credentials: credentials });
|
1187
|
+
expect(auth).to.not.exist();
|
1188
|
+
done();
|
1189
|
+
});
|
1190
|
+
});
|
1191
|
+
|
1192
|
+
it('errors on missing message', function (done) {
|
1193
|
+
|
1194
|
+
credentialsFunc('123456', function (err, credentials) {
|
1195
|
+
|
1196
|
+
var auth = Browser.client.message('example.com', 8080, undefined, { credentials: credentials });
|
1197
|
+
expect(auth).to.not.exist();
|
1198
|
+
done();
|
1199
|
+
});
|
1200
|
+
});
|
1201
|
+
|
1202
|
+
it('errors on null message', function (done) {
|
1203
|
+
|
1204
|
+
credentialsFunc('123456', function (err, credentials) {
|
1205
|
+
|
1206
|
+
var auth = Browser.client.message('example.com', 8080, null, { credentials: credentials });
|
1207
|
+
expect(auth).to.not.exist();
|
1208
|
+
done();
|
1209
|
+
});
|
1210
|
+
});
|
1211
|
+
|
1212
|
+
it('errors on invalid message', function (done) {
|
1213
|
+
|
1214
|
+
credentialsFunc('123456', function (err, credentials) {
|
1215
|
+
|
1216
|
+
var auth = Browser.client.message('example.com', 8080, 5, { credentials: credentials });
|
1217
|
+
expect(auth).to.not.exist();
|
1218
|
+
done();
|
1219
|
+
});
|
1220
|
+
});
|
1221
|
+
|
1222
|
+
it('errors on missing credentials', function (done) {
|
1223
|
+
|
1224
|
+
var auth = Browser.client.message('example.com', 8080, 'some message', {});
|
1225
|
+
expect(auth).to.not.exist();
|
1226
|
+
done();
|
1227
|
+
});
|
1228
|
+
|
1229
|
+
it('errors on missing options', function (done) {
|
1230
|
+
|
1231
|
+
var auth = Browser.client.message('example.com', 8080, 'some message');
|
1232
|
+
expect(auth).to.not.exist();
|
1233
|
+
done();
|
1234
|
+
});
|
1235
|
+
|
1236
|
+
it('errors on invalid credentials (id)', function (done) {
|
1237
|
+
|
1238
|
+
credentialsFunc('123456', function (err, credentials) {
|
1239
|
+
|
1240
|
+
var creds = Hoek.clone(credentials);
|
1241
|
+
delete creds.id;
|
1242
|
+
var auth = Browser.client.message('example.com', 8080, 'some message', { credentials: creds });
|
1243
|
+
expect(auth).to.not.exist();
|
1244
|
+
done();
|
1245
|
+
});
|
1246
|
+
});
|
1247
|
+
|
1248
|
+
it('errors on invalid credentials (key)', function (done) {
|
1249
|
+
|
1250
|
+
credentialsFunc('123456', function (err, credentials) {
|
1251
|
+
|
1252
|
+
var creds = Hoek.clone(credentials);
|
1253
|
+
delete creds.key;
|
1254
|
+
var auth = Browser.client.message('example.com', 8080, 'some message', { credentials: creds });
|
1255
|
+
expect(auth).to.not.exist();
|
1256
|
+
done();
|
1257
|
+
});
|
1258
|
+
});
|
1259
|
+
|
1260
|
+
it('errors on invalid algorithm', function (done) {
|
1261
|
+
|
1262
|
+
credentialsFunc('123456', function (err, credentials) {
|
1263
|
+
|
1264
|
+
var creds = Hoek.clone(credentials);
|
1265
|
+
creds.algorithm = 'blah';
|
1266
|
+
var auth = Browser.client.message('example.com', 8080, 'some message', { credentials: creds });
|
1267
|
+
expect(auth).to.not.exist();
|
1268
|
+
done();
|
1269
|
+
});
|
1270
|
+
});
|
1271
|
+
});
|
1272
|
+
|
1273
|
+
describe('authenticateTimestamp()', function (done) {
|
1274
|
+
|
1275
|
+
it('validates a timestamp', function (done) {
|
1276
|
+
|
1277
|
+
credentialsFunc('123456', function (err, credentials) {
|
1278
|
+
|
1279
|
+
var tsm = Hawk.crypto.timestampMessage(credentials);
|
1280
|
+
expect(Browser.client.authenticateTimestamp(tsm, credentials)).to.equal(true);
|
1281
|
+
done();
|
1282
|
+
});
|
1283
|
+
});
|
1284
|
+
|
1285
|
+
it('validates a timestamp without updating local time', function (done) {
|
1286
|
+
|
1287
|
+
credentialsFunc('123456', function (err, credentials) {
|
1288
|
+
|
1289
|
+
var offset = Browser.utils.getNtpOffset();
|
1290
|
+
var tsm = Hawk.crypto.timestampMessage(credentials, 10000);
|
1291
|
+
expect(Browser.client.authenticateTimestamp(tsm, credentials, false)).to.equal(true);
|
1292
|
+
expect(offset).to.equal(Browser.utils.getNtpOffset());
|
1293
|
+
done();
|
1294
|
+
});
|
1295
|
+
});
|
1296
|
+
|
1297
|
+
it('detects a bad timestamp', function (done) {
|
1298
|
+
|
1299
|
+
credentialsFunc('123456', function (err, credentials) {
|
1300
|
+
|
1301
|
+
var tsm = Hawk.crypto.timestampMessage(credentials);
|
1302
|
+
tsm.ts = 4;
|
1303
|
+
expect(Browser.client.authenticateTimestamp(tsm, credentials)).to.equal(false);
|
1304
|
+
done();
|
1305
|
+
});
|
1306
|
+
});
|
1307
|
+
});
|
1308
|
+
});
|
1309
|
+
|
1310
|
+
describe('internals', function () {
|
1311
|
+
|
1312
|
+
describe('LocalStorage', function () {
|
1313
|
+
|
1314
|
+
it('goes through the full lifecycle', function (done) {
|
1315
|
+
|
1316
|
+
var storage = new Browser.internals.LocalStorage();
|
1317
|
+
expect(storage.length).to.equal(0);
|
1318
|
+
expect(storage.getItem('a')).to.equal(null);
|
1319
|
+
storage.setItem('a', 5);
|
1320
|
+
expect(storage.length).to.equal(1);
|
1321
|
+
expect(storage.key()).to.equal('a');
|
1322
|
+
expect(storage.key(0)).to.equal('a');
|
1323
|
+
expect(storage.getItem('a')).to.equal('5');
|
1324
|
+
storage.setItem('b', 'test');
|
1325
|
+
expect(storage.key()).to.equal('a');
|
1326
|
+
expect(storage.key(0)).to.equal('a');
|
1327
|
+
expect(storage.key(1)).to.equal('b');
|
1328
|
+
expect(storage.length).to.equal(2);
|
1329
|
+
expect(storage.getItem('b')).to.equal('test');
|
1330
|
+
storage.removeItem('a');
|
1331
|
+
expect(storage.length).to.equal(1);
|
1332
|
+
expect(storage.getItem('a')).to.equal(null);
|
1333
|
+
expect(storage.getItem('b')).to.equal('test');
|
1334
|
+
storage.clear();
|
1335
|
+
expect(storage.length).to.equal(0);
|
1336
|
+
expect(storage.getItem('a')).to.equal(null);
|
1337
|
+
expect(storage.getItem('b')).to.equal(null);
|
1338
|
+
done();
|
1339
|
+
});
|
1340
|
+
});
|
1341
|
+
});
|
1342
|
+
|
1343
|
+
describe('utils', function () {
|
1344
|
+
|
1345
|
+
describe('setStorage()', function () {
|
1346
|
+
|
1347
|
+
it('sets storage for the first time', function (done) {
|
1348
|
+
|
1349
|
+
Browser.utils.storage = new Browser.internals.LocalStorage(); // Reset state
|
1350
|
+
|
1351
|
+
expect(Browser.utils.storage.getItem('hawk_ntp_offset')).to.not.exist();
|
1352
|
+
Browser.utils.storage.setItem('test', '1');
|
1353
|
+
Browser.utils.setStorage(new Browser.internals.LocalStorage());
|
1354
|
+
expect(Browser.utils.storage.getItem('test')).to.not.exist();
|
1355
|
+
Browser.utils.storage.setItem('test', '2');
|
1356
|
+
expect(Browser.utils.storage.getItem('test')).to.equal('2');
|
1357
|
+
done();
|
1358
|
+
});
|
1359
|
+
});
|
1360
|
+
|
1361
|
+
describe('setNtpOffset()', function (done) {
|
1362
|
+
|
1363
|
+
it('catches localStorage errors', { parallel: false }, function (done) {
|
1364
|
+
|
1365
|
+
var orig = Browser.utils.storage.setItem;
|
1366
|
+
var consoleOrig = console.error;
|
1367
|
+
var count = 0;
|
1368
|
+
console.error = function () {
|
1369
|
+
|
1370
|
+
if (count++ === 2) {
|
1371
|
+
|
1372
|
+
console.error = consoleOrig;
|
1373
|
+
}
|
1374
|
+
};
|
1375
|
+
|
1376
|
+
Browser.utils.storage.setItem = function () {
|
1377
|
+
|
1378
|
+
Browser.utils.storage.setItem = orig;
|
1379
|
+
throw new Error();
|
1380
|
+
};
|
1381
|
+
|
1382
|
+
expect(function () {
|
1383
|
+
|
1384
|
+
Browser.utils.setNtpOffset(100);
|
1385
|
+
}).not.to.throw();
|
1386
|
+
|
1387
|
+
done();
|
1388
|
+
});
|
1389
|
+
});
|
1390
|
+
|
1391
|
+
describe('parseAuthorizationHeader()', function (done) {
|
1392
|
+
|
1393
|
+
it('returns null on missing header', function (done) {
|
1394
|
+
|
1395
|
+
expect(Browser.utils.parseAuthorizationHeader()).to.equal(null);
|
1396
|
+
done();
|
1397
|
+
});
|
1398
|
+
|
1399
|
+
it('returns null on bad header syntax (structure)', function (done) {
|
1400
|
+
|
1401
|
+
expect(Browser.utils.parseAuthorizationHeader('Hawk')).to.equal(null);
|
1402
|
+
done();
|
1403
|
+
});
|
1404
|
+
|
1405
|
+
it('returns null on bad header syntax (parts)', function (done) {
|
1406
|
+
|
1407
|
+
expect(Browser.utils.parseAuthorizationHeader(' ')).to.equal(null);
|
1408
|
+
done();
|
1409
|
+
});
|
1410
|
+
|
1411
|
+
it('returns null on bad scheme name', function (done) {
|
1412
|
+
|
1413
|
+
expect(Browser.utils.parseAuthorizationHeader('Basic asdasd')).to.equal(null);
|
1414
|
+
done();
|
1415
|
+
});
|
1416
|
+
|
1417
|
+
it('returns null on bad attribute value', function (done) {
|
1418
|
+
|
1419
|
+
expect(Browser.utils.parseAuthorizationHeader('Hawk test="\t"', ['test'])).to.equal(null);
|
1420
|
+
done();
|
1421
|
+
});
|
1422
|
+
|
1423
|
+
it('returns null on duplicated attribute', function (done) {
|
1424
|
+
|
1425
|
+
expect(Browser.utils.parseAuthorizationHeader('Hawk test="a", test="b"', ['test'])).to.equal(null);
|
1426
|
+
done();
|
1427
|
+
});
|
1428
|
+
});
|
1429
|
+
|
1430
|
+
describe('parseUri()', function () {
|
1431
|
+
|
1432
|
+
it('returns empty object on invalid', function (done) {
|
1433
|
+
|
1434
|
+
var uri = Browser.utils.parseUri('ftp');
|
1435
|
+
expect(uri).to.deep.equal({ host: '', port: '', resource: '' });
|
1436
|
+
done();
|
1437
|
+
});
|
1438
|
+
|
1439
|
+
it('returns empty port when unknown scheme', function (done) {
|
1440
|
+
|
1441
|
+
var uri = Browser.utils.parseUri('ftp://example.com');
|
1442
|
+
expect(uri.port).to.equal('');
|
1443
|
+
done();
|
1444
|
+
});
|
1445
|
+
|
1446
|
+
it('returns default port when missing', function (done) {
|
1447
|
+
|
1448
|
+
var uri = Browser.utils.parseUri('http://example.com');
|
1449
|
+
expect(uri.port).to.equal('80');
|
1450
|
+
done();
|
1451
|
+
});
|
1452
|
+
|
1453
|
+
it('handles unusual characters correctly', function (done) {
|
1454
|
+
|
1455
|
+
var parts = {
|
1456
|
+
protocol: 'http+vnd.my-extension',
|
1457
|
+
user: 'user!$&\'()*+,;=%40my-domain.com',
|
1458
|
+
password: 'pass!$&\'()*+,;=%40:word',
|
1459
|
+
hostname: 'foo-bar.com',
|
1460
|
+
port: '99',
|
1461
|
+
pathname: '/path/%40/!$&\'()*+,;=:@/',
|
1462
|
+
query: 'query%40/!$&\'()*+,;=:@/?',
|
1463
|
+
fragment: 'fragm%40/!$&\'()*+,;=:@/?'
|
1464
|
+
};
|
1465
|
+
|
1466
|
+
parts.userInfo = parts.user + ':' + parts.password;
|
1467
|
+
parts.authority = parts.userInfo + '@' + parts.hostname + ':' + parts.port;
|
1468
|
+
parts.relative = parts.pathname + '?' + parts.query;
|
1469
|
+
parts.resource = parts.relative + '#' + parts.fragment;
|
1470
|
+
parts.source = parts.protocol + '://' + parts.authority + parts.resource;
|
1471
|
+
|
1472
|
+
var uri = Browser.utils.parseUri(parts.source);
|
1473
|
+
expect(uri.host).to.equal('foo-bar.com');
|
1474
|
+
expect(uri.port).to.equal('99');
|
1475
|
+
expect(uri.resource).to.equal(parts.pathname + '?' + parts.query);
|
1476
|
+
done();
|
1477
|
+
});
|
1478
|
+
});
|
1479
|
+
|
1480
|
+
var str = 'https://www.google.ca/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=url';
|
1481
|
+
var base64str = 'aHR0cHM6Ly93d3cuZ29vZ2xlLmNhL3dlYmhwP3NvdXJjZWlkPWNocm9tZS1pbnN0YW50Jmlvbj0xJmVzcHY9MiZpZT1VVEYtOCNxPXVybA';
|
1482
|
+
|
1483
|
+
describe('base64urlEncode()', function () {
|
1484
|
+
|
1485
|
+
it('should base64 URL-safe decode a string', function (done) {
|
1486
|
+
|
1487
|
+
expect(Browser.utils.base64urlEncode(str)).to.equal(base64str);
|
1488
|
+
done();
|
1489
|
+
});
|
1490
|
+
});
|
1491
|
+
});
|
1492
|
+
});
|