snowball 0.1.21 → 0.1.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/.gitignore +1 -3
- data/{lib/snowball → bin}/roll.js +0 -0
- data/lib/snowball/roller.rb +1 -1
- data/lib/snowball/version.rb +1 -1
- data/node_modules/.bin/browserify +161 -0
- data/node_modules/.bin/cake +7 -0
- data/node_modules/.bin/coffee +7 -0
- data/node_modules/.bin/jade +168 -0
- data/node_modules/browserify/.travis.yml +4 -0
- data/node_modules/browserify/LICENSE +63 -0
- data/node_modules/browserify/README.markdown +172 -0
- data/node_modules/browserify/bin/cmd.js +161 -0
- data/node_modules/browserify/builtins/__browserify_process.js +55 -0
- data/node_modules/browserify/builtins/assert.js +314 -0
- data/node_modules/browserify/builtins/child_process.js +2 -0
- data/node_modules/browserify/builtins/events.js +178 -0
- data/node_modules/browserify/builtins/fs.js +1 -0
- data/node_modules/browserify/builtins/https.js +1 -0
- data/node_modules/browserify/builtins/net.js +1 -0
- data/node_modules/browserify/builtins/path.js +175 -0
- data/node_modules/browserify/builtins/querystring.js +250 -0
- data/node_modules/browserify/builtins/stream.js +119 -0
- data/node_modules/browserify/builtins/string_decoder.js +161 -0
- data/node_modules/browserify/builtins/sys.js +1 -0
- data/node_modules/browserify/builtins/timers.js +39 -0
- data/node_modules/browserify/builtins/tls.js +1 -0
- data/node_modules/browserify/builtins/tty.js +2 -0
- data/node_modules/browserify/builtins/url.js +604 -0
- data/node_modules/browserify/builtins/util.js +351 -0
- data/node_modules/browserify/example/debug/browserify.js +219 -0
- data/node_modules/browserify/example/debug/build.sh +3 -0
- data/node_modules/browserify/example/debug/index.html +7 -0
- data/node_modules/browserify/example/debug/js/entry.js +2 -0
- data/node_modules/browserify/example/debug/js/thrower.js +3 -0
- data/node_modules/browserify/example/debug/server.js +9 -0
- data/node_modules/browserify/example/simple-build/browserify.js +368 -0
- data/node_modules/browserify/example/simple-build/build.sh +3 -0
- data/node_modules/browserify/example/simple-build/index.html +9 -0
- data/node_modules/browserify/example/simple-build/js/bar.js +3 -0
- data/node_modules/browserify/example/simple-build/js/entry.js +5 -0
- data/node_modules/browserify/example/simple-build/js/foo.js +5 -0
- data/node_modules/browserify/example/simple-build/server.js +9 -0
- data/node_modules/browserify/example/test/b.js +5 -0
- data/node_modules/browserify/example/test/bar.js +3 -0
- data/node_modules/browserify/example/test/foo.js +3 -0
- data/node_modules/browserify/example/test/m.js +3 -0
- data/node_modules/browserify/example/test/n.js +3 -0
- data/node_modules/browserify/example/using-http/bundle.js +813 -0
- data/node_modules/browserify/example/using-http/entry.js +25 -0
- data/node_modules/browserify/example/using-http/index.html +9 -0
- data/node_modules/browserify/example/using-http/server.js +28 -0
- data/node_modules/browserify/index.js +202 -0
- data/node_modules/browserify/lib/watch.js +75 -0
- data/node_modules/browserify/lib/wrap.js +580 -0
- data/node_modules/browserify/lib/wrappers.js +10 -0
- data/node_modules/browserify/node_modules/buffer-browserify/.npmignore +1 -0
- data/node_modules/browserify/node_modules/buffer-browserify/README.md +11 -0
- data/node_modules/browserify/node_modules/buffer-browserify/buffer_ieee754.js +84 -0
- data/node_modules/browserify/node_modules/buffer-browserify/index.js +1317 -0
- data/node_modules/browserify/node_modules/buffer-browserify/node_modules/base64-js/README.md +14 -0
- data/node_modules/browserify/node_modules/buffer-browserify/node_modules/base64-js/lib/b64.js +84 -0
- data/node_modules/browserify/node_modules/buffer-browserify/node_modules/base64-js/package.json +30 -0
- data/node_modules/browserify/node_modules/buffer-browserify/node_modules/base64-js/test/runner.js +50 -0
- data/node_modules/browserify/node_modules/buffer-browserify/package.json +46 -0
- data/node_modules/browserify/node_modules/buffer-browserify/test/buffer.js +218 -0
- data/node_modules/browserify/node_modules/commondir/README.markdown +45 -0
- data/node_modules/browserify/node_modules/commondir/example/base.js +3 -0
- data/node_modules/browserify/node_modules/commondir/example/dir.js +3 -0
- data/node_modules/browserify/node_modules/commondir/index.js +29 -0
- data/node_modules/browserify/node_modules/commondir/package.json +47 -0
- data/node_modules/browserify/node_modules/commondir/test/dirs.js +66 -0
- data/node_modules/browserify/node_modules/crypto-browserify/.travis.yml +4 -0
- data/node_modules/browserify/node_modules/crypto-browserify/example/bundle.js +637 -0
- data/node_modules/browserify/node_modules/crypto-browserify/example/index.html +12 -0
- data/node_modules/browserify/node_modules/crypto-browserify/example/test.js +4 -0
- data/node_modules/browserify/node_modules/crypto-browserify/index.js +74 -0
- data/node_modules/browserify/node_modules/crypto-browserify/md5.js +384 -0
- data/node_modules/browserify/node_modules/crypto-browserify/package.json +33 -0
- data/node_modules/browserify/node_modules/crypto-browserify/readme.markdown +20 -0
- data/node_modules/browserify/node_modules/crypto-browserify/rng.js +37 -0
- data/node_modules/browserify/node_modules/crypto-browserify/sha.js +210 -0
- data/node_modules/browserify/node_modules/crypto-browserify/test/simple.js +35 -0
- data/node_modules/browserify/node_modules/deputy/.travis.yml +4 -0
- data/node_modules/browserify/node_modules/deputy/README.markdown +55 -0
- data/node_modules/browserify/node_modules/deputy/example/cache.js +5 -0
- data/node_modules/browserify/node_modules/deputy/index.js +46 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/.npmignore +2 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/.travis.yml +5 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/LICENSE +21 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/examples/pow.js +6 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/index.js +82 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/package.json +34 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/readme.markdown +63 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/chmod.js +38 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/clobber.js +37 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/mkdirp.js +28 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/perm.js +32 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/perm_sync.js +39 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/race.js +41 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/rel.js +32 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/return.js +25 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/return_sync.js +24 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/root.js +18 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/sync.js +32 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/umask.js +28 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/umask_sync.js +32 -0
- data/node_modules/browserify/node_modules/deputy/package.json +47 -0
- data/node_modules/browserify/node_modules/deputy/test/cache.js +58 -0
- data/node_modules/browserify/node_modules/detective/.travis.yml +4 -0
- data/node_modules/browserify/node_modules/detective/README.markdown +66 -0
- data/node_modules/browserify/node_modules/detective/example/strings.js +6 -0
- data/node_modules/browserify/node_modules/detective/example/strings_src.js +3 -0
- data/node_modules/browserify/node_modules/detective/index.js +60 -0
- data/node_modules/browserify/node_modules/detective/node_modules/.bin/esparse +42 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/.travis.yml +5 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/LICENSE.BSD +19 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/README.md +74 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/codemirror/codemirror.css +112 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/codemirror/codemirror.js +2972 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/codemirror/javascript.js +360 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/json2.js +487 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/style.css +164 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/treeview-min.js +12 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/treeview-sprite.gif +0 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/treeview.css +7 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/yahoo-dom-event.js +14 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/bin/esparse.js +42 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/changes +92 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/cm +696 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/checkenv.js +42 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/collector.html +82 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/collector.js +170 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/functiontrace.html +106 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/functiontrace.js +123 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/parse.css +82 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/parse.html +352 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/precedence.html +225 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/rewrite.html +120 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/rewrite.js +71 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/esprima.js +3577 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/index.html +103 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/package.json +42 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/Tokenizer.js +646 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/XMLHttpRequest.js +509 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/ZeParser.js +2185 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/backbone-0.5.3.js +1158 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/benchmark.js +3261 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/escodegen.js +906 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/esmorph.js +240 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/ext-core-3.0.0.js +6579 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/ext-core-3.1.0.js +10255 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jquery-1.6.4.js +9046 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jquery-1.7.1.js +9266 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jquery.mobile-1.0.js +6951 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jsdefs.js +731 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jslex.js +588 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jsparse.js +1921 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/mootools-1.3.2.js +5952 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/mootools-1.4.1.js +6297 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/parse-js.js +1342 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/platform.js +878 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/prototype-1.6.1.js +4874 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/prototype-1.7.0.0.js +6082 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/underscore-1.2.3.js +981 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/benchmarks.html +58 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/benchmarks.js +328 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/compare.html +140 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/compare.js +270 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/compat.html +40 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/compat.js +239 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/coverage.footer.html +3 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/coverage.header.html +37 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/coverage.html +3617 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/index.html +36 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/reflect.js +403 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/run.js +66 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/test.js +16659 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/tools/generate-unicode-regex.py +164 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/tools/update-coverage.sh +28 -0
- data/node_modules/browserify/node_modules/detective/package.json +47 -0
- data/node_modules/browserify/node_modules/detective/test/both.js +11 -0
- data/node_modules/browserify/node_modules/detective/test/chained.js +9 -0
- data/node_modules/browserify/node_modules/detective/test/files/both.js +4 -0
- data/node_modules/browserify/node_modules/detective/test/files/chained.js +5 -0
- data/node_modules/browserify/node_modules/detective/test/files/nested.js +22 -0
- data/node_modules/browserify/node_modules/detective/test/files/skip.js +7 -0
- data/node_modules/browserify/node_modules/detective/test/files/strings.js +13 -0
- data/node_modules/browserify/node_modules/detective/test/files/word.js +13 -0
- data/node_modules/browserify/node_modules/detective/test/nested.js +9 -0
- data/node_modules/browserify/node_modules/detective/test/skip.js +9 -0
- data/node_modules/browserify/node_modules/detective/test/strings.js +9 -0
- data/node_modules/browserify/node_modules/detective/test/word.js +12 -0
- data/node_modules/browserify/node_modules/http-browserify/.npmignore +1 -0
- data/node_modules/browserify/node_modules/http-browserify/example/get/index.html +9 -0
- data/node_modules/browserify/node_modules/http-browserify/example/get/main.js +14 -0
- data/node_modules/browserify/node_modules/http-browserify/example/get/server.js +12 -0
- data/node_modules/browserify/node_modules/http-browserify/example/headers/index.html +9 -0
- data/node_modules/browserify/node_modules/http-browserify/example/headers/main.js +18 -0
- data/node_modules/browserify/node_modules/http-browserify/example/headers/server.js +15 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/data.json +139 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/index.html +9 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/main.js +13 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/.npmignore +2 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/.travis.yml +4 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/LICENSE.APACHE2 +15 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/LICENSE.MIT +24 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/examples/all_docs.js +13 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/index.js +189 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/LICENSE +24 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/README.markdown +11 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/bench.js +26 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/examples/twitterfeed.js +30 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js +379 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/package.json +36 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic.json +167 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic2.json +180 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/test/primitives.js +54 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/test/utf8.js +38 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/package.json +40 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/readme.markdown +145 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/bool.js +41 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/destroy_missing.js +22 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/empty.js +44 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/fixtures/all_npm.json +4030 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/fn.js +39 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/memory.js +69 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/multiple_objects.js +42 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/multiple_objects_error.js +35 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/parsejson.js +28 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/stringify.js +41 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/stringify_object.js +47 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/test.js +35 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/test2.js +29 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/two-ways.js +41 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/server.js +10 -0
- data/node_modules/browserify/node_modules/http-browserify/example/post/index.html +9 -0
- data/node_modules/browserify/node_modules/http-browserify/example/post/main.js +16 -0
- data/node_modules/browserify/node_modules/http-browserify/example/post/server.js +19 -0
- data/node_modules/browserify/node_modules/http-browserify/example/streaming/index.html +9 -0
- data/node_modules/browserify/node_modules/http-browserify/example/streaming/main.js +16 -0
- data/node_modules/browserify/node_modules/http-browserify/example/streaming/server.js +21 -0
- data/node_modules/browserify/node_modules/http-browserify/index.js +59 -0
- data/node_modules/browserify/node_modules/http-browserify/lib/request.js +128 -0
- data/node_modules/browserify/node_modules/http-browserify/lib/response.js +119 -0
- data/node_modules/browserify/node_modules/http-browserify/node_modules/concat-stream/index.js +48 -0
- data/node_modules/browserify/node_modules/http-browserify/node_modules/concat-stream/package.json +30 -0
- data/node_modules/browserify/node_modules/http-browserify/node_modules/concat-stream/readme.md +31 -0
- data/node_modules/browserify/node_modules/http-browserify/node_modules/concat-stream/test.js +34 -0
- data/node_modules/browserify/node_modules/http-browserify/package.json +46 -0
- data/node_modules/browserify/node_modules/http-browserify/readme.markdown +128 -0
- data/node_modules/browserify/node_modules/nub/README.markdown +23 -0
- data/node_modules/browserify/node_modules/nub/index.js +64 -0
- data/node_modules/browserify/node_modules/nub/package.json +46 -0
- data/node_modules/browserify/node_modules/nub/test/by.js +51 -0
- data/node_modules/browserify/node_modules/nub/test/nub.js +46 -0
- data/node_modules/browserify/node_modules/resolve/.travis.yml +4 -0
- data/node_modules/browserify/node_modules/resolve/LICENSE +18 -0
- data/node_modules/browserify/node_modules/resolve/README.markdown +47 -0
- data/node_modules/browserify/node_modules/resolve/index.js +106 -0
- data/node_modules/browserify/node_modules/resolve/package.json +45 -0
- data/node_modules/browserify/node_modules/resolve/test/core.js +12 -0
- data/node_modules/browserify/node_modules/resolve/test/filter.js +15 -0
- data/node_modules/browserify/node_modules/resolve/test/mock.js +64 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver.js +157 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js +1 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/baz/doom.js +0 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/baz/package.json +3 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/baz/quux.js +1 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js +1 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js +1 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/cup.coffee +1 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/foo.js +1 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/mug.coffee +0 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/mug.js +0 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/other_path/root.js +0 -0
- data/node_modules/browserify/node_modules/syntax-error/.travis.yml +4 -0
- data/node_modules/browserify/node_modules/syntax-error/LICENSE +18 -0
- data/node_modules/browserify/node_modules/syntax-error/example/check.js +12 -0
- data/node_modules/browserify/node_modules/syntax-error/example/src.js +9 -0
- data/node_modules/browserify/node_modules/syntax-error/index.js +54 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/.bin/esparse +42 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/.travis.yml +5 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/LICENSE.BSD +19 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/README.md +74 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/codemirror/codemirror.css +112 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/codemirror/codemirror.js +2972 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/codemirror/javascript.js +360 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/json2.js +487 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/style.css +164 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/treeview-min.js +12 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/treeview-sprite.gif +0 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/treeview.css +7 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/yahoo-dom-event.js +14 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/bin/esparse.js +42 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/changes +92 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/cm +696 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/checkenv.js +42 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/collector.html +82 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/collector.js +170 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/functiontrace.html +106 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/functiontrace.js +123 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/parse.css +82 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/parse.html +352 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/precedence.html +225 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/rewrite.html +120 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/rewrite.js +71 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/esprima.js +3577 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/index.html +103 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/package.json +42 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/Tokenizer.js +646 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/XMLHttpRequest.js +509 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/ZeParser.js +2185 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/backbone-0.5.3.js +1158 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/benchmark.js +3261 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/escodegen.js +906 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/esmorph.js +240 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/ext-core-3.0.0.js +6579 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/ext-core-3.1.0.js +10255 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jquery-1.6.4.js +9046 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jquery-1.7.1.js +9266 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jquery.mobile-1.0.js +6951 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jsdefs.js +731 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jslex.js +588 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jsparse.js +1921 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/mootools-1.3.2.js +5952 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/mootools-1.4.1.js +6297 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/parse-js.js +1342 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/platform.js +878 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/prototype-1.6.1.js +4874 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/prototype-1.7.0.0.js +6082 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/underscore-1.2.3.js +981 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/benchmarks.html +58 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/benchmarks.js +328 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compare.html +140 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compare.js +270 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compat.html +40 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compat.js +239 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/coverage.footer.html +3 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/coverage.header.html +37 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/coverage.html +3617 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/index.html +36 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/reflect.js +403 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/run.js +66 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/test.js +16659 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/tools/generate-unicode-regex.py +164 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/tools/update-coverage.sh +28 -0
- data/node_modules/browserify/node_modules/syntax-error/package.json +49 -0
- data/node_modules/browserify/node_modules/syntax-error/readme.markdown +87 -0
- data/node_modules/browserify/node_modules/syntax-error/test/check.js +17 -0
- data/node_modules/browserify/node_modules/syntax-error/test/sources/check.js +9 -0
- data/node_modules/browserify/node_modules/vm-browserify/README.markdown +103 -0
- data/node_modules/browserify/node_modules/vm-browserify/example/run/bundle.js +473 -0
- data/node_modules/browserify/node_modules/vm-browserify/example/run/entry.js +6 -0
- data/node_modules/browserify/node_modules/vm-browserify/example/run/index.html +9 -0
- data/node_modules/browserify/node_modules/vm-browserify/example/run/server.js +6 -0
- data/node_modules/browserify/node_modules/vm-browserify/index.js +85 -0
- data/node_modules/browserify/node_modules/vm-browserify/package.json +43 -0
- data/node_modules/browserify/node_modules/vm-browserify/testling/run.js +22 -0
- data/node_modules/browserify/node_modules/vm-browserify/testling/test.sh +11 -0
- data/node_modules/browserify/package.json +78 -0
- data/node_modules/browserify/test/alias.js +58 -0
- data/node_modules/browserify/test/backbone.js +21 -0
- data/node_modules/browserify/test/bin.js +39 -0
- data/node_modules/browserify/test/buffer.js +99 -0
- data/node_modules/browserify/test/bundle.js +32 -0
- data/node_modules/browserify/test/cache.js +28 -0
- data/node_modules/browserify/test/coffee.js +39 -0
- data/node_modules/browserify/test/coffee/bar.js +1 -0
- data/node_modules/browserify/test/coffee/baz.coffee +1 -0
- data/node_modules/browserify/test/coffee/entry.coffee +1 -0
- data/node_modules/browserify/test/coffee/foo.coffee +1 -0
- data/node_modules/browserify/test/coffee/index.coffee +5 -0
- data/node_modules/browserify/test/coffee/nested/nested.coffee +2 -0
- data/node_modules/browserify/test/comment.js +17 -0
- data/node_modules/browserify/test/comment/main.js +2 -0
- data/node_modules/browserify/test/crypto.js +37 -0
- data/node_modules/browserify/test/dnode.js +27 -0
- data/node_modules/browserify/test/dollar.js +19 -0
- data/node_modules/browserify/test/dollar/dollar/index.js +7 -0
- data/node_modules/browserify/test/entry.js +36 -0
- data/node_modules/browserify/test/entry/main.js +1 -0
- data/node_modules/browserify/test/entry/one.js +1 -0
- data/node_modules/browserify/test/entry/two.js +1 -0
- data/node_modules/browserify/test/error_code.js +24 -0
- data/node_modules/browserify/test/error_code/src.js +2 -0
- data/node_modules/browserify/test/export.js +52 -0
- data/node_modules/browserify/test/export/entry.js +1 -0
- data/node_modules/browserify/test/field.js +64 -0
- data/node_modules/browserify/test/field/miss.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-miss/browser.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-miss/main.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-miss/package.json +4 -0
- data/node_modules/browserify/test/field/node_modules/z-object/browser.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-object/main.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-object/package.json +6 -0
- data/node_modules/browserify/test/field/node_modules/z-string/browser.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-string/main.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-string/package.json +4 -0
- data/node_modules/browserify/test/field/node_modules/z-sub/browser/a.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-sub/browser/b.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-sub/main.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-sub/package.json +4 -0
- data/node_modules/browserify/test/field/object.js +1 -0
- data/node_modules/browserify/test/field/string.js +1 -0
- data/node_modules/browserify/test/field/sub.js +1 -0
- data/node_modules/browserify/test/global.js +19 -0
- data/node_modules/browserify/test/global/main.js +2 -0
- data/node_modules/browserify/test/jade.js +35 -0
- data/node_modules/browserify/test/json.js +17 -0
- data/node_modules/browserify/test/json/beep.json +4 -0
- data/node_modules/browserify/test/json/main.js +1 -0
- data/node_modules/browserify/test/maxlisteners.js +8 -0
- data/node_modules/browserify/test/module.js +22 -0
- data/node_modules/browserify/test/multi_entry.js +20 -0
- data/node_modules/browserify/test/multi_entry/a.js +2 -0
- data/node_modules/browserify/test/multi_entry/b.js +2 -0
- data/node_modules/browserify/test/multi_entry/c.js +3 -0
- data/node_modules/browserify/test/multi_ignore.js +23 -0
- data/node_modules/browserify/test/node_modules/beep/index.js +1 -0
- data/node_modules/browserify/test/require_cache.js +18 -0
- data/node_modules/browserify/test/retarget.js +27 -0
- data/node_modules/browserify/test/seq.js +47 -0
- data/node_modules/browserify/test/subdep.js +26 -0
- data/node_modules/browserify/test/subdep/index.js +1 -0
- data/node_modules/browserify/test/subdep/package.json +6 -0
- data/node_modules/browserify/test/util.js +48 -0
- data/node_modules/browserify/test/watch.js +91 -0
- data/node_modules/browserify/test/watch/a.js +1 -0
- data/node_modules/browserify/test/wrap.js +43 -0
- data/node_modules/browserify/test/wrap/a.js +2 -0
- data/node_modules/browserify/test/wrap/c.js +1 -0
- data/node_modules/browserify/test/wrap/node_modules/b/main.js +1 -0
- data/node_modules/browserify/test/wrap/node_modules/b/package.json +3 -0
- data/node_modules/browserify/test/wrap/node_modules/skipmetoo/index.js +1 -0
- data/node_modules/browserify/test/wrap/skipme.js +1 -0
- data/node_modules/browserify/test/wrap/x.js +0 -0
- data/node_modules/browserify/testling/README.markdown +29 -0
- data/node_modules/browserify/testling/test.sh +37 -0
- data/node_modules/browserify/testling/tick.js +9 -0
- data/node_modules/browserify/testling/timers.js +50 -0
- data/node_modules/browserify/testling/util.js +24 -0
- data/node_modules/browserify/v2.markdown +41 -0
- data/node_modules/browserify/wrappers/alias.js +1 -0
- data/node_modules/browserify/wrappers/body.js +2 -0
- data/node_modules/browserify/wrappers/body_debug.js +2 -0
- data/node_modules/browserify/wrappers/entry.js +3 -0
- data/node_modules/browserify/wrappers/entry_debug.js +3 -0
- data/node_modules/browserify/wrappers/package.js +3 -0
- data/node_modules/browserify/wrappers/prelude.js +196 -0
- data/node_modules/coffee-script/.npmignore +11 -0
- data/node_modules/coffee-script/CNAME +1 -0
- data/node_modules/coffee-script/CONTRIBUTING.md +9 -0
- data/node_modules/coffee-script/LICENSE +22 -0
- data/node_modules/coffee-script/README +51 -0
- data/node_modules/coffee-script/Rakefile +78 -0
- data/node_modules/coffee-script/bin/cake +7 -0
- data/node_modules/coffee-script/bin/coffee +7 -0
- data/node_modules/coffee-script/extras/jsl.conf +44 -0
- data/node_modules/coffee-script/lib/coffee-script/browser.js +92 -0
- data/node_modules/coffee-script/lib/coffee-script/cake.js +113 -0
- data/node_modules/coffee-script/lib/coffee-script/coffee-script.js +171 -0
- data/node_modules/coffee-script/lib/coffee-script/command.js +502 -0
- data/node_modules/coffee-script/lib/coffee-script/grammar.js +606 -0
- data/node_modules/coffee-script/lib/coffee-script/helpers.js +88 -0
- data/node_modules/coffee-script/lib/coffee-script/index.js +11 -0
- data/node_modules/coffee-script/lib/coffee-script/lexer.js +788 -0
- data/node_modules/coffee-script/lib/coffee-script/nodes.js +2971 -0
- data/node_modules/coffee-script/lib/coffee-script/optparse.js +138 -0
- data/node_modules/coffee-script/lib/coffee-script/parser.js +683 -0
- data/node_modules/coffee-script/lib/coffee-script/repl.js +276 -0
- data/node_modules/coffee-script/lib/coffee-script/rewriter.js +349 -0
- data/node_modules/coffee-script/lib/coffee-script/scope.js +146 -0
- data/node_modules/coffee-script/package.json +50 -0
- data/node_modules/jade-runtime/.npmignore +15 -0
- data/node_modules/jade-runtime/README.md +8 -0
- data/node_modules/jade-runtime/globals.js +32 -0
- data/node_modules/jade-runtime/index.js +2 -0
- data/node_modules/jade-runtime/jade-runtime.js +181 -0
- data/node_modules/jade-runtime/package.json +18 -0
- data/node_modules/jade/.npmignore +14 -0
- data/node_modules/jade/LICENSE +22 -0
- data/node_modules/jade/Readme.md +1299 -0
- data/node_modules/jade/bin/jade +168 -0
- data/node_modules/jade/index.js +4 -0
- data/node_modules/jade/jade.js +3586 -0
- data/node_modules/jade/jade.md +510 -0
- data/node_modules/jade/jade.min.js +2 -0
- data/node_modules/jade/lib/compiler.js +654 -0
- data/node_modules/jade/lib/doctypes.js +18 -0
- data/node_modules/jade/lib/filters.js +97 -0
- data/node_modules/jade/lib/inline-tags.js +28 -0
- data/node_modules/jade/lib/jade.js +253 -0
- data/node_modules/jade/lib/lexer.js +774 -0
- data/node_modules/jade/lib/nodes/attrs.js +77 -0
- data/node_modules/jade/lib/nodes/block-comment.js +33 -0
- data/node_modules/jade/lib/nodes/block.js +122 -0
- data/node_modules/jade/lib/nodes/case.js +43 -0
- data/node_modules/jade/lib/nodes/code.js +35 -0
- data/node_modules/jade/lib/nodes/comment.js +32 -0
- data/node_modules/jade/lib/nodes/doctype.js +29 -0
- data/node_modules/jade/lib/nodes/each.js +35 -0
- data/node_modules/jade/lib/nodes/filter.js +35 -0
- data/node_modules/jade/lib/nodes/index.js +20 -0
- data/node_modules/jade/lib/nodes/literal.js +32 -0
- data/node_modules/jade/lib/nodes/mixin.js +36 -0
- data/node_modules/jade/lib/nodes/node.js +25 -0
- data/node_modules/jade/lib/nodes/tag.js +95 -0
- data/node_modules/jade/lib/nodes/text.js +36 -0
- data/node_modules/jade/lib/parser.js +714 -0
- data/node_modules/jade/lib/runtime.js +174 -0
- data/node_modules/jade/lib/self-closing.js +19 -0
- data/node_modules/jade/lib/utils.js +49 -0
- data/node_modules/jade/node_modules/commander/.npmignore +4 -0
- data/node_modules/jade/node_modules/commander/.travis.yml +4 -0
- data/node_modules/jade/node_modules/commander/History.md +107 -0
- data/node_modules/jade/node_modules/commander/Makefile +7 -0
- data/node_modules/jade/node_modules/commander/Readme.md +262 -0
- data/node_modules/jade/node_modules/commander/index.js +2 -0
- data/node_modules/jade/node_modules/commander/lib/commander.js +1026 -0
- data/node_modules/jade/node_modules/commander/package.json +39 -0
- data/node_modules/jade/node_modules/mkdirp/.npmignore +2 -0
- data/node_modules/jade/node_modules/mkdirp/.travis.yml +4 -0
- data/node_modules/jade/node_modules/mkdirp/LICENSE +21 -0
- data/node_modules/jade/node_modules/mkdirp/README.markdown +61 -0
- data/node_modules/jade/node_modules/mkdirp/examples/pow.js +6 -0
- data/node_modules/jade/node_modules/mkdirp/index.js +82 -0
- data/node_modules/jade/node_modules/mkdirp/package.json +37 -0
- data/node_modules/jade/node_modules/mkdirp/test/chmod.js +38 -0
- data/node_modules/jade/node_modules/mkdirp/test/clobber.js +37 -0
- data/node_modules/jade/node_modules/mkdirp/test/mkdirp.js +28 -0
- data/node_modules/jade/node_modules/mkdirp/test/perm.js +32 -0
- data/node_modules/jade/node_modules/mkdirp/test/perm_sync.js +39 -0
- data/node_modules/jade/node_modules/mkdirp/test/race.js +41 -0
- data/node_modules/jade/node_modules/mkdirp/test/rel.js +32 -0
- data/node_modules/jade/node_modules/mkdirp/test/return.js +25 -0
- data/node_modules/jade/node_modules/mkdirp/test/return_sync.js +24 -0
- data/node_modules/jade/node_modules/mkdirp/test/root.js +18 -0
- data/node_modules/jade/node_modules/mkdirp/test/sync.js +32 -0
- data/node_modules/jade/node_modules/mkdirp/test/umask.js +28 -0
- data/node_modules/jade/node_modules/mkdirp/test/umask_sync.js +32 -0
- data/node_modules/jade/package.json +53 -0
- data/node_modules/jade/runtime.js +179 -0
- data/node_modules/jade/runtime.min.js +1 -0
- data/node_modules/jade/test.jade +7 -0
- data/node_modules/jade/testing/head.jade +5 -0
- data/node_modules/jade/testing/index.jade +1 -0
- data/node_modules/jade/testing/index.js +14 -0
- data/node_modules/jade/testing/layout.jade +10 -0
- data/node_modules/jade/testing/user.jade +7 -0
- data/node_modules/jade/testing/user.js +27 -0
- data/node_modules/optimist/.travis.yml +4 -0
- data/node_modules/optimist/LICENSE +21 -0
- data/node_modules/optimist/README.markdown +487 -0
- data/node_modules/optimist/example/bool.js +10 -0
- data/node_modules/optimist/example/boolean_double.js +7 -0
- data/node_modules/optimist/example/boolean_single.js +7 -0
- data/node_modules/optimist/example/default_hash.js +8 -0
- data/node_modules/optimist/example/default_singles.js +7 -0
- data/node_modules/optimist/example/divide.js +8 -0
- data/node_modules/optimist/example/line_count.js +20 -0
- data/node_modules/optimist/example/line_count_options.js +29 -0
- data/node_modules/optimist/example/line_count_wrap.js +29 -0
- data/node_modules/optimist/example/nonopt.js +4 -0
- data/node_modules/optimist/example/reflect.js +2 -0
- data/node_modules/optimist/example/short.js +3 -0
- data/node_modules/optimist/example/string.js +11 -0
- data/node_modules/optimist/example/usage-options.js +19 -0
- data/node_modules/optimist/example/xup.js +10 -0
- data/node_modules/optimist/index.js +475 -0
- data/node_modules/optimist/node_modules/wordwrap/.npmignore +1 -0
- data/node_modules/optimist/node_modules/wordwrap/README.markdown +70 -0
- data/node_modules/optimist/node_modules/wordwrap/example/center.js +10 -0
- data/node_modules/optimist/node_modules/wordwrap/example/meat.js +3 -0
- data/node_modules/optimist/node_modules/wordwrap/index.js +76 -0
- data/node_modules/optimist/node_modules/wordwrap/package.json +45 -0
- data/node_modules/optimist/node_modules/wordwrap/test/break.js +30 -0
- data/node_modules/optimist/node_modules/wordwrap/test/idleness.txt +63 -0
- data/node_modules/optimist/node_modules/wordwrap/test/wrap.js +31 -0
- data/node_modules/optimist/package.json +55 -0
- data/node_modules/optimist/test/_.js +71 -0
- data/node_modules/optimist/test/_/argv.js +2 -0
- data/node_modules/optimist/test/_/bin.js +3 -0
- data/node_modules/optimist/test/parse.js +420 -0
- data/node_modules/optimist/test/usage.js +292 -0
- data/snowball.gemspec +1 -2
- metadata +601 -21
- data/extconf.rb +0 -9
@@ -0,0 +1,119 @@
|
|
1
|
+
var events = require('events');
|
2
|
+
var util = require('util');
|
3
|
+
|
4
|
+
function Stream() {
|
5
|
+
events.EventEmitter.call(this);
|
6
|
+
}
|
7
|
+
util.inherits(Stream, events.EventEmitter);
|
8
|
+
module.exports = Stream;
|
9
|
+
// Backwards-compat with node 0.4.x
|
10
|
+
Stream.Stream = Stream;
|
11
|
+
|
12
|
+
Stream.prototype.pipe = function(dest, options) {
|
13
|
+
var source = this;
|
14
|
+
|
15
|
+
function ondata(chunk) {
|
16
|
+
if (dest.writable) {
|
17
|
+
if (false === dest.write(chunk) && source.pause) {
|
18
|
+
source.pause();
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
source.on('data', ondata);
|
24
|
+
|
25
|
+
function ondrain() {
|
26
|
+
if (source.readable && source.resume) {
|
27
|
+
source.resume();
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
dest.on('drain', ondrain);
|
32
|
+
|
33
|
+
// If the 'end' option is not supplied, dest.end() will be called when
|
34
|
+
// source gets the 'end' or 'close' events. Only dest.end() once, and
|
35
|
+
// only when all sources have ended.
|
36
|
+
if (!dest._isStdio && (!options || options.end !== false)) {
|
37
|
+
dest._pipeCount = dest._pipeCount || 0;
|
38
|
+
dest._pipeCount++;
|
39
|
+
|
40
|
+
source.on('end', onend);
|
41
|
+
source.on('close', onclose);
|
42
|
+
}
|
43
|
+
|
44
|
+
var didOnEnd = false;
|
45
|
+
function onend() {
|
46
|
+
if (didOnEnd) return;
|
47
|
+
didOnEnd = true;
|
48
|
+
|
49
|
+
dest._pipeCount--;
|
50
|
+
|
51
|
+
// remove the listeners
|
52
|
+
cleanup();
|
53
|
+
|
54
|
+
if (dest._pipeCount > 0) {
|
55
|
+
// waiting for other incoming streams to end.
|
56
|
+
return;
|
57
|
+
}
|
58
|
+
|
59
|
+
dest.end();
|
60
|
+
}
|
61
|
+
|
62
|
+
|
63
|
+
function onclose() {
|
64
|
+
if (didOnEnd) return;
|
65
|
+
didOnEnd = true;
|
66
|
+
|
67
|
+
dest._pipeCount--;
|
68
|
+
|
69
|
+
// remove the listeners
|
70
|
+
cleanup();
|
71
|
+
|
72
|
+
if (dest._pipeCount > 0) {
|
73
|
+
// waiting for other incoming streams to end.
|
74
|
+
return;
|
75
|
+
}
|
76
|
+
|
77
|
+
dest.destroy();
|
78
|
+
}
|
79
|
+
|
80
|
+
// don't leave dangling pipes when there are errors.
|
81
|
+
function onerror(er) {
|
82
|
+
cleanup();
|
83
|
+
if (this.listeners('error').length === 0) {
|
84
|
+
throw er; // Unhandled stream error in pipe.
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
source.on('error', onerror);
|
89
|
+
dest.on('error', onerror);
|
90
|
+
|
91
|
+
// remove all the event listeners that were added.
|
92
|
+
function cleanup() {
|
93
|
+
source.removeListener('data', ondata);
|
94
|
+
dest.removeListener('drain', ondrain);
|
95
|
+
|
96
|
+
source.removeListener('end', onend);
|
97
|
+
source.removeListener('close', onclose);
|
98
|
+
|
99
|
+
source.removeListener('error', onerror);
|
100
|
+
dest.removeListener('error', onerror);
|
101
|
+
|
102
|
+
source.removeListener('end', cleanup);
|
103
|
+
source.removeListener('close', cleanup);
|
104
|
+
|
105
|
+
dest.removeListener('end', cleanup);
|
106
|
+
dest.removeListener('close', cleanup);
|
107
|
+
}
|
108
|
+
|
109
|
+
source.on('end', cleanup);
|
110
|
+
source.on('close', cleanup);
|
111
|
+
|
112
|
+
dest.on('end', cleanup);
|
113
|
+
dest.on('close', cleanup);
|
114
|
+
|
115
|
+
dest.emit('pipe', source);
|
116
|
+
|
117
|
+
// Allow for unix-like usage: A.pipe(B).pipe(C)
|
118
|
+
return dest;
|
119
|
+
};
|
@@ -0,0 +1,161 @@
|
|
1
|
+
var StringDecoder = exports.StringDecoder = function(encoding) {
|
2
|
+
this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');
|
3
|
+
switch (this.encoding) {
|
4
|
+
case 'utf8':
|
5
|
+
// CESU-8 represents each of Surrogate Pair by 3-bytes
|
6
|
+
this.surrogateSize = 3;
|
7
|
+
break;
|
8
|
+
case 'ucs2':
|
9
|
+
case 'utf16le':
|
10
|
+
// UTF-16 represents each of Surrogate Pair by 2-bytes
|
11
|
+
this.surrogateSize = 2;
|
12
|
+
this.detectIncompleteChar = utf16DetectIncompleteChar;
|
13
|
+
break;
|
14
|
+
case 'base64':
|
15
|
+
// Base-64 stores 3 bytes in 4 chars, and pads the remainder.
|
16
|
+
this.surrogateSize = 3;
|
17
|
+
this.detectIncompleteChar = base64DetectIncompleteChar;
|
18
|
+
break;
|
19
|
+
default:
|
20
|
+
this.write = passThroughWrite;
|
21
|
+
return;
|
22
|
+
}
|
23
|
+
|
24
|
+
this.charBuffer = new Buffer(6);
|
25
|
+
this.charReceived = 0;
|
26
|
+
this.charLength = 0;
|
27
|
+
};
|
28
|
+
|
29
|
+
|
30
|
+
StringDecoder.prototype.write = function(buffer) {
|
31
|
+
var charStr = '';
|
32
|
+
var offset = 0;
|
33
|
+
|
34
|
+
// if our last write ended with an incomplete multibyte character
|
35
|
+
while (this.charLength) {
|
36
|
+
// determine how many remaining bytes this buffer has to offer for this char
|
37
|
+
var i = (buffer.length >= this.charLength - this.charReceived) ?
|
38
|
+
this.charLength - this.charReceived :
|
39
|
+
buffer.length;
|
40
|
+
|
41
|
+
// add the new bytes to the char buffer
|
42
|
+
buffer.copy(this.charBuffer, this.charReceived, offset, i);
|
43
|
+
this.charReceived += (i - offset);
|
44
|
+
offset = i;
|
45
|
+
|
46
|
+
if (this.charReceived < this.charLength) {
|
47
|
+
// still not enough chars in this buffer? wait for more ...
|
48
|
+
return '';
|
49
|
+
}
|
50
|
+
|
51
|
+
// get the character that was split
|
52
|
+
charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);
|
53
|
+
|
54
|
+
// lead surrogate (D800-DBFF) is also the incomplete character
|
55
|
+
var charCode = charStr.charCodeAt(charStr.length - 1);
|
56
|
+
if (charCode >= 0xD800 && charCode <= 0xDBFF) {
|
57
|
+
this.charLength += this.surrogateSize;
|
58
|
+
charStr = '';
|
59
|
+
continue;
|
60
|
+
}
|
61
|
+
this.charReceived = this.charLength = 0;
|
62
|
+
|
63
|
+
// if there are no more bytes in this buffer, just emit our char
|
64
|
+
if (i == buffer.length) return charStr;
|
65
|
+
|
66
|
+
// otherwise cut off the characters end from the beginning of this buffer
|
67
|
+
buffer = buffer.slice(i, buffer.length);
|
68
|
+
break;
|
69
|
+
}
|
70
|
+
|
71
|
+
var lenIncomplete = this.detectIncompleteChar(buffer);
|
72
|
+
|
73
|
+
var end = buffer.length;
|
74
|
+
if (this.charLength) {
|
75
|
+
// buffer the incomplete character bytes we got
|
76
|
+
buffer.copy(this.charBuffer, 0, buffer.length - lenIncomplete, end);
|
77
|
+
this.charReceived = lenIncomplete;
|
78
|
+
end -= lenIncomplete;
|
79
|
+
}
|
80
|
+
|
81
|
+
charStr += buffer.toString(this.encoding, 0, end);
|
82
|
+
|
83
|
+
var end = charStr.length - 1;
|
84
|
+
var charCode = charStr.charCodeAt(end);
|
85
|
+
// lead surrogate (D800-DBFF) is also the incomplete character
|
86
|
+
if (charCode >= 0xD800 && charCode <= 0xDBFF) {
|
87
|
+
var size = this.surrogateSize;
|
88
|
+
this.charLength += size;
|
89
|
+
this.charReceived += size;
|
90
|
+
this.charBuffer.copy(this.charBuffer, size, 0, size);
|
91
|
+
this.charBuffer.write(charStr.charAt(charStr.length - 1), this.encoding);
|
92
|
+
return charStr.substring(0, end);
|
93
|
+
}
|
94
|
+
|
95
|
+
// or just emit the charStr
|
96
|
+
return charStr;
|
97
|
+
};
|
98
|
+
|
99
|
+
StringDecoder.prototype.detectIncompleteChar = function(buffer) {
|
100
|
+
// determine how many bytes we have to check at the end of this buffer
|
101
|
+
var i = (buffer.length >= 3) ? 3 : buffer.length;
|
102
|
+
|
103
|
+
// Figure out if one of the last i bytes of our buffer announces an
|
104
|
+
// incomplete char.
|
105
|
+
for (; i > 0; i--) {
|
106
|
+
var c = buffer[buffer.length - i];
|
107
|
+
|
108
|
+
// See http://en.wikipedia.org/wiki/UTF-8#Description
|
109
|
+
|
110
|
+
// 110XXXXX
|
111
|
+
if (i == 1 && c >> 5 == 0x06) {
|
112
|
+
this.charLength = 2;
|
113
|
+
break;
|
114
|
+
}
|
115
|
+
|
116
|
+
// 1110XXXX
|
117
|
+
if (i <= 2 && c >> 4 == 0x0E) {
|
118
|
+
this.charLength = 3;
|
119
|
+
break;
|
120
|
+
}
|
121
|
+
|
122
|
+
// 11110XXX
|
123
|
+
if (i <= 3 && c >> 3 == 0x1E) {
|
124
|
+
this.charLength = 4;
|
125
|
+
break;
|
126
|
+
}
|
127
|
+
}
|
128
|
+
|
129
|
+
return i;
|
130
|
+
};
|
131
|
+
|
132
|
+
StringDecoder.prototype.end = function(buffer) {
|
133
|
+
var res = '';
|
134
|
+
if (buffer && buffer.length)
|
135
|
+
res = this.write(buffer);
|
136
|
+
|
137
|
+
if (this.charReceived) {
|
138
|
+
var cr = this.charReceived;
|
139
|
+
var buf = this.charBuffer;
|
140
|
+
var enc = this.encoding;
|
141
|
+
res += buf.slice(0, cr).toString(enc);
|
142
|
+
}
|
143
|
+
|
144
|
+
return res;
|
145
|
+
};
|
146
|
+
|
147
|
+
function passThroughWrite(buffer) {
|
148
|
+
return buffer.toString(this.encoding);
|
149
|
+
}
|
150
|
+
|
151
|
+
function utf16DetectIncompleteChar(buffer) {
|
152
|
+
var incomplete = this.charReceived = buffer.length % 2;
|
153
|
+
this.charLength = incomplete ? 2 : 0;
|
154
|
+
return incomplete;
|
155
|
+
}
|
156
|
+
|
157
|
+
function base64DetectIncompleteChar(buffer) {
|
158
|
+
var incomplete = this.charReceived = buffer.length % 3;
|
159
|
+
this.charLength = incomplete ? 3 : 0;
|
160
|
+
return incomplete;
|
161
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
module.exports = require('util');
|
@@ -0,0 +1,39 @@
|
|
1
|
+
try {
|
2
|
+
// Old IE browsers that do not curry arguments
|
3
|
+
if (!setTimeout.call) {
|
4
|
+
var slicer = Array.prototype.slice;
|
5
|
+
exports.setTimeout = function(fn) {
|
6
|
+
var args = slicer.call(arguments, 1);
|
7
|
+
return setTimeout(function() {
|
8
|
+
return fn.apply(this, args);
|
9
|
+
})
|
10
|
+
};
|
11
|
+
|
12
|
+
exports.setInterval = function(fn) {
|
13
|
+
var args = slicer.call(arguments, 1);
|
14
|
+
return setInterval(function() {
|
15
|
+
return fn.apply(this, args);
|
16
|
+
});
|
17
|
+
};
|
18
|
+
} else {
|
19
|
+
exports.setTimeout = setTimeout;
|
20
|
+
exports.setInterval = setInterval;
|
21
|
+
}
|
22
|
+
exports.clearTimeout = clearTimeout;
|
23
|
+
exports.clearInterval = clearInterval;
|
24
|
+
|
25
|
+
// Chrome and PhantomJS seems to depend on `this` pseudo variable being a
|
26
|
+
// `window` and throws invalid invocation exception otherwise. If this code
|
27
|
+
// runs in such JS runtime next line will throw and `catch` clause will
|
28
|
+
// exported timers functions bound to a window.
|
29
|
+
exports.setTimeout(function() {});
|
30
|
+
} catch (_) {
|
31
|
+
function bind(f, context) {
|
32
|
+
return function () { return f.apply(context, arguments) };
|
33
|
+
}
|
34
|
+
|
35
|
+
exports.setTimeout = bind(setTimeout, window);
|
36
|
+
exports.setInterval = bind(setInterval, window);
|
37
|
+
exports.clearTimeout = bind(clearTimeout, window);
|
38
|
+
exports.clearInterval = bind(clearInterval, window);
|
39
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
// todo
|
@@ -0,0 +1,604 @@
|
|
1
|
+
var punycode = { encode : function (s) { return s } };
|
2
|
+
|
3
|
+
exports.parse = urlParse;
|
4
|
+
exports.resolve = urlResolve;
|
5
|
+
exports.resolveObject = urlResolveObject;
|
6
|
+
exports.format = urlFormat;
|
7
|
+
|
8
|
+
function arrayIndexOf(array, subject) {
|
9
|
+
for (var i = 0, j = array.length; i < j; i++) {
|
10
|
+
if(array[i] == subject) return i;
|
11
|
+
}
|
12
|
+
return -1;
|
13
|
+
}
|
14
|
+
|
15
|
+
var objectKeys = Object.keys || function objectKeys(object) {
|
16
|
+
if (object !== Object(object)) throw new TypeError('Invalid object');
|
17
|
+
var keys = [];
|
18
|
+
for (var key in object) if (object.hasOwnProperty(key)) keys[keys.length] = key;
|
19
|
+
return keys;
|
20
|
+
}
|
21
|
+
|
22
|
+
// Reference: RFC 3986, RFC 1808, RFC 2396
|
23
|
+
|
24
|
+
// define these here so at least they only have to be
|
25
|
+
// compiled once on the first module load.
|
26
|
+
var protocolPattern = /^([a-z0-9.+-]+:)/i,
|
27
|
+
portPattern = /:[0-9]+$/,
|
28
|
+
// RFC 2396: characters reserved for delimiting URLs.
|
29
|
+
delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'],
|
30
|
+
// RFC 2396: characters not allowed for various reasons.
|
31
|
+
unwise = ['{', '}', '|', '\\', '^', '~', '[', ']', '`'].concat(delims),
|
32
|
+
// Allowed by RFCs, but cause of XSS attacks. Always escape these.
|
33
|
+
autoEscape = ['\''],
|
34
|
+
// Characters that are never ever allowed in a hostname.
|
35
|
+
// Note that any invalid chars are also handled, but these
|
36
|
+
// are the ones that are *expected* to be seen, so we fast-path
|
37
|
+
// them.
|
38
|
+
nonHostChars = ['%', '/', '?', ';', '#']
|
39
|
+
.concat(unwise).concat(autoEscape),
|
40
|
+
nonAuthChars = ['/', '@', '?', '#'].concat(delims),
|
41
|
+
hostnameMaxLen = 255,
|
42
|
+
hostnamePartPattern = /^[a-zA-Z0-9][a-z0-9A-Z_-]{0,62}$/,
|
43
|
+
hostnamePartStart = /^([a-zA-Z0-9][a-z0-9A-Z_-]{0,62})(.*)$/,
|
44
|
+
// protocols that can allow "unsafe" and "unwise" chars.
|
45
|
+
unsafeProtocol = {
|
46
|
+
'javascript': true,
|
47
|
+
'javascript:': true
|
48
|
+
},
|
49
|
+
// protocols that never have a hostname.
|
50
|
+
hostlessProtocol = {
|
51
|
+
'javascript': true,
|
52
|
+
'javascript:': true
|
53
|
+
},
|
54
|
+
// protocols that always have a path component.
|
55
|
+
pathedProtocol = {
|
56
|
+
'http': true,
|
57
|
+
'https': true,
|
58
|
+
'ftp': true,
|
59
|
+
'gopher': true,
|
60
|
+
'file': true,
|
61
|
+
'http:': true,
|
62
|
+
'ftp:': true,
|
63
|
+
'gopher:': true,
|
64
|
+
'file:': true
|
65
|
+
},
|
66
|
+
// protocols that always contain a // bit.
|
67
|
+
slashedProtocol = {
|
68
|
+
'http': true,
|
69
|
+
'https': true,
|
70
|
+
'ftp': true,
|
71
|
+
'gopher': true,
|
72
|
+
'file': true,
|
73
|
+
'http:': true,
|
74
|
+
'https:': true,
|
75
|
+
'ftp:': true,
|
76
|
+
'gopher:': true,
|
77
|
+
'file:': true
|
78
|
+
},
|
79
|
+
querystring = require('querystring');
|
80
|
+
|
81
|
+
function urlParse(url, parseQueryString, slashesDenoteHost) {
|
82
|
+
if (url && typeof(url) === 'object' && url.href) return url;
|
83
|
+
|
84
|
+
if (typeof url !== 'string') {
|
85
|
+
throw new TypeError("Parameter 'url' must be a string, not " + typeof url);
|
86
|
+
}
|
87
|
+
|
88
|
+
var out = {},
|
89
|
+
rest = url;
|
90
|
+
|
91
|
+
// cut off any delimiters.
|
92
|
+
// This is to support parse stuff like "<http://foo.com>"
|
93
|
+
for (var i = 0, l = rest.length; i < l; i++) {
|
94
|
+
if (arrayIndexOf(delims, rest.charAt(i)) === -1) break;
|
95
|
+
}
|
96
|
+
if (i !== 0) rest = rest.substr(i);
|
97
|
+
|
98
|
+
|
99
|
+
var proto = protocolPattern.exec(rest);
|
100
|
+
if (proto) {
|
101
|
+
proto = proto[0];
|
102
|
+
var lowerProto = proto.toLowerCase();
|
103
|
+
out.protocol = lowerProto;
|
104
|
+
rest = rest.substr(proto.length);
|
105
|
+
}
|
106
|
+
|
107
|
+
// figure out if it's got a host
|
108
|
+
// user@server is *always* interpreted as a hostname, and url
|
109
|
+
// resolution will treat //foo/bar as host=foo,path=bar because that's
|
110
|
+
// how the browser resolves relative URLs.
|
111
|
+
if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) {
|
112
|
+
var slashes = rest.substr(0, 2) === '//';
|
113
|
+
if (slashes && !(proto && hostlessProtocol[proto])) {
|
114
|
+
rest = rest.substr(2);
|
115
|
+
out.slashes = true;
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
119
|
+
if (!hostlessProtocol[proto] &&
|
120
|
+
(slashes || (proto && !slashedProtocol[proto]))) {
|
121
|
+
// there's a hostname.
|
122
|
+
// the first instance of /, ?, ;, or # ends the host.
|
123
|
+
// don't enforce full RFC correctness, just be unstupid about it.
|
124
|
+
|
125
|
+
// If there is an @ in the hostname, then non-host chars *are* allowed
|
126
|
+
// to the left of the first @ sign, unless some non-auth character
|
127
|
+
// comes *before* the @-sign.
|
128
|
+
// URLs are obnoxious.
|
129
|
+
var atSign = arrayIndexOf(rest, '@');
|
130
|
+
if (atSign !== -1) {
|
131
|
+
// there *may be* an auth
|
132
|
+
var hasAuth = true;
|
133
|
+
for (var i = 0, l = nonAuthChars.length; i < l; i++) {
|
134
|
+
var index = arrayIndexOf(rest, nonAuthChars[i]);
|
135
|
+
if (index !== -1 && index < atSign) {
|
136
|
+
// not a valid auth. Something like http://foo.com/bar@baz/
|
137
|
+
hasAuth = false;
|
138
|
+
break;
|
139
|
+
}
|
140
|
+
}
|
141
|
+
if (hasAuth) {
|
142
|
+
// pluck off the auth portion.
|
143
|
+
out.auth = rest.substr(0, atSign);
|
144
|
+
rest = rest.substr(atSign + 1);
|
145
|
+
}
|
146
|
+
}
|
147
|
+
|
148
|
+
var firstNonHost = -1;
|
149
|
+
for (var i = 0, l = nonHostChars.length; i < l; i++) {
|
150
|
+
var index = arrayIndexOf(rest, nonHostChars[i]);
|
151
|
+
if (index !== -1 &&
|
152
|
+
(firstNonHost < 0 || index < firstNonHost)) firstNonHost = index;
|
153
|
+
}
|
154
|
+
|
155
|
+
if (firstNonHost !== -1) {
|
156
|
+
out.host = rest.substr(0, firstNonHost);
|
157
|
+
rest = rest.substr(firstNonHost);
|
158
|
+
} else {
|
159
|
+
out.host = rest;
|
160
|
+
rest = '';
|
161
|
+
}
|
162
|
+
|
163
|
+
// pull out port.
|
164
|
+
var p = parseHost(out.host);
|
165
|
+
var keys = objectKeys(p);
|
166
|
+
for (var i = 0, l = keys.length; i < l; i++) {
|
167
|
+
var key = keys[i];
|
168
|
+
out[key] = p[key];
|
169
|
+
}
|
170
|
+
|
171
|
+
// we've indicated that there is a hostname,
|
172
|
+
// so even if it's empty, it has to be present.
|
173
|
+
out.hostname = out.hostname || '';
|
174
|
+
|
175
|
+
// validate a little.
|
176
|
+
if (out.hostname.length > hostnameMaxLen) {
|
177
|
+
out.hostname = '';
|
178
|
+
} else {
|
179
|
+
var hostparts = out.hostname.split(/\./);
|
180
|
+
for (var i = 0, l = hostparts.length; i < l; i++) {
|
181
|
+
var part = hostparts[i];
|
182
|
+
if (!part) continue;
|
183
|
+
if (!part.match(hostnamePartPattern)) {
|
184
|
+
var newpart = '';
|
185
|
+
for (var j = 0, k = part.length; j < k; j++) {
|
186
|
+
if (part.charCodeAt(j) > 127) {
|
187
|
+
// we replace non-ASCII char with a temporary placeholder
|
188
|
+
// we need this to make sure size of hostname is not
|
189
|
+
// broken by replacing non-ASCII by nothing
|
190
|
+
newpart += 'x';
|
191
|
+
} else {
|
192
|
+
newpart += part[j];
|
193
|
+
}
|
194
|
+
}
|
195
|
+
// we test again with ASCII char only
|
196
|
+
if (!newpart.match(hostnamePartPattern)) {
|
197
|
+
var validParts = hostparts.slice(0, i);
|
198
|
+
var notHost = hostparts.slice(i + 1);
|
199
|
+
var bit = part.match(hostnamePartStart);
|
200
|
+
if (bit) {
|
201
|
+
validParts.push(bit[1]);
|
202
|
+
notHost.unshift(bit[2]);
|
203
|
+
}
|
204
|
+
if (notHost.length) {
|
205
|
+
rest = '/' + notHost.join('.') + rest;
|
206
|
+
}
|
207
|
+
out.hostname = validParts.join('.');
|
208
|
+
break;
|
209
|
+
}
|
210
|
+
}
|
211
|
+
}
|
212
|
+
}
|
213
|
+
|
214
|
+
// hostnames are always lower case.
|
215
|
+
out.hostname = out.hostname.toLowerCase();
|
216
|
+
|
217
|
+
// IDNA Support: Returns a puny coded representation of "domain".
|
218
|
+
// It only converts the part of the domain name that
|
219
|
+
// has non ASCII characters. I.e. it dosent matter if
|
220
|
+
// you call it with a domain that already is in ASCII.
|
221
|
+
var domainArray = out.hostname.split('.');
|
222
|
+
var newOut = [];
|
223
|
+
for (var i = 0; i < domainArray.length; ++i) {
|
224
|
+
var s = domainArray[i];
|
225
|
+
newOut.push(s.match(/[^A-Za-z0-9_-]/) ?
|
226
|
+
'xn--' + punycode.encode(s) : s);
|
227
|
+
}
|
228
|
+
out.hostname = newOut.join('.');
|
229
|
+
|
230
|
+
out.host = (out.hostname || '') +
|
231
|
+
((out.port) ? ':' + out.port : '');
|
232
|
+
out.href += out.host;
|
233
|
+
}
|
234
|
+
|
235
|
+
// now rest is set to the post-host stuff.
|
236
|
+
// chop off any delim chars.
|
237
|
+
if (!unsafeProtocol[lowerProto]) {
|
238
|
+
|
239
|
+
// First, make 100% sure that any "autoEscape" chars get
|
240
|
+
// escaped, even if encodeURIComponent doesn't think they
|
241
|
+
// need to be.
|
242
|
+
for (var i = 0, l = autoEscape.length; i < l; i++) {
|
243
|
+
var ae = autoEscape[i];
|
244
|
+
var esc = encodeURIComponent(ae);
|
245
|
+
if (esc === ae) {
|
246
|
+
esc = escape(ae);
|
247
|
+
}
|
248
|
+
rest = rest.split(ae).join(esc);
|
249
|
+
}
|
250
|
+
|
251
|
+
// Now make sure that delims never appear in a url.
|
252
|
+
var chop = rest.length;
|
253
|
+
for (var i = 0, l = delims.length; i < l; i++) {
|
254
|
+
var c = arrayIndexOf(rest, delims[i]);
|
255
|
+
if (c !== -1) {
|
256
|
+
chop = Math.min(c, chop);
|
257
|
+
}
|
258
|
+
}
|
259
|
+
rest = rest.substr(0, chop);
|
260
|
+
}
|
261
|
+
|
262
|
+
|
263
|
+
// chop off from the tail first.
|
264
|
+
var hash = arrayIndexOf(rest, '#');
|
265
|
+
if (hash !== -1) {
|
266
|
+
// got a fragment string.
|
267
|
+
out.hash = rest.substr(hash);
|
268
|
+
rest = rest.slice(0, hash);
|
269
|
+
}
|
270
|
+
var qm = arrayIndexOf(rest, '?');
|
271
|
+
if (qm !== -1) {
|
272
|
+
out.search = rest.substr(qm);
|
273
|
+
out.query = rest.substr(qm + 1);
|
274
|
+
if (parseQueryString) {
|
275
|
+
out.query = querystring.parse(out.query);
|
276
|
+
}
|
277
|
+
rest = rest.slice(0, qm);
|
278
|
+
} else if (parseQueryString) {
|
279
|
+
// no query string, but parseQueryString still requested
|
280
|
+
out.search = '';
|
281
|
+
out.query = {};
|
282
|
+
}
|
283
|
+
if (rest) out.pathname = rest;
|
284
|
+
if (slashedProtocol[proto] &&
|
285
|
+
out.hostname && !out.pathname) {
|
286
|
+
out.pathname = '/';
|
287
|
+
}
|
288
|
+
|
289
|
+
//to support http.request
|
290
|
+
if (out.pathname || out.search) {
|
291
|
+
out.path = (out.pathname ? out.pathname : '') +
|
292
|
+
(out.search ? out.search : '');
|
293
|
+
}
|
294
|
+
|
295
|
+
// finally, reconstruct the href based on what has been validated.
|
296
|
+
out.href = urlFormat(out);
|
297
|
+
return out;
|
298
|
+
}
|
299
|
+
|
300
|
+
// format a parsed object into a url string
|
301
|
+
function urlFormat(obj) {
|
302
|
+
// ensure it's an object, and not a string url.
|
303
|
+
// If it's an obj, this is a no-op.
|
304
|
+
// this way, you can call url_format() on strings
|
305
|
+
// to clean up potentially wonky urls.
|
306
|
+
if (typeof(obj) === 'string') obj = urlParse(obj);
|
307
|
+
|
308
|
+
var auth = obj.auth || '';
|
309
|
+
if (auth) {
|
310
|
+
auth = auth.split('@').join('%40');
|
311
|
+
for (var i = 0, l = nonAuthChars.length; i < l; i++) {
|
312
|
+
var nAC = nonAuthChars[i];
|
313
|
+
auth = auth.split(nAC).join(encodeURIComponent(nAC));
|
314
|
+
}
|
315
|
+
auth += '@';
|
316
|
+
}
|
317
|
+
|
318
|
+
var protocol = obj.protocol || '',
|
319
|
+
host = (obj.host !== undefined) ? auth + obj.host :
|
320
|
+
obj.hostname !== undefined ? (
|
321
|
+
auth + obj.hostname +
|
322
|
+
(obj.port ? ':' + obj.port : '')
|
323
|
+
) :
|
324
|
+
false,
|
325
|
+
pathname = obj.pathname || '',
|
326
|
+
query = obj.query &&
|
327
|
+
((typeof obj.query === 'object' &&
|
328
|
+
objectKeys(obj.query).length) ?
|
329
|
+
querystring.stringify(obj.query) :
|
330
|
+
'') || '',
|
331
|
+
search = obj.search || (query && ('?' + query)) || '',
|
332
|
+
hash = obj.hash || '';
|
333
|
+
|
334
|
+
if (protocol && protocol.substr(-1) !== ':') protocol += ':';
|
335
|
+
|
336
|
+
// only the slashedProtocols get the //. Not mailto:, xmpp:, etc.
|
337
|
+
// unless they had them to begin with.
|
338
|
+
if (obj.slashes ||
|
339
|
+
(!protocol || slashedProtocol[protocol]) && host !== false) {
|
340
|
+
host = '//' + (host || '');
|
341
|
+
if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;
|
342
|
+
} else if (!host) {
|
343
|
+
host = '';
|
344
|
+
}
|
345
|
+
|
346
|
+
if (hash && hash.charAt(0) !== '#') hash = '#' + hash;
|
347
|
+
if (search && search.charAt(0) !== '?') search = '?' + search;
|
348
|
+
|
349
|
+
return protocol + host + pathname + search + hash;
|
350
|
+
}
|
351
|
+
|
352
|
+
function urlResolve(source, relative) {
|
353
|
+
return urlFormat(urlResolveObject(source, relative));
|
354
|
+
}
|
355
|
+
|
356
|
+
function urlResolveObject(source, relative) {
|
357
|
+
if (!source) return relative;
|
358
|
+
|
359
|
+
source = urlParse(urlFormat(source), false, true);
|
360
|
+
relative = urlParse(urlFormat(relative), false, true);
|
361
|
+
|
362
|
+
// hash is always overridden, no matter what.
|
363
|
+
source.hash = relative.hash;
|
364
|
+
|
365
|
+
if (relative.href === '') {
|
366
|
+
source.href = urlFormat(source);
|
367
|
+
return source;
|
368
|
+
}
|
369
|
+
|
370
|
+
// hrefs like //foo/bar always cut to the protocol.
|
371
|
+
if (relative.slashes && !relative.protocol) {
|
372
|
+
relative.protocol = source.protocol;
|
373
|
+
//urlParse appends trailing / to urls like http://www.example.com
|
374
|
+
if (slashedProtocol[relative.protocol] &&
|
375
|
+
relative.hostname && !relative.pathname) {
|
376
|
+
relative.path = relative.pathname = '/';
|
377
|
+
}
|
378
|
+
relative.href = urlFormat(relative);
|
379
|
+
return relative;
|
380
|
+
}
|
381
|
+
|
382
|
+
if (relative.protocol && relative.protocol !== source.protocol) {
|
383
|
+
// if it's a known url protocol, then changing
|
384
|
+
// the protocol does weird things
|
385
|
+
// first, if it's not file:, then we MUST have a host,
|
386
|
+
// and if there was a path
|
387
|
+
// to begin with, then we MUST have a path.
|
388
|
+
// if it is file:, then the host is dropped,
|
389
|
+
// because that's known to be hostless.
|
390
|
+
// anything else is assumed to be absolute.
|
391
|
+
if (!slashedProtocol[relative.protocol]) {
|
392
|
+
relative.href = urlFormat(relative);
|
393
|
+
return relative;
|
394
|
+
}
|
395
|
+
source.protocol = relative.protocol;
|
396
|
+
if (!relative.host && !hostlessProtocol[relative.protocol]) {
|
397
|
+
var relPath = (relative.pathname || '').split('/');
|
398
|
+
while (relPath.length && !(relative.host = relPath.shift()));
|
399
|
+
if (!relative.host) relative.host = '';
|
400
|
+
if (!relative.hostname) relative.hostname = '';
|
401
|
+
if (relPath[0] !== '') relPath.unshift('');
|
402
|
+
if (relPath.length < 2) relPath.unshift('');
|
403
|
+
relative.pathname = relPath.join('/');
|
404
|
+
}
|
405
|
+
source.pathname = relative.pathname;
|
406
|
+
source.search = relative.search;
|
407
|
+
source.query = relative.query;
|
408
|
+
source.host = relative.host || '';
|
409
|
+
source.auth = relative.auth;
|
410
|
+
source.hostname = relative.hostname || relative.host;
|
411
|
+
source.port = relative.port;
|
412
|
+
//to support http.request
|
413
|
+
if (source.pathname !== undefined || source.search !== undefined) {
|
414
|
+
source.path = (source.pathname ? source.pathname : '') +
|
415
|
+
(source.search ? source.search : '');
|
416
|
+
}
|
417
|
+
source.slashes = source.slashes || relative.slashes;
|
418
|
+
source.href = urlFormat(source);
|
419
|
+
return source;
|
420
|
+
}
|
421
|
+
|
422
|
+
var isSourceAbs = (source.pathname && source.pathname.charAt(0) === '/'),
|
423
|
+
isRelAbs = (
|
424
|
+
relative.host !== undefined ||
|
425
|
+
relative.pathname && relative.pathname.charAt(0) === '/'
|
426
|
+
),
|
427
|
+
mustEndAbs = (isRelAbs || isSourceAbs ||
|
428
|
+
(source.host && relative.pathname)),
|
429
|
+
removeAllDots = mustEndAbs,
|
430
|
+
srcPath = source.pathname && source.pathname.split('/') || [],
|
431
|
+
relPath = relative.pathname && relative.pathname.split('/') || [],
|
432
|
+
psychotic = source.protocol &&
|
433
|
+
!slashedProtocol[source.protocol];
|
434
|
+
|
435
|
+
// if the url is a non-slashed url, then relative
|
436
|
+
// links like ../.. should be able
|
437
|
+
// to crawl up to the hostname, as well. This is strange.
|
438
|
+
// source.protocol has already been set by now.
|
439
|
+
// Later on, put the first path part into the host field.
|
440
|
+
if (psychotic) {
|
441
|
+
|
442
|
+
delete source.hostname;
|
443
|
+
delete source.port;
|
444
|
+
if (source.host) {
|
445
|
+
if (srcPath[0] === '') srcPath[0] = source.host;
|
446
|
+
else srcPath.unshift(source.host);
|
447
|
+
}
|
448
|
+
delete source.host;
|
449
|
+
if (relative.protocol) {
|
450
|
+
delete relative.hostname;
|
451
|
+
delete relative.port;
|
452
|
+
if (relative.host) {
|
453
|
+
if (relPath[0] === '') relPath[0] = relative.host;
|
454
|
+
else relPath.unshift(relative.host);
|
455
|
+
}
|
456
|
+
delete relative.host;
|
457
|
+
}
|
458
|
+
mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');
|
459
|
+
}
|
460
|
+
|
461
|
+
if (isRelAbs) {
|
462
|
+
// it's absolute.
|
463
|
+
source.host = (relative.host || relative.host === '') ?
|
464
|
+
relative.host : source.host;
|
465
|
+
source.hostname = (relative.hostname || relative.hostname === '') ?
|
466
|
+
relative.hostname : source.hostname;
|
467
|
+
source.search = relative.search;
|
468
|
+
source.query = relative.query;
|
469
|
+
srcPath = relPath;
|
470
|
+
// fall through to the dot-handling below.
|
471
|
+
} else if (relPath.length) {
|
472
|
+
// it's relative
|
473
|
+
// throw away the existing file, and take the new path instead.
|
474
|
+
if (!srcPath) srcPath = [];
|
475
|
+
srcPath.pop();
|
476
|
+
srcPath = srcPath.concat(relPath);
|
477
|
+
source.search = relative.search;
|
478
|
+
source.query = relative.query;
|
479
|
+
} else if ('search' in relative) {
|
480
|
+
// just pull out the search.
|
481
|
+
// like href='?foo'.
|
482
|
+
// Put this after the other two cases because it simplifies the booleans
|
483
|
+
if (psychotic) {
|
484
|
+
source.hostname = source.host = srcPath.shift();
|
485
|
+
//occationaly the auth can get stuck only in host
|
486
|
+
//this especialy happens in cases like
|
487
|
+
//url.resolveObject('mailto:local1@domain1', 'local2@domain2')
|
488
|
+
var authInHost = source.host && arrayIndexOf(source.host, '@') > 0 ?
|
489
|
+
source.host.split('@') : false;
|
490
|
+
if (authInHost) {
|
491
|
+
source.auth = authInHost.shift();
|
492
|
+
source.host = source.hostname = authInHost.shift();
|
493
|
+
}
|
494
|
+
}
|
495
|
+
source.search = relative.search;
|
496
|
+
source.query = relative.query;
|
497
|
+
//to support http.request
|
498
|
+
if (source.pathname !== undefined || source.search !== undefined) {
|
499
|
+
source.path = (source.pathname ? source.pathname : '') +
|
500
|
+
(source.search ? source.search : '');
|
501
|
+
}
|
502
|
+
source.href = urlFormat(source);
|
503
|
+
return source;
|
504
|
+
}
|
505
|
+
if (!srcPath.length) {
|
506
|
+
// no path at all. easy.
|
507
|
+
// we've already handled the other stuff above.
|
508
|
+
delete source.pathname;
|
509
|
+
//to support http.request
|
510
|
+
if (!source.search) {
|
511
|
+
source.path = '/' + source.search;
|
512
|
+
} else {
|
513
|
+
delete source.path;
|
514
|
+
}
|
515
|
+
source.href = urlFormat(source);
|
516
|
+
return source;
|
517
|
+
}
|
518
|
+
// if a url ENDs in . or .., then it must get a trailing slash.
|
519
|
+
// however, if it ends in anything else non-slashy,
|
520
|
+
// then it must NOT get a trailing slash.
|
521
|
+
var last = srcPath.slice(-1)[0];
|
522
|
+
var hasTrailingSlash = (
|
523
|
+
(source.host || relative.host) && (last === '.' || last === '..') ||
|
524
|
+
last === '');
|
525
|
+
|
526
|
+
// strip single dots, resolve double dots to parent dir
|
527
|
+
// if the path tries to go above the root, `up` ends up > 0
|
528
|
+
var up = 0;
|
529
|
+
for (var i = srcPath.length; i >= 0; i--) {
|
530
|
+
last = srcPath[i];
|
531
|
+
if (last == '.') {
|
532
|
+
srcPath.splice(i, 1);
|
533
|
+
} else if (last === '..') {
|
534
|
+
srcPath.splice(i, 1);
|
535
|
+
up++;
|
536
|
+
} else if (up) {
|
537
|
+
srcPath.splice(i, 1);
|
538
|
+
up--;
|
539
|
+
}
|
540
|
+
}
|
541
|
+
|
542
|
+
// if the path is allowed to go above the root, restore leading ..s
|
543
|
+
if (!mustEndAbs && !removeAllDots) {
|
544
|
+
for (; up--; up) {
|
545
|
+
srcPath.unshift('..');
|
546
|
+
}
|
547
|
+
}
|
548
|
+
|
549
|
+
if (mustEndAbs && srcPath[0] !== '' &&
|
550
|
+
(!srcPath[0] || srcPath[0].charAt(0) !== '/')) {
|
551
|
+
srcPath.unshift('');
|
552
|
+
}
|
553
|
+
|
554
|
+
if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {
|
555
|
+
srcPath.push('');
|
556
|
+
}
|
557
|
+
|
558
|
+
var isAbsolute = srcPath[0] === '' ||
|
559
|
+
(srcPath[0] && srcPath[0].charAt(0) === '/');
|
560
|
+
|
561
|
+
// put the host back
|
562
|
+
if (psychotic) {
|
563
|
+
source.hostname = source.host = isAbsolute ? '' :
|
564
|
+
srcPath.length ? srcPath.shift() : '';
|
565
|
+
//occationaly the auth can get stuck only in host
|
566
|
+
//this especialy happens in cases like
|
567
|
+
//url.resolveObject('mailto:local1@domain1', 'local2@domain2')
|
568
|
+
var authInHost = source.host && arrayIndexOf(source.host, '@') > 0 ?
|
569
|
+
source.host.split('@') : false;
|
570
|
+
if (authInHost) {
|
571
|
+
source.auth = authInHost.shift();
|
572
|
+
source.host = source.hostname = authInHost.shift();
|
573
|
+
}
|
574
|
+
}
|
575
|
+
|
576
|
+
mustEndAbs = mustEndAbs || (source.host && srcPath.length);
|
577
|
+
|
578
|
+
if (mustEndAbs && !isAbsolute) {
|
579
|
+
srcPath.unshift('');
|
580
|
+
}
|
581
|
+
|
582
|
+
source.pathname = srcPath.join('/');
|
583
|
+
//to support request.http
|
584
|
+
if (source.pathname !== undefined || source.search !== undefined) {
|
585
|
+
source.path = (source.pathname ? source.pathname : '') +
|
586
|
+
(source.search ? source.search : '');
|
587
|
+
}
|
588
|
+
source.auth = relative.auth || source.auth;
|
589
|
+
source.slashes = source.slashes || relative.slashes;
|
590
|
+
source.href = urlFormat(source);
|
591
|
+
return source;
|
592
|
+
}
|
593
|
+
|
594
|
+
function parseHost(host) {
|
595
|
+
var out = {};
|
596
|
+
var port = portPattern.exec(host);
|
597
|
+
if (port) {
|
598
|
+
port = port[0];
|
599
|
+
out.port = port.substr(1);
|
600
|
+
host = host.substr(0, host.length - port.length);
|
601
|
+
}
|
602
|
+
if (host) out.hostname = host;
|
603
|
+
return out;
|
604
|
+
}
|