cssesc-source 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/lib/cssesc/source.rb +7 -0
- data/vendor/LICENSE-MIT.txt +20 -0
- data/vendor/README.md +207 -0
- data/vendor/bin/cssesc +122 -0
- data/vendor/cssesc.js +177 -0
- data/vendor/man/cssesc.1 +70 -0
- data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/MIT-LICENSE.txt +21 -0
- data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/README.md +43 -0
- data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/bin/stripcolorcodes.js +18 -0
- data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/index.js +3 -0
- data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/package.json +42 -0
- data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/test/fixture/with-colors +2 -0
- data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/test/fixture/without-colors +2 -0
- data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/test/stripcolorcodes-test.js +20 -0
- data/vendor/node_modules/grunt-shell/package.json +53 -0
- data/vendor/node_modules/grunt-shell/readme.md +221 -0
- data/vendor/node_modules/grunt-shell/tasks/shell.js +54 -0
- data/vendor/node_modules/grunt-template/LICENSE-MIT.txt +20 -0
- data/vendor/node_modules/grunt-template/README.md +123 -0
- data/vendor/node_modules/grunt-template/package.json +50 -0
- data/vendor/node_modules/grunt-template/tasks/template.js +44 -0
- data/vendor/node_modules/grunt/CONTRIBUTING.md +1 -0
- data/vendor/node_modules/grunt/LICENSE-MIT +22 -0
- data/vendor/node_modules/grunt/README.md +16 -0
- data/vendor/node_modules/grunt/internal-tasks/bump.js +151 -0
- data/vendor/node_modules/grunt/internal-tasks/subgrunt.js +34 -0
- data/vendor/node_modules/grunt/lib/grunt.js +156 -0
- data/vendor/node_modules/grunt/lib/grunt/cli.js +128 -0
- data/vendor/node_modules/grunt/lib/grunt/config.js +118 -0
- data/vendor/node_modules/grunt/lib/grunt/event.js +16 -0
- data/vendor/node_modules/grunt/lib/grunt/fail.js +84 -0
- data/vendor/node_modules/grunt/lib/grunt/file.js +440 -0
- data/vendor/node_modules/grunt/lib/grunt/help.js +129 -0
- data/vendor/node_modules/grunt/lib/grunt/log.js +352 -0
- data/vendor/node_modules/grunt/lib/grunt/option.js +42 -0
- data/vendor/node_modules/grunt/lib/grunt/task.js +451 -0
- data/vendor/node_modules/grunt/lib/grunt/template.js +95 -0
- data/vendor/node_modules/grunt/lib/grunt/util.js +188 -0
- data/vendor/node_modules/grunt/lib/util/task.js +323 -0
- data/vendor/node_modules/grunt/node_modules/async/LICENSE +19 -0
- data/vendor/node_modules/grunt/node_modules/async/Makefile +25 -0
- data/vendor/node_modules/grunt/node_modules/async/README.md +1021 -0
- data/vendor/node_modules/grunt/node_modules/async/index.js +3 -0
- data/vendor/node_modules/grunt/node_modules/async/lib/async.js +692 -0
- data/vendor/node_modules/grunt/node_modules/async/package.json +32 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/CNAME +1 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/LICENSE +22 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/README +51 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/Rakefile +78 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/bin/cake +7 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/bin/coffee +7 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/extras/jsl.conf +44 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/browser.js +92 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/cake.js +111 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/coffee-script.js +167 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/command.js +500 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/grammar.js +606 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/helpers.js +77 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/index.js +11 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/lexer.js +788 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/nodes.js +2986 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/optparse.js +138 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/parser.js +683 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/repl.js +261 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/rewriter.js +349 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/scope.js +146 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/package.json +47 -0
- data/vendor/node_modules/grunt/node_modules/colors/MIT-LICENSE.txt +22 -0
- data/vendor/node_modules/grunt/node_modules/colors/ReadMe.md +77 -0
- data/vendor/node_modules/grunt/node_modules/colors/colors.js +342 -0
- data/vendor/node_modules/grunt/node_modules/colors/example.html +76 -0
- data/vendor/node_modules/grunt/node_modules/colors/example.js +77 -0
- data/vendor/node_modules/grunt/node_modules/colors/package.json +29 -0
- data/vendor/node_modules/grunt/node_modules/colors/test.js +70 -0
- data/vendor/node_modules/grunt/node_modules/colors/themes/winston-dark.js +12 -0
- data/vendor/node_modules/grunt/node_modules/colors/themes/winston-light.js +12 -0
- data/vendor/node_modules/grunt/node_modules/dateformat/Readme.md +67 -0
- data/vendor/node_modules/grunt/node_modules/dateformat/lib/dateformat.js +165 -0
- data/vendor/node_modules/grunt/node_modules/dateformat/package.json +20 -0
- data/vendor/node_modules/grunt/node_modules/dateformat/test/test_weekofyear.js +4 -0
- data/vendor/node_modules/grunt/node_modules/dateformat/test/test_weekofyear.sh +27 -0
- data/vendor/node_modules/grunt/node_modules/eventemitter2/README.md +212 -0
- data/vendor/node_modules/grunt/node_modules/eventemitter2/index.js +1 -0
- data/vendor/node_modules/grunt/node_modules/eventemitter2/lib/eventemitter2.js +561 -0
- data/vendor/node_modules/grunt/node_modules/eventemitter2/package.json +62 -0
- data/vendor/node_modules/grunt/node_modules/exit/Gruntfile.js +48 -0
- data/vendor/node_modules/grunt/node_modules/exit/LICENSE-MIT +22 -0
- data/vendor/node_modules/grunt/node_modules/exit/README.md +75 -0
- data/vendor/node_modules/grunt/node_modules/exit/lib/exit.js +41 -0
- data/vendor/node_modules/grunt/node_modules/exit/package.json +51 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/exit_test.js +121 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/10-stderr.txt +10 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/10-stdout-stderr.txt +20 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/10-stdout.txt +10 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/100-stderr.txt +100 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/100-stdout-stderr.txt +200 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/100-stdout.txt +100 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/1000-stderr.txt +1000 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/1000-stdout-stderr.txt +2000 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/1000-stdout.txt +1000 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/create-files.sh +8 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/log-broken.js +23 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/log.js +25 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/Gruntfile.js +25 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/LICENSE-MIT +22 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/README.md +44 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/lib/findup-sync.js +46 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/README.md +164 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.compat.js +5152 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.compat.min.js +42 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.js +4983 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.min.js +40 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.underscore.js +4307 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.underscore.min.js +34 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/package.json +62 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/package.json +48 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/test/findup-sync_test.js +48 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/test/fixtures/a.txt +0 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/test/fixtures/a/b/bar.txt +0 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/test/fixtures/a/foo.txt +0 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/test/fixtures/aaa.txt +0 -0
- data/vendor/node_modules/grunt/node_modules/getobject/Gruntfile.js +48 -0
- data/vendor/node_modules/grunt/node_modules/getobject/LICENSE-MIT +22 -0
- data/vendor/node_modules/grunt/node_modules/getobject/README.md +20 -0
- data/vendor/node_modules/grunt/node_modules/getobject/lib/getobject.js +60 -0
- data/vendor/node_modules/grunt/node_modules/getobject/package.json +48 -0
- data/vendor/node_modules/grunt/node_modules/getobject/test/namespace_test.js +51 -0
- data/vendor/node_modules/grunt/node_modules/glob/LICENSE +27 -0
- data/vendor/node_modules/grunt/node_modules/glob/README.md +233 -0
- data/vendor/node_modules/grunt/node_modules/glob/examples/g.js +9 -0
- data/vendor/node_modules/grunt/node_modules/glob/examples/usr-local.js +9 -0
- data/vendor/node_modules/grunt/node_modules/glob/glob.js +643 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/LICENSE +27 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/README.md +33 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/graceful-fs.js +442 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/package.json +49 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/test/open.js +46 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/test/ulimit.js +158 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/inherits/README.md +51 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/inherits/inherits.js +29 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/inherits/package.json +30 -0
- data/vendor/node_modules/grunt/node_modules/glob/package.json +40 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/00-setup.js +176 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/bash-comparison.js +63 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/bash-results.json +348 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/cwd-test.js +55 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/mark.js +74 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/nocase-nomagic.js +113 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/pause-resume.js +73 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/root-nomount.js +39 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/root.js +46 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/zz-cleanup.js +11 -0
- data/vendor/node_modules/grunt/node_modules/hooker/LICENSE-MIT +22 -0
- data/vendor/node_modules/grunt/node_modules/hooker/README.md +186 -0
- data/vendor/node_modules/grunt/node_modules/hooker/child.js +101 -0
- data/vendor/node_modules/grunt/node_modules/hooker/dist/ba-hooker.js +169 -0
- data/vendor/node_modules/grunt/node_modules/hooker/dist/ba-hooker.min.js +4 -0
- data/vendor/node_modules/grunt/node_modules/hooker/grunt.js +47 -0
- data/vendor/node_modules/grunt/node_modules/hooker/lib/hooker.js +174 -0
- data/vendor/node_modules/grunt/node_modules/hooker/package.json +45 -0
- data/vendor/node_modules/grunt/node_modules/hooker/parent.js +17 -0
- data/vendor/node_modules/grunt/node_modules/hooker/test/hooker_test.js +435 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/LICENSE +21 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/README.md +72 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/README.md~ +54 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/encodings/big5.js +9 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/encodings/gbk.js +9 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/encodings/singlebyte.js +340 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/encodings/table/big5.js +1 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/encodings/table/gbk.js +1 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/generation/generate-big5-table.js +25 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/generation/generate-singlebyte.js +142 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/index.js +231 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/package.json +80 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/big5-test.js +36 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/big5File.txt +13 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/cyrillic-test.js +86 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/gbk-test.js +38 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/gbkFile.txt +14 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/greek-test.js +79 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/main-test.js +55 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/performance.js +67 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/turkish-test.js +90 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/HISTORY.md +155 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/LICENSE +21 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/README.md +249 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/bin/js-yaml.js +125 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/examples/custom_types.js +104 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/examples/custom_types.yaml +18 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/examples/dumper.js +31 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/examples/dumper.json +22 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/examples/sample_document.js +15 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/examples/sample_document.yaml +197 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/index.js +1 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml.js +33 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/common.js +60 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/dumper.js +437 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/exception.js +25 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/loader.js +1549 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/mark.js +78 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/require.js +23 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema.js +103 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/default.js +16 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/minimal.js +13 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/safe.js +25 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type.js +82 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/binary.js +118 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/bool.js +74 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/float.js +102 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/int.js +85 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/function.js +56 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +56 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +28 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/map.js +11 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/merge.js +18 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/null.js +36 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/omap.js +53 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/pairs.js +41 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/seq.js +11 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/set.js +31 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/str.js +11 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +91 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/HISTORY.md +109 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/LICENSE +21 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/README.md +239 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/arguments.js +36 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/choice.js +22 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/constants.js +59 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/help.js +13 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/nargs.js +33 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/parents.js +28 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/prefix_chars.js +23 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/sub_commands.js +49 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/sum.js +35 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/testformatters.js +270 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/index.js +1 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action.js +146 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/append.js +55 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/append/constant.js +47 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/count.js +40 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/help.js +48 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store.js +50 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/constant.js +43 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/false.js +27 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/true.js +26 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/subparsers.js +148 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/version.js +50 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action_container.js +481 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argparse.js +14 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/error.js +50 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/exclusive.js +54 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/group.js +75 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument_parser.js +1165 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/const.js +18 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/help/added_formatters.js +88 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/help/formatter.js +803 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/namespace.js +77 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Gemfile +4 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Gemfile.lock +17 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/README.markdown +814 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Rakefile +23 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/component.json +11 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/dist/underscore.string.min.js +1 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/lib/underscore.string.js +673 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/libpeerconnection.log +0 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/package.json +73 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/run-qunit.js +45 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/speed.js +148 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/strings.js +685 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/strings_standalone.js +12 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test.html +31 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_standalone.html +18 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/arrays.js +200 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/chaining.js +59 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/collections.js +426 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/functions.js +259 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/index.html +45 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/objects.js +548 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/speed.js +75 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/utility.js +249 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/jquery.js +9404 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/jslitmus.js +670 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/qunit.css +235 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/qunit.js +1977 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/underscore.js +1201 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/CNAME +1 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/CONTRIBUTING.md +9 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/LICENSE +22 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/README.md +19 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/favicon.ico +0 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/index.html +2467 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/index.js +1 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/package.json +35 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/underscore-min.js +1 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/underscore.js +1226 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/package.json +50 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/README.md +73 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/bin/esparse.js +117 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/bin/esvalidate.js +177 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/esprima.js +3908 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/package.json +59 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/compat.js +239 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/reflect.js +422 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/run.js +66 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/runner.js +387 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/test.js +20238 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/package.json +60 -0
- data/vendor/node_modules/grunt/node_modules/lodash/README.md +140 -0
- data/vendor/node_modules/grunt/node_modules/lodash/lodash.js +4258 -0
- data/vendor/node_modules/grunt/node_modules/lodash/lodash.min.js +35 -0
- data/vendor/node_modules/grunt/node_modules/lodash/lodash.underscore.js +3688 -0
- data/vendor/node_modules/grunt/node_modules/lodash/lodash.underscore.min.js +28 -0
- data/vendor/node_modules/grunt/node_modules/lodash/package.json +62 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/LICENSE +23 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/README.md +218 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/minimatch.js +1055 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS +14 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/LICENSE +23 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/README.md +97 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js +252 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/package.json +33 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/basic.js +369 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/foreach.js +52 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js +50 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/LICENSE +27 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/README.md +53 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/bench.js +283 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/package.json +42 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/sigmund.js +39 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/test/basic.js +24 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/package.json +40 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/test/basic.js +399 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/test/brace-expand.js +33 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/test/caching.js +14 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/test/defaults.js +274 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/test/extglob-ending-with-state-char.js +8 -0
- data/vendor/node_modules/grunt/node_modules/nopt/LICENSE +23 -0
- data/vendor/node_modules/grunt/node_modules/nopt/README.md +208 -0
- data/vendor/node_modules/grunt/node_modules/nopt/bin/nopt.js +44 -0
- data/vendor/node_modules/grunt/node_modules/nopt/examples/my-program.js +30 -0
- data/vendor/node_modules/grunt/node_modules/nopt/lib/nopt.js +552 -0
- data/vendor/node_modules/grunt/node_modules/nopt/node_modules/abbrev/LICENSE +23 -0
- data/vendor/node_modules/grunt/node_modules/nopt/node_modules/abbrev/README.md +23 -0
- data/vendor/node_modules/grunt/node_modules/nopt/node_modules/abbrev/lib/abbrev.js +111 -0
- data/vendor/node_modules/grunt/node_modules/nopt/node_modules/abbrev/package.json +29 -0
- data/vendor/node_modules/grunt/node_modules/nopt/package.json +36 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/AUTHORS +6 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/LICENSE +23 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/README.md +21 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/node_modules/graceful-fs/LICENSE +23 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/node_modules/graceful-fs/README.md +5 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/node_modules/graceful-fs/graceful-fs.js +312 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/node_modules/graceful-fs/package.json +40 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/node_modules/graceful-fs/test/open.js +41 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/package.json +59 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/rimraf.js +161 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/test/run.sh +10 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/test/setup.sh +47 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/test/test-async.js +5 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/test/test-fiber.js +0 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/test/test-sync.js +3 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/Gemfile +5 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/Gemfile.lock +34 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/README.markdown +668 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/Rakefile +28 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/dist/underscore.string.min.js +1 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/lib/underscore.string.js +525 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/package.json +72 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/run-qunit.js +44 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/speed.js +138 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/strings.js +438 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/strings_standalone.js +12 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test.html +31 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_standalone.html +18 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/arrays.js +166 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/chaining.js +59 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/collections.js +270 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/functions.js +198 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/objects.js +535 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/speed.js +70 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/temp.js +27 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/temp_tests.html +19 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/test.html +43 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/utility.js +155 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/jquery.js +19 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/jslitmus.js +670 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/qunit.css +196 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/qunit.js +2360 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/underscore.js +999 -0
- data/vendor/node_modules/grunt/node_modules/which/LICENSE +23 -0
- data/vendor/node_modules/grunt/node_modules/which/README.md +5 -0
- data/vendor/node_modules/grunt/node_modules/which/bin/which +14 -0
- data/vendor/node_modules/grunt/node_modules/which/package.json +31 -0
- data/vendor/node_modules/grunt/node_modules/which/which.js +104 -0
- data/vendor/node_modules/grunt/package.json +82 -0
- data/vendor/node_modules/istanbul/CHANGELOG.md +57 -0
- data/vendor/node_modules/istanbul/LICENSE +24 -0
- data/vendor/node_modules/istanbul/README.md +205 -0
- data/vendor/node_modules/istanbul/index.js +115 -0
- data/vendor/node_modules/istanbul/lib/cli.js +74 -0
- data/vendor/node_modules/istanbul/lib/collector.js +121 -0
- data/vendor/node_modules/istanbul/lib/command/check-coverage.js +115 -0
- data/vendor/node_modules/istanbul/lib/command/common/run-with-cover.js +199 -0
- data/vendor/node_modules/istanbul/lib/command/cover.js +33 -0
- data/vendor/node_modules/istanbul/lib/command/help.js +58 -0
- data/vendor/node_modules/istanbul/lib/command/index.js +33 -0
- data/vendor/node_modules/istanbul/lib/command/instrument.js +244 -0
- data/vendor/node_modules/istanbul/lib/command/report.js +97 -0
- data/vendor/node_modules/istanbul/lib/command/test.js +31 -0
- data/vendor/node_modules/istanbul/lib/hook.js +187 -0
- data/vendor/node_modules/istanbul/lib/instrumenter.js +759 -0
- data/vendor/node_modules/istanbul/lib/object-utils.js +341 -0
- data/vendor/node_modules/istanbul/lib/register-plugins.js +15 -0
- data/vendor/node_modules/istanbul/lib/report/cobertura.js +207 -0
- data/vendor/node_modules/istanbul/lib/report/html.js +517 -0
- data/vendor/node_modules/istanbul/lib/report/index.js +60 -0
- data/vendor/node_modules/istanbul/lib/report/json.js +55 -0
- data/vendor/node_modules/istanbul/lib/report/lcov.js +49 -0
- data/vendor/node_modules/istanbul/lib/report/lcovonly.js +93 -0
- data/vendor/node_modules/istanbul/lib/report/none.js +20 -0
- data/vendor/node_modules/istanbul/lib/report/teamcity.js +82 -0
- data/vendor/node_modules/istanbul/lib/report/templates/foot.txt +102 -0
- data/vendor/node_modules/istanbul/lib/report/templates/head.txt +200 -0
- data/vendor/node_modules/istanbul/lib/report/text-summary.js +72 -0
- data/vendor/node_modules/istanbul/lib/report/text.js +210 -0
- data/vendor/node_modules/istanbul/lib/store/fslookup.js +60 -0
- data/vendor/node_modules/istanbul/lib/store/index.js +122 -0
- data/vendor/node_modules/istanbul/lib/store/memory.js +55 -0
- data/vendor/node_modules/istanbul/lib/store/tmp.js +80 -0
- data/vendor/node_modules/istanbul/lib/util/factory.js +88 -0
- data/vendor/node_modules/istanbul/lib/util/file-matcher.js +60 -0
- data/vendor/node_modules/istanbul/lib/util/file-writer.js +131 -0
- data/vendor/node_modules/istanbul/lib/util/flow-control.js +26 -0
- data/vendor/node_modules/istanbul/lib/util/help-formatter.js +24 -0
- data/vendor/node_modules/istanbul/lib/util/input-error.js +12 -0
- data/vendor/node_modules/istanbul/lib/util/insertion-text.js +109 -0
- data/vendor/node_modules/istanbul/lib/util/meta.js +13 -0
- data/vendor/node_modules/istanbul/lib/util/tree-summarizer.js +213 -0
- data/vendor/node_modules/istanbul/lib/util/writer.js +56 -0
- data/vendor/node_modules/istanbul/lib/util/yui-load-hook.js +49 -0
- data/vendor/node_modules/istanbul/lib/vendor/prettify.css +1 -0
- data/vendor/node_modules/istanbul/lib/vendor/prettify.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/abbrev/LICENSE +23 -0
- data/vendor/node_modules/istanbul/node_modules/abbrev/README.md +23 -0
- data/vendor/node_modules/istanbul/node_modules/abbrev/lib/abbrev.js +111 -0
- data/vendor/node_modules/istanbul/node_modules/abbrev/package.json +29 -0
- data/vendor/node_modules/istanbul/node_modules/async/LICENSE +19 -0
- data/vendor/node_modules/istanbul/node_modules/async/README.md +1414 -0
- data/vendor/node_modules/istanbul/node_modules/async/component.json +11 -0
- data/vendor/node_modules/istanbul/node_modules/async/lib/async.js +955 -0
- data/vendor/node_modules/istanbul/node_modules/async/package.json +43 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/LICENSE.BSD +19 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/LICENSE.source-map +27 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/README.md +99 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/bin/escodegen.js +45 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/bin/esgenerate.js +45 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/component.json +48 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/escodegen.browser.js +3072 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/escodegen.js +2275 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/estraverse/LICENSE.BSD +19 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/estraverse/README.md +29 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/estraverse/estraverse.js +315 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/estraverse/package.json +41 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/CHANGELOG.md +112 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/LICENSE +28 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/Makefile.dryice.js +166 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/README.md +434 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/assert-shim.js +56 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/mini-require.js +152 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/prefix-source-map.jsm +20 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/prefix-utils.jsm +18 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/suffix-browser.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/suffix-source-map.jsm +6 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/suffix-utils.jsm +21 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/test-prefix.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/test-suffix.js +3 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/array-set.js +97 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/base64.js +42 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/binary-search.js +81 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/source-map-consumer.js +477 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/source-map-generator.js +380 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/source-node.js +371 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/util.js +205 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/README.md +171 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/intercept.js +36 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/package.json +36 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/package.json +110 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/run-tests.js +71 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-api.js +26 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-array-set.js +104 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-base64.js +35 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-dog-fooding.js +72 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-map-consumer.js +451 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-map-generator.js +417 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-node.js +365 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/util.js +161 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/package.json +58 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/README.md +73 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/bin/esparse.js +117 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/bin/esvalidate.js +177 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/esprima.js +3908 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/package.json +59 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/test/compat.js +239 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/test/reflect.js +422 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/test/run.js +66 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/test/runner.js +387 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/test/test.js +20238 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/LICENSE-MIT +22 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/README.md +87 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/lib/fileset.js +64 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/LICENSE +27 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/README.md +250 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/examples/g.js +9 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/examples/usr-local.js +9 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/glob.js +680 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/LICENSE +16 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/README.md +42 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/inherits.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/inherits_browser.js +23 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/package.json +33 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/test.js +25 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/package.json +39 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/00-setup.js +176 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/bash-comparison.js +63 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/bash-results.json +350 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/cwd-test.js +55 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/globstar-match.js +19 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/mark.js +74 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/new-glob-optional-options.js +10 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/nocase-nomagic.js +113 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/pause-resume.js +73 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/root-nomount.js +39 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/root.js +46 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/stat.js +32 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/zz-cleanup.js +11 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/LICENSE +23 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/README.md +218 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/minimatch.js +1055 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS +14 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/LICENSE +23 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/README.md +97 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js +252 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/package.json +33 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/test/basic.js +369 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/test/foreach.js +52 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js +50 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/LICENSE +27 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/README.md +53 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/bench.js +283 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/package.json +42 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/sigmund.js +39 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/test/basic.js +24 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/package.json +40 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/test/basic.js +399 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/test/brace-expand.js +33 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/test/caching.js +14 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/test/defaults.js +274 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/test/extglob-ending-with-state-char.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/package.json +34 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/tests/fixtures/an (odd) filename.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/tests/helper.js +61 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/tests/test.js +133 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/LICENSE +19 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/README.markdown +391 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/bin/handlebars +213 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/bower.json +9 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/dist/handlebars.js +2278 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/dist/handlebars.min.js +2 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/dist/handlebars.runtime.js +362 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/dist/handlebars.runtime.min.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/global-test.js +18 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/global.js +4 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/handlebars-source.gemspec +21 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/handlebars.js.nuspec +17 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars.js +43 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/base.js +166 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/browser-prefix.js +3 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/browser-suffix.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/ast.js +138 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/base.js +21 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/compiler.js +1305 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/index.js +16 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/parser.js +483 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/printer.js +138 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/visitor.js +18 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/runtime.js +106 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/source.rb +11 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/utils.js +83 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/min.sh +11 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/LICENSE +21 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/bool.js +10 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/boolean_double.js +7 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/boolean_single.js +7 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/default_hash.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/default_singles.js +7 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/divide.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/line_count.js +20 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/line_count_options.js +29 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/line_count_wrap.js +29 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/nonopt.js +4 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/reflect.js +2 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/short.js +3 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/string.js +11 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/usage-options.js +19 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/xup.js +10 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/index.js +478 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/package.json +46 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/readme.markdown +487 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/test/_.js +71 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/test/_/argv.js +2 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/test/_/bin.js +3 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/test/parse.js +446 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/test/usage.js +292 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/LICENSE +29 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/README.md +588 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/bin/uglifyjs +402 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/ast.js +985 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/compress.js +2028 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/mozilla-ast.js +267 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/output.js +1229 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/parse.js +1410 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/scope.js +581 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/sourcemap.js +81 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/transform.js +217 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/utils.js +295 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/CHANGELOG.md +112 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/LICENSE +28 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/Makefile.dryice.js +166 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/README.md +434 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/assert-shim.js +56 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/mini-require.js +152 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/prefix-source-map.jsm +20 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/prefix-utils.jsm +18 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/suffix-browser.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/suffix-source-map.jsm +6 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/suffix-utils.jsm +21 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/test-prefix.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/test-suffix.js +3 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/array-set.js +97 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/base64.js +42 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/binary-search.js +81 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-consumer.js +477 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-generator.js +380 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-node.js +371 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/util.js +205 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/README.md +171 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/intercept.js +36 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/package.json +37 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/package.json +110 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/run-tests.js +71 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-api.js +26 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-array-set.js +104 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64.js +35 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-dog-fooding.js +72 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-consumer.js +451 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-generator.js +417 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-node.js +365 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/util.js +161 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/package.json +39 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/arrays.js +12 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/blocks.js +49 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/conditionals.js +143 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/dead-code.js +89 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/debugger.js +24 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/drop-unused.js +97 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-105.js +25 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-12.js +11 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-143.js +48 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-22.js +17 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-44.js +31 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-59.js +30 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/labels.js +163 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/loops.js +123 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/properties.js +54 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/sequences.js +161 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/switch.js +260 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/typeof.js +25 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/run-tests.js +170 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/tools/node.js +165 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/package.json +42 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/release-notes.md +93 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/test.js +20 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/LICENSE +21 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/examples/pow.js +6 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/index.js +82 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/package.json +34 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/readme.markdown +63 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/chmod.js +38 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/clobber.js +37 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/mkdirp.js +28 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/perm.js +32 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/perm_sync.js +39 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/race.js +41 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/rel.js +32 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/return.js +25 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/return_sync.js +24 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/root.js +18 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/sync.js +32 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/umask.js +28 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/umask_sync.js +32 -0
- data/vendor/node_modules/istanbul/node_modules/nopt/LICENSE +23 -0
- data/vendor/node_modules/istanbul/node_modules/nopt/README.md +210 -0
- data/vendor/node_modules/istanbul/node_modules/nopt/bin/nopt.js +51 -0
- data/vendor/node_modules/istanbul/node_modules/nopt/examples/my-program.js +30 -0
- data/vendor/node_modules/istanbul/node_modules/nopt/lib/nopt.js +612 -0
- data/vendor/node_modules/istanbul/node_modules/nopt/package.json +36 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/LICENSE +18 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/example/async.js +5 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/example/sync.js +3 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/index.js +5 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/lib/async.js +125 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/lib/caller.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/lib/core.js +4 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/lib/core.json +38 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/lib/node-modules-paths.js +25 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/lib/sync.js +80 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/package.json +36 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/readme.markdown +144 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/core.js +12 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/filter.js +18 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/filter_sync.js +15 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/mock.js +142 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/mock_sync.js +68 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver.js +270 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/baz/doom.js +0 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/baz/package.json +3 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/baz/quux.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/biz/node_modules/garply/lib/index.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/biz/node_modules/garply/package.json +3 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/cup.coffee +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/foo.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/incorrect_main/index.js +2 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/incorrect_main/package.json +3 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/mug.coffee +0 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/mug.js +0 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/other_path/root.js +0 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/quux/foo/index.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/without_basedir/main.js +6 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/without_basedir/node_modules/mymodule.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver_sync.js +170 -0
- data/vendor/node_modules/istanbul/node_modules/which/LICENSE +23 -0
- data/vendor/node_modules/istanbul/node_modules/which/README.md +5 -0
- data/vendor/node_modules/istanbul/node_modules/which/bin/which +14 -0
- data/vendor/node_modules/istanbul/node_modules/which/package.json +32 -0
- data/vendor/node_modules/istanbul/node_modules/which/which.js +104 -0
- data/vendor/node_modules/istanbul/node_modules/wordwrap/README.markdown +70 -0
- data/vendor/node_modules/istanbul/node_modules/wordwrap/example/center.js +10 -0
- data/vendor/node_modules/istanbul/node_modules/wordwrap/example/meat.js +3 -0
- data/vendor/node_modules/istanbul/node_modules/wordwrap/index.js +76 -0
- data/vendor/node_modules/istanbul/node_modules/wordwrap/package.json +45 -0
- data/vendor/node_modules/istanbul/node_modules/wordwrap/test/break.js +30 -0
- data/vendor/node_modules/istanbul/node_modules/wordwrap/test/idleness.txt +63 -0
- data/vendor/node_modules/istanbul/node_modules/wordwrap/test/wrap.js +31 -0
- data/vendor/node_modules/istanbul/package.json +117 -0
- data/vendor/node_modules/istanbul/test/browser/support/index.html +153 -0
- data/vendor/node_modules/istanbul/test/browser/support/phantom-test.client.js +49 -0
- data/vendor/node_modules/istanbul/test/browser/support/server.js +154 -0
- data/vendor/node_modules/istanbul/test/browser/test-browser-instrumentation.js +94 -0
- data/vendor/node_modules/istanbul/test/cli-helper.js +219 -0
- data/vendor/node_modules/istanbul/test/cli/package.json +8 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/amd/ipsum.js +11 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/amd/lorem.js +7 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/lib/bar.js +13 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/lib/foo.js +12 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/lib/util/bad.js +1 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/lib/util/generate-names.js +5 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/node_modules/dependency/index.js +9 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/node_modules/post-require/hook.js +11 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/node_modules/post-require/package.json +5 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/test/amd-run.js +16 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/test/global-leak.js +30 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/test/run.js +25 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/vendor/dummy_vendor_lib.js +9 -0
- data/vendor/node_modules/istanbul/test/cli/test-base-cli.js +39 -0
- data/vendor/node_modules/istanbul/test/cli/test-check-coverage-command.js +97 -0
- data/vendor/node_modules/istanbul/test/cli/test-cobertura-report.js +54 -0
- data/vendor/node_modules/istanbul/test/cli/test-cover-command.js +170 -0
- data/vendor/node_modules/istanbul/test/cli/test-html-report.js +125 -0
- data/vendor/node_modules/istanbul/test/cli/test-instrument-command.js +167 -0
- data/vendor/node_modules/istanbul/test/cli/test-json-report.js +60 -0
- data/vendor/node_modules/istanbul/test/cli/test-lcov-report.js +58 -0
- data/vendor/node_modules/istanbul/test/cli/test-lcovonly-report.js +61 -0
- data/vendor/node_modules/istanbul/test/cli/test-lots-of-files.js +87 -0
- data/vendor/node_modules/istanbul/test/cli/test-none-report.js +17 -0
- data/vendor/node_modules/istanbul/test/cli/test-report-command.js +65 -0
- data/vendor/node_modules/istanbul/test/cli/test-teamcity-report.js +54 -0
- data/vendor/node_modules/istanbul/test/cli/test-test-command.js +43 -0
- data/vendor/node_modules/istanbul/test/common.js +19 -0
- data/vendor/node_modules/istanbul/test/helper.js +122 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-do.js +53 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-expressions.js +70 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-for.js +206 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-forin.js +50 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-functions.js +102 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-if.js +393 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-misc.js +35 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-statement.js +182 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-strict.js +121 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-switch.js +155 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-while.js +104 -0
- data/vendor/node_modules/istanbul/test/loader.js +38 -0
- data/vendor/node_modules/istanbul/test/other/data-complete-copy/baz.js +3 -0
- data/vendor/node_modules/istanbul/test/other/data-complete-copy/fixture.xml +1 -0
- data/vendor/node_modules/istanbul/test/other/data-complete-copy/foo.js +4 -0
- data/vendor/node_modules/istanbul/test/other/data-complete-copy/myfile1 +0 -0
- data/vendor/node_modules/istanbul/test/other/data-complete-copy/myfile2 +1 -0
- data/vendor/node_modules/istanbul/test/other/data-complete-copy/subdir/x.css +3 -0
- data/vendor/node_modules/istanbul/test/other/data/baz.js +3 -0
- data/vendor/node_modules/istanbul/test/other/data/foo.js +4 -0
- data/vendor/node_modules/istanbul/test/other/data/matcher/general/general.js +2 -0
- data/vendor/node_modules/istanbul/test/other/data/matcher/general/node_modules/mod-file.js +2 -0
- data/vendor/node_modules/istanbul/test/other/data/matcher/lib/lib-top.js +2 -0
- data/vendor/node_modules/istanbul/test/other/data/matcher/node_modules/dep/mod-file.js +2 -0
- data/vendor/node_modules/istanbul/test/other/data/matcher/node_modules/mod-file.js +2 -0
- data/vendor/node_modules/istanbul/test/other/data/matcher/top.js +2 -0
- data/vendor/node_modules/istanbul/test/other/test-collector.js +85 -0
- data/vendor/node_modules/istanbul/test/other/test-command-xface.js +35 -0
- data/vendor/node_modules/istanbul/test/other/test-file-writer.js +71 -0
- data/vendor/node_modules/istanbul/test/other/test-help-formatter.js +31 -0
- data/vendor/node_modules/istanbul/test/other/test-hook.js +87 -0
- data/vendor/node_modules/istanbul/test/other/test-index-xface.js +17 -0
- data/vendor/node_modules/istanbul/test/other/test-input-error.js +10 -0
- data/vendor/node_modules/istanbul/test/other/test-insertion-text.js +102 -0
- data/vendor/node_modules/istanbul/test/other/test-matcher.js +93 -0
- data/vendor/node_modules/istanbul/test/other/test-object-utils.js +201 -0
- data/vendor/node_modules/istanbul/test/other/test-store.js +129 -0
- data/vendor/node_modules/istanbul/test/other/test-summarizer.js +172 -0
- data/vendor/node_modules/istanbul/test/run-again.js +19 -0
- data/vendor/node_modules/istanbul/test/run.js +108 -0
- data/vendor/node_modules/istanbul/yui-coverage-comparison.md +85 -0
- data/vendor/node_modules/qunit-clib/LICENSE.txt +20 -0
- data/vendor/node_modules/qunit-clib/README.md +2 -0
- data/vendor/node_modules/qunit-clib/package.json +36 -0
- data/vendor/node_modules/qunit-clib/qunit-clib.js +570 -0
- data/vendor/node_modules/qunitjs/AUTHORS.txt +55 -0
- data/vendor/node_modules/qunitjs/History.md +496 -0
- data/vendor/node_modules/qunitjs/README.md +62 -0
- data/vendor/node_modules/qunitjs/addons/canvas/README.md +17 -0
- data/vendor/node_modules/qunitjs/addons/canvas/canvas-test.js +76 -0
- data/vendor/node_modules/qunitjs/addons/canvas/canvas.html +15 -0
- data/vendor/node_modules/qunitjs/addons/canvas/qunit-canvas.js +6 -0
- data/vendor/node_modules/qunitjs/addons/close-enough/README.md +18 -0
- data/vendor/node_modules/qunitjs/addons/close-enough/close-enough-test.js +35 -0
- data/vendor/node_modules/qunitjs/addons/close-enough/close-enough.html +14 -0
- data/vendor/node_modules/qunitjs/addons/close-enough/qunit-close-enough.js +32 -0
- data/vendor/node_modules/qunitjs/addons/composite/README.md +26 -0
- data/vendor/node_modules/qunitjs/addons/composite/composite-demo-test.html +24 -0
- data/vendor/node_modules/qunitjs/addons/composite/index.html +34 -0
- data/vendor/node_modules/qunitjs/addons/composite/qunit-composite.css +13 -0
- data/vendor/node_modules/qunitjs/addons/composite/qunit-composite.js +112 -0
- data/vendor/node_modules/qunitjs/addons/junitlogger/README.md +18 -0
- data/vendor/node_modules/qunitjs/addons/junitlogger/index.html +44 -0
- data/vendor/node_modules/qunitjs/addons/junitlogger/junitlogger.js +306 -0
- data/vendor/node_modules/qunitjs/addons/phantomjs/README.md +16 -0
- data/vendor/node_modules/qunitjs/addons/phantomjs/runner.js +127 -0
- data/vendor/node_modules/qunitjs/addons/step/README.md +20 -0
- data/vendor/node_modules/qunitjs/addons/step/qunit-step.js +26 -0
- data/vendor/node_modules/qunitjs/addons/step/step-test.js +15 -0
- data/vendor/node_modules/qunitjs/addons/step/step.html +14 -0
- data/vendor/node_modules/qunitjs/addons/themes/README.md +6 -0
- data/vendor/node_modules/qunitjs/addons/themes/gabe.css +371 -0
- data/vendor/node_modules/qunitjs/addons/themes/gabe.html +15 -0
- data/vendor/node_modules/qunitjs/addons/themes/ninja.css +196 -0
- data/vendor/node_modules/qunitjs/addons/themes/ninja.html +15 -0
- data/vendor/node_modules/qunitjs/addons/themes/nv.css +217 -0
- data/vendor/node_modules/qunitjs/addons/themes/nv.html +15 -0
- data/vendor/node_modules/qunitjs/grunt.js +101 -0
- data/vendor/node_modules/qunitjs/package.json +49 -0
- data/vendor/node_modules/qunitjs/qunit/qunit.css +244 -0
- data/vendor/node_modules/qunitjs/qunit/qunit.js +2152 -0
- data/vendor/node_modules/qunitjs/test/async.html +26 -0
- data/vendor/node_modules/qunitjs/test/async.js +6 -0
- data/vendor/node_modules/qunitjs/test/deepEqual.js +1438 -0
- data/vendor/node_modules/qunitjs/test/headless.html +28 -0
- data/vendor/node_modules/qunitjs/test/index.html +16 -0
- data/vendor/node_modules/qunitjs/test/logs.html +14 -0
- data/vendor/node_modules/qunitjs/test/logs.js +184 -0
- data/vendor/node_modules/qunitjs/test/narwhal-test.js +22 -0
- data/vendor/node_modules/qunitjs/test/node-test.js +22 -0
- data/vendor/node_modules/qunitjs/test/swarminject.js +10 -0
- data/vendor/node_modules/qunitjs/test/test.js +804 -0
- data/vendor/node_modules/regenerate/LICENSE-MIT.txt +20 -0
- data/vendor/node_modules/regenerate/README.md +467 -0
- data/vendor/node_modules/regenerate/package.json +50 -0
- data/vendor/node_modules/regenerate/regenerate.js +617 -0
- data/vendor/node_modules/requirejs/README.md +9 -0
- data/vendor/node_modules/requirejs/bin/r.js +26059 -0
- data/vendor/node_modules/requirejs/package.json +39 -0
- data/vendor/node_modules/requirejs/require.js +2054 -0
- data/vendor/package.json +56 -0
- metadata +949 -0
@@ -0,0 +1,31 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2012, Yahoo! Inc. All rights reserved.
|
3
|
+
Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
4
|
+
*/
|
5
|
+
|
6
|
+
var runWithCover = require('./common/run-with-cover'),
|
7
|
+
util = require('util'),
|
8
|
+
Command = require('./index');
|
9
|
+
|
10
|
+
function TestCommand() {
|
11
|
+
Command.call(this);
|
12
|
+
}
|
13
|
+
|
14
|
+
TestCommand.TYPE = 'test';
|
15
|
+
util.inherits(TestCommand, Command);
|
16
|
+
|
17
|
+
Command.mix(TestCommand, {
|
18
|
+
synopsis: function () {
|
19
|
+
return "cover a node command only when npm_config_coverage is set. Use in an `npm test` script for conditional coverage";
|
20
|
+
},
|
21
|
+
|
22
|
+
usage: function () {
|
23
|
+
runWithCover.usage(this.toolName(), this.type());
|
24
|
+
},
|
25
|
+
|
26
|
+
run: function (args, callback) {
|
27
|
+
runWithCover.run(args, this.type(), !!process.env.npm_config_coverage, callback);
|
28
|
+
}
|
29
|
+
});
|
30
|
+
|
31
|
+
module.exports = TestCommand;
|
@@ -0,0 +1,187 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2012, Yahoo! Inc. All rights reserved.
|
3
|
+
Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
4
|
+
*/
|
5
|
+
|
6
|
+
/**
|
7
|
+
* provides a mechanism to transform code in the scope of `require` or `vm.createScript`.
|
8
|
+
* This mechanism is general and relies on a user-supplied `matcher` function that determines when transformations should be
|
9
|
+
* performed and a user-supplied `transformer` function that performs the actual transform.
|
10
|
+
* Instrumenting code for coverage is one specific example of useful hooking.
|
11
|
+
*
|
12
|
+
* Note that both the `matcher` and `transformer` must execute synchronously.
|
13
|
+
*
|
14
|
+
* For the common case of matching filesystem paths based on inclusion/ exclusion patterns, use the `matcherFor`
|
15
|
+
* function in the istanbul API to get a matcher.
|
16
|
+
*
|
17
|
+
* It is up to the transformer to perform processing with side-effects, such as caching, storing the original
|
18
|
+
* source code to disk in case of dynamically generated scripts etc. The `Store` class can help you with this.
|
19
|
+
*
|
20
|
+
* Usage
|
21
|
+
* -----
|
22
|
+
*
|
23
|
+
* var hook = require('istanbul').hook,
|
24
|
+
* myMatcher = function (file) { return file.match(/foo/); },
|
25
|
+
* myTransformer = function (code, file) { return 'console.log("' + file + '");' + code; };
|
26
|
+
*
|
27
|
+
* hook.hookRequire(myMatcher, myTransformer);
|
28
|
+
*
|
29
|
+
* var foo = require('foo'); //will now print foo's module path to console
|
30
|
+
*
|
31
|
+
* @class Hook
|
32
|
+
*/
|
33
|
+
var path = require('path'),
|
34
|
+
fs = require('fs'),
|
35
|
+
Module = require('module'),
|
36
|
+
vm = require('vm'),
|
37
|
+
originalLoader = Module._extensions['.js'],
|
38
|
+
originalCreateScript = vm.createScript,
|
39
|
+
originalRunInThisContext = vm.runInThisContext;
|
40
|
+
|
41
|
+
function transformFn(matcher, transformer, verbose) {
|
42
|
+
|
43
|
+
return function (code, filename) {
|
44
|
+
var shouldHook = matcher(path.resolve(filename)),
|
45
|
+
transformed,
|
46
|
+
changed = false;
|
47
|
+
|
48
|
+
if (shouldHook) {
|
49
|
+
if (verbose) {
|
50
|
+
console.error('Module load hook: transform [' + filename + ']');
|
51
|
+
}
|
52
|
+
try {
|
53
|
+
transformed = transformer(code, filename);
|
54
|
+
changed = true;
|
55
|
+
} catch (ex) {
|
56
|
+
console.error('Transformation error; return original code');
|
57
|
+
console.error(ex);
|
58
|
+
transformed = code;
|
59
|
+
}
|
60
|
+
} else {
|
61
|
+
transformed = code;
|
62
|
+
}
|
63
|
+
return { code: transformed, changed: changed };
|
64
|
+
};
|
65
|
+
}
|
66
|
+
|
67
|
+
function unloadRequireCache(matcher) {
|
68
|
+
if (matcher && typeof require !== 'undefined' && require && require.cache) {
|
69
|
+
Object.keys(require.cache).forEach(function (filename) {
|
70
|
+
if (matcher(filename)) {
|
71
|
+
delete require.cache[filename];
|
72
|
+
}
|
73
|
+
});
|
74
|
+
}
|
75
|
+
}
|
76
|
+
/**
|
77
|
+
* hooks `require` to return transformed code to the node module loader.
|
78
|
+
* Exceptions in the transform result in the original code being used instead.
|
79
|
+
* @method hookRequire
|
80
|
+
* @static
|
81
|
+
* @param matcher {Function(filePath)} a function that is called with the absolute path to the file being
|
82
|
+
* `require`-d. Should return a truthy value when transformations need to be applied to the code, a falsy value otherwise
|
83
|
+
* @param transformer {Function(code, filePath)} a function called with the original code and the associated path of the file
|
84
|
+
* from where the code was loaded. Should return the transformed code.
|
85
|
+
* @param options {Object} options Optional.
|
86
|
+
* @param {Boolean} [options.verbose] write a line to standard error every time the transformer is called
|
87
|
+
* @param {Function} [options.postLoadHook] a function that is called with the name of the file being
|
88
|
+
* required. This is called after the require is processed irrespective of whether it was transformed.
|
89
|
+
*/
|
90
|
+
function hookRequire(matcher, transformer, options) {
|
91
|
+
options = options || {};
|
92
|
+
var fn = transformFn(matcher, transformer, options.verbose),
|
93
|
+
postLoadHook = options.postLoadHook &&
|
94
|
+
typeof options.postLoadHook === 'function' ? options.postLoadHook : null;
|
95
|
+
|
96
|
+
Module._extensions['.js'] = function (module, filename) {
|
97
|
+
var ret = fn(fs.readFileSync(filename, 'utf8'), filename);
|
98
|
+
if (ret.changed) {
|
99
|
+
module._compile(ret.code, filename);
|
100
|
+
} else {
|
101
|
+
originalLoader(module, filename);
|
102
|
+
}
|
103
|
+
if (postLoadHook) {
|
104
|
+
postLoadHook(filename);
|
105
|
+
}
|
106
|
+
};
|
107
|
+
}
|
108
|
+
/**
|
109
|
+
* unhook `require` to restore it to its original state.
|
110
|
+
* @method unhookRequire
|
111
|
+
* @static
|
112
|
+
*/
|
113
|
+
function unhookRequire() {
|
114
|
+
Module._extensions['.js'] = originalLoader;
|
115
|
+
}
|
116
|
+
/**
|
117
|
+
* hooks `vm.createScript` to return transformed code out of which a `Script` object will be created.
|
118
|
+
* Exceptions in the transform result in the original code being used instead.
|
119
|
+
* @method hookCreateScript
|
120
|
+
* @static
|
121
|
+
* @param matcher {Function(filePath)} a function that is called with the filename passed to `vm.createScript`
|
122
|
+
* Should return a truthy value when transformations need to be applied to the code, a falsy value otherwise
|
123
|
+
* @param transformer {Function(code, filePath)} a function called with the original code and the filename passed to
|
124
|
+
* `vm.createScript`. Should return the transformed code.
|
125
|
+
* @param options {Object} options Optional.
|
126
|
+
* @param {Boolean} [options.verbose] write a line to standard error every time the transformer is called
|
127
|
+
*/
|
128
|
+
function hookCreateScript(matcher, transformer, opts) {
|
129
|
+
opts = opts || {};
|
130
|
+
var fn = transformFn(matcher, transformer, opts.verbose);
|
131
|
+
vm.createScript = function (code, file) {
|
132
|
+
var ret = fn(code, file);
|
133
|
+
return originalCreateScript(ret.code, file);
|
134
|
+
};
|
135
|
+
}
|
136
|
+
|
137
|
+
/**
|
138
|
+
* unhooks vm.createScript, restoring it to its original state.
|
139
|
+
* @method unhookCreateScript
|
140
|
+
* @static
|
141
|
+
*/
|
142
|
+
function unhookCreateScript() {
|
143
|
+
vm.createScript = originalCreateScript;
|
144
|
+
}
|
145
|
+
|
146
|
+
|
147
|
+
/**
|
148
|
+
* hooks `vm.runInThisContext` to return transformed code.
|
149
|
+
* @method hookRunInThisContext
|
150
|
+
* @static
|
151
|
+
* @param matcher {Function(filePath)} a function that is called with the filename passed to `vm.createScript`
|
152
|
+
* Should return a truthy value when transformations need to be applied to the code, a falsy value otherwise
|
153
|
+
* @param transformer {Function(code, filePath)} a function called with the original code and the filename passed to
|
154
|
+
* `vm.createScript`. Should return the transformed code.
|
155
|
+
* @param options {Object} options Optional.
|
156
|
+
* @param {Boolean} [options.verbose] write a line to standard error every time the transformer is called
|
157
|
+
*/
|
158
|
+
function hookRunInThisContext(matcher, transformer, opts) {
|
159
|
+
opts = opts || {};
|
160
|
+
var fn = transformFn(matcher, transformer, opts.verbose);
|
161
|
+
vm.runInThisContext = function (code, file) {
|
162
|
+
var ret = fn(code, file);
|
163
|
+
return originalRunInThisContext(ret.code, file);
|
164
|
+
};
|
165
|
+
}
|
166
|
+
|
167
|
+
/**
|
168
|
+
* unhooks vm.runInThisContext, restoring it to its original state.
|
169
|
+
* @method unhookRunInThisContext
|
170
|
+
* @static
|
171
|
+
*/
|
172
|
+
function unhookRunInThisContext() {
|
173
|
+
vm.runInThisContext = originalRunInThisContext;
|
174
|
+
}
|
175
|
+
|
176
|
+
|
177
|
+
module.exports = {
|
178
|
+
hookRequire: hookRequire,
|
179
|
+
unhookRequire: unhookRequire,
|
180
|
+
hookCreateScript: hookCreateScript,
|
181
|
+
unhookCreateScript: unhookCreateScript,
|
182
|
+
hookRunInThisContext : hookRunInThisContext,
|
183
|
+
unhookRunInThisContext : unhookRunInThisContext,
|
184
|
+
unloadRequireCache: unloadRequireCache
|
185
|
+
};
|
186
|
+
|
187
|
+
|
@@ -0,0 +1,759 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2012, Yahoo! Inc. All rights reserved.
|
3
|
+
Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
4
|
+
*/
|
5
|
+
|
6
|
+
/*global esprima, escodegen, window */
|
7
|
+
(function (isNode) {
|
8
|
+
"use strict";
|
9
|
+
var SYNTAX,
|
10
|
+
nodeType,
|
11
|
+
ESP = isNode ? require('esprima') : esprima,
|
12
|
+
ESPGEN = isNode ? require('escodegen') : escodegen, //TODO - package as dependency
|
13
|
+
crypto = isNode ? require('crypto') : null,
|
14
|
+
LEADER_WRAP = '(function () { ',
|
15
|
+
TRAILER_WRAP = '\n}());',
|
16
|
+
astgen,
|
17
|
+
preconditions,
|
18
|
+
cond,
|
19
|
+
isArray = Array.isArray;
|
20
|
+
|
21
|
+
if (!isArray) {
|
22
|
+
isArray = function (thing) { return thing && Object.prototype.toString.call(thing) === '[object Array]'; };
|
23
|
+
}
|
24
|
+
|
25
|
+
if (!isNode) {
|
26
|
+
preconditions = {
|
27
|
+
'Could not find esprima': ESP,
|
28
|
+
'Could not find escodegen': ESPGEN,
|
29
|
+
'JSON object not in scope': JSON,
|
30
|
+
'Array does not implement push': [].push,
|
31
|
+
'Array does not implement unshift': [].unshift
|
32
|
+
};
|
33
|
+
for (cond in preconditions) {
|
34
|
+
if (preconditions.hasOwnProperty(cond)) {
|
35
|
+
if (!preconditions[cond]) { throw new Error(cond); }
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
function generateTrackerVar(filename, omitSuffix) {
|
41
|
+
var hash, suffix;
|
42
|
+
if (crypto !== null) {
|
43
|
+
hash = crypto.createHash('md5');
|
44
|
+
hash.update(filename);
|
45
|
+
suffix = hash.digest('base64');
|
46
|
+
//trim trailing equal signs, turn identifier unsafe chars to safe ones + => _ and / => $
|
47
|
+
suffix = suffix.replace(new RegExp('=', 'g'), '')
|
48
|
+
.replace(new RegExp('\\+', 'g'), '_')
|
49
|
+
.replace(new RegExp('/', 'g'), '$');
|
50
|
+
} else {
|
51
|
+
window.__cov_seq = window.__cov_seq || 0;
|
52
|
+
window.__cov_seq += 1;
|
53
|
+
suffix = window.__cov_seq;
|
54
|
+
}
|
55
|
+
return '__cov_' + (omitSuffix ? '' : suffix);
|
56
|
+
}
|
57
|
+
|
58
|
+
function pushAll(ary, thing) {
|
59
|
+
if (!isArray(thing)) {
|
60
|
+
thing = [ thing ];
|
61
|
+
}
|
62
|
+
Array.prototype.push.apply(ary, thing);
|
63
|
+
}
|
64
|
+
|
65
|
+
SYNTAX = {
|
66
|
+
ArrayExpression: [ 'elements' ],
|
67
|
+
AssignmentExpression: ['left', 'right'],
|
68
|
+
BinaryExpression: ['left', 'right' ],
|
69
|
+
BlockStatement: [ 'body' ],
|
70
|
+
BreakStatement: [ 'label' ],
|
71
|
+
CallExpression: [ 'callee', 'arguments'],
|
72
|
+
CatchClause: ['param', 'body'],
|
73
|
+
ConditionalExpression: [ 'test', 'consequent', 'alternate' ],
|
74
|
+
ContinueStatement: [ 'label' ],
|
75
|
+
DebuggerStatement: [ ],
|
76
|
+
DoWhileStatement: [ 'test', 'body' ],
|
77
|
+
EmptyStatement: [],
|
78
|
+
ExpressionStatement: [ 'expression'],
|
79
|
+
ForInStatement: [ 'left', 'right', 'body' ],
|
80
|
+
ForStatement: ['init', 'test', 'update', 'body' ],
|
81
|
+
FunctionDeclaration: ['id', 'params', 'body'],
|
82
|
+
FunctionExpression: ['id', 'params', 'defaults', 'body'],
|
83
|
+
Identifier: [],
|
84
|
+
IfStatement: ['test', 'consequent', 'alternate'],
|
85
|
+
LabeledStatement: ['label', 'body'],
|
86
|
+
Literal: [],
|
87
|
+
LogicalExpression: [ 'left', 'right' ],
|
88
|
+
MemberExpression: ['object', 'property'],
|
89
|
+
NewExpression: ['callee', 'arguments'],
|
90
|
+
ObjectExpression: [ 'properties' ],
|
91
|
+
Program: [ 'body' ],
|
92
|
+
Property: [ 'key', 'value'],
|
93
|
+
ReturnStatement: ['argument'],
|
94
|
+
SequenceExpression: ['expressions'],
|
95
|
+
SwitchCase: [ 'test', 'consequent' ],
|
96
|
+
SwitchStatement: ['discriminant', 'cases' ],
|
97
|
+
ThisExpression: [],
|
98
|
+
ThrowStatement: ['argument'],
|
99
|
+
TryStatement: [ 'block', 'handlers', 'finalizer' ],
|
100
|
+
UnaryExpression: ['argument'],
|
101
|
+
UpdateExpression: [ 'argument' ],
|
102
|
+
VariableDeclaration: [ 'declarations' ],
|
103
|
+
VariableDeclarator: [ 'id', 'init' ],
|
104
|
+
WhileStatement: [ 'test', 'body' ],
|
105
|
+
WithStatement: [ 'object', 'body' ]
|
106
|
+
|
107
|
+
};
|
108
|
+
|
109
|
+
for (nodeType in SYNTAX) {
|
110
|
+
if (SYNTAX.hasOwnProperty(nodeType)) {
|
111
|
+
SYNTAX[nodeType] = { name: nodeType, children: SYNTAX[nodeType] };
|
112
|
+
}
|
113
|
+
}
|
114
|
+
|
115
|
+
astgen = {
|
116
|
+
variable: function (name) { return { type: SYNTAX.Identifier.name, name: name }; },
|
117
|
+
stringLiteral: function (str) { return { type: SYNTAX.Literal.name, value: String(str) }; },
|
118
|
+
numericLiteral: function (num) { return { type: SYNTAX.Literal.name, value: Number(num) }; },
|
119
|
+
statement: function (contents) { return { type: SYNTAX.ExpressionStatement.name, expression: contents }; },
|
120
|
+
dot: function (obj, field) { return { type: SYNTAX.MemberExpression.name, computed: false, object: obj, property: field }; },
|
121
|
+
subscript: function (obj, sub) { return { type: SYNTAX.MemberExpression.name, computed: true, object: obj, property: sub }; },
|
122
|
+
postIncrement: function (obj) { return { type: SYNTAX.UpdateExpression.name, operator: '++', prefix: false, argument: obj }; },
|
123
|
+
sequence: function (one, two) { return { type: SYNTAX.SequenceExpression.name, expressions: [one, two] }; }
|
124
|
+
};
|
125
|
+
|
126
|
+
function Walker(walkMap, scope, debug) {
|
127
|
+
this.walkMap = walkMap;
|
128
|
+
this.scope = scope;
|
129
|
+
this.debug = debug;
|
130
|
+
if (this.debug) {
|
131
|
+
this.level = 0;
|
132
|
+
this.seq = true;
|
133
|
+
}
|
134
|
+
}
|
135
|
+
|
136
|
+
function defaultWalker(node, walker) {
|
137
|
+
|
138
|
+
var type = node.type,
|
139
|
+
children = SYNTAX[type].children,
|
140
|
+
// don't run generated nodes thru custom walks otherwise we will attempt to instrument the instrumentation code :)
|
141
|
+
applyCustomWalker = !!node.loc || node.type === SYNTAX.Program.name,
|
142
|
+
walkerFn = applyCustomWalker ? walker.walkMap[type] : null,
|
143
|
+
i,
|
144
|
+
j,
|
145
|
+
walkFnIndex,
|
146
|
+
childType,
|
147
|
+
childNode,
|
148
|
+
ret = node,
|
149
|
+
childArray,
|
150
|
+
childElement,
|
151
|
+
pathElement,
|
152
|
+
assignNode,
|
153
|
+
isLast;
|
154
|
+
|
155
|
+
if (node.walking) { throw new Error('Infinite regress: Custom walkers may NOT call walker.walk(node)'); }
|
156
|
+
node.walking = true;
|
157
|
+
if (isArray(walkerFn)) {
|
158
|
+
for (walkFnIndex = 0; walkFnIndex < walkerFn.length; walkFnIndex += 1) {
|
159
|
+
isLast = walkFnIndex === walkerFn.length - 1;
|
160
|
+
ret = walker.walk(ret, walkerFn[walkFnIndex]) || ret;
|
161
|
+
if (ret.type !== type && !isLast) {
|
162
|
+
throw new Error('Only the last walker is allowed to change the node type: [type was: ' + type + ' ]');
|
163
|
+
}
|
164
|
+
}
|
165
|
+
} else {
|
166
|
+
if (walkerFn) {
|
167
|
+
ret = walker.walk(node, walkerFn) || ret;
|
168
|
+
}
|
169
|
+
}
|
170
|
+
|
171
|
+
for (i = 0; i < children.length; i += 1) {
|
172
|
+
childType = children[i];
|
173
|
+
childNode = node[childType];
|
174
|
+
if (childNode && !childNode.skipWalk) {
|
175
|
+
pathElement = { node: node, property: childType };
|
176
|
+
if (isArray(childNode)) {
|
177
|
+
childArray = [];
|
178
|
+
for (j = 0; j < childNode.length; j += 1) {
|
179
|
+
childElement = childNode[j];
|
180
|
+
pathElement.index = j;
|
181
|
+
if (childElement) {
|
182
|
+
assignNode = walker.walk(childElement, null, pathElement) || childElement;
|
183
|
+
if (isArray(assignNode.prepend)) {
|
184
|
+
pushAll(childArray, assignNode.prepend);
|
185
|
+
delete assignNode.prepend;
|
186
|
+
}
|
187
|
+
}
|
188
|
+
pushAll(childArray, assignNode);
|
189
|
+
}
|
190
|
+
node[childType] = childArray;
|
191
|
+
} else {
|
192
|
+
assignNode = walker.walk(childNode, null, pathElement) || childNode;
|
193
|
+
if (isArray(assignNode.prepend)) {
|
194
|
+
throw new Error('Internal error: attempt to prepend statements in disallowed (non-array) context');
|
195
|
+
/* if this should be allowed, this is how to solve it
|
196
|
+
tmpNode = { type: 'BlockStatement', body: [] };
|
197
|
+
pushAll(tmpNode.body, assignNode.prepend);
|
198
|
+
pushAll(tmpNode.body, assignNode);
|
199
|
+
node[childType] = tmpNode;
|
200
|
+
delete assignNode.prepend;
|
201
|
+
*/
|
202
|
+
} else {
|
203
|
+
node[childType] = assignNode;
|
204
|
+
}
|
205
|
+
}
|
206
|
+
}
|
207
|
+
}
|
208
|
+
|
209
|
+
delete node.walking;
|
210
|
+
return ret;
|
211
|
+
}
|
212
|
+
|
213
|
+
Walker.prototype = {
|
214
|
+
startWalk: function (node) {
|
215
|
+
this.path = [];
|
216
|
+
this.walk(node);
|
217
|
+
},
|
218
|
+
|
219
|
+
walk: function (node, walkFn, pathElement) {
|
220
|
+
var ret, i, seq, prefix;
|
221
|
+
|
222
|
+
walkFn = walkFn || defaultWalker;
|
223
|
+
if (this.debug) {
|
224
|
+
this.seq += 1;
|
225
|
+
this.level += 1;
|
226
|
+
seq = this.seq;
|
227
|
+
prefix = '';
|
228
|
+
for (i = 0; i < this.level; i += 1) { prefix += ' '; }
|
229
|
+
console.log(prefix + 'Enter (' + seq + '):' + node.type);
|
230
|
+
}
|
231
|
+
if (pathElement) { this.path.push(pathElement); }
|
232
|
+
ret = walkFn.call(this.scope, node, this);
|
233
|
+
if (pathElement) { this.path.pop(); }
|
234
|
+
if (this.debug) {
|
235
|
+
this.level -= 1;
|
236
|
+
console.log(prefix + 'Return (' + seq + '):' + node.type);
|
237
|
+
}
|
238
|
+
return ret;
|
239
|
+
},
|
240
|
+
|
241
|
+
startLineForNode: function (node) {
|
242
|
+
return node && node.loc && node.loc.start ? node.loc.start.line : null;
|
243
|
+
},
|
244
|
+
|
245
|
+
ancestor: function (n) {
|
246
|
+
return this.path.length > n - 1 ? this.path[this.path.length - n] : null;
|
247
|
+
},
|
248
|
+
|
249
|
+
parent: function () {
|
250
|
+
return this.ancestor(1);
|
251
|
+
},
|
252
|
+
|
253
|
+
isLabeled: function () {
|
254
|
+
var el = this.parent();
|
255
|
+
return el && el.node.type === SYNTAX.LabeledStatement.name;
|
256
|
+
}
|
257
|
+
};
|
258
|
+
|
259
|
+
/**
|
260
|
+
* mechanism to instrument code for coverage. It uses the `esprima` and
|
261
|
+
* `escodegen` libraries for JS parsing and code generation respectively.
|
262
|
+
*
|
263
|
+
* Works on `node` as well as the browser.
|
264
|
+
*
|
265
|
+
* Usage on nodejs
|
266
|
+
* ---------------
|
267
|
+
*
|
268
|
+
* var instrumenter = new require('istanbul').Instrumenter(),
|
269
|
+
* changed = instrumenter.instrumentSync('function meaningOfLife() { return 42; }', 'filename.js');
|
270
|
+
*
|
271
|
+
* Usage in a browser
|
272
|
+
* ------------------
|
273
|
+
*
|
274
|
+
* Load `esprima.js`, `escodegen.js` and `instrumenter.js` (this file) using `script` tags or other means.
|
275
|
+
*
|
276
|
+
* Create an instrumenter object as:
|
277
|
+
*
|
278
|
+
* var instrumenter = new Instrumenter(),
|
279
|
+
* changed = instrumenter.instrumentSync('function meaningOfLife() { return 42; }', 'filename.js');
|
280
|
+
*
|
281
|
+
* Aside from demonstration purposes, it is unclear why you would want to instrument code in a browser.
|
282
|
+
*
|
283
|
+
* @class Instrumenter
|
284
|
+
* @constructor
|
285
|
+
* @param {Object} options Optional. Configuration options.
|
286
|
+
* @param {String} [options.coverageVariable] the global variable name to use for
|
287
|
+
* tracking coverage. Defaults to `__coverage__`
|
288
|
+
* @param {Boolean} [options.embedSource] whether to embed the source code of every
|
289
|
+
* file as an array in the file coverage object for that file. Defaults to `false`
|
290
|
+
* @param {Boolean} [options.noCompact] emit readable code when set. Defaults to `false`
|
291
|
+
* @param {Boolean} [options.noAutoWrap] do not automatically wrap the source in
|
292
|
+
* an anonymous function before covering it. By default, code is wrapped in
|
293
|
+
* an anonymous function before it is parsed. This is done because
|
294
|
+
* some nodejs libraries have `return` statements outside of
|
295
|
+
* a function which is technically invalid Javascript and causes the parser to fail.
|
296
|
+
* This construct, however, works correctly in node since module loading
|
297
|
+
* is done in the context of an anonymous function.
|
298
|
+
*
|
299
|
+
* Note that the semantics of the code *returned* by the instrumenter does not change in any way.
|
300
|
+
* The function wrapper is "unwrapped" before the instrumented code is generated.
|
301
|
+
* @param {Object} [options.codeGenerationOptions] an object that is directly passed to the `escodegen`
|
302
|
+
* library as configuration for code generation. The `noCompact` setting is not honored when this
|
303
|
+
* option is specified
|
304
|
+
* @param {Boolean} [options.debug] assist in debugging. Currently, the only effect of
|
305
|
+
* setting this option is a pretty-print of the coverage variable. Defaults to `false`
|
306
|
+
* @param {Boolean} [options.walkDebug] assist in debugging of the AST walker used by this class.
|
307
|
+
*
|
308
|
+
*/
|
309
|
+
function Instrumenter(options) {
|
310
|
+
this.opts = options || {
|
311
|
+
debug: false,
|
312
|
+
walkDebug: false,
|
313
|
+
coverageVariable: '__coverage__',
|
314
|
+
codeGenerationOptions: undefined,
|
315
|
+
noAutoWrap: false,
|
316
|
+
noCompact: false,
|
317
|
+
embedSource: false
|
318
|
+
};
|
319
|
+
|
320
|
+
this.walker = new Walker({
|
321
|
+
ExpressionStatement: this.coverStatement,
|
322
|
+
BreakStatement: this.coverStatement,
|
323
|
+
ContinueStatement: this.coverStatement,
|
324
|
+
DebuggerStatement: this.coverStatement,
|
325
|
+
ReturnStatement: this.coverStatement,
|
326
|
+
ThrowStatement: this.coverStatement,
|
327
|
+
TryStatement: this.coverStatement,
|
328
|
+
VariableDeclaration: this.coverStatement,
|
329
|
+
IfStatement: [ this.ifBlockConverter, this.ifBranchInjector, this.coverStatement ],
|
330
|
+
ForStatement: [ this.skipInit, this.loopBlockConverter, this.coverStatement ],
|
331
|
+
ForInStatement: [ this.skipLeft, this.loopBlockConverter, this.coverStatement ],
|
332
|
+
WhileStatement: [ this.loopBlockConverter, this.coverStatement ],
|
333
|
+
DoWhileStatement: [ this.loopBlockConverter, this.coverStatement ],
|
334
|
+
SwitchStatement: [ this.switchBranchInjector, this.coverStatement ],
|
335
|
+
WithStatement: this.coverStatement,
|
336
|
+
FunctionDeclaration: [ this.coverFunction, this.coverStatement ],
|
337
|
+
FunctionExpression: this.coverFunction,
|
338
|
+
LabeledStatement: this.coverStatement,
|
339
|
+
ConditionalExpression: this.conditionalBranchInjector,
|
340
|
+
LogicalExpression: this.logicalExpressionBranchInjector,
|
341
|
+
ObjectExpression: this.maybeAddType
|
342
|
+
}, this, this.opts.walkDebug);
|
343
|
+
|
344
|
+
//unit testing purposes only
|
345
|
+
if (this.opts.backdoor && this.opts.backdoor.omitTrackerSuffix) {
|
346
|
+
this.omitTrackerSuffix = true;
|
347
|
+
}
|
348
|
+
}
|
349
|
+
|
350
|
+
Instrumenter.prototype = {
|
351
|
+
/**
|
352
|
+
* synchronous instrumentation method. Throws when illegal code is passed to it
|
353
|
+
* @method instrumentSync
|
354
|
+
* @param {String} code the code to be instrumented as a String
|
355
|
+
* @param {String} filename Optional. The name of the file from which
|
356
|
+
* the code was read. A temporary filename is generated when not specified.
|
357
|
+
* Not specifying a filename is only useful for unit tests and demonstrations
|
358
|
+
* of this library.
|
359
|
+
*/
|
360
|
+
instrumentSync: function (code, filename) {
|
361
|
+
var program;
|
362
|
+
|
363
|
+
//protect from users accidentally passing in a Buffer object instead
|
364
|
+
if (typeof code !== 'string') { throw new Error('Code must be string'); }
|
365
|
+
if (code.charAt(0) === '#') { //shebang, 'comment' it out, won't affect syntax tree locations for things we care about
|
366
|
+
code = '//' + code;
|
367
|
+
}
|
368
|
+
if (!this.opts.noAutoWrap) {
|
369
|
+
code = LEADER_WRAP + code + TRAILER_WRAP;
|
370
|
+
}
|
371
|
+
program = ESP.parse(code, { loc: true });
|
372
|
+
if (!this.opts.noAutoWrap) {
|
373
|
+
program = { type: SYNTAX.Program.name, body: program.body[0].expression.callee.body.body };
|
374
|
+
}
|
375
|
+
return this.instrumentASTSync(program, filename, code);
|
376
|
+
},
|
377
|
+
/**
|
378
|
+
* synchronous instrumentation method that instruments an AST instead.
|
379
|
+
* @method instrumentASTSync
|
380
|
+
* @param {String} program the AST to be instrumented
|
381
|
+
* @param {String} filename Optional. The name of the file from which
|
382
|
+
* the code was read. A temporary filename is generated when not specified.
|
383
|
+
* Not specifying a filename is only useful for unit tests and demonstrations
|
384
|
+
* of this library.
|
385
|
+
* @param {String} originalCode the original code corresponding to the AST,
|
386
|
+
* used for embedding the source into the coverage object
|
387
|
+
*/
|
388
|
+
instrumentASTSync: function (program, filename, originalCode) {
|
389
|
+
filename = filename || String(new Date().getTime()) + '.js';
|
390
|
+
this.coverState = {
|
391
|
+
path: filename,
|
392
|
+
s: {},
|
393
|
+
b: {},
|
394
|
+
f: {},
|
395
|
+
fnMap: {},
|
396
|
+
statementMap: {},
|
397
|
+
branchMap: {}
|
398
|
+
};
|
399
|
+
this.currentState = {
|
400
|
+
trackerVar: generateTrackerVar(filename, this.omitTrackerSuffix),
|
401
|
+
func: 0,
|
402
|
+
branch: 0,
|
403
|
+
variable: 0,
|
404
|
+
statement: 0
|
405
|
+
};
|
406
|
+
this.walker.startWalk(program);
|
407
|
+
var codegenOptions = this.opts.codeGenerationOptions || { format: { compact: !this.opts.noCompact }};
|
408
|
+
//console.log(JSON.stringify(program, undefined, 2));
|
409
|
+
return this.getPreamble(originalCode || '') + '\n' + ESPGEN.generate(program, codegenOptions) + '\n';
|
410
|
+
},
|
411
|
+
/**
|
412
|
+
* Callback based instrumentation. Note that this still executes synchronously in the same process tick
|
413
|
+
* and calls back immediately. It only provides the options for callback style error handling as
|
414
|
+
* opposed to a `try-catch` style and nothing more. Implemented as a wrapper over `instrumentSync`
|
415
|
+
*
|
416
|
+
* @method instrument
|
417
|
+
* @param {String} code the code to be instrumented as a String
|
418
|
+
* @param {String} filename Optional. The name of the file from which
|
419
|
+
* the code was read. A temporary filename is generated when not specified.
|
420
|
+
* Not specifying a filename is only useful for unit tests and demonstrations
|
421
|
+
* of this library.
|
422
|
+
* @param {Function(err, instrumentedCode)} callback - the callback function
|
423
|
+
*/
|
424
|
+
instrument: function (code, filename, callback) {
|
425
|
+
|
426
|
+
if (!callback && typeof filename === 'function') {
|
427
|
+
callback = filename;
|
428
|
+
filename = null;
|
429
|
+
}
|
430
|
+
try {
|
431
|
+
callback(null, this.instrumentSync(code, filename));
|
432
|
+
} catch (ex) {
|
433
|
+
callback(ex);
|
434
|
+
}
|
435
|
+
},
|
436
|
+
/**
|
437
|
+
* returns the file coverage object for the code that was instrumented
|
438
|
+
* just before calling this method. Note that this represents a
|
439
|
+
* "zero-coverage" object which is not even representative of the code
|
440
|
+
* being loaded in node or a browser (which would increase the statement
|
441
|
+
* counts for mainline code).
|
442
|
+
* @return {Object} a "zero-coverage" file coverage object for the code last instrumented
|
443
|
+
* by this instrumenter
|
444
|
+
*/
|
445
|
+
lastFileCoverage: function () {
|
446
|
+
return this.coverState;
|
447
|
+
},
|
448
|
+
fixColumnPositions: function (coverState) {
|
449
|
+
var offset = LEADER_WRAP.length,
|
450
|
+
fixer = function (loc) {
|
451
|
+
if (loc.start.line === 1) {
|
452
|
+
loc.start.column -= offset;
|
453
|
+
}
|
454
|
+
if (loc.end.line === 1) {
|
455
|
+
loc.end.column -= offset;
|
456
|
+
}
|
457
|
+
},
|
458
|
+
k,
|
459
|
+
obj,
|
460
|
+
i,
|
461
|
+
locations;
|
462
|
+
|
463
|
+
obj = coverState.statementMap;
|
464
|
+
for (k in obj) {
|
465
|
+
if (obj.hasOwnProperty(k)) { fixer(obj[k]); }
|
466
|
+
}
|
467
|
+
obj = coverState.fnMap;
|
468
|
+
for (k in obj) {
|
469
|
+
if (obj.hasOwnProperty(k)) { fixer(obj[k].loc); }
|
470
|
+
}
|
471
|
+
obj = coverState.branchMap;
|
472
|
+
for (k in obj) {
|
473
|
+
if (obj.hasOwnProperty(k)) {
|
474
|
+
locations = obj[k].locations;
|
475
|
+
for (i = 0; i < locations.length; i += 1) {
|
476
|
+
fixer(locations[i]);
|
477
|
+
}
|
478
|
+
}
|
479
|
+
}
|
480
|
+
},
|
481
|
+
|
482
|
+
getPreamble: function (sourceCode) {
|
483
|
+
var varName = this.opts.coverageVariable || '__coverage__',
|
484
|
+
file = this.coverState.path.replace(/\\/g, '\\\\'),
|
485
|
+
tracker = this.currentState.trackerVar,
|
486
|
+
coverState,
|
487
|
+
// return replacements using the function to ensure that the replacement is
|
488
|
+
// treated like a dumb string and not as a string with RE replacement patterns
|
489
|
+
replacer = function (s) {
|
490
|
+
return function () { return s; };
|
491
|
+
},
|
492
|
+
code;
|
493
|
+
if (!this.opts.noAutoWrap) {
|
494
|
+
this.fixColumnPositions(this.coverState);
|
495
|
+
}
|
496
|
+
if (this.opts.embedSource) {
|
497
|
+
this.coverState.code = sourceCode.split(/\r?\n/);
|
498
|
+
}
|
499
|
+
coverState = this.opts.debug ? JSON.stringify(this.coverState, undefined, 4) : JSON.stringify(this.coverState);
|
500
|
+
code = [
|
501
|
+
"if (typeof %GLOBAL% === 'undefined') { %GLOBAL% = {}; }",
|
502
|
+
"if (!%GLOBAL%['%FILE%']) {",
|
503
|
+
" %GLOBAL%['%FILE%'] = %OBJECT%;",
|
504
|
+
"}",
|
505
|
+
"var %VAR% = %GLOBAL%['%FILE%'];"
|
506
|
+
].join("\n")
|
507
|
+
.replace(/%VAR%/g, replacer(tracker))
|
508
|
+
.replace(/%GLOBAL%/g, replacer(varName))
|
509
|
+
.replace(/%FILE%/g, replacer(file))
|
510
|
+
.replace(/%OBJECT%/g, replacer(coverState));
|
511
|
+
return code;
|
512
|
+
},
|
513
|
+
|
514
|
+
convertToBlock: function (node) {
|
515
|
+
if (!node) {
|
516
|
+
return { type: 'BlockStatement', body: [] };
|
517
|
+
} else if (node.type === 'BlockStatement') {
|
518
|
+
return node;
|
519
|
+
} else {
|
520
|
+
return { type: 'BlockStatement', body: [ node ] };
|
521
|
+
}
|
522
|
+
},
|
523
|
+
|
524
|
+
ifBlockConverter: function (node) {
|
525
|
+
node.consequent = this.convertToBlock(node.consequent);
|
526
|
+
node.alternate = this.convertToBlock(node.alternate);
|
527
|
+
},
|
528
|
+
|
529
|
+
loopBlockConverter: function (node) {
|
530
|
+
node.body = this.convertToBlock(node.body);
|
531
|
+
},
|
532
|
+
|
533
|
+
statementName: function (location, initValue) {
|
534
|
+
initValue = initValue || 0;
|
535
|
+
var sName;
|
536
|
+
this.currentState.statement += 1;
|
537
|
+
sName = this.currentState.statement;
|
538
|
+
this.coverState.statementMap[sName] = location;
|
539
|
+
this.coverState.s[sName] = initValue;
|
540
|
+
return sName;
|
541
|
+
},
|
542
|
+
|
543
|
+
skipInit: function (node /*, walker */) {
|
544
|
+
if (node.init) {
|
545
|
+
node.init.skipWalk = true;
|
546
|
+
}
|
547
|
+
},
|
548
|
+
|
549
|
+
skipLeft: function (node /*, walker */) {
|
550
|
+
node.left.skipWalk = true;
|
551
|
+
},
|
552
|
+
|
553
|
+
isUseStrictExpression: function (node) {
|
554
|
+
return node && node.type === SYNTAX.ExpressionStatement.name &&
|
555
|
+
node.expression && node.expression.type === SYNTAX.Literal.name &&
|
556
|
+
node.expression.value === 'use strict';
|
557
|
+
},
|
558
|
+
coverStatement: function (node, walker) {
|
559
|
+
var sName,
|
560
|
+
incrStatementCount,
|
561
|
+
grandParent;
|
562
|
+
|
563
|
+
if (this.isUseStrictExpression(node)) {
|
564
|
+
grandParent = walker.ancestor(2);
|
565
|
+
if (grandParent) {
|
566
|
+
if ((grandParent.node.type === SYNTAX.FunctionExpression.name ||
|
567
|
+
grandParent.node.type === SYNTAX.FunctionDeclaration.name) &&
|
568
|
+
walker.parent().node.body[0] === node) {
|
569
|
+
return;
|
570
|
+
}
|
571
|
+
}
|
572
|
+
}
|
573
|
+
if (node.type === SYNTAX.FunctionDeclaration.name) {
|
574
|
+
sName = this.statementName(node.loc, 1);
|
575
|
+
} else {
|
576
|
+
sName = this.statementName(node.loc);
|
577
|
+
incrStatementCount = astgen.statement(
|
578
|
+
astgen.postIncrement(
|
579
|
+
astgen.subscript(
|
580
|
+
astgen.dot(astgen.variable(this.currentState.trackerVar), astgen.variable('s')),
|
581
|
+
astgen.stringLiteral(sName)
|
582
|
+
)
|
583
|
+
)
|
584
|
+
);
|
585
|
+
this.splice(incrStatementCount, node, walker);
|
586
|
+
}
|
587
|
+
},
|
588
|
+
|
589
|
+
splice: function (statements, node, walker) {
|
590
|
+
var targetNode = walker.isLabeled() ? walker.parent().node : node;
|
591
|
+
targetNode.prepend = targetNode.prepend || [];
|
592
|
+
pushAll(targetNode.prepend, statements);
|
593
|
+
},
|
594
|
+
|
595
|
+
functionName: function (node, line, location) {
|
596
|
+
this.currentState.func += 1;
|
597
|
+
var id = this.currentState.func,
|
598
|
+
name = node.id ? node.id.name : '(anonymous_' + id + ')';
|
599
|
+
this.coverState.fnMap[id] = { name: name, line: line, loc: location };
|
600
|
+
this.coverState.f[id] = 0;
|
601
|
+
return id;
|
602
|
+
},
|
603
|
+
|
604
|
+
coverFunction: function (node, walker) {
|
605
|
+
var id = this.functionName(node, walker.startLineForNode(node), {
|
606
|
+
start: node.loc.start,
|
607
|
+
end: { line: node.body.loc.start.line, column: node.body.loc.start.column }
|
608
|
+
}),
|
609
|
+
body = node.body,
|
610
|
+
blockBody = body.body,
|
611
|
+
popped;
|
612
|
+
|
613
|
+
if (blockBody.length > 0 && this.isUseStrictExpression(blockBody[0])) {
|
614
|
+
popped = blockBody.shift();
|
615
|
+
}
|
616
|
+
blockBody.unshift(
|
617
|
+
astgen.statement(
|
618
|
+
astgen.postIncrement(
|
619
|
+
astgen.subscript(
|
620
|
+
astgen.dot(astgen.variable(this.currentState.trackerVar), astgen.variable('f')),
|
621
|
+
astgen.stringLiteral(id)
|
622
|
+
)
|
623
|
+
)
|
624
|
+
)
|
625
|
+
);
|
626
|
+
if (popped) {
|
627
|
+
blockBody.unshift(popped);
|
628
|
+
}
|
629
|
+
},
|
630
|
+
|
631
|
+
branchName: function (type, startLine, pathLocations) {
|
632
|
+
var bName,
|
633
|
+
paths = [],
|
634
|
+
locations = [],
|
635
|
+
i;
|
636
|
+
this.currentState.branch += 1;
|
637
|
+
bName = this.currentState.branch;
|
638
|
+
for (i = 0; i < pathLocations.length; i += 1) {
|
639
|
+
paths.push(0);
|
640
|
+
locations.push(pathLocations[i]);
|
641
|
+
}
|
642
|
+
this.coverState.b[bName] = paths;
|
643
|
+
this.coverState.branchMap[bName] = { line: startLine, type: type, locations: locations };
|
644
|
+
return bName;
|
645
|
+
},
|
646
|
+
|
647
|
+
branchIncrementExprAst: function (varName, branchIndex, down) {
|
648
|
+
var ret = astgen.postIncrement(
|
649
|
+
astgen.subscript(
|
650
|
+
astgen.subscript(
|
651
|
+
astgen.dot(astgen.variable(this.currentState.trackerVar), astgen.variable('b')),
|
652
|
+
astgen.stringLiteral(varName)
|
653
|
+
),
|
654
|
+
astgen.numericLiteral(branchIndex)
|
655
|
+
),
|
656
|
+
down
|
657
|
+
);
|
658
|
+
return ret;
|
659
|
+
},
|
660
|
+
|
661
|
+
locationsForNodes: function (nodes) {
|
662
|
+
var ret = [],
|
663
|
+
i;
|
664
|
+
for (i = 0; i < nodes.length; i += 1) {
|
665
|
+
ret.push(nodes[i].loc);
|
666
|
+
}
|
667
|
+
return ret;
|
668
|
+
},
|
669
|
+
|
670
|
+
ifBranchInjector: function (node, walker) {
|
671
|
+
var line = node.loc.start.line,
|
672
|
+
col = node.loc.start.column,
|
673
|
+
start = { line: line, column: col },
|
674
|
+
end = { line: line, column: col },
|
675
|
+
bName = this.branchName('if', walker.startLineForNode(node), [
|
676
|
+
{ start: start, end: end },
|
677
|
+
{ start: start, end: end }
|
678
|
+
]),
|
679
|
+
thenBody = node.consequent.body,
|
680
|
+
elseBody = node.alternate.body;
|
681
|
+
thenBody.unshift(astgen.statement(this.branchIncrementExprAst(bName, 0)));
|
682
|
+
elseBody.unshift(astgen.statement(this.branchIncrementExprAst(bName, 1)));
|
683
|
+
},
|
684
|
+
|
685
|
+
switchBranchInjector: function (node, walker) {
|
686
|
+
var cases = node.cases,
|
687
|
+
bName,
|
688
|
+
i;
|
689
|
+
|
690
|
+
if (!(cases && cases.length > 0)) {
|
691
|
+
return;
|
692
|
+
}
|
693
|
+
bName = this.branchName('switch', walker.startLineForNode(node), this.locationsForNodes(cases));
|
694
|
+
for (i = 0; i < cases.length; i += 1) {
|
695
|
+
cases[i].consequent.unshift(astgen.statement(this.branchIncrementExprAst(bName, i)));
|
696
|
+
}
|
697
|
+
},
|
698
|
+
|
699
|
+
conditionalBranchInjector: function (node, walker) {
|
700
|
+
var bName = this.branchName('cond-expr', walker.startLineForNode(node), this.locationsForNodes([ node.consequent, node.alternate ])),
|
701
|
+
ast1 = this.branchIncrementExprAst(bName, 0),
|
702
|
+
ast2 = this.branchIncrementExprAst(bName, 1);
|
703
|
+
|
704
|
+
node.consequent = astgen.sequence(ast1, node.consequent);
|
705
|
+
node.alternate = astgen.sequence(ast2, node.alternate);
|
706
|
+
},
|
707
|
+
|
708
|
+
logicalExpressionBranchInjector: function (node, walker) {
|
709
|
+
var parent = walker.parent(),
|
710
|
+
leaves = [],
|
711
|
+
bName,
|
712
|
+
tuple,
|
713
|
+
i;
|
714
|
+
|
715
|
+
if (parent && parent.node.type === SYNTAX.LogicalExpression.name) {
|
716
|
+
//already covered
|
717
|
+
return;
|
718
|
+
}
|
719
|
+
|
720
|
+
this.findLeaves(node, leaves);
|
721
|
+
bName = this.branchName('binary-expr',
|
722
|
+
walker.startLineForNode(node),
|
723
|
+
this.locationsForNodes(leaves.map(function (item) { return item.node; }))
|
724
|
+
);
|
725
|
+
for (i = 0; i < leaves.length; i += 1) {
|
726
|
+
tuple = leaves[i];
|
727
|
+
tuple.parent[tuple.property] = astgen.sequence(this.branchIncrementExprAst(bName, i), tuple.node);
|
728
|
+
}
|
729
|
+
},
|
730
|
+
|
731
|
+
findLeaves: function (node, accumulator, parent, property) {
|
732
|
+
if (node.type === SYNTAX.LogicalExpression.name) {
|
733
|
+
this.findLeaves(node.left, accumulator, node, 'left');
|
734
|
+
this.findLeaves(node.right, accumulator, node, 'right');
|
735
|
+
} else {
|
736
|
+
accumulator.push({ node: node, parent: parent, property: property });
|
737
|
+
}
|
738
|
+
},
|
739
|
+
maybeAddType: function (node /*, walker */) {
|
740
|
+
var props = node.properties,
|
741
|
+
i,
|
742
|
+
child;
|
743
|
+
for (i = 0; i < props.length; i += 1) {
|
744
|
+
child = props[i];
|
745
|
+
if (!child.type) {
|
746
|
+
child.type = SYNTAX.Property.name;
|
747
|
+
}
|
748
|
+
}
|
749
|
+
}
|
750
|
+
};
|
751
|
+
|
752
|
+
if (isNode) {
|
753
|
+
module.exports = Instrumenter;
|
754
|
+
} else {
|
755
|
+
window.Instrumenter = Instrumenter;
|
756
|
+
}
|
757
|
+
|
758
|
+
}(typeof module !== 'undefined' && typeof module.exports !== 'undefined' && typeof exports !== 'undefined'));
|
759
|
+
|