exercism-analysis 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/exercism-analysis.gemspec +30 -0
- data/lib/exercism-analysis.rb +38 -0
- data/lib/exercism-analysis/adapters/adapter.rb +23 -0
- data/lib/exercism-analysis/adapters/clojure.rb +13 -0
- data/lib/exercism-analysis/adapters/go.rb +19 -0
- data/lib/exercism-analysis/adapters/javascript.rb +13 -0
- data/lib/exercism-analysis/adapters/python.rb +13 -0
- data/lib/exercism-analysis/adapters/ruby.rb +19 -0
- data/lib/exercism-analysis/analysis.rb +18 -0
- data/lib/exercism-analysis/analyzers/analyzer.rb +54 -0
- data/lib/exercism-analysis/analyzers/clojure/kibit.rb +25 -0
- data/lib/exercism-analysis/analyzers/go/golint.rb +23 -0
- data/lib/exercism-analysis/analyzers/javascript/jslint.rb +24 -0
- data/lib/exercism-analysis/analyzers/python/pylint.rb +24 -0
- data/lib/exercism-analysis/analyzers/ruby/control_flow.rb +21 -0
- data/lib/exercism-analysis/analyzers/ruby/enumerable_condition.rb +21 -0
- data/lib/exercism-analysis/analyzers/ruby/for_loop.rb +29 -0
- data/lib/exercism-analysis/analyzers/ruby/indentation.rb +21 -0
- data/lib/exercism-analysis/analyzers/ruby/iter_mutation.rb +37 -0
- data/lib/exercism-analysis/analyzers/ruby/output.rb +20 -0
- data/lib/exercism-analysis/analyzers/ruby/range.rb +28 -0
- data/lib/exercism-analysis/analyzers/ruby/roodi.rb +19 -0
- data/lib/exercism-analysis/analyzers/ruby/send.rb +25 -0
- data/lib/exercism-analysis/analyzers/ruby/shebang.rb +23 -0
- data/lib/exercism-analysis/analyzers/ruby/tab.rb +38 -0
- data/lib/exercism-analysis/processors/call_processor.rb +39 -0
- data/lib/exercism-analysis/processors/control_flow_processor.rb +27 -0
- data/lib/exercism-analysis/processors/enumerable_condition_processor.rb +31 -0
- data/lib/exercism-analysis/processors/for_loop_processor.rb +21 -0
- data/lib/exercism-analysis/processors/indentation_processor.rb +69 -0
- data/lib/exercism-analysis/processors/iter_mutation_processor.rb +50 -0
- data/lib/exercism-analysis/processors/processor.rb +34 -0
- data/lib/exercism-analysis/processors/range_processor.rb +23 -0
- data/lib/exercism-analysis/processors/send_processor.rb +23 -0
- data/lib/exercism-analysis/templates/each_to_map.rb +29 -0
- data/lib/exercism-analysis/templates/each_to_select.rb +31 -0
- data/lib/exercism-analysis/templates/range_exclusive.rb +19 -0
- data/lib/exercism-analysis/templates/template.rb +29 -0
- data/vendor/clojure/kibit-runner/LICENSE +214 -0
- data/vendor/clojure/kibit-runner/project.clj +10 -0
- data/vendor/clojure/kibit-runner/src/kibit_runner/core.clj +17 -0
- data/vendor/clojure/kibit-runner/target/kibit-runner-0.1.0-SNAPSHOT-standalone.jar +0 -0
- data/vendor/clojure/kibit-runner/target/kibit-runner-0.1.0-SNAPSHOT.jar +0 -0
- data/vendor/clojure/kibit-runner/target/stale/extract-native.dependencies +1 -0
- data/vendor/go/src/github.com/golang/lint/LICENSE +27 -0
- data/vendor/go/src/github.com/golang/lint/README +59 -0
- data/vendor/go/src/github.com/golang/lint/golint/golint.go +67 -0
- data/vendor/go/src/github.com/golang/lint/lint.go +1061 -0
- data/vendor/go/src/runner/golint_runner.go +23 -0
- data/vendor/javascript/jshint_runner.js +6 -0
- data/vendor/javascript/node_modules/jshint/README.md +47 -0
- data/vendor/javascript/node_modules/jshint/bin/apply +6 -0
- data/vendor/javascript/node_modules/jshint/bin/build +36 -0
- data/vendor/javascript/node_modules/jshint/bin/changelog +36 -0
- data/vendor/javascript/node_modules/jshint/bin/jshint +3 -0
- data/vendor/javascript/node_modules/jshint/bin/land +34 -0
- data/vendor/javascript/node_modules/jshint/data/ascii-identifier-data.js +22 -0
- data/vendor/javascript/node_modules/jshint/data/non-ascii-identifier-part-only.js +1570 -0
- data/vendor/javascript/node_modules/jshint/data/non-ascii-identifier-start.js +48477 -0
- data/vendor/javascript/node_modules/jshint/dist/jshint-rhino.js +60642 -0
- data/vendor/javascript/node_modules/jshint/dist/jshint.js +60525 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/README.md +196 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/cli.js +1139 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/cat.js +17 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/command.js +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/echo.js +54 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/glob.js +6 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/long_desc.js +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/progress.js +11 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/sort.js +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/spinner.js +9 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/static.coffee +27 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/static.js +25 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/index.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/LICENSE +27 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/README.md +250 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/examples/g.js +9 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/examples/usr-local.js +9 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/glob.js +728 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/node_modules/inherits/LICENSE +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/node_modules/inherits/README.md +42 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/node_modules/inherits/inherits.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/node_modules/inherits/inherits_browser.js +23 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/node_modules/inherits/package.json +51 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/node_modules/inherits/test.js +25 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/package.json +58 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/00-setup.js +176 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/bash-comparison.js +63 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/bash-results.json +351 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/cwd-test.js +55 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/globstar-match.js +19 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/mark.js +118 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/new-glob-optional-options.js +10 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/nocase-nomagic.js +113 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/pause-resume.js +73 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/readme-issue.js +36 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/root-nomount.js +39 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/root.js +46 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/stat.js +32 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/zz-cleanup.js +11 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/package.json +70 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/LICENCE +19 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/README.md +33 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/index.js +86 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/node_modules/date-now/LICENCE +19 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/node_modules/date-now/README.md +45 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/node_modules/date-now/index.js +5 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/node_modules/date-now/package.json +89 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/node_modules/date-now/seed.js +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/node_modules/date-now/test/index.js +28 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/node_modules/date-now/test/static/index.html +10 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/package.json +88 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/test/index.js +67 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/test/static/index.html +12 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/test/static/test-adapter.js +53 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/Gruntfile.js +48 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/LICENSE-MIT +22 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/README.md +75 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/lib/exit.js +41 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/package.json +69 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/exit_test.js +121 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/10-stderr.txt +10 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/10-stdout-stderr.txt +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/10-stdout.txt +10 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/100-stderr.txt +100 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/100-stdout-stderr.txt +200 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/100-stdout.txt +100 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/1000-stderr.txt +1000 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/1000-stdout-stderr.txt +2000 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/1000-stdout.txt +1000 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/create-files.sh +8 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/log-broken.js +23 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/log.js +25 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/LICENSE +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/README.md +83 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/lib/CollectingHandler.js +55 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/lib/FeedHandler.js +95 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/lib/Parser.js +337 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/lib/ProxyHandler.js +27 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/lib/Stream.js +35 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/lib/Tokenizer.js +891 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/lib/WritableStream.js +21 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/lib/index.js +68 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domelementtype/LICENSE +11 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domelementtype/index.js +14 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domelementtype/package.json +40 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domelementtype/readme.md +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/LICENSE +11 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/index.js +211 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/package.json +68 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/readme.md +102 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/01-basic.json +57 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/02-single_tag_1.json +21 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/03-single_tag_2.json +21 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/04-unescaped_in_script.json +27 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/05-tags_in_comment.json +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/06-comment_in_script.json +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/07-unescaped_in_style.json +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/08-extra_spaces_in_tag.json +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/09-unquoted_attrib.json +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/10-singular_attribute.json +15 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/11-text_outside_tags.json +40 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/12-text_only.json +11 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/13-comment_in_text.json +19 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/14-comment_in_text_in_script.json +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/15-non-verbose.json +22 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/16-normalize_whitespace.json +47 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/17-xml_namespace.json +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/18-enforce_empty_tags.json +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/19-ignore_empty_tags.json +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/20-template_script_tags.json +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/21-conditional_comments.json +15 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/22-lowercase_tags.json +41 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/23-dom-lvl1.json +121 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/tests.js +58 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/LICENSE +11 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/index.js +14 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/lib/helpers.js +141 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/lib/legacy.js +87 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/lib/manipulation.js +77 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/lib/querying.js +94 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/lib/stringify.js +93 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/lib/traversal.js +24 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/package.json +71 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/readme.md +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/test/fixture.js +6 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/test/tests/helpers.js +89 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/test/tests/legacy.js +119 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/test/utils.js +9 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/LICENSE +11 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/index.js +31 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/lib/decode.js +72 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/lib/decode_codepoint.js +26 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/lib/encode.js +48 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/maps/decode.json +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/maps/entities.json +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/maps/legacy.json +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/maps/xml.json +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/package.json +79 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/readme.md +31 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/test/mocha.opts +2 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/test/test.js +150 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/LICENSE +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/README.md +15 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/duplex.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/float.patch +923 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/lib/_stream_duplex.js +89 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/lib/_stream_passthrough.js +46 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/lib/_stream_readable.js +944 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/lib/_stream_transform.js +209 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/lib/_stream_writable.js +472 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/core-util-is/README.md +3 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/core-util-is/float.patch +604 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +107 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/core-util-is/package.json +53 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/core-util-is/util.js +106 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/inherits/LICENSE +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/inherits/README.md +42 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/inherits/inherits.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/inherits/inherits_browser.js +23 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/inherits/package.json +51 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/inherits/test.js +25 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/isarray/README.md +54 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/isarray/build/build.js +209 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/isarray/component.json +19 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/isarray/index.js +3 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/isarray/package.json +54 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/string_decoder/LICENSE +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/string_decoder/README.md +7 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/string_decoder/index.js +200 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/string_decoder/package.json +53 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/package.json +68 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/passthrough.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/readable.js +7 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/transform.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/writable.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/package.json +90 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/01-events.js +9 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/02-stream.js +23 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/03-feed.js +19 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Documents/Atom_Example.xml +25 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Documents/Attributes.html +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Documents/Basic.html +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Documents/RDF_Example.xml +63 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Documents/RSS_Example.xml +48 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/01-simple.json +44 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/02-template.json +63 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/03-lowercase_tags.json +46 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/04-cdata.json +50 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/05-cdata-special.json +35 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/06-leading-lt.json +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/07-self-closing.json +67 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/08-implicit-close-tags.json +59 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/09-attributes.json +68 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/10-crazy-attrib.json +52 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/11-script_in_script.json +54 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/12-long-comment-end.json +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/13-long-cdata-end.json +22 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/14-implicit-open-tags.json +27 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/15-lt-whitespace.json +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/16-double_attribs.json +45 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/17-numeric_entities.json +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/18-legacy_entities.json +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/19-named_entities.json +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/20-xml_entities.json +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/21-entity_in_attribute.json +38 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/22-double_brackets.json +41 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/23-legacy_entity_fail.json +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/24-special_special.json +133 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/25-empty_tag_name.json +13 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/26-not-quite-closed.json +35 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/27-entities_in_attributes.json +62 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/28-cdata_in_html.json +9 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/29-comment_edge-cases.json +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/30-cdata_edge-cases.json +22 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Feeds/01-rss.js +34 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Feeds/02-atom.js +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Feeds/03-rdf.js +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Stream/01-basic.json +83 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Stream/02-RSS.json +1093 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Stream/03-Atom.json +644 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Stream/04-RDF.json +1399 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Stream/05-Attributes.json +354 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/api.js +63 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/test-helper.js +83 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/LICENSE +23 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/README.md +218 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/minimatch.js +1061 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS +14 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/lru-cache/LICENSE +23 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/lru-cache/README.md +97 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js +252 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/lru-cache/package.json +50 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/lru-cache/test/basic.js +369 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/lru-cache/test/foreach.js +52 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js +50 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/sigmund/LICENSE +27 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/sigmund/README.md +53 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/sigmund/bench.js +283 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/sigmund/package.json +58 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/sigmund/sigmund.js +39 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/sigmund/test/basic.js +24 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/package.json +57 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/test/basic.js +399 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/test/brace-expand.js +33 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/test/caching.js +14 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/test/defaults.js +274 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/test/extglob-ending-with-state-char.js +8 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/LICENSE +26 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/README.md +569 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/bin/shjs +51 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/global.js +3 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/make.js +47 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/package.json +61 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/scripts/generate-docs.js +21 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/scripts/run-tests.js +50 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/shell.js +157 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/cat.js +43 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/cd.js +19 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/chmod.js +208 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/common.js +203 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/cp.js +201 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/dirs.js +191 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/echo.js +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/error.js +10 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/exec.js +181 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/find.js +51 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/grep.js +52 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/ln.js +53 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/ls.js +126 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/mkdir.js +68 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/mv.js +80 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/popd.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/pushd.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/pwd.js +11 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/rm.js +145 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/sed.js +43 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/tempdir.js +56 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/test.js +85 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/to.js +29 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/toEnd.js +29 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/which.js +83 -0
- data/vendor/javascript/node_modules/jshint/node_modules/strip-json-comments/cli.js +41 -0
- data/vendor/javascript/node_modules/jshint/node_modules/strip-json-comments/package.json +76 -0
- data/vendor/javascript/node_modules/jshint/node_modules/strip-json-comments/readme.md +74 -0
- data/vendor/javascript/node_modules/jshint/node_modules/strip-json-comments/strip-json-comments.js +64 -0
- data/vendor/javascript/node_modules/jshint/node_modules/underscore/LICENSE +23 -0
- data/vendor/javascript/node_modules/jshint/node_modules/underscore/README.md +22 -0
- data/vendor/javascript/node_modules/jshint/node_modules/underscore/package.json +66 -0
- data/vendor/javascript/node_modules/jshint/node_modules/underscore/underscore-min.js +6 -0
- data/vendor/javascript/node_modules/jshint/node_modules/underscore/underscore.js +1343 -0
- data/vendor/javascript/node_modules/jshint/package.json +80 -0
- data/vendor/javascript/node_modules/jshint/src/cli.js +731 -0
- data/vendor/javascript/node_modules/jshint/src/jshint.js +5023 -0
- data/vendor/javascript/node_modules/jshint/src/lex.js +1650 -0
- data/vendor/javascript/node_modules/jshint/src/messages.js +223 -0
- data/vendor/javascript/node_modules/jshint/src/platforms/rhino.js +115 -0
- data/vendor/javascript/node_modules/jshint/src/reg.js +38 -0
- data/vendor/javascript/node_modules/jshint/src/reporters/checkstyle.js +81 -0
- data/vendor/javascript/node_modules/jshint/src/reporters/default.js +34 -0
- data/vendor/javascript/node_modules/jshint/src/reporters/jslint_xml.js +57 -0
- data/vendor/javascript/node_modules/jshint/src/reporters/non_error.js +52 -0
- data/vendor/javascript/node_modules/jshint/src/state.js +28 -0
- data/vendor/javascript/node_modules/jshint/src/style.js +143 -0
- data/vendor/javascript/node_modules/jshint/src/vars.js +658 -0
- data/vendor/python/astroid/COPYING +339 -0
- data/vendor/python/astroid/COPYING.LESSER +510 -0
- data/vendor/python/astroid/ChangeLog +574 -0
- data/vendor/python/astroid/MANIFEST.in +9 -0
- data/vendor/python/astroid/README +56 -0
- data/vendor/python/astroid/README.Python3 +26 -0
- data/vendor/python/astroid/__init__.py +118 -0
- data/vendor/python/astroid/__init__.pyc +0 -0
- data/vendor/python/astroid/__pkginfo__.py +48 -0
- data/vendor/python/astroid/__pkginfo__.pyc +0 -0
- data/vendor/python/astroid/announce.txt +23 -0
- data/vendor/python/astroid/as_string.py +496 -0
- data/vendor/python/astroid/as_string.pyc +0 -0
- data/vendor/python/astroid/bases.py +618 -0
- data/vendor/python/astroid/bases.pyc +0 -0
- data/vendor/python/astroid/brain/py2gi.py +159 -0
- data/vendor/python/astroid/brain/py2gi.pyc +0 -0
- data/vendor/python/astroid/brain/py2mechanize.py +20 -0
- data/vendor/python/astroid/brain/py2mechanize.pyc +0 -0
- data/vendor/python/astroid/brain/py2qt4.py +25 -0
- data/vendor/python/astroid/brain/py2qt4.pyc +0 -0
- data/vendor/python/astroid/brain/py2stdlib.py +252 -0
- data/vendor/python/astroid/brain/py2stdlib.pyc +0 -0
- data/vendor/python/astroid/builder.py +238 -0
- data/vendor/python/astroid/builder.pyc +0 -0
- data/vendor/python/astroid/exceptions.py +51 -0
- data/vendor/python/astroid/exceptions.pyc +0 -0
- data/vendor/python/astroid/inference.py +393 -0
- data/vendor/python/astroid/inference.pyc +0 -0
- data/vendor/python/astroid/inspector.py +275 -0
- data/vendor/python/astroid/manager.py +336 -0
- data/vendor/python/astroid/manager.pyc +0 -0
- data/vendor/python/astroid/mixins.py +122 -0
- data/vendor/python/astroid/mixins.pyc +0 -0
- data/vendor/python/astroid/node_classes.py +928 -0
- data/vendor/python/astroid/node_classes.pyc +0 -0
- data/vendor/python/astroid/nodes.py +73 -0
- data/vendor/python/astroid/nodes.pyc +0 -0
- data/vendor/python/astroid/protocols.py +322 -0
- data/vendor/python/astroid/protocols.pyc +0 -0
- data/vendor/python/astroid/raw_building.py +361 -0
- data/vendor/python/astroid/raw_building.pyc +0 -0
- data/vendor/python/astroid/rebuilder.py +954 -0
- data/vendor/python/astroid/rebuilder.pyc +0 -0
- data/vendor/python/astroid/scoped_nodes.py +1118 -0
- data/vendor/python/astroid/scoped_nodes.pyc +0 -0
- data/vendor/python/astroid/setup.py +184 -0
- data/vendor/python/astroid/tox.ini +10 -0
- data/vendor/python/astroid/utils.py +236 -0
- data/vendor/python/astroid/utils.pyc +0 -0
- data/vendor/python/logilab/__init__.py +0 -0
- data/vendor/python/logilab/__init__.pyc +0 -0
- data/vendor/python/logilab/common/COPYING +339 -0
- data/vendor/python/logilab/common/COPYING.LESSER +510 -0
- data/vendor/python/logilab/common/ChangeLog +1517 -0
- data/vendor/python/logilab/common/MANIFEST.in +13 -0
- data/vendor/python/logilab/common/README +185 -0
- data/vendor/python/logilab/common/README.Python3 +29 -0
- data/vendor/python/logilab/common/__init__.py +171 -0
- data/vendor/python/logilab/common/__init__.pyc +0 -0
- data/vendor/python/logilab/common/__pkginfo__.py +53 -0
- data/vendor/python/logilab/common/__pkginfo__.pyc +0 -0
- data/vendor/python/logilab/common/announce.txt +25 -0
- data/vendor/python/logilab/common/bin/pytest +7 -0
- data/vendor/python/logilab/common/bin/pytest.bat +17 -0
- data/vendor/python/logilab/common/cache.py +114 -0
- data/vendor/python/logilab/common/changelog.py +236 -0
- data/vendor/python/logilab/common/changelog.pyc +0 -0
- data/vendor/python/logilab/common/clcommands.py +332 -0
- data/vendor/python/logilab/common/cli.py +208 -0
- data/vendor/python/logilab/common/compat.py +243 -0
- data/vendor/python/logilab/common/compat.pyc +0 -0
- data/vendor/python/logilab/common/configuration.py +1094 -0
- data/vendor/python/logilab/common/configuration.pyc +0 -0
- data/vendor/python/logilab/common/contexts.py +5 -0
- data/vendor/python/logilab/common/corbautils.py +117 -0
- data/vendor/python/logilab/common/daemon.py +100 -0
- data/vendor/python/logilab/common/date.py +333 -0
- data/vendor/python/logilab/common/dbf.py +229 -0
- data/vendor/python/logilab/common/debugger.py +210 -0
- data/vendor/python/logilab/common/decorators.py +281 -0
- data/vendor/python/logilab/common/decorators.pyc +0 -0
- data/vendor/python/logilab/common/deprecation.py +188 -0
- data/vendor/python/logilab/common/deprecation.pyc +0 -0
- data/vendor/python/logilab/common/fileutils.py +402 -0
- data/vendor/python/logilab/common/graph.py +276 -0
- data/vendor/python/logilab/common/graph.pyc +0 -0
- data/vendor/python/logilab/common/hg.py +130 -0
- data/vendor/python/logilab/common/interface.py +71 -0
- data/vendor/python/logilab/common/interface.pyc +0 -0
- data/vendor/python/logilab/common/logging_ext.py +193 -0
- data/vendor/python/logilab/common/modutils.py +695 -0
- data/vendor/python/logilab/common/modutils.pyc +0 -0
- data/vendor/python/logilab/common/optik_ext.py +391 -0
- data/vendor/python/logilab/common/optik_ext.pyc +0 -0
- data/vendor/python/logilab/common/optparser.py +90 -0
- data/vendor/python/logilab/common/proc.py +277 -0
- data/vendor/python/logilab/common/pyro_ext.py +180 -0
- data/vendor/python/logilab/common/pytest.py +1177 -0
- data/vendor/python/logilab/common/python-logilab-common.spec +184 -0
- data/vendor/python/logilab/common/registry.py +1113 -0
- data/vendor/python/logilab/common/setup.cfg +3 -0
- data/vendor/python/logilab/common/setup.py +189 -0
- data/vendor/python/logilab/common/shellutils.py +455 -0
- data/vendor/python/logilab/common/sphinx_ext.py +87 -0
- data/vendor/python/logilab/common/sphinxutils.py +122 -0
- data/vendor/python/logilab/common/table.py +925 -0
- data/vendor/python/logilab/common/tasksqueue.py +100 -0
- data/vendor/python/logilab/common/textutils.py +534 -0
- data/vendor/python/logilab/common/textutils.pyc +0 -0
- data/vendor/python/logilab/common/tree.py +369 -0
- data/vendor/python/logilab/common/tree.pyc +0 -0
- data/vendor/python/logilab/common/umessage.py +190 -0
- data/vendor/python/logilab/common/ureports/__init__.py +174 -0
- data/vendor/python/logilab/common/ureports/__init__.pyc +0 -0
- data/vendor/python/logilab/common/ureports/docbook_writer.py +139 -0
- data/vendor/python/logilab/common/ureports/html_writer.py +131 -0
- data/vendor/python/logilab/common/ureports/html_writer.pyc +0 -0
- data/vendor/python/logilab/common/ureports/nodes.py +201 -0
- data/vendor/python/logilab/common/ureports/nodes.pyc +0 -0
- data/vendor/python/logilab/common/ureports/text_writer.py +140 -0
- data/vendor/python/logilab/common/ureports/text_writer.pyc +0 -0
- data/vendor/python/logilab/common/urllib2ext.py +87 -0
- data/vendor/python/logilab/common/vcgutils.py +216 -0
- data/vendor/python/logilab/common/visitor.py +107 -0
- data/vendor/python/logilab/common/visitor.pyc +0 -0
- data/vendor/python/logilab/common/xmlrpcutils.py +131 -0
- data/vendor/python/logilab/common/xmlutils.py +61 -0
- data/vendor/python/pylint/CONTRIBUTORS.txt +38 -0
- data/vendor/python/pylint/COPYING +340 -0
- data/vendor/python/pylint/ChangeLog +1437 -0
- data/vendor/python/pylint/DEPENDS +3 -0
- data/vendor/python/pylint/MANIFEST.in +14 -0
- data/vendor/python/pylint/README +50 -0
- data/vendor/python/pylint/README.Python3 +37 -0
- data/vendor/python/pylint/__init__.py +44 -0
- data/vendor/python/pylint/__init__.pyc +0 -0
- data/vendor/python/pylint/__main__.py +3 -0
- data/vendor/python/pylint/__pkginfo__.py +74 -0
- data/vendor/python/pylint/__pkginfo__.pyc +0 -0
- data/vendor/python/pylint/bin/epylint +3 -0
- data/vendor/python/pylint/bin/epylint.bat +5 -0
- data/vendor/python/pylint/bin/pylint +3 -0
- data/vendor/python/pylint/bin/pylint-gui +3 -0
- data/vendor/python/pylint/bin/pylint-gui.bat +5 -0
- data/vendor/python/pylint/bin/pylint.bat +5 -0
- data/vendor/python/pylint/bin/pyreverse +3 -0
- data/vendor/python/pylint/bin/pyreverse.bat +5 -0
- data/vendor/python/pylint/bin/symilar +3 -0
- data/vendor/python/pylint/bin/symilar.bat +5 -0
- data/vendor/python/pylint/checkers/__init__.py +145 -0
- data/vendor/python/pylint/checkers/__init__.pyc +0 -0
- data/vendor/python/pylint/checkers/base.py +1141 -0
- data/vendor/python/pylint/checkers/base.pyc +0 -0
- data/vendor/python/pylint/checkers/classes.py +792 -0
- data/vendor/python/pylint/checkers/classes.pyc +0 -0
- data/vendor/python/pylint/checkers/design_analysis.py +367 -0
- data/vendor/python/pylint/checkers/design_analysis.pyc +0 -0
- data/vendor/python/pylint/checkers/exceptions.py +306 -0
- data/vendor/python/pylint/checkers/exceptions.pyc +0 -0
- data/vendor/python/pylint/checkers/format.py +943 -0
- data/vendor/python/pylint/checkers/format.pyc +0 -0
- data/vendor/python/pylint/checkers/imports.py +394 -0
- data/vendor/python/pylint/checkers/imports.pyc +0 -0
- data/vendor/python/pylint/checkers/logging.py +213 -0
- data/vendor/python/pylint/checkers/logging.pyc +0 -0
- data/vendor/python/pylint/checkers/misc.py +90 -0
- data/vendor/python/pylint/checkers/misc.pyc +0 -0
- data/vendor/python/pylint/checkers/newstyle.py +151 -0
- data/vendor/python/pylint/checkers/newstyle.pyc +0 -0
- data/vendor/python/pylint/checkers/raw_metrics.py +129 -0
- data/vendor/python/pylint/checkers/raw_metrics.pyc +0 -0
- data/vendor/python/pylint/checkers/similar.py +365 -0
- data/vendor/python/pylint/checkers/similar.pyc +0 -0
- data/vendor/python/pylint/checkers/stdlib.py +69 -0
- data/vendor/python/pylint/checkers/stdlib.pyc +0 -0
- data/vendor/python/pylint/checkers/strings.py +304 -0
- data/vendor/python/pylint/checkers/strings.pyc +0 -0
- data/vendor/python/pylint/checkers/typecheck.py +451 -0
- data/vendor/python/pylint/checkers/typecheck.pyc +0 -0
- data/vendor/python/pylint/checkers/utils.py +416 -0
- data/vendor/python/pylint/checkers/utils.pyc +0 -0
- data/vendor/python/pylint/checkers/variables.py +741 -0
- data/vendor/python/pylint/checkers/variables.pyc +0 -0
- data/vendor/python/pylint/config.py +156 -0
- data/vendor/python/pylint/config.pyc +0 -0
- data/vendor/python/pylint/epylint.py +175 -0
- data/vendor/python/pylint/gui.py +508 -0
- data/vendor/python/pylint/interfaces.py +72 -0
- data/vendor/python/pylint/interfaces.pyc +0 -0
- data/vendor/python/pylint/lint.py +1106 -0
- data/vendor/python/pylint/lint.pyc +0 -0
- data/vendor/python/pylint/pyreverse/__init__.py +5 -0
- data/vendor/python/pylint/pyreverse/diadefslib.py +233 -0
- data/vendor/python/pylint/pyreverse/diagrams.py +247 -0
- data/vendor/python/pylint/pyreverse/main.py +124 -0
- data/vendor/python/pylint/pyreverse/utils.py +131 -0
- data/vendor/python/pylint/pyreverse/writer.py +199 -0
- data/vendor/python/pylint/reporters/__init__.py +138 -0
- data/vendor/python/pylint/reporters/__init__.pyc +0 -0
- data/vendor/python/pylint/reporters/guireporter.py +28 -0
- data/vendor/python/pylint/reporters/guireporter.pyc +0 -0
- data/vendor/python/pylint/reporters/html.py +70 -0
- data/vendor/python/pylint/reporters/html.pyc +0 -0
- data/vendor/python/pylint/reporters/text.py +143 -0
- data/vendor/python/pylint/reporters/text.pyc +0 -0
- data/vendor/python/pylint/setup.cfg +3 -0
- data/vendor/python/pylint/setup.py +203 -0
- data/vendor/python/pylint/tox.ini +10 -0
- data/vendor/python/pylint/utils.py +744 -0
- data/vendor/python/pylint/utils.pyc +0 -0
- data/vendor/python/pylint_runner.py +22 -0
- metadata +675 -0
@@ -0,0 +1,23 @@
|
|
1
|
+
var errorCode = process.argv[2];
|
2
|
+
var max = process.argv[3];
|
3
|
+
var modes = process.argv.slice(4);
|
4
|
+
|
5
|
+
function stdout(message) {
|
6
|
+
if (modes.indexOf('stdout') === -1) { return; }
|
7
|
+
process.stdout.write('stdout ' + message + '\n');
|
8
|
+
}
|
9
|
+
|
10
|
+
function stderr(message) {
|
11
|
+
if (modes.indexOf('stderr') === -1) { return; }
|
12
|
+
process.stderr.write('stderr ' + message + '\n');
|
13
|
+
}
|
14
|
+
|
15
|
+
for (var i = 0; i < max; i++) {
|
16
|
+
stdout(i);
|
17
|
+
stderr(i);
|
18
|
+
}
|
19
|
+
|
20
|
+
process.exit(errorCode);
|
21
|
+
|
22
|
+
stdout('fail');
|
23
|
+
stderr('fail');
|
@@ -0,0 +1,25 @@
|
|
1
|
+
var exit = require('../../lib/exit');
|
2
|
+
|
3
|
+
var errorCode = process.argv[2];
|
4
|
+
var max = process.argv[3];
|
5
|
+
var modes = process.argv.slice(4);
|
6
|
+
|
7
|
+
function stdout(message) {
|
8
|
+
if (modes.indexOf('stdout') === -1) { return; }
|
9
|
+
process.stdout.write('stdout ' + message + '\n');
|
10
|
+
}
|
11
|
+
|
12
|
+
function stderr(message) {
|
13
|
+
if (modes.indexOf('stderr') === -1) { return; }
|
14
|
+
process.stderr.write('stderr ' + message + '\n');
|
15
|
+
}
|
16
|
+
|
17
|
+
for (var i = 0; i < max; i++) {
|
18
|
+
stdout(i);
|
19
|
+
stderr(i);
|
20
|
+
}
|
21
|
+
|
22
|
+
exit(errorCode);
|
23
|
+
|
24
|
+
stdout('fail');
|
25
|
+
stderr('fail');
|
@@ -0,0 +1,18 @@
|
|
1
|
+
Copyright 2010, 2011, Chris Winberry <chris@winberry.net>. All rights reserved.
|
2
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
3
|
+
of this software and associated documentation files (the "Software"), to
|
4
|
+
deal in the Software without restriction, including without limitation the
|
5
|
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
6
|
+
sell copies of the Software, and to permit persons to whom the Software is
|
7
|
+
furnished to do so, subject to the following conditions:
|
8
|
+
|
9
|
+
The above copyright notice and this permission notice shall be included in
|
10
|
+
all copies or substantial portions of the Software.
|
11
|
+
|
12
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
13
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
14
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
15
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
16
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
17
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
18
|
+
IN THE SOFTWARE.
|
@@ -0,0 +1,83 @@
|
|
1
|
+
#htmlparser2 [![NPM version](http://img.shields.io/npm/v/htmlparser2.svg)](https://npmjs.org/package/htmlparser2) [![Downloads](https://img.shields.io/npm/dm/htmlparser2.svg)](https://npmjs.org/package/htmlparser2)
|
2
|
+
|
3
|
+
[![Build Status](https://travis-ci.org/fb55/htmlparser2.svg)](http://travis-ci.org/fb55/htmlparser2) [![Coverage](http://img.shields.io/coveralls/fb55/htmlparser2.svg)](https://coveralls.io/r/fb55/htmlparser2)
|
4
|
+
|
5
|
+
A forgiving HTML/XML/RSS parser written in JS for NodeJS. The parser can handle streams (chunked data) and supports custom handlers for writing custom DOMs/output.
|
6
|
+
|
7
|
+
##Installing
|
8
|
+
npm install htmlparser2
|
9
|
+
|
10
|
+
A live demo of htmlparser2 is available at http://demos.forbeslindesay.co.uk/htmlparser2/
|
11
|
+
|
12
|
+
##Usage
|
13
|
+
|
14
|
+
```javascript
|
15
|
+
var htmlparser = require("htmlparser2");
|
16
|
+
var parser = new htmlparser.Parser({
|
17
|
+
onopentag: function(name, attribs){
|
18
|
+
if(name === "script" && attribs.type === "text/javascript"){
|
19
|
+
console.log("JS! Hooray!");
|
20
|
+
}
|
21
|
+
},
|
22
|
+
ontext: function(text){
|
23
|
+
console.log("-->", text);
|
24
|
+
},
|
25
|
+
onclosetag: function(tagname){
|
26
|
+
if(tagname === "script"){
|
27
|
+
console.log("That's it?!");
|
28
|
+
}
|
29
|
+
}
|
30
|
+
});
|
31
|
+
parser.write("Xyz <script type='text/javascript'>var foo = '<<bar>>';</ script>");
|
32
|
+
parser.end();
|
33
|
+
```
|
34
|
+
|
35
|
+
Output (simplified):
|
36
|
+
|
37
|
+
```javascript
|
38
|
+
--> Xyz
|
39
|
+
JS! Hooray!
|
40
|
+
--> var foo = '<<bar>>';
|
41
|
+
That's it?!
|
42
|
+
```
|
43
|
+
|
44
|
+
Read more about the parser in the [wiki](https://github.com/fb55/htmlparser2/wiki/Parser-options).
|
45
|
+
|
46
|
+
##Get a DOM
|
47
|
+
The `DomHandler` (known as `DefaultHandler` in the original `htmlparser` module) produces a DOM (document object model) that can be manipulated using the [`DomUtils`](https://github.com/fb55/DomUtils) helper.
|
48
|
+
|
49
|
+
The `DomHandler`, while still bundled with this module, was moved to its [own module](https://github.com/fb55/domhandler). Have a look at it for further information.
|
50
|
+
|
51
|
+
##Parsing RSS/RDF/Atom Feeds
|
52
|
+
|
53
|
+
```javascript
|
54
|
+
new htmlparser.FeedHandler(function(<error> error, <object> feed){
|
55
|
+
...
|
56
|
+
});
|
57
|
+
```
|
58
|
+
|
59
|
+
##Performance
|
60
|
+
|
61
|
+
After having some artificial benchmarks for some time, __@AndreasMadsen__ published his [`htmlparser-benchmark`](https://github.com/AndreasMadsen/htmlparser-benchmark), which benchmarks HTML parses based on real-world websites.
|
62
|
+
|
63
|
+
At the time of writing, the latest versions of all supported parsers show the following performance characteristics on [Travis CI](https://travis-ci.org/AndreasMadsen/htmlparser-benchmark/builds/10805007) (please note that Travis doesn't guarantee equal conditions for all tests):
|
64
|
+
|
65
|
+
```
|
66
|
+
gumbo-parser : 34.9208 ms/file ± 21.4238
|
67
|
+
html-parser : 24.8224 ms/file ± 15.8703
|
68
|
+
html5 : 419.597 ms/file ± 264.265
|
69
|
+
htmlparser : 60.0722 ms/file ± 384.844
|
70
|
+
htmlparser2-dom: 12.0749 ms/file ± 6.49474
|
71
|
+
htmlparser2 : 7.49130 ms/file ± 5.74368
|
72
|
+
hubbub : 30.4980 ms/file ± 16.4682
|
73
|
+
libxmljs : 14.1338 ms/file ± 18.6541
|
74
|
+
parse5 : 22.0439 ms/file ± 15.3743
|
75
|
+
sax : 49.6513 ms/file ± 26.6032
|
76
|
+
```
|
77
|
+
|
78
|
+
##How is this different from [node-htmlparser](https://github.com/tautologistics/node-htmlparser)?
|
79
|
+
This is a fork of the `htmlparser` module. The main difference is that this is intended to be used only with node (it runs on other platforms using [browserify](https://github.com/substack/node-browserify)). `htmlparser2` was rewritten multiple times and, while it maintains an API that's compatible with `htmlparser` in most cases, the projects don't share any code anymore.
|
80
|
+
|
81
|
+
The parser now provides a callback interface close to [sax.js](https://github.com/isaacs/sax-js) (originally targeted at [readabilitySAX](https://github.com/fb55/readabilitysax)). As a result, old handlers won't work anymore.
|
82
|
+
|
83
|
+
The `DefaultHandler` and the `RssHandler` were renamed to clarify their purpose (to `DomHandler` and `FeedHandler`). The old names are still available when requiring `htmlparser2`, so your code should work as expected.
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module.exports = CollectingHandler;
|
2
|
+
|
3
|
+
function CollectingHandler(cbs){
|
4
|
+
this._cbs = cbs || {};
|
5
|
+
this.events = [];
|
6
|
+
}
|
7
|
+
|
8
|
+
var EVENTS = require("./").EVENTS;
|
9
|
+
Object.keys(EVENTS).forEach(function(name){
|
10
|
+
if(EVENTS[name] === 0){
|
11
|
+
name = "on" + name;
|
12
|
+
CollectingHandler.prototype[name] = function(){
|
13
|
+
this.events.push([name]);
|
14
|
+
if(this._cbs[name]) this._cbs[name]();
|
15
|
+
};
|
16
|
+
} else if(EVENTS[name] === 1){
|
17
|
+
name = "on" + name;
|
18
|
+
CollectingHandler.prototype[name] = function(a){
|
19
|
+
this.events.push([name, a]);
|
20
|
+
if(this._cbs[name]) this._cbs[name](a);
|
21
|
+
};
|
22
|
+
} else if(EVENTS[name] === 2){
|
23
|
+
name = "on" + name;
|
24
|
+
CollectingHandler.prototype[name] = function(a, b){
|
25
|
+
this.events.push([name, a, b]);
|
26
|
+
if(this._cbs[name]) this._cbs[name](a, b);
|
27
|
+
};
|
28
|
+
} else {
|
29
|
+
throw Error("wrong number of arguments");
|
30
|
+
}
|
31
|
+
});
|
32
|
+
|
33
|
+
CollectingHandler.prototype.onreset = function(){
|
34
|
+
this.events = [];
|
35
|
+
if(this._cbs.onreset) this._cbs.onreset();
|
36
|
+
};
|
37
|
+
|
38
|
+
CollectingHandler.prototype.restart = function(){
|
39
|
+
if(this._cbs.onreset) this._cbs.onreset();
|
40
|
+
|
41
|
+
for(var i = 0, len = this.events.length; i < len; i++){
|
42
|
+
if(this._cbs[this.events[i][0]]){
|
43
|
+
|
44
|
+
var num = this.events[i].length;
|
45
|
+
|
46
|
+
if(num === 1){
|
47
|
+
this._cbs[this.events[i][0]]();
|
48
|
+
} else if(num === 2){
|
49
|
+
this._cbs[this.events[i][0]](this.events[i][1]);
|
50
|
+
} else {
|
51
|
+
this._cbs[this.events[i][0]](this.events[i][1], this.events[i][2]);
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
};
|
@@ -0,0 +1,95 @@
|
|
1
|
+
var index = require("./index.js"),
|
2
|
+
DomHandler = index.DomHandler,
|
3
|
+
DomUtils = index.DomUtils;
|
4
|
+
|
5
|
+
//TODO: make this a streamable handler
|
6
|
+
function FeedHandler(callback, options){
|
7
|
+
this.init(callback, options);
|
8
|
+
}
|
9
|
+
|
10
|
+
require("util").inherits(FeedHandler, DomHandler);
|
11
|
+
|
12
|
+
FeedHandler.prototype.init = DomHandler;
|
13
|
+
|
14
|
+
function getElements(what, where){
|
15
|
+
return DomUtils.getElementsByTagName(what, where, true);
|
16
|
+
}
|
17
|
+
function getOneElement(what, where){
|
18
|
+
return DomUtils.getElementsByTagName(what, where, true, 1)[0];
|
19
|
+
}
|
20
|
+
function fetch(what, where, recurse){
|
21
|
+
return DomUtils.getText(
|
22
|
+
DomUtils.getElementsByTagName(what, where, recurse, 1)
|
23
|
+
).trim();
|
24
|
+
}
|
25
|
+
|
26
|
+
function addConditionally(obj, prop, what, where, recurse){
|
27
|
+
var tmp = fetch(what, where, recurse);
|
28
|
+
if(tmp) obj[prop] = tmp;
|
29
|
+
}
|
30
|
+
|
31
|
+
var isValidFeed = function(value) {
|
32
|
+
return value === "rss" || value === "feed" || value === "rdf:RDF";
|
33
|
+
};
|
34
|
+
|
35
|
+
FeedHandler.prototype.onend = function() {
|
36
|
+
var feed = {},
|
37
|
+
feedRoot = getOneElement(isValidFeed, this.dom),
|
38
|
+
tmp, childs;
|
39
|
+
|
40
|
+
if(feedRoot){
|
41
|
+
if(feedRoot.name === "feed"){
|
42
|
+
childs = feedRoot.children;
|
43
|
+
|
44
|
+
feed.type = "atom";
|
45
|
+
addConditionally(feed, "id", "id", childs);
|
46
|
+
addConditionally(feed, "title", "title", childs);
|
47
|
+
if((tmp = getOneElement("link", childs)) && (tmp = tmp.attribs) && (tmp = tmp.href)) feed.link = tmp;
|
48
|
+
addConditionally(feed, "description", "subtitle", childs);
|
49
|
+
if((tmp = fetch("updated", childs))) feed.updated = new Date(tmp);
|
50
|
+
addConditionally(feed, "author", "email", childs, true);
|
51
|
+
|
52
|
+
feed.items = getElements("entry", childs).map(function(item){
|
53
|
+
var entry = {}, tmp;
|
54
|
+
|
55
|
+
item = item.children;
|
56
|
+
|
57
|
+
addConditionally(entry, "id", "id", item);
|
58
|
+
addConditionally(entry, "title", "title", item);
|
59
|
+
if((tmp = getOneElement("link", item)) && (tmp = tmp.attribs) && (tmp = tmp.href)) entry.link = tmp;
|
60
|
+
addConditionally(entry, "description", "summary", item);
|
61
|
+
if((tmp = fetch("updated", item))) entry.pubDate = new Date(tmp);
|
62
|
+
return entry;
|
63
|
+
});
|
64
|
+
} else {
|
65
|
+
childs = getOneElement("channel", feedRoot.children).children;
|
66
|
+
|
67
|
+
feed.type = feedRoot.name.substr(0, 3);
|
68
|
+
feed.id = "";
|
69
|
+
addConditionally(feed, "title", "title", childs);
|
70
|
+
addConditionally(feed, "link", "link", childs);
|
71
|
+
addConditionally(feed, "description", "description", childs);
|
72
|
+
if((tmp = fetch("lastBuildDate", childs))) feed.updated = new Date(tmp);
|
73
|
+
addConditionally(feed, "author", "managingEditor", childs, true);
|
74
|
+
|
75
|
+
feed.items = getElements("item", feedRoot.children).map(function(item){
|
76
|
+
var entry = {}, tmp;
|
77
|
+
|
78
|
+
item = item.children;
|
79
|
+
|
80
|
+
addConditionally(entry, "id", "guid", item);
|
81
|
+
addConditionally(entry, "title", "title", item);
|
82
|
+
addConditionally(entry, "link", "link", item);
|
83
|
+
addConditionally(entry, "description", "description", item);
|
84
|
+
if((tmp = fetch("pubDate", item))) entry.pubDate = new Date(tmp);
|
85
|
+
return entry;
|
86
|
+
});
|
87
|
+
}
|
88
|
+
}
|
89
|
+
this.dom = feed;
|
90
|
+
DomHandler.prototype._handleCallback.call(
|
91
|
+
this, feedRoot ? null : Error("couldn't find root of feed")
|
92
|
+
);
|
93
|
+
};
|
94
|
+
|
95
|
+
module.exports = FeedHandler;
|
@@ -0,0 +1,337 @@
|
|
1
|
+
var Tokenizer = require("./Tokenizer.js");
|
2
|
+
|
3
|
+
/*
|
4
|
+
Options:
|
5
|
+
|
6
|
+
xmlMode: Special behavior for script/style tags (true by default)
|
7
|
+
lowerCaseAttributeNames: call .toLowerCase for each attribute name (true if xmlMode is `false`)
|
8
|
+
lowerCaseTags: call .toLowerCase for each tag name (true if xmlMode is `false`)
|
9
|
+
*/
|
10
|
+
|
11
|
+
/*
|
12
|
+
Callbacks:
|
13
|
+
|
14
|
+
oncdataend,
|
15
|
+
oncdatastart,
|
16
|
+
onclosetag,
|
17
|
+
oncomment,
|
18
|
+
oncommentend,
|
19
|
+
onerror,
|
20
|
+
onopentag,
|
21
|
+
onprocessinginstruction,
|
22
|
+
onreset,
|
23
|
+
ontext
|
24
|
+
*/
|
25
|
+
|
26
|
+
var formTags = {
|
27
|
+
input: true,
|
28
|
+
option: true,
|
29
|
+
optgroup: true,
|
30
|
+
select: true,
|
31
|
+
button: true,
|
32
|
+
datalist: true,
|
33
|
+
textarea: true
|
34
|
+
};
|
35
|
+
|
36
|
+
var openImpliesClose = {
|
37
|
+
tr : { tr:true, th:true, td:true },
|
38
|
+
th : { th:true },
|
39
|
+
td : { thead:true, td:true },
|
40
|
+
body : { head:true, link:true, script:true },
|
41
|
+
li : { li:true },
|
42
|
+
p : { p:true },
|
43
|
+
select : formTags,
|
44
|
+
input : formTags,
|
45
|
+
output : formTags,
|
46
|
+
button : formTags,
|
47
|
+
datalist: formTags,
|
48
|
+
textarea: formTags,
|
49
|
+
option : { option:true },
|
50
|
+
optgroup: { optgroup:true }
|
51
|
+
};
|
52
|
+
|
53
|
+
var voidElements = {
|
54
|
+
__proto__: null,
|
55
|
+
area: true,
|
56
|
+
base: true,
|
57
|
+
basefont: true,
|
58
|
+
br: true,
|
59
|
+
col: true,
|
60
|
+
command: true,
|
61
|
+
embed: true,
|
62
|
+
frame: true,
|
63
|
+
hr: true,
|
64
|
+
img: true,
|
65
|
+
input: true,
|
66
|
+
isindex: true,
|
67
|
+
keygen: true,
|
68
|
+
link: true,
|
69
|
+
meta: true,
|
70
|
+
param: true,
|
71
|
+
source: true,
|
72
|
+
track: true,
|
73
|
+
wbr: true,
|
74
|
+
|
75
|
+
//common self closing svg elements
|
76
|
+
path: true,
|
77
|
+
circle: true,
|
78
|
+
ellipse: true,
|
79
|
+
line: true,
|
80
|
+
rect: true,
|
81
|
+
use: true
|
82
|
+
};
|
83
|
+
|
84
|
+
var re_nameEnd = /\s|\//;
|
85
|
+
|
86
|
+
function Parser(cbs, options){
|
87
|
+
this._options = options || {};
|
88
|
+
this._cbs = cbs || {};
|
89
|
+
|
90
|
+
this._tagname = "";
|
91
|
+
this._attribname = "";
|
92
|
+
this._attribvalue = "";
|
93
|
+
this._attribs = null;
|
94
|
+
this._stack = [];
|
95
|
+
|
96
|
+
this.startIndex = 0;
|
97
|
+
this.endIndex = null;
|
98
|
+
|
99
|
+
this._lowerCaseTagNames = "lowerCaseTags" in this._options ?
|
100
|
+
!!this._options.lowerCaseTags :
|
101
|
+
!this._options.xmlMode;
|
102
|
+
this._lowerCaseAttributeNames = "lowerCaseAttributeNames" in this._options ?
|
103
|
+
!!this._options.lowerCaseAttributeNames :
|
104
|
+
!this._options.xmlMode;
|
105
|
+
|
106
|
+
this._tokenizer = new Tokenizer(this._options, this);
|
107
|
+
}
|
108
|
+
|
109
|
+
require("util").inherits(Parser, require("events").EventEmitter);
|
110
|
+
|
111
|
+
Parser.prototype._updatePosition = function(initialOffset){
|
112
|
+
if(this.endIndex === null){
|
113
|
+
if(this._tokenizer._sectionStart <= initialOffset){
|
114
|
+
this.startIndex = 0;
|
115
|
+
} else {
|
116
|
+
this.startIndex = this._tokenizer._sectionStart - initialOffset;
|
117
|
+
}
|
118
|
+
}
|
119
|
+
else this.startIndex = this.endIndex + 1;
|
120
|
+
this.endIndex = this._tokenizer._index;
|
121
|
+
};
|
122
|
+
|
123
|
+
//Tokenizer event handlers
|
124
|
+
Parser.prototype.ontext = function(data){
|
125
|
+
this._updatePosition(1);
|
126
|
+
this.endIndex--;
|
127
|
+
|
128
|
+
if(this._cbs.ontext) this._cbs.ontext(data);
|
129
|
+
};
|
130
|
+
|
131
|
+
Parser.prototype.onopentagname = function(name){
|
132
|
+
if(this._lowerCaseTagNames){
|
133
|
+
name = name.toLowerCase();
|
134
|
+
}
|
135
|
+
|
136
|
+
this._tagname = name;
|
137
|
+
|
138
|
+
if (!this._options.xmlMode && name in openImpliesClose) {
|
139
|
+
for(
|
140
|
+
var el;
|
141
|
+
(el = this._stack[this._stack.length-1]) in openImpliesClose[name];
|
142
|
+
this.onclosetag(el)
|
143
|
+
);
|
144
|
+
}
|
145
|
+
|
146
|
+
if(this._options.xmlMode || !(name in voidElements)){
|
147
|
+
this._stack.push(name);
|
148
|
+
}
|
149
|
+
|
150
|
+
if(this._cbs.onopentagname) this._cbs.onopentagname(name);
|
151
|
+
if(this._cbs.onopentag) this._attribs = {};
|
152
|
+
};
|
153
|
+
|
154
|
+
Parser.prototype.onopentagend = function(){
|
155
|
+
this._updatePosition(1);
|
156
|
+
|
157
|
+
if(this._attribs){
|
158
|
+
if(this._cbs.onopentag) this._cbs.onopentag(this._tagname, this._attribs);
|
159
|
+
this._attribs = null;
|
160
|
+
}
|
161
|
+
|
162
|
+
if(!this._options.xmlMode && this._cbs.onclosetag && this._tagname in voidElements){
|
163
|
+
this._cbs.onclosetag(this._tagname);
|
164
|
+
}
|
165
|
+
|
166
|
+
this._tagname = "";
|
167
|
+
};
|
168
|
+
|
169
|
+
Parser.prototype.onclosetag = function(name){
|
170
|
+
this._updatePosition(1);
|
171
|
+
|
172
|
+
if(this._lowerCaseTagNames){
|
173
|
+
name = name.toLowerCase();
|
174
|
+
}
|
175
|
+
|
176
|
+
if(this._stack.length && (!(name in voidElements) || this._options.xmlMode)){
|
177
|
+
var pos = this._stack.lastIndexOf(name);
|
178
|
+
if(pos !== -1){
|
179
|
+
if(this._cbs.onclosetag){
|
180
|
+
pos = this._stack.length - pos;
|
181
|
+
while(pos--) this._cbs.onclosetag(this._stack.pop());
|
182
|
+
}
|
183
|
+
else this._stack.length = pos;
|
184
|
+
} else if(name === "p" && !this._options.xmlMode){
|
185
|
+
this.onopentagname(name);
|
186
|
+
this._closeCurrentTag();
|
187
|
+
}
|
188
|
+
} else if(!this._options.xmlMode && (name === "br" || name === "p")){
|
189
|
+
this.onopentagname(name);
|
190
|
+
this._closeCurrentTag();
|
191
|
+
}
|
192
|
+
};
|
193
|
+
|
194
|
+
Parser.prototype.onselfclosingtag = function(){
|
195
|
+
if(this._options.xmlMode || this._options.recognizeSelfClosing){
|
196
|
+
this._closeCurrentTag();
|
197
|
+
} else {
|
198
|
+
this.onopentagend();
|
199
|
+
}
|
200
|
+
};
|
201
|
+
|
202
|
+
Parser.prototype._closeCurrentTag = function(){
|
203
|
+
var name = this._tagname;
|
204
|
+
|
205
|
+
this.onopentagend();
|
206
|
+
|
207
|
+
//self-closing tags will be on the top of the stack
|
208
|
+
//(cheaper check than in onclosetag)
|
209
|
+
if(this._stack[this._stack.length-1] === name){
|
210
|
+
if(this._cbs.onclosetag){
|
211
|
+
this._cbs.onclosetag(name);
|
212
|
+
}
|
213
|
+
this._stack.pop();
|
214
|
+
}
|
215
|
+
};
|
216
|
+
|
217
|
+
Parser.prototype.onattribname = function(name){
|
218
|
+
if(this._lowerCaseAttributeNames){
|
219
|
+
name = name.toLowerCase();
|
220
|
+
}
|
221
|
+
this._attribname = name;
|
222
|
+
};
|
223
|
+
|
224
|
+
Parser.prototype.onattribdata = function(value){
|
225
|
+
this._attribvalue += value;
|
226
|
+
};
|
227
|
+
|
228
|
+
Parser.prototype.onattribend = function(){
|
229
|
+
if(this._cbs.onattribute) this._cbs.onattribute(this._attribname, this._attribvalue);
|
230
|
+
if(
|
231
|
+
this._attribs &&
|
232
|
+
!Object.prototype.hasOwnProperty.call(this._attribs, this._attribname)
|
233
|
+
){
|
234
|
+
this._attribs[this._attribname] = this._attribvalue;
|
235
|
+
}
|
236
|
+
this._attribname = "";
|
237
|
+
this._attribvalue = "";
|
238
|
+
};
|
239
|
+
|
240
|
+
Parser.prototype._getInstructionName = function(value){
|
241
|
+
var idx = value.search(re_nameEnd),
|
242
|
+
name = idx < 0 ? value : value.substr(0, idx);
|
243
|
+
|
244
|
+
if(this._lowerCaseTagNames){
|
245
|
+
name = name.toLowerCase();
|
246
|
+
}
|
247
|
+
|
248
|
+
return name;
|
249
|
+
};
|
250
|
+
|
251
|
+
Parser.prototype.ondeclaration = function(value){
|
252
|
+
if(this._cbs.onprocessinginstruction){
|
253
|
+
var name = this._getInstructionName(value);
|
254
|
+
this._cbs.onprocessinginstruction("!" + name, "!" + value);
|
255
|
+
}
|
256
|
+
};
|
257
|
+
|
258
|
+
Parser.prototype.onprocessinginstruction = function(value){
|
259
|
+
if(this._cbs.onprocessinginstruction){
|
260
|
+
var name = this._getInstructionName(value);
|
261
|
+
this._cbs.onprocessinginstruction("?" + name, "?" + value);
|
262
|
+
}
|
263
|
+
};
|
264
|
+
|
265
|
+
Parser.prototype.oncomment = function(value){
|
266
|
+
this._updatePosition(4);
|
267
|
+
|
268
|
+
if(this._cbs.oncomment) this._cbs.oncomment(value);
|
269
|
+
if(this._cbs.oncommentend) this._cbs.oncommentend();
|
270
|
+
};
|
271
|
+
|
272
|
+
Parser.prototype.oncdata = function(value){
|
273
|
+
this._updatePosition(1);
|
274
|
+
|
275
|
+
if(this._options.xmlMode || this._options.recognizeCDATA){
|
276
|
+
if(this._cbs.oncdatastart) this._cbs.oncdatastart();
|
277
|
+
if(this._cbs.ontext) this._cbs.ontext(value);
|
278
|
+
if(this._cbs.oncdataend) this._cbs.oncdataend();
|
279
|
+
} else {
|
280
|
+
this.oncomment("[CDATA[" + value + "]]");
|
281
|
+
}
|
282
|
+
};
|
283
|
+
|
284
|
+
Parser.prototype.onerror = function(err){
|
285
|
+
if(this._cbs.onerror) this._cbs.onerror(err);
|
286
|
+
};
|
287
|
+
|
288
|
+
Parser.prototype.onend = function(){
|
289
|
+
if(this._cbs.onclosetag){
|
290
|
+
for(
|
291
|
+
var i = this._stack.length;
|
292
|
+
i > 0;
|
293
|
+
this._cbs.onclosetag(this._stack[--i])
|
294
|
+
);
|
295
|
+
}
|
296
|
+
if(this._cbs.onend) this._cbs.onend();
|
297
|
+
};
|
298
|
+
|
299
|
+
|
300
|
+
//Resets the parser to a blank state, ready to parse a new HTML document
|
301
|
+
Parser.prototype.reset = function(){
|
302
|
+
if(this._cbs.onreset) this._cbs.onreset();
|
303
|
+
this._tokenizer.reset();
|
304
|
+
|
305
|
+
this._tagname = "";
|
306
|
+
this._attribname = "";
|
307
|
+
this._attribs = null;
|
308
|
+
this._stack = [];
|
309
|
+
};
|
310
|
+
|
311
|
+
//Parses a complete HTML document and pushes it to the handler
|
312
|
+
Parser.prototype.parseComplete = function(data){
|
313
|
+
this.reset();
|
314
|
+
this.end(data);
|
315
|
+
};
|
316
|
+
|
317
|
+
Parser.prototype.write = function(chunk){
|
318
|
+
this._tokenizer.write(chunk);
|
319
|
+
};
|
320
|
+
|
321
|
+
Parser.prototype.end = function(chunk){
|
322
|
+
this._tokenizer.end(chunk);
|
323
|
+
};
|
324
|
+
|
325
|
+
Parser.prototype.pause = function(){
|
326
|
+
this._tokenizer.pause();
|
327
|
+
};
|
328
|
+
|
329
|
+
Parser.prototype.resume = function(){
|
330
|
+
this._tokenizer.resume();
|
331
|
+
};
|
332
|
+
|
333
|
+
//alias for backwards compat
|
334
|
+
Parser.prototype.parseChunk = Parser.prototype.write;
|
335
|
+
Parser.prototype.done = Parser.prototype.end;
|
336
|
+
|
337
|
+
module.exports = Parser;
|