exercism-analysis 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +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,189 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
# pylint: disable=W0404,W0622,W0704,W0613
|
|
4
|
+
# copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
|
|
5
|
+
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
|
|
6
|
+
#
|
|
7
|
+
# This file is part of logilab-common.
|
|
8
|
+
#
|
|
9
|
+
# logilab-common is free software: you can redistribute it and/or modify it under
|
|
10
|
+
# the terms of the GNU Lesser General Public License as published by the Free
|
|
11
|
+
# Software Foundation, either version 2.1 of the License, or (at your option) any
|
|
12
|
+
# later version.
|
|
13
|
+
#
|
|
14
|
+
# logilab-common is distributed in the hope that it will be useful, but WITHOUT
|
|
15
|
+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
16
|
+
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
|
17
|
+
# details.
|
|
18
|
+
#
|
|
19
|
+
# You should have received a copy of the GNU Lesser General Public License along
|
|
20
|
+
# with logilab-common. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
"""Generic Setup script, takes package info from __pkginfo__.py file.
|
|
22
|
+
"""
|
|
23
|
+
__docformat__ = "restructuredtext en"
|
|
24
|
+
|
|
25
|
+
import os
|
|
26
|
+
import sys
|
|
27
|
+
import shutil
|
|
28
|
+
from os.path import isdir, exists, join
|
|
29
|
+
|
|
30
|
+
try:
|
|
31
|
+
if os.environ.get('NO_SETUPTOOLS'):
|
|
32
|
+
raise ImportError()
|
|
33
|
+
from setuptools import setup
|
|
34
|
+
from setuptools.command import install_lib
|
|
35
|
+
USE_SETUPTOOLS = 1
|
|
36
|
+
except ImportError:
|
|
37
|
+
from distutils.core import setup
|
|
38
|
+
from distutils.command import install_lib
|
|
39
|
+
USE_SETUPTOOLS = 0
|
|
40
|
+
|
|
41
|
+
try:
|
|
42
|
+
# python3
|
|
43
|
+
from distutils.command.build_py import build_py_2to3 as build_py
|
|
44
|
+
except ImportError:
|
|
45
|
+
# python2.x
|
|
46
|
+
from distutils.command.build_py import build_py
|
|
47
|
+
|
|
48
|
+
sys.modules.pop('__pkginfo__', None)
|
|
49
|
+
# import optional features
|
|
50
|
+
__pkginfo__ = __import__("__pkginfo__")
|
|
51
|
+
# import required features
|
|
52
|
+
from __pkginfo__ import modname, version, license, description, \
|
|
53
|
+
web, author, author_email
|
|
54
|
+
|
|
55
|
+
distname = getattr(__pkginfo__, 'distname', modname)
|
|
56
|
+
scripts = getattr(__pkginfo__, 'scripts', [])
|
|
57
|
+
data_files = getattr(__pkginfo__, 'data_files', None)
|
|
58
|
+
subpackage_of = getattr(__pkginfo__, 'subpackage_of', None)
|
|
59
|
+
include_dirs = getattr(__pkginfo__, 'include_dirs', [])
|
|
60
|
+
ext_modules = getattr(__pkginfo__, 'ext_modules', None)
|
|
61
|
+
install_requires = getattr(__pkginfo__, 'install_requires', None)
|
|
62
|
+
dependency_links = getattr(__pkginfo__, 'dependency_links', [])
|
|
63
|
+
classifiers = getattr(__pkginfo__, 'classifiers', [])
|
|
64
|
+
|
|
65
|
+
STD_BLACKLIST = ('CVS', '.svn', '.hg', 'debian', 'dist', 'build')
|
|
66
|
+
|
|
67
|
+
IGNORED_EXTENSIONS = ('.pyc', '.pyo', '.elc', '~')
|
|
68
|
+
|
|
69
|
+
if exists('README'):
|
|
70
|
+
long_description = open('README').read()
|
|
71
|
+
else:
|
|
72
|
+
long_description = ''
|
|
73
|
+
|
|
74
|
+
def ensure_scripts(linux_scripts):
|
|
75
|
+
"""Creates the proper script names required for each platform
|
|
76
|
+
(taken from 4Suite)
|
|
77
|
+
"""
|
|
78
|
+
from distutils import util
|
|
79
|
+
if util.get_platform()[:3] == 'win':
|
|
80
|
+
scripts_ = [script + '.bat' for script in linux_scripts]
|
|
81
|
+
else:
|
|
82
|
+
scripts_ = linux_scripts
|
|
83
|
+
return scripts_
|
|
84
|
+
|
|
85
|
+
def get_packages(directory, prefix):
|
|
86
|
+
"""return a list of subpackages for the given directory"""
|
|
87
|
+
result = []
|
|
88
|
+
for package in os.listdir(directory):
|
|
89
|
+
absfile = join(directory, package)
|
|
90
|
+
if isdir(absfile):
|
|
91
|
+
if exists(join(absfile, '__init__.py')) or \
|
|
92
|
+
package in ('test', 'tests'):
|
|
93
|
+
if prefix:
|
|
94
|
+
result.append('%s.%s' % (prefix, package))
|
|
95
|
+
else:
|
|
96
|
+
result.append(package)
|
|
97
|
+
result += get_packages(absfile, result[-1])
|
|
98
|
+
return result
|
|
99
|
+
|
|
100
|
+
EMPTY_FILE = '''"""generated file, don't modify or your data will be lost"""
|
|
101
|
+
try:
|
|
102
|
+
__import__('pkg_resources').declare_namespace(__name__)
|
|
103
|
+
except ImportError:
|
|
104
|
+
pass
|
|
105
|
+
'''
|
|
106
|
+
|
|
107
|
+
class MyInstallLib(install_lib.install_lib):
|
|
108
|
+
"""extend install_lib command to handle package __init__.py if necessary
|
|
109
|
+
"""
|
|
110
|
+
def run(self):
|
|
111
|
+
"""overridden from install_lib class"""
|
|
112
|
+
install_lib.install_lib.run(self)
|
|
113
|
+
# create Products.__init__.py if needed
|
|
114
|
+
if subpackage_of:
|
|
115
|
+
product_init = join(self.install_dir, subpackage_of, '__init__.py')
|
|
116
|
+
if not exists(product_init):
|
|
117
|
+
self.announce('creating %s' % product_init)
|
|
118
|
+
stream = open(product_init, 'w')
|
|
119
|
+
stream.write(EMPTY_FILE)
|
|
120
|
+
stream.close()
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
class MyBuildPy(build_py):
|
|
124
|
+
"""extend build_by command to handle include_dirs variable if necessary
|
|
125
|
+
"""
|
|
126
|
+
def run(self):
|
|
127
|
+
"""overridden from install_lib class"""
|
|
128
|
+
build_py.run(self)
|
|
129
|
+
# manually install included directories if any
|
|
130
|
+
if include_dirs:
|
|
131
|
+
if subpackage_of:
|
|
132
|
+
base = join(subpackage_of, modname)
|
|
133
|
+
else:
|
|
134
|
+
base = modname
|
|
135
|
+
basedir = os.path.join(self.build_lib, base)
|
|
136
|
+
for directory in include_dirs:
|
|
137
|
+
dest = join(basedir, directory)
|
|
138
|
+
shutil.rmtree(dest, ignore_errors=True)
|
|
139
|
+
shutil.copytree(directory, dest)
|
|
140
|
+
if sys.version_info >= (3, 0):
|
|
141
|
+
# process manually python file in include_dirs (test data)
|
|
142
|
+
from distutils.util import run_2to3
|
|
143
|
+
# brackets are NOT optional here for py3k compat
|
|
144
|
+
print('running 2to3 on', dest)
|
|
145
|
+
run_2to3([dest])
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def install(**kwargs):
|
|
151
|
+
"""setup entry point"""
|
|
152
|
+
if USE_SETUPTOOLS:
|
|
153
|
+
if '--force-manifest' in sys.argv:
|
|
154
|
+
sys.argv.remove('--force-manifest')
|
|
155
|
+
# install-layout option was introduced in 2.5.3-1~exp1
|
|
156
|
+
elif sys.version_info < (2, 5, 4) and '--install-layout=deb' in sys.argv:
|
|
157
|
+
sys.argv.remove('--install-layout=deb')
|
|
158
|
+
if subpackage_of:
|
|
159
|
+
package = subpackage_of + '.' + modname
|
|
160
|
+
kwargs['package_dir'] = {package : '.'}
|
|
161
|
+
packages = [package] + get_packages(os.getcwd(), package)
|
|
162
|
+
if USE_SETUPTOOLS:
|
|
163
|
+
kwargs['namespace_packages'] = [subpackage_of]
|
|
164
|
+
else:
|
|
165
|
+
kwargs['package_dir'] = {modname : '.'}
|
|
166
|
+
packages = [modname] + get_packages(os.getcwd(), modname)
|
|
167
|
+
if USE_SETUPTOOLS and install_requires:
|
|
168
|
+
kwargs['install_requires'] = install_requires
|
|
169
|
+
kwargs['dependency_links'] = dependency_links
|
|
170
|
+
kwargs['packages'] = packages
|
|
171
|
+
return setup(name = distname,
|
|
172
|
+
version = version,
|
|
173
|
+
license = license,
|
|
174
|
+
description = description,
|
|
175
|
+
long_description = long_description,
|
|
176
|
+
classifiers = classifiers,
|
|
177
|
+
author = author,
|
|
178
|
+
author_email = author_email,
|
|
179
|
+
url = web,
|
|
180
|
+
scripts = ensure_scripts(scripts),
|
|
181
|
+
data_files = data_files,
|
|
182
|
+
ext_modules = ext_modules,
|
|
183
|
+
cmdclass = {'install_lib': MyInstallLib,
|
|
184
|
+
'build_py': MyBuildPy},
|
|
185
|
+
**kwargs
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
if __name__ == '__main__' :
|
|
189
|
+
install()
|
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
|
|
2
|
+
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
|
|
3
|
+
#
|
|
4
|
+
# This file is part of logilab-common.
|
|
5
|
+
#
|
|
6
|
+
# logilab-common is free software: you can redistribute it and/or modify it under
|
|
7
|
+
# the terms of the GNU Lesser General Public License as published by the Free
|
|
8
|
+
# Software Foundation, either version 2.1 of the License, or (at your option) any
|
|
9
|
+
# later version.
|
|
10
|
+
#
|
|
11
|
+
# logilab-common is distributed in the hope that it will be useful, but WITHOUT
|
|
12
|
+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
13
|
+
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
|
14
|
+
# details.
|
|
15
|
+
#
|
|
16
|
+
# You should have received a copy of the GNU Lesser General Public License along
|
|
17
|
+
# with logilab-common. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
"""shell/term utilities, useful to write some python scripts instead of shell
|
|
19
|
+
scripts.
|
|
20
|
+
"""
|
|
21
|
+
__docformat__ = "restructuredtext en"
|
|
22
|
+
|
|
23
|
+
import os
|
|
24
|
+
import glob
|
|
25
|
+
import shutil
|
|
26
|
+
import stat
|
|
27
|
+
import sys
|
|
28
|
+
import tempfile
|
|
29
|
+
import time
|
|
30
|
+
import fnmatch
|
|
31
|
+
import errno
|
|
32
|
+
import string
|
|
33
|
+
import random
|
|
34
|
+
import subprocess
|
|
35
|
+
from os.path import exists, isdir, islink, basename, join
|
|
36
|
+
|
|
37
|
+
from logilab.common import STD_BLACKLIST, _handle_blacklist
|
|
38
|
+
from logilab.common.compat import raw_input
|
|
39
|
+
from logilab.common.compat import str_to_bytes
|
|
40
|
+
from logilab.common.deprecation import deprecated
|
|
41
|
+
|
|
42
|
+
try:
|
|
43
|
+
from logilab.common.proc import ProcInfo, NoSuchProcess
|
|
44
|
+
except ImportError:
|
|
45
|
+
# windows platform
|
|
46
|
+
class NoSuchProcess(Exception): pass
|
|
47
|
+
|
|
48
|
+
def ProcInfo(pid):
|
|
49
|
+
raise NoSuchProcess()
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class tempdir(object):
|
|
53
|
+
|
|
54
|
+
def __enter__(self):
|
|
55
|
+
self.path = tempfile.mkdtemp()
|
|
56
|
+
return self.path
|
|
57
|
+
|
|
58
|
+
def __exit__(self, exctype, value, traceback):
|
|
59
|
+
# rmtree in all cases
|
|
60
|
+
shutil.rmtree(self.path)
|
|
61
|
+
return traceback is None
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
class pushd(object):
|
|
65
|
+
def __init__(self, directory):
|
|
66
|
+
self.directory = directory
|
|
67
|
+
|
|
68
|
+
def __enter__(self):
|
|
69
|
+
self.cwd = os.getcwd()
|
|
70
|
+
os.chdir(self.directory)
|
|
71
|
+
return self.directory
|
|
72
|
+
|
|
73
|
+
def __exit__(self, exctype, value, traceback):
|
|
74
|
+
os.chdir(self.cwd)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def chown(path, login=None, group=None):
|
|
78
|
+
"""Same as `os.chown` function but accepting user login or group name as
|
|
79
|
+
argument. If login or group is omitted, it's left unchanged.
|
|
80
|
+
|
|
81
|
+
Note: you must own the file to chown it (or be root). Otherwise OSError is raised.
|
|
82
|
+
"""
|
|
83
|
+
if login is None:
|
|
84
|
+
uid = -1
|
|
85
|
+
else:
|
|
86
|
+
try:
|
|
87
|
+
uid = int(login)
|
|
88
|
+
except ValueError:
|
|
89
|
+
import pwd # Platforms: Unix
|
|
90
|
+
uid = pwd.getpwnam(login).pw_uid
|
|
91
|
+
if group is None:
|
|
92
|
+
gid = -1
|
|
93
|
+
else:
|
|
94
|
+
try:
|
|
95
|
+
gid = int(group)
|
|
96
|
+
except ValueError:
|
|
97
|
+
import grp
|
|
98
|
+
gid = grp.getgrnam(group).gr_gid
|
|
99
|
+
os.chown(path, uid, gid)
|
|
100
|
+
|
|
101
|
+
def mv(source, destination, _action=shutil.move):
|
|
102
|
+
"""A shell-like mv, supporting wildcards.
|
|
103
|
+
"""
|
|
104
|
+
sources = glob.glob(source)
|
|
105
|
+
if len(sources) > 1:
|
|
106
|
+
assert isdir(destination)
|
|
107
|
+
for filename in sources:
|
|
108
|
+
_action(filename, join(destination, basename(filename)))
|
|
109
|
+
else:
|
|
110
|
+
try:
|
|
111
|
+
source = sources[0]
|
|
112
|
+
except IndexError:
|
|
113
|
+
raise OSError('No file matching %s' % source)
|
|
114
|
+
if isdir(destination) and exists(destination):
|
|
115
|
+
destination = join(destination, basename(source))
|
|
116
|
+
try:
|
|
117
|
+
_action(source, destination)
|
|
118
|
+
except OSError, ex:
|
|
119
|
+
raise OSError('Unable to move %r to %r (%s)' % (
|
|
120
|
+
source, destination, ex))
|
|
121
|
+
|
|
122
|
+
def rm(*files):
|
|
123
|
+
"""A shell-like rm, supporting wildcards.
|
|
124
|
+
"""
|
|
125
|
+
for wfile in files:
|
|
126
|
+
for filename in glob.glob(wfile):
|
|
127
|
+
if islink(filename):
|
|
128
|
+
os.remove(filename)
|
|
129
|
+
elif isdir(filename):
|
|
130
|
+
shutil.rmtree(filename)
|
|
131
|
+
else:
|
|
132
|
+
os.remove(filename)
|
|
133
|
+
|
|
134
|
+
def cp(source, destination):
|
|
135
|
+
"""A shell-like cp, supporting wildcards.
|
|
136
|
+
"""
|
|
137
|
+
mv(source, destination, _action=shutil.copy)
|
|
138
|
+
|
|
139
|
+
def find(directory, exts, exclude=False, blacklist=STD_BLACKLIST):
|
|
140
|
+
"""Recursively find files ending with the given extensions from the directory.
|
|
141
|
+
|
|
142
|
+
:type directory: str
|
|
143
|
+
:param directory:
|
|
144
|
+
directory where the search should start
|
|
145
|
+
|
|
146
|
+
:type exts: basestring or list or tuple
|
|
147
|
+
:param exts:
|
|
148
|
+
extensions or lists or extensions to search
|
|
149
|
+
|
|
150
|
+
:type exclude: boolean
|
|
151
|
+
:param exts:
|
|
152
|
+
if this argument is True, returning files NOT ending with the given
|
|
153
|
+
extensions
|
|
154
|
+
|
|
155
|
+
:type blacklist: list or tuple
|
|
156
|
+
:param blacklist:
|
|
157
|
+
optional list of files or directory to ignore, default to the value of
|
|
158
|
+
`logilab.common.STD_BLACKLIST`
|
|
159
|
+
|
|
160
|
+
:rtype: list
|
|
161
|
+
:return:
|
|
162
|
+
the list of all matching files
|
|
163
|
+
"""
|
|
164
|
+
if isinstance(exts, basestring):
|
|
165
|
+
exts = (exts,)
|
|
166
|
+
if exclude:
|
|
167
|
+
def match(filename, exts):
|
|
168
|
+
for ext in exts:
|
|
169
|
+
if filename.endswith(ext):
|
|
170
|
+
return False
|
|
171
|
+
return True
|
|
172
|
+
else:
|
|
173
|
+
def match(filename, exts):
|
|
174
|
+
for ext in exts:
|
|
175
|
+
if filename.endswith(ext):
|
|
176
|
+
return True
|
|
177
|
+
return False
|
|
178
|
+
files = []
|
|
179
|
+
for dirpath, dirnames, filenames in os.walk(directory):
|
|
180
|
+
_handle_blacklist(blacklist, dirnames, filenames)
|
|
181
|
+
# don't append files if the directory is blacklisted
|
|
182
|
+
dirname = basename(dirpath)
|
|
183
|
+
if dirname in blacklist:
|
|
184
|
+
continue
|
|
185
|
+
files.extend([join(dirpath, f) for f in filenames if match(f, exts)])
|
|
186
|
+
return files
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
def globfind(directory, pattern, blacklist=STD_BLACKLIST):
|
|
190
|
+
"""Recursively finds files matching glob `pattern` under `directory`.
|
|
191
|
+
|
|
192
|
+
This is an alternative to `logilab.common.shellutils.find`.
|
|
193
|
+
|
|
194
|
+
:type directory: str
|
|
195
|
+
:param directory:
|
|
196
|
+
directory where the search should start
|
|
197
|
+
|
|
198
|
+
:type pattern: basestring
|
|
199
|
+
:param pattern:
|
|
200
|
+
the glob pattern (e.g *.py, foo*.py, etc.)
|
|
201
|
+
|
|
202
|
+
:type blacklist: list or tuple
|
|
203
|
+
:param blacklist:
|
|
204
|
+
optional list of files or directory to ignore, default to the value of
|
|
205
|
+
`logilab.common.STD_BLACKLIST`
|
|
206
|
+
|
|
207
|
+
:rtype: iterator
|
|
208
|
+
:return:
|
|
209
|
+
iterator over the list of all matching files
|
|
210
|
+
"""
|
|
211
|
+
for curdir, dirnames, filenames in os.walk(directory):
|
|
212
|
+
_handle_blacklist(blacklist, dirnames, filenames)
|
|
213
|
+
for fname in fnmatch.filter(filenames, pattern):
|
|
214
|
+
yield join(curdir, fname)
|
|
215
|
+
|
|
216
|
+
def unzip(archive, destdir):
|
|
217
|
+
import zipfile
|
|
218
|
+
if not exists(destdir):
|
|
219
|
+
os.mkdir(destdir)
|
|
220
|
+
zfobj = zipfile.ZipFile(archive)
|
|
221
|
+
for name in zfobj.namelist():
|
|
222
|
+
if name.endswith('/'):
|
|
223
|
+
os.mkdir(join(destdir, name))
|
|
224
|
+
else:
|
|
225
|
+
outfile = open(join(destdir, name), 'wb')
|
|
226
|
+
outfile.write(zfobj.read(name))
|
|
227
|
+
outfile.close()
|
|
228
|
+
|
|
229
|
+
@deprecated('Use subprocess.Popen instead')
|
|
230
|
+
class Execute:
|
|
231
|
+
"""This is a deadlock safe version of popen2 (no stdin), that returns
|
|
232
|
+
an object with errorlevel, out and err.
|
|
233
|
+
"""
|
|
234
|
+
|
|
235
|
+
def __init__(self, command):
|
|
236
|
+
cmd = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
|
237
|
+
self.out, self.err = cmd.communicate()
|
|
238
|
+
self.status = os.WEXITSTATUS(cmd.returncode)
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
def acquire_lock(lock_file, max_try=10, delay=10, max_delay=3600):
|
|
242
|
+
"""Acquire a lock represented by a file on the file system
|
|
243
|
+
|
|
244
|
+
If the process written in lock file doesn't exist anymore, we remove the
|
|
245
|
+
lock file immediately
|
|
246
|
+
If age of the lock_file is greater than max_delay, then we raise a UserWarning
|
|
247
|
+
"""
|
|
248
|
+
count = abs(max_try)
|
|
249
|
+
while count:
|
|
250
|
+
try:
|
|
251
|
+
fd = os.open(lock_file, os.O_EXCL | os.O_RDWR | os.O_CREAT)
|
|
252
|
+
os.write(fd, str_to_bytes(str(os.getpid())) )
|
|
253
|
+
os.close(fd)
|
|
254
|
+
return True
|
|
255
|
+
except OSError, e:
|
|
256
|
+
if e.errno == errno.EEXIST:
|
|
257
|
+
try:
|
|
258
|
+
fd = open(lock_file, "r")
|
|
259
|
+
pid = int(fd.readline())
|
|
260
|
+
pi = ProcInfo(pid)
|
|
261
|
+
age = (time.time() - os.stat(lock_file)[stat.ST_MTIME])
|
|
262
|
+
if age / max_delay > 1 :
|
|
263
|
+
raise UserWarning("Command '%s' (pid %s) has locked the "
|
|
264
|
+
"file '%s' for %s minutes"
|
|
265
|
+
% (pi.name(), pid, lock_file, age/60))
|
|
266
|
+
except UserWarning:
|
|
267
|
+
raise
|
|
268
|
+
except NoSuchProcess:
|
|
269
|
+
os.remove(lock_file)
|
|
270
|
+
except Exception:
|
|
271
|
+
# The try block is not essential. can be skipped.
|
|
272
|
+
# Note: ProcInfo object is only available for linux
|
|
273
|
+
# process information are not accessible...
|
|
274
|
+
# or lock_file is no more present...
|
|
275
|
+
pass
|
|
276
|
+
else:
|
|
277
|
+
raise
|
|
278
|
+
count -= 1
|
|
279
|
+
time.sleep(delay)
|
|
280
|
+
else:
|
|
281
|
+
raise Exception('Unable to acquire %s' % lock_file)
|
|
282
|
+
|
|
283
|
+
def release_lock(lock_file):
|
|
284
|
+
"""Release a lock represented by a file on the file system."""
|
|
285
|
+
os.remove(lock_file)
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
class ProgressBar(object):
|
|
289
|
+
"""A simple text progression bar."""
|
|
290
|
+
|
|
291
|
+
def __init__(self, nbops, size=20, stream=sys.stdout, title=''):
|
|
292
|
+
if title:
|
|
293
|
+
self._fstr = '\r%s [%%-%ss]' % (title, int(size))
|
|
294
|
+
else:
|
|
295
|
+
self._fstr = '\r[%%-%ss]' % int(size)
|
|
296
|
+
self._stream = stream
|
|
297
|
+
self._total = nbops
|
|
298
|
+
self._size = size
|
|
299
|
+
self._current = 0
|
|
300
|
+
self._progress = 0
|
|
301
|
+
self._current_text = None
|
|
302
|
+
self._last_text_write_size = 0
|
|
303
|
+
|
|
304
|
+
def _get_text(self):
|
|
305
|
+
return self._current_text
|
|
306
|
+
|
|
307
|
+
def _set_text(self, text=None):
|
|
308
|
+
if text != self._current_text:
|
|
309
|
+
self._current_text = text
|
|
310
|
+
self.refresh()
|
|
311
|
+
|
|
312
|
+
def _del_text(self):
|
|
313
|
+
self.text = None
|
|
314
|
+
|
|
315
|
+
text = property(_get_text, _set_text, _del_text)
|
|
316
|
+
|
|
317
|
+
def update(self, offset=1, exact=False):
|
|
318
|
+
"""Move FORWARD to new cursor position (cursor will never go backward).
|
|
319
|
+
|
|
320
|
+
:offset: fraction of ``size``
|
|
321
|
+
|
|
322
|
+
:exact:
|
|
323
|
+
|
|
324
|
+
- False: offset relative to current cursor position if True
|
|
325
|
+
- True: offset as an asbsolute position
|
|
326
|
+
|
|
327
|
+
"""
|
|
328
|
+
if exact:
|
|
329
|
+
self._current = offset
|
|
330
|
+
else:
|
|
331
|
+
self._current += offset
|
|
332
|
+
|
|
333
|
+
progress = int((float(self._current)/float(self._total))*self._size)
|
|
334
|
+
if progress > self._progress:
|
|
335
|
+
self._progress = progress
|
|
336
|
+
self.refresh()
|
|
337
|
+
|
|
338
|
+
def refresh(self):
|
|
339
|
+
"""Refresh the progression bar display."""
|
|
340
|
+
self._stream.write(self._fstr % ('=' * min(self._progress, self._size)) )
|
|
341
|
+
if self._last_text_write_size or self._current_text:
|
|
342
|
+
template = ' %%-%is' % (self._last_text_write_size)
|
|
343
|
+
text = self._current_text
|
|
344
|
+
if text is None:
|
|
345
|
+
text = ''
|
|
346
|
+
self._stream.write(template % text)
|
|
347
|
+
self._last_text_write_size = len(text.rstrip())
|
|
348
|
+
self._stream.flush()
|
|
349
|
+
|
|
350
|
+
def finish(self):
|
|
351
|
+
self._stream.write('\n')
|
|
352
|
+
self._stream.flush()
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
class DummyProgressBar(object):
|
|
356
|
+
__slot__ = ('text',)
|
|
357
|
+
|
|
358
|
+
def refresh(self):
|
|
359
|
+
pass
|
|
360
|
+
def update(self):
|
|
361
|
+
pass
|
|
362
|
+
def finish(self):
|
|
363
|
+
pass
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
_MARKER = object()
|
|
367
|
+
class progress(object):
|
|
368
|
+
|
|
369
|
+
def __init__(self, nbops=_MARKER, size=_MARKER, stream=_MARKER, title=_MARKER, enabled=True):
|
|
370
|
+
self.nbops = nbops
|
|
371
|
+
self.size = size
|
|
372
|
+
self.stream = stream
|
|
373
|
+
self.title = title
|
|
374
|
+
self.enabled = enabled
|
|
375
|
+
|
|
376
|
+
def __enter__(self):
|
|
377
|
+
if self.enabled:
|
|
378
|
+
kwargs = {}
|
|
379
|
+
for attr in ('nbops', 'size', 'stream', 'title'):
|
|
380
|
+
value = getattr(self, attr)
|
|
381
|
+
if value is not _MARKER:
|
|
382
|
+
kwargs[attr] = value
|
|
383
|
+
self.pb = ProgressBar(**kwargs)
|
|
384
|
+
else:
|
|
385
|
+
self.pb = DummyProgressBar()
|
|
386
|
+
return self.pb
|
|
387
|
+
|
|
388
|
+
def __exit__(self, exc_type, exc_val, exc_tb):
|
|
389
|
+
self.pb.finish()
|
|
390
|
+
|
|
391
|
+
class RawInput(object):
|
|
392
|
+
|
|
393
|
+
def __init__(self, input=None, printer=None):
|
|
394
|
+
self._input = input or raw_input
|
|
395
|
+
self._print = printer
|
|
396
|
+
|
|
397
|
+
def ask(self, question, options, default):
|
|
398
|
+
assert default in options
|
|
399
|
+
choices = []
|
|
400
|
+
for option in options:
|
|
401
|
+
if option == default:
|
|
402
|
+
label = option[0].upper()
|
|
403
|
+
else:
|
|
404
|
+
label = option[0].lower()
|
|
405
|
+
if len(option) > 1:
|
|
406
|
+
label += '(%s)' % option[1:].lower()
|
|
407
|
+
choices.append((option, label))
|
|
408
|
+
prompt = "%s [%s]: " % (question,
|
|
409
|
+
'/'.join([opt[1] for opt in choices]))
|
|
410
|
+
tries = 3
|
|
411
|
+
while tries > 0:
|
|
412
|
+
answer = self._input(prompt).strip().lower()
|
|
413
|
+
if not answer:
|
|
414
|
+
return default
|
|
415
|
+
possible = [option for option, label in choices
|
|
416
|
+
if option.lower().startswith(answer)]
|
|
417
|
+
if len(possible) == 1:
|
|
418
|
+
return possible[0]
|
|
419
|
+
elif len(possible) == 0:
|
|
420
|
+
msg = '%s is not an option.' % answer
|
|
421
|
+
else:
|
|
422
|
+
msg = ('%s is an ambiguous answer, do you mean %s ?' % (
|
|
423
|
+
answer, ' or '.join(possible)))
|
|
424
|
+
if self._print:
|
|
425
|
+
self._print(msg)
|
|
426
|
+
else:
|
|
427
|
+
print msg
|
|
428
|
+
tries -= 1
|
|
429
|
+
raise Exception('unable to get a sensible answer')
|
|
430
|
+
|
|
431
|
+
def confirm(self, question, default_is_yes=True):
|
|
432
|
+
default = default_is_yes and 'y' or 'n'
|
|
433
|
+
answer = self.ask(question, ('y', 'n'), default)
|
|
434
|
+
return answer == 'y'
|
|
435
|
+
|
|
436
|
+
ASK = RawInput()
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
def getlogin():
|
|
440
|
+
"""avoid using os.getlogin() because of strange tty / stdin problems
|
|
441
|
+
(man 3 getlogin)
|
|
442
|
+
Another solution would be to use $LOGNAME, $USER or $USERNAME
|
|
443
|
+
"""
|
|
444
|
+
if sys.platform != 'win32':
|
|
445
|
+
import pwd # Platforms: Unix
|
|
446
|
+
return pwd.getpwuid(os.getuid())[0]
|
|
447
|
+
else:
|
|
448
|
+
return os.environ['USERNAME']
|
|
449
|
+
|
|
450
|
+
def generate_password(length=8, vocab=string.ascii_letters + string.digits):
|
|
451
|
+
"""dumb password generation function"""
|
|
452
|
+
pwd = ''
|
|
453
|
+
for i in xrange(length):
|
|
454
|
+
pwd += random.choice(vocab)
|
|
455
|
+
return pwd
|