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,208 @@
|
|
1
|
+
var common = require('./common');
|
2
|
+
var fs = require('fs');
|
3
|
+
var path = require('path');
|
4
|
+
|
5
|
+
var PERMS = (function (base) {
|
6
|
+
return {
|
7
|
+
OTHER_EXEC : base.EXEC,
|
8
|
+
OTHER_WRITE : base.WRITE,
|
9
|
+
OTHER_READ : base.READ,
|
10
|
+
|
11
|
+
GROUP_EXEC : base.EXEC << 3,
|
12
|
+
GROUP_WRITE : base.WRITE << 3,
|
13
|
+
GROUP_READ : base.READ << 3,
|
14
|
+
|
15
|
+
OWNER_EXEC : base.EXEC << 6,
|
16
|
+
OWNER_WRITE : base.WRITE << 6,
|
17
|
+
OWNER_READ : base.READ << 6,
|
18
|
+
|
19
|
+
// Literal octal numbers are apparently not allowed in "strict" javascript. Using parseInt is
|
20
|
+
// the preferred way, else a jshint warning is thrown.
|
21
|
+
STICKY : parseInt('01000', 8),
|
22
|
+
SETGID : parseInt('02000', 8),
|
23
|
+
SETUID : parseInt('04000', 8),
|
24
|
+
|
25
|
+
TYPE_MASK : parseInt('0770000', 8)
|
26
|
+
};
|
27
|
+
})({
|
28
|
+
EXEC : 1,
|
29
|
+
WRITE : 2,
|
30
|
+
READ : 4
|
31
|
+
});
|
32
|
+
|
33
|
+
//@
|
34
|
+
//@ ### chmod(octal_mode || octal_string, file)
|
35
|
+
//@ ### chmod(symbolic_mode, file)
|
36
|
+
//@
|
37
|
+
//@ Available options:
|
38
|
+
//@
|
39
|
+
//@ + `-v`: output a diagnostic for every file processed//@
|
40
|
+
//@ + `-c`: like verbose but report only when a change is made//@
|
41
|
+
//@ + `-R`: change files and directories recursively//@
|
42
|
+
//@
|
43
|
+
//@ Examples:
|
44
|
+
//@
|
45
|
+
//@ ```javascript
|
46
|
+
//@ chmod(755, '/Users/brandon');
|
47
|
+
//@ chmod('755', '/Users/brandon'); // same as above
|
48
|
+
//@ chmod('u+x', '/Users/brandon');
|
49
|
+
//@ ```
|
50
|
+
//@
|
51
|
+
//@ Alters the permissions of a file or directory by either specifying the
|
52
|
+
//@ absolute permissions in octal form or expressing the changes in symbols.
|
53
|
+
//@ This command tries to mimic the POSIX behavior as much as possible.
|
54
|
+
//@ Notable exceptions:
|
55
|
+
//@
|
56
|
+
//@ + In symbolic modes, 'a-r' and '-r' are identical. No consideration is
|
57
|
+
//@ given to the umask.
|
58
|
+
//@ + There is no "quiet" option since default behavior is to run silent.
|
59
|
+
function _chmod(options, mode, filePattern) {
|
60
|
+
if (!filePattern) {
|
61
|
+
if (options.length > 0 && options.charAt(0) === '-') {
|
62
|
+
// Special case where the specified file permissions started with - to subtract perms, which
|
63
|
+
// get picked up by the option parser as command flags.
|
64
|
+
// If we are down by one argument and options starts with -, shift everything over.
|
65
|
+
filePattern = mode;
|
66
|
+
mode = options;
|
67
|
+
options = '';
|
68
|
+
}
|
69
|
+
else {
|
70
|
+
common.error('You must specify a file.');
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
options = common.parseOptions(options, {
|
75
|
+
'R': 'recursive',
|
76
|
+
'c': 'changes',
|
77
|
+
'v': 'verbose'
|
78
|
+
});
|
79
|
+
|
80
|
+
if (typeof filePattern === 'string') {
|
81
|
+
filePattern = [ filePattern ];
|
82
|
+
}
|
83
|
+
|
84
|
+
var files;
|
85
|
+
|
86
|
+
if (options.recursive) {
|
87
|
+
files = [];
|
88
|
+
common.expand(filePattern).forEach(function addFile(expandedFile) {
|
89
|
+
var stat = fs.lstatSync(expandedFile);
|
90
|
+
|
91
|
+
if (!stat.isSymbolicLink()) {
|
92
|
+
files.push(expandedFile);
|
93
|
+
|
94
|
+
if (stat.isDirectory()) { // intentionally does not follow symlinks.
|
95
|
+
fs.readdirSync(expandedFile).forEach(function (child) {
|
96
|
+
addFile(expandedFile + '/' + child);
|
97
|
+
});
|
98
|
+
}
|
99
|
+
}
|
100
|
+
});
|
101
|
+
}
|
102
|
+
else {
|
103
|
+
files = common.expand(filePattern);
|
104
|
+
}
|
105
|
+
|
106
|
+
files.forEach(function innerChmod(file) {
|
107
|
+
file = path.resolve(file);
|
108
|
+
if (!fs.existsSync(file)) {
|
109
|
+
common.error('File not found: ' + file);
|
110
|
+
}
|
111
|
+
|
112
|
+
// When recursing, don't follow symlinks.
|
113
|
+
if (options.recursive && fs.lstatSync(file).isSymbolicLink()) {
|
114
|
+
return;
|
115
|
+
}
|
116
|
+
|
117
|
+
var perms = fs.statSync(file).mode;
|
118
|
+
var type = perms & PERMS.TYPE_MASK;
|
119
|
+
|
120
|
+
var newPerms = perms;
|
121
|
+
|
122
|
+
if (isNaN(parseInt(mode, 8))) {
|
123
|
+
// parse options
|
124
|
+
mode.split(',').forEach(function (symbolicMode) {
|
125
|
+
/*jshint regexdash:true */
|
126
|
+
var pattern = /([ugoa]*)([=\+-])([rwxXst]*)/i;
|
127
|
+
var matches = pattern.exec(symbolicMode);
|
128
|
+
|
129
|
+
if (matches) {
|
130
|
+
var applyTo = matches[1];
|
131
|
+
var operator = matches[2];
|
132
|
+
var change = matches[3];
|
133
|
+
|
134
|
+
var changeOwner = applyTo.indexOf('u') != -1 || applyTo === 'a' || applyTo === '';
|
135
|
+
var changeGroup = applyTo.indexOf('g') != -1 || applyTo === 'a' || applyTo === '';
|
136
|
+
var changeOther = applyTo.indexOf('o') != -1 || applyTo === 'a' || applyTo === '';
|
137
|
+
|
138
|
+
var changeRead = change.indexOf('r') != -1;
|
139
|
+
var changeWrite = change.indexOf('w') != -1;
|
140
|
+
var changeExec = change.indexOf('x') != -1;
|
141
|
+
var changeSticky = change.indexOf('t') != -1;
|
142
|
+
var changeSetuid = change.indexOf('s') != -1;
|
143
|
+
|
144
|
+
var mask = 0;
|
145
|
+
if (changeOwner) {
|
146
|
+
mask |= (changeRead ? PERMS.OWNER_READ : 0) + (changeWrite ? PERMS.OWNER_WRITE : 0) + (changeExec ? PERMS.OWNER_EXEC : 0) + (changeSetuid ? PERMS.SETUID : 0);
|
147
|
+
}
|
148
|
+
if (changeGroup) {
|
149
|
+
mask |= (changeRead ? PERMS.GROUP_READ : 0) + (changeWrite ? PERMS.GROUP_WRITE : 0) + (changeExec ? PERMS.GROUP_EXEC : 0) + (changeSetuid ? PERMS.SETGID : 0);
|
150
|
+
}
|
151
|
+
if (changeOther) {
|
152
|
+
mask |= (changeRead ? PERMS.OTHER_READ : 0) + (changeWrite ? PERMS.OTHER_WRITE : 0) + (changeExec ? PERMS.OTHER_EXEC : 0);
|
153
|
+
}
|
154
|
+
|
155
|
+
// Sticky bit is special - it's not tied to user, group or other.
|
156
|
+
if (changeSticky) {
|
157
|
+
mask |= PERMS.STICKY;
|
158
|
+
}
|
159
|
+
|
160
|
+
switch (operator) {
|
161
|
+
case '+':
|
162
|
+
newPerms |= mask;
|
163
|
+
break;
|
164
|
+
|
165
|
+
case '-':
|
166
|
+
newPerms &= ~mask;
|
167
|
+
break;
|
168
|
+
|
169
|
+
case '=':
|
170
|
+
newPerms = type + mask;
|
171
|
+
|
172
|
+
// According to POSIX, when using = to explicitly set the permissions, setuid and setgid can never be cleared.
|
173
|
+
if (fs.statSync(file).isDirectory()) {
|
174
|
+
newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms;
|
175
|
+
}
|
176
|
+
break;
|
177
|
+
}
|
178
|
+
|
179
|
+
if (options.verbose) {
|
180
|
+
log(file + ' -> ' + newPerms.toString(8));
|
181
|
+
}
|
182
|
+
|
183
|
+
if (perms != newPerms) {
|
184
|
+
if (!options.verbose && options.changes) {
|
185
|
+
log(file + ' -> ' + newPerms.toString(8));
|
186
|
+
}
|
187
|
+
fs.chmodSync(file, newPerms);
|
188
|
+
}
|
189
|
+
}
|
190
|
+
else {
|
191
|
+
common.error('Invalid symbolic mode change: ' + symbolicMode);
|
192
|
+
}
|
193
|
+
});
|
194
|
+
}
|
195
|
+
else {
|
196
|
+
// they gave us a full number
|
197
|
+
newPerms = type + parseInt(mode, 8);
|
198
|
+
|
199
|
+
// POSIX rules are that setuid and setgid can only be added using numeric form, but not cleared.
|
200
|
+
if (fs.statSync(file).isDirectory()) {
|
201
|
+
newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms;
|
202
|
+
}
|
203
|
+
|
204
|
+
fs.chmodSync(file, newPerms);
|
205
|
+
}
|
206
|
+
});
|
207
|
+
}
|
208
|
+
module.exports = _chmod;
|
@@ -0,0 +1,203 @@
|
|
1
|
+
var os = require('os');
|
2
|
+
var fs = require('fs');
|
3
|
+
var _ls = require('./ls');
|
4
|
+
|
5
|
+
// Module globals
|
6
|
+
var config = {
|
7
|
+
silent: false,
|
8
|
+
fatal: false
|
9
|
+
};
|
10
|
+
exports.config = config;
|
11
|
+
|
12
|
+
var state = {
|
13
|
+
error: null,
|
14
|
+
currentCmd: 'shell.js',
|
15
|
+
tempDir: null
|
16
|
+
};
|
17
|
+
exports.state = state;
|
18
|
+
|
19
|
+
var platform = os.type().match(/^Win/) ? 'win' : 'unix';
|
20
|
+
exports.platform = platform;
|
21
|
+
|
22
|
+
function log() {
|
23
|
+
if (!config.silent)
|
24
|
+
console.log.apply(this, arguments);
|
25
|
+
}
|
26
|
+
exports.log = log;
|
27
|
+
|
28
|
+
// Shows error message. Throws unless _continue or config.fatal are true
|
29
|
+
function error(msg, _continue) {
|
30
|
+
if (state.error === null)
|
31
|
+
state.error = '';
|
32
|
+
state.error += state.currentCmd + ': ' + msg + '\n';
|
33
|
+
|
34
|
+
if (msg.length > 0)
|
35
|
+
log(state.error);
|
36
|
+
|
37
|
+
if (config.fatal)
|
38
|
+
process.exit(1);
|
39
|
+
|
40
|
+
if (!_continue)
|
41
|
+
throw '';
|
42
|
+
}
|
43
|
+
exports.error = error;
|
44
|
+
|
45
|
+
// In the future, when Proxies are default, we can add methods like `.to()` to primitive strings.
|
46
|
+
// For now, this is a dummy function to bookmark places we need such strings
|
47
|
+
function ShellString(str) {
|
48
|
+
return str;
|
49
|
+
}
|
50
|
+
exports.ShellString = ShellString;
|
51
|
+
|
52
|
+
// Returns {'alice': true, 'bob': false} when passed a dictionary, e.g.:
|
53
|
+
// parseOptions('-a', {'a':'alice', 'b':'bob'});
|
54
|
+
function parseOptions(str, map) {
|
55
|
+
if (!map)
|
56
|
+
error('parseOptions() internal error: no map given');
|
57
|
+
|
58
|
+
// All options are false by default
|
59
|
+
var options = {};
|
60
|
+
for (var letter in map)
|
61
|
+
options[map[letter]] = false;
|
62
|
+
|
63
|
+
if (!str)
|
64
|
+
return options; // defaults
|
65
|
+
|
66
|
+
if (typeof str !== 'string')
|
67
|
+
error('parseOptions() internal error: wrong str');
|
68
|
+
|
69
|
+
// e.g. match[1] = 'Rf' for str = '-Rf'
|
70
|
+
var match = str.match(/^\-(.+)/);
|
71
|
+
if (!match)
|
72
|
+
return options;
|
73
|
+
|
74
|
+
// e.g. chars = ['R', 'f']
|
75
|
+
var chars = match[1].split('');
|
76
|
+
|
77
|
+
chars.forEach(function(c) {
|
78
|
+
if (c in map)
|
79
|
+
options[map[c]] = true;
|
80
|
+
else
|
81
|
+
error('option not recognized: '+c);
|
82
|
+
});
|
83
|
+
|
84
|
+
return options;
|
85
|
+
}
|
86
|
+
exports.parseOptions = parseOptions;
|
87
|
+
|
88
|
+
// Expands wildcards with matching (ie. existing) file names.
|
89
|
+
// For example:
|
90
|
+
// expand(['file*.js']) = ['file1.js', 'file2.js', ...]
|
91
|
+
// (if the files 'file1.js', 'file2.js', etc, exist in the current dir)
|
92
|
+
function expand(list) {
|
93
|
+
var expanded = [];
|
94
|
+
list.forEach(function(listEl) {
|
95
|
+
// Wildcard present on directory names ?
|
96
|
+
if(listEl.search(/\*[^\/]*\//) > -1 || listEl.search(/\*\*[^\/]*\//) > -1) {
|
97
|
+
var match = listEl.match(/^([^*]+\/|)(.*)/);
|
98
|
+
var root = match[1];
|
99
|
+
var rest = match[2];
|
100
|
+
var restRegex = rest.replace(/\*\*/g, ".*").replace(/\*/g, "[^\\/]*");
|
101
|
+
restRegex = new RegExp(restRegex);
|
102
|
+
|
103
|
+
_ls('-R', root).filter(function (e) {
|
104
|
+
return restRegex.test(e);
|
105
|
+
}).forEach(function(file) {
|
106
|
+
expanded.push(file);
|
107
|
+
});
|
108
|
+
}
|
109
|
+
// Wildcard present on file names ?
|
110
|
+
else if (listEl.search(/\*/) > -1) {
|
111
|
+
_ls('', listEl).forEach(function(file) {
|
112
|
+
expanded.push(file);
|
113
|
+
});
|
114
|
+
} else {
|
115
|
+
expanded.push(listEl);
|
116
|
+
}
|
117
|
+
});
|
118
|
+
return expanded;
|
119
|
+
}
|
120
|
+
exports.expand = expand;
|
121
|
+
|
122
|
+
// Normalizes _unlinkSync() across platforms to match Unix behavior, i.e.
|
123
|
+
// file can be unlinked even if it's read-only, see https://github.com/joyent/node/issues/3006
|
124
|
+
function unlinkSync(file) {
|
125
|
+
try {
|
126
|
+
fs.unlinkSync(file);
|
127
|
+
} catch(e) {
|
128
|
+
// Try to override file permission
|
129
|
+
if (e.code === 'EPERM') {
|
130
|
+
fs.chmodSync(file, '0666');
|
131
|
+
fs.unlinkSync(file);
|
132
|
+
} else {
|
133
|
+
throw e;
|
134
|
+
}
|
135
|
+
}
|
136
|
+
}
|
137
|
+
exports.unlinkSync = unlinkSync;
|
138
|
+
|
139
|
+
// e.g. 'shelljs_a5f185d0443ca...'
|
140
|
+
function randomFileName() {
|
141
|
+
function randomHash(count) {
|
142
|
+
if (count === 1)
|
143
|
+
return parseInt(16*Math.random(), 10).toString(16);
|
144
|
+
else {
|
145
|
+
var hash = '';
|
146
|
+
for (var i=0; i<count; i++)
|
147
|
+
hash += randomHash(1);
|
148
|
+
return hash;
|
149
|
+
}
|
150
|
+
}
|
151
|
+
|
152
|
+
return 'shelljs_'+randomHash(20);
|
153
|
+
}
|
154
|
+
exports.randomFileName = randomFileName;
|
155
|
+
|
156
|
+
// extend(target_obj, source_obj1 [, source_obj2 ...])
|
157
|
+
// Shallow extend, e.g.:
|
158
|
+
// extend({A:1}, {b:2}, {c:3}) returns {A:1, b:2, c:3}
|
159
|
+
function extend(target) {
|
160
|
+
var sources = [].slice.call(arguments, 1);
|
161
|
+
sources.forEach(function(source) {
|
162
|
+
for (var key in source)
|
163
|
+
target[key] = source[key];
|
164
|
+
});
|
165
|
+
|
166
|
+
return target;
|
167
|
+
}
|
168
|
+
exports.extend = extend;
|
169
|
+
|
170
|
+
// Common wrapper for all Unix-like commands
|
171
|
+
function wrap(cmd, fn, options) {
|
172
|
+
return function() {
|
173
|
+
var retValue = null;
|
174
|
+
|
175
|
+
state.currentCmd = cmd;
|
176
|
+
state.error = null;
|
177
|
+
|
178
|
+
try {
|
179
|
+
var args = [].slice.call(arguments, 0);
|
180
|
+
|
181
|
+
if (options && options.notUnix) {
|
182
|
+
retValue = fn.apply(this, args);
|
183
|
+
} else {
|
184
|
+
if (args.length === 0 || typeof args[0] !== 'string' || args[0][0] !== '-')
|
185
|
+
args.unshift(''); // only add dummy option if '-option' not already present
|
186
|
+
retValue = fn.apply(this, args);
|
187
|
+
}
|
188
|
+
} catch (e) {
|
189
|
+
if (!state.error) {
|
190
|
+
// If state.error hasn't been set it's an error thrown by Node, not us - probably a bug...
|
191
|
+
console.log('shell.js: internal error');
|
192
|
+
console.log(e.stack || e);
|
193
|
+
process.exit(1);
|
194
|
+
}
|
195
|
+
if (config.fatal)
|
196
|
+
throw e;
|
197
|
+
}
|
198
|
+
|
199
|
+
state.currentCmd = 'shell.js';
|
200
|
+
return retValue;
|
201
|
+
};
|
202
|
+
} // wrap
|
203
|
+
exports.wrap = wrap;
|
@@ -0,0 +1,201 @@
|
|
1
|
+
var fs = require('fs');
|
2
|
+
var path = require('path');
|
3
|
+
var common = require('./common');
|
4
|
+
var os = require('os');
|
5
|
+
|
6
|
+
// Buffered file copy, synchronous
|
7
|
+
// (Using readFileSync() + writeFileSync() could easily cause a memory overflow
|
8
|
+
// with large files)
|
9
|
+
function copyFileSync(srcFile, destFile) {
|
10
|
+
if (!fs.existsSync(srcFile))
|
11
|
+
common.error('copyFileSync: no such file or directory: ' + srcFile);
|
12
|
+
|
13
|
+
var BUF_LENGTH = 64*1024,
|
14
|
+
buf = new Buffer(BUF_LENGTH),
|
15
|
+
bytesRead = BUF_LENGTH,
|
16
|
+
pos = 0,
|
17
|
+
fdr = null,
|
18
|
+
fdw = null;
|
19
|
+
|
20
|
+
try {
|
21
|
+
fdr = fs.openSync(srcFile, 'r');
|
22
|
+
} catch(e) {
|
23
|
+
common.error('copyFileSync: could not read src file ('+srcFile+')');
|
24
|
+
}
|
25
|
+
|
26
|
+
try {
|
27
|
+
fdw = fs.openSync(destFile, 'w');
|
28
|
+
} catch(e) {
|
29
|
+
common.error('copyFileSync: could not write to dest file (code='+e.code+'):'+destFile);
|
30
|
+
}
|
31
|
+
|
32
|
+
while (bytesRead === BUF_LENGTH) {
|
33
|
+
bytesRead = fs.readSync(fdr, buf, 0, BUF_LENGTH, pos);
|
34
|
+
fs.writeSync(fdw, buf, 0, bytesRead);
|
35
|
+
pos += bytesRead;
|
36
|
+
}
|
37
|
+
|
38
|
+
fs.closeSync(fdr);
|
39
|
+
fs.closeSync(fdw);
|
40
|
+
|
41
|
+
fs.chmodSync(destFile, fs.statSync(srcFile).mode);
|
42
|
+
}
|
43
|
+
|
44
|
+
// Recursively copies 'sourceDir' into 'destDir'
|
45
|
+
// Adapted from https://github.com/ryanmcgrath/wrench-js
|
46
|
+
//
|
47
|
+
// Copyright (c) 2010 Ryan McGrath
|
48
|
+
// Copyright (c) 2012 Artur Adib
|
49
|
+
//
|
50
|
+
// Licensed under the MIT License
|
51
|
+
// http://www.opensource.org/licenses/mit-license.php
|
52
|
+
function cpdirSyncRecursive(sourceDir, destDir, opts) {
|
53
|
+
if (!opts) opts = {};
|
54
|
+
|
55
|
+
/* Create the directory where all our junk is moving to; read the mode of the source directory and mirror it */
|
56
|
+
var checkDir = fs.statSync(sourceDir);
|
57
|
+
try {
|
58
|
+
fs.mkdirSync(destDir, checkDir.mode);
|
59
|
+
} catch (e) {
|
60
|
+
//if the directory already exists, that's okay
|
61
|
+
if (e.code !== 'EEXIST') throw e;
|
62
|
+
}
|
63
|
+
|
64
|
+
var files = fs.readdirSync(sourceDir);
|
65
|
+
|
66
|
+
for (var i = 0; i < files.length; i++) {
|
67
|
+
var srcFile = sourceDir + "/" + files[i];
|
68
|
+
var destFile = destDir + "/" + files[i];
|
69
|
+
var srcFileStat = fs.lstatSync(srcFile);
|
70
|
+
|
71
|
+
if (srcFileStat.isDirectory()) {
|
72
|
+
/* recursion this thing right on back. */
|
73
|
+
cpdirSyncRecursive(srcFile, destFile, opts);
|
74
|
+
} else if (srcFileStat.isSymbolicLink()) {
|
75
|
+
var symlinkFull = fs.readlinkSync(srcFile);
|
76
|
+
fs.symlinkSync(symlinkFull, destFile, os.platform() === "win32" ? "junction" : null);
|
77
|
+
} else {
|
78
|
+
/* At this point, we've hit a file actually worth copying... so copy it on over. */
|
79
|
+
if (fs.existsSync(destFile) && !opts.force) {
|
80
|
+
common.log('skipping existing file: ' + files[i]);
|
81
|
+
} else {
|
82
|
+
copyFileSync(srcFile, destFile);
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
} // for files
|
87
|
+
} // cpdirSyncRecursive
|
88
|
+
|
89
|
+
|
90
|
+
//@
|
91
|
+
//@ ### cp([options ,] source [,source ...], dest)
|
92
|
+
//@ ### cp([options ,] source_array, dest)
|
93
|
+
//@ Available options:
|
94
|
+
//@
|
95
|
+
//@ + `-f`: force
|
96
|
+
//@ + `-r, -R`: recursive
|
97
|
+
//@
|
98
|
+
//@ Examples:
|
99
|
+
//@
|
100
|
+
//@ ```javascript
|
101
|
+
//@ cp('file1', 'dir1');
|
102
|
+
//@ cp('-Rf', '/tmp/*', '/usr/local/*', '/home/tmp');
|
103
|
+
//@ cp('-Rf', ['/tmp/*', '/usr/local/*'], '/home/tmp'); // same as above
|
104
|
+
//@ ```
|
105
|
+
//@
|
106
|
+
//@ Copies files. The wildcard `*` is accepted.
|
107
|
+
function _cp(options, sources, dest) {
|
108
|
+
options = common.parseOptions(options, {
|
109
|
+
'f': 'force',
|
110
|
+
'R': 'recursive',
|
111
|
+
'r': 'recursive'
|
112
|
+
});
|
113
|
+
|
114
|
+
// Get sources, dest
|
115
|
+
if (arguments.length < 3) {
|
116
|
+
common.error('missing <source> and/or <dest>');
|
117
|
+
} else if (arguments.length > 3) {
|
118
|
+
sources = [].slice.call(arguments, 1, arguments.length - 1);
|
119
|
+
dest = arguments[arguments.length - 1];
|
120
|
+
} else if (typeof sources === 'string') {
|
121
|
+
sources = [sources];
|
122
|
+
} else if ('length' in sources) {
|
123
|
+
sources = sources; // no-op for array
|
124
|
+
} else {
|
125
|
+
common.error('invalid arguments');
|
126
|
+
}
|
127
|
+
|
128
|
+
var exists = fs.existsSync(dest),
|
129
|
+
stats = exists && fs.statSync(dest);
|
130
|
+
|
131
|
+
// Dest is not existing dir, but multiple sources given
|
132
|
+
if ((!exists || !stats.isDirectory()) && sources.length > 1)
|
133
|
+
common.error('dest is not a directory (too many sources)');
|
134
|
+
|
135
|
+
// Dest is an existing file, but no -f given
|
136
|
+
if (exists && stats.isFile() && !options.force)
|
137
|
+
common.error('dest file already exists: ' + dest);
|
138
|
+
|
139
|
+
if (options.recursive) {
|
140
|
+
// Recursive allows the shortcut syntax "sourcedir/" for "sourcedir/*"
|
141
|
+
// (see Github issue #15)
|
142
|
+
sources.forEach(function(src, i) {
|
143
|
+
if (src[src.length - 1] === '/')
|
144
|
+
sources[i] += '*';
|
145
|
+
});
|
146
|
+
|
147
|
+
// Create dest
|
148
|
+
try {
|
149
|
+
fs.mkdirSync(dest, parseInt('0777', 8));
|
150
|
+
} catch (e) {
|
151
|
+
// like Unix's cp, keep going even if we can't create dest dir
|
152
|
+
}
|
153
|
+
}
|
154
|
+
|
155
|
+
sources = common.expand(sources);
|
156
|
+
|
157
|
+
sources.forEach(function(src) {
|
158
|
+
if (!fs.existsSync(src)) {
|
159
|
+
common.error('no such file or directory: '+src, true);
|
160
|
+
return; // skip file
|
161
|
+
}
|
162
|
+
|
163
|
+
// If here, src exists
|
164
|
+
if (fs.statSync(src).isDirectory()) {
|
165
|
+
if (!options.recursive) {
|
166
|
+
// Non-Recursive
|
167
|
+
common.log(src + ' is a directory (not copied)');
|
168
|
+
} else {
|
169
|
+
// Recursive
|
170
|
+
// 'cp /a/source dest' should create 'source' in 'dest'
|
171
|
+
var newDest = path.join(dest, path.basename(src)),
|
172
|
+
checkDir = fs.statSync(src);
|
173
|
+
try {
|
174
|
+
fs.mkdirSync(newDest, checkDir.mode);
|
175
|
+
} catch (e) {
|
176
|
+
//if the directory already exists, that's okay
|
177
|
+
if (e.code !== 'EEXIST') throw e;
|
178
|
+
}
|
179
|
+
|
180
|
+
cpdirSyncRecursive(src, newDest, {force: options.force});
|
181
|
+
}
|
182
|
+
return; // done with dir
|
183
|
+
}
|
184
|
+
|
185
|
+
// If here, src is a file
|
186
|
+
|
187
|
+
// When copying to '/path/dir':
|
188
|
+
// thisDest = '/path/dir/file1'
|
189
|
+
var thisDest = dest;
|
190
|
+
if (fs.existsSync(dest) && fs.statSync(dest).isDirectory())
|
191
|
+
thisDest = path.normalize(dest + '/' + path.basename(src));
|
192
|
+
|
193
|
+
if (fs.existsSync(thisDest) && !options.force) {
|
194
|
+
common.error('dest file already exists: ' + thisDest, true);
|
195
|
+
return; // skip file
|
196
|
+
}
|
197
|
+
|
198
|
+
copyFileSync(src, thisDest);
|
199
|
+
}); // forEach(src)
|
200
|
+
}
|
201
|
+
module.exports = _cp;
|