rigid 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/bin/rigid +4 -0
- data/rigid +16 -0
- data/vendor/PyYAML-3.12.dist-info/DESCRIPTION.rst +12 -0
- data/vendor/PyYAML-3.12.dist-info/INSTALLER +1 -0
- data/vendor/PyYAML-3.12.dist-info/METADATA +35 -0
- data/vendor/PyYAML-3.12.dist-info/RECORD +42 -0
- data/vendor/PyYAML-3.12.dist-info/WHEEL +5 -0
- data/vendor/PyYAML-3.12.dist-info/metadata.json +1 -0
- data/vendor/PyYAML-3.12.dist-info/top_level.txt +2 -0
- data/vendor/_yaml.so +0 -0
- data/vendor/click/__init__.py +98 -0
- data/vendor/click/__init__.pyc +0 -0
- data/vendor/click/_bashcomplete.py +83 -0
- data/vendor/click/_bashcomplete.pyc +0 -0
- data/vendor/click/_compat.py +642 -0
- data/vendor/click/_compat.pyc +0 -0
- data/vendor/click/_termui_impl.py +547 -0
- data/vendor/click/_termui_impl.pyc +0 -0
- data/vendor/click/_textwrap.py +38 -0
- data/vendor/click/_textwrap.pyc +0 -0
- data/vendor/click/_unicodefun.py +119 -0
- data/vendor/click/_unicodefun.pyc +0 -0
- data/vendor/click/_winconsole.py +273 -0
- data/vendor/click/_winconsole.pyc +0 -0
- data/vendor/click/core.py +1738 -0
- data/vendor/click/core.pyc +0 -0
- data/vendor/click/decorators.py +304 -0
- data/vendor/click/decorators.pyc +0 -0
- data/vendor/click/exceptions.py +201 -0
- data/vendor/click/exceptions.pyc +0 -0
- data/vendor/click/formatting.py +256 -0
- data/vendor/click/formatting.pyc +0 -0
- data/vendor/click/globals.py +48 -0
- data/vendor/click/globals.pyc +0 -0
- data/vendor/click/parser.py +426 -0
- data/vendor/click/parser.pyc +0 -0
- data/vendor/click/termui.py +539 -0
- data/vendor/click/termui.pyc +0 -0
- data/vendor/click/testing.py +322 -0
- data/vendor/click/testing.pyc +0 -0
- data/vendor/click/types.py +550 -0
- data/vendor/click/types.pyc +0 -0
- data/vendor/click/utils.py +415 -0
- data/vendor/click/utils.pyc +0 -0
- data/vendor/click-6.6.dist-info/DESCRIPTION.rst +3 -0
- data/vendor/click-6.6.dist-info/INSTALLER +1 -0
- data/vendor/click-6.6.dist-info/METADATA +16 -0
- data/vendor/click-6.6.dist-info/RECORD +41 -0
- data/vendor/click-6.6.dist-info/WHEEL +6 -0
- data/vendor/click-6.6.dist-info/metadata.json +1 -0
- data/vendor/click-6.6.dist-info/top_level.txt +1 -0
- data/vendor/easy_install.py +5 -0
- data/vendor/easy_install.pyc +0 -0
- data/vendor/pip-9.0.1.dist-info/DESCRIPTION.rst +39 -0
- data/vendor/pip-9.0.1.dist-info/INSTALLER +1 -0
- data/vendor/pip-9.0.1.dist-info/METADATA +69 -0
- data/vendor/pip-9.0.1.dist-info/RECORD +501 -0
- data/vendor/pip-9.0.1.dist-info/WHEEL +6 -0
- data/vendor/pip-9.0.1.dist-info/entry_points.txt +5 -0
- data/vendor/pip-9.0.1.dist-info/metadata.json +1 -0
- data/vendor/pip-9.0.1.dist-info/top_level.txt +1 -0
- data/vendor/pkg_resources/__init__.py +3051 -0
- data/vendor/pkg_resources/__init__.pyc +0 -0
- data/vendor/pkg_resources/_vendor/__init__.py +0 -0
- data/vendor/pkg_resources/_vendor/__init__.pyc +0 -0
- data/vendor/pkg_resources/_vendor/appdirs.py +552 -0
- data/vendor/pkg_resources/_vendor/appdirs.pyc +0 -0
- data/vendor/pkg_resources/_vendor/packaging/__about__.py +21 -0
- data/vendor/pkg_resources/_vendor/packaging/__about__.pyc +0 -0
- data/vendor/pkg_resources/_vendor/packaging/__init__.py +14 -0
- data/vendor/pkg_resources/_vendor/packaging/__init__.pyc +0 -0
- data/vendor/pkg_resources/_vendor/packaging/_compat.py +30 -0
- data/vendor/pkg_resources/_vendor/packaging/_compat.pyc +0 -0
- data/vendor/pkg_resources/_vendor/packaging/_structures.py +68 -0
- data/vendor/pkg_resources/_vendor/packaging/_structures.pyc +0 -0
- data/vendor/pkg_resources/_vendor/packaging/markers.py +287 -0
- data/vendor/pkg_resources/_vendor/packaging/markers.pyc +0 -0
- data/vendor/pkg_resources/_vendor/packaging/requirements.py +127 -0
- data/vendor/pkg_resources/_vendor/packaging/requirements.pyc +0 -0
- data/vendor/pkg_resources/_vendor/packaging/specifiers.py +774 -0
- data/vendor/pkg_resources/_vendor/packaging/specifiers.pyc +0 -0
- data/vendor/pkg_resources/_vendor/packaging/utils.py +14 -0
- data/vendor/pkg_resources/_vendor/packaging/utils.pyc +0 -0
- data/vendor/pkg_resources/_vendor/packaging/version.py +393 -0
- data/vendor/pkg_resources/_vendor/packaging/version.pyc +0 -0
- data/vendor/pkg_resources/_vendor/pyparsing.py +5696 -0
- data/vendor/pkg_resources/_vendor/pyparsing.pyc +0 -0
- data/vendor/pkg_resources/_vendor/six.py +868 -0
- data/vendor/pkg_resources/_vendor/six.pyc +0 -0
- data/vendor/pkg_resources/extern/__init__.py +73 -0
- data/vendor/pkg_resources/extern/__init__.pyc +0 -0
- data/vendor/requests/__init__.py +86 -0
- data/vendor/requests/__init__.pyc +0 -0
- data/vendor/requests/adapters.py +503 -0
- data/vendor/requests/adapters.pyc +0 -0
- data/vendor/requests/api.py +148 -0
- data/vendor/requests/api.pyc +0 -0
- data/vendor/requests/auth.py +252 -0
- data/vendor/requests/auth.pyc +0 -0
- data/vendor/requests/cacert.pem +5616 -0
- data/vendor/requests/certs.py +25 -0
- data/vendor/requests/certs.pyc +0 -0
- data/vendor/requests/compat.py +66 -0
- data/vendor/requests/compat.pyc +0 -0
- data/vendor/requests/cookies.py +540 -0
- data/vendor/requests/cookies.pyc +0 -0
- data/vendor/requests/exceptions.py +114 -0
- data/vendor/requests/exceptions.pyc +0 -0
- data/vendor/requests/hooks.py +34 -0
- data/vendor/requests/hooks.pyc +0 -0
- data/vendor/requests/models.py +873 -0
- data/vendor/requests/models.pyc +0 -0
- data/vendor/requests/packages/__init__.py +36 -0
- data/vendor/requests/packages/__init__.pyc +0 -0
- data/vendor/requests/packages/chardet/__init__.py +32 -0
- data/vendor/requests/packages/chardet/__init__.pyc +0 -0
- data/vendor/requests/packages/chardet/big5freq.py +925 -0
- data/vendor/requests/packages/chardet/big5freq.pyc +0 -0
- data/vendor/requests/packages/chardet/big5prober.py +42 -0
- data/vendor/requests/packages/chardet/big5prober.pyc +0 -0
- data/vendor/requests/packages/chardet/chardetect.py +80 -0
- data/vendor/requests/packages/chardet/chardetect.pyc +0 -0
- data/vendor/requests/packages/chardet/chardistribution.py +231 -0
- data/vendor/requests/packages/chardet/chardistribution.pyc +0 -0
- data/vendor/requests/packages/chardet/charsetgroupprober.py +106 -0
- data/vendor/requests/packages/chardet/charsetgroupprober.pyc +0 -0
- data/vendor/requests/packages/chardet/charsetprober.py +62 -0
- data/vendor/requests/packages/chardet/charsetprober.pyc +0 -0
- data/vendor/requests/packages/chardet/codingstatemachine.py +61 -0
- data/vendor/requests/packages/chardet/codingstatemachine.pyc +0 -0
- data/vendor/requests/packages/chardet/compat.py +34 -0
- data/vendor/requests/packages/chardet/compat.pyc +0 -0
- data/vendor/requests/packages/chardet/constants.py +39 -0
- data/vendor/requests/packages/chardet/constants.pyc +0 -0
- data/vendor/requests/packages/chardet/cp949prober.py +44 -0
- data/vendor/requests/packages/chardet/cp949prober.pyc +0 -0
- data/vendor/requests/packages/chardet/escprober.py +86 -0
- data/vendor/requests/packages/chardet/escprober.pyc +0 -0
- data/vendor/requests/packages/chardet/escsm.py +242 -0
- data/vendor/requests/packages/chardet/escsm.pyc +0 -0
- data/vendor/requests/packages/chardet/eucjpprober.py +90 -0
- data/vendor/requests/packages/chardet/eucjpprober.pyc +0 -0
- data/vendor/requests/packages/chardet/euckrfreq.py +596 -0
- data/vendor/requests/packages/chardet/euckrfreq.pyc +0 -0
- data/vendor/requests/packages/chardet/euckrprober.py +42 -0
- data/vendor/requests/packages/chardet/euckrprober.pyc +0 -0
- data/vendor/requests/packages/chardet/euctwfreq.py +428 -0
- data/vendor/requests/packages/chardet/euctwfreq.pyc +0 -0
- data/vendor/requests/packages/chardet/euctwprober.py +41 -0
- data/vendor/requests/packages/chardet/euctwprober.pyc +0 -0
- data/vendor/requests/packages/chardet/gb2312freq.py +472 -0
- data/vendor/requests/packages/chardet/gb2312freq.pyc +0 -0
- data/vendor/requests/packages/chardet/gb2312prober.py +41 -0
- data/vendor/requests/packages/chardet/gb2312prober.pyc +0 -0
- data/vendor/requests/packages/chardet/hebrewprober.py +283 -0
- data/vendor/requests/packages/chardet/hebrewprober.pyc +0 -0
- data/vendor/requests/packages/chardet/jisfreq.py +569 -0
- data/vendor/requests/packages/chardet/jisfreq.pyc +0 -0
- data/vendor/requests/packages/chardet/jpcntx.py +227 -0
- data/vendor/requests/packages/chardet/jpcntx.pyc +0 -0
- data/vendor/requests/packages/chardet/langbulgarianmodel.py +229 -0
- data/vendor/requests/packages/chardet/langbulgarianmodel.pyc +0 -0
- data/vendor/requests/packages/chardet/langcyrillicmodel.py +329 -0
- data/vendor/requests/packages/chardet/langcyrillicmodel.pyc +0 -0
- data/vendor/requests/packages/chardet/langgreekmodel.py +225 -0
- data/vendor/requests/packages/chardet/langgreekmodel.pyc +0 -0
- data/vendor/requests/packages/chardet/langhebrewmodel.py +201 -0
- data/vendor/requests/packages/chardet/langhebrewmodel.pyc +0 -0
- data/vendor/requests/packages/chardet/langhungarianmodel.py +225 -0
- data/vendor/requests/packages/chardet/langhungarianmodel.pyc +0 -0
- data/vendor/requests/packages/chardet/langthaimodel.py +200 -0
- data/vendor/requests/packages/chardet/langthaimodel.pyc +0 -0
- data/vendor/requests/packages/chardet/latin1prober.py +139 -0
- data/vendor/requests/packages/chardet/latin1prober.pyc +0 -0
- data/vendor/requests/packages/chardet/mbcharsetprober.py +86 -0
- data/vendor/requests/packages/chardet/mbcharsetprober.pyc +0 -0
- data/vendor/requests/packages/chardet/mbcsgroupprober.py +54 -0
- data/vendor/requests/packages/chardet/mbcsgroupprober.pyc +0 -0
- data/vendor/requests/packages/chardet/mbcssm.py +572 -0
- data/vendor/requests/packages/chardet/mbcssm.pyc +0 -0
- data/vendor/requests/packages/chardet/sbcharsetprober.py +120 -0
- data/vendor/requests/packages/chardet/sbcharsetprober.pyc +0 -0
- data/vendor/requests/packages/chardet/sbcsgroupprober.py +69 -0
- data/vendor/requests/packages/chardet/sbcsgroupprober.pyc +0 -0
- data/vendor/requests/packages/chardet/sjisprober.py +91 -0
- data/vendor/requests/packages/chardet/sjisprober.pyc +0 -0
- data/vendor/requests/packages/chardet/universaldetector.py +170 -0
- data/vendor/requests/packages/chardet/universaldetector.pyc +0 -0
- data/vendor/requests/packages/chardet/utf8prober.py +76 -0
- data/vendor/requests/packages/chardet/utf8prober.pyc +0 -0
- data/vendor/requests/packages/urllib3/__init__.py +96 -0
- data/vendor/requests/packages/urllib3/__init__.pyc +0 -0
- data/vendor/requests/packages/urllib3/_collections.py +324 -0
- data/vendor/requests/packages/urllib3/_collections.pyc +0 -0
- data/vendor/requests/packages/urllib3/connection.py +330 -0
- data/vendor/requests/packages/urllib3/connection.pyc +0 -0
- data/vendor/requests/packages/urllib3/connectionpool.py +866 -0
- data/vendor/requests/packages/urllib3/connectionpool.pyc +0 -0
- data/vendor/requests/packages/urllib3/contrib/__init__.py +0 -0
- data/vendor/requests/packages/urllib3/contrib/__init__.pyc +0 -0
- data/vendor/requests/packages/urllib3/contrib/appengine.py +231 -0
- data/vendor/requests/packages/urllib3/contrib/appengine.pyc +0 -0
- data/vendor/requests/packages/urllib3/contrib/ntlmpool.py +115 -0
- data/vendor/requests/packages/urllib3/contrib/ntlmpool.pyc +0 -0
- data/vendor/requests/packages/urllib3/contrib/pyopenssl.py +358 -0
- data/vendor/requests/packages/urllib3/contrib/pyopenssl.pyc +0 -0
- data/vendor/requests/packages/urllib3/contrib/socks.py +172 -0
- data/vendor/requests/packages/urllib3/contrib/socks.pyc +0 -0
- data/vendor/requests/packages/urllib3/exceptions.py +209 -0
- data/vendor/requests/packages/urllib3/exceptions.pyc +0 -0
- data/vendor/requests/packages/urllib3/fields.py +178 -0
- data/vendor/requests/packages/urllib3/fields.pyc +0 -0
- data/vendor/requests/packages/urllib3/filepost.py +94 -0
- data/vendor/requests/packages/urllib3/filepost.pyc +0 -0
- data/vendor/requests/packages/urllib3/packages/__init__.py +5 -0
- data/vendor/requests/packages/urllib3/packages/__init__.pyc +0 -0
- data/vendor/requests/packages/urllib3/packages/ordered_dict.py +259 -0
- data/vendor/requests/packages/urllib3/packages/ordered_dict.pyc +0 -0
- data/vendor/requests/packages/urllib3/packages/six.py +868 -0
- data/vendor/requests/packages/urllib3/packages/six.pyc +0 -0
- data/vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py +13 -0
- data/vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.pyc +0 -0
- data/vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py +105 -0
- data/vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.pyc +0 -0
- data/vendor/requests/packages/urllib3/poolmanager.py +367 -0
- data/vendor/requests/packages/urllib3/poolmanager.pyc +0 -0
- data/vendor/requests/packages/urllib3/request.py +151 -0
- data/vendor/requests/packages/urllib3/request.pyc +0 -0
- data/vendor/requests/packages/urllib3/response.py +530 -0
- data/vendor/requests/packages/urllib3/response.pyc +0 -0
- data/vendor/requests/packages/urllib3/util/__init__.py +46 -0
- data/vendor/requests/packages/urllib3/util/__init__.pyc +0 -0
- data/vendor/requests/packages/urllib3/util/connection.py +144 -0
- data/vendor/requests/packages/urllib3/util/connection.pyc +0 -0
- data/vendor/requests/packages/urllib3/util/request.py +72 -0
- data/vendor/requests/packages/urllib3/util/request.pyc +0 -0
- data/vendor/requests/packages/urllib3/util/response.py +74 -0
- data/vendor/requests/packages/urllib3/util/response.pyc +0 -0
- data/vendor/requests/packages/urllib3/util/retry.py +300 -0
- data/vendor/requests/packages/urllib3/util/retry.pyc +0 -0
- data/vendor/requests/packages/urllib3/util/ssl_.py +320 -0
- data/vendor/requests/packages/urllib3/util/ssl_.pyc +0 -0
- data/vendor/requests/packages/urllib3/util/timeout.py +242 -0
- data/vendor/requests/packages/urllib3/util/timeout.pyc +0 -0
- data/vendor/requests/packages/urllib3/util/url.py +217 -0
- data/vendor/requests/packages/urllib3/util/url.pyc +0 -0
- data/vendor/requests/sessions.py +712 -0
- data/vendor/requests/sessions.pyc +0 -0
- data/vendor/requests/status_codes.py +91 -0
- data/vendor/requests/status_codes.pyc +0 -0
- data/vendor/requests/structures.py +105 -0
- data/vendor/requests/structures.pyc +0 -0
- data/vendor/requests/utils.py +817 -0
- data/vendor/requests/utils.pyc +0 -0
- data/vendor/requests-2.11.1.dist-info/DESCRIPTION.rst +1294 -0
- data/vendor/requests-2.11.1.dist-info/INSTALLER +1 -0
- data/vendor/requests-2.11.1.dist-info/METADATA +1323 -0
- data/vendor/requests-2.11.1.dist-info/RECORD +170 -0
- data/vendor/requests-2.11.1.dist-info/WHEEL +6 -0
- data/vendor/requests-2.11.1.dist-info/metadata.json +1 -0
- data/vendor/requests-2.11.1.dist-info/top_level.txt +1 -0
- data/vendor/rigid/__init__.py +1 -0
- data/vendor/rigid/__init__.pyc +0 -0
- data/vendor/rigid/api.py +129 -0
- data/vendor/rigid/api.pyc +0 -0
- data/vendor/rigid/commands/__init__.py +260 -0
- data/vendor/rigid/commands/__init__.pyc +0 -0
- data/vendor/rigid/commands/deploy.py +0 -0
- data/vendor/rigid/commands/deploy.pyc +0 -0
- data/vendor/rigid/deploy.py +70 -0
- data/vendor/rigid/deploy.pyc +0 -0
- data/vendor/rigid/file_scanner.py +63 -0
- data/vendor/rigid/file_scanner.pyc +0 -0
- data/vendor/rigid/utils.py +17 -0
- data/vendor/rigid/utils.pyc +0 -0
- data/vendor/rigid-0.2.0.dist-info/DESCRIPTION.rst +3 -0
- data/vendor/rigid-0.2.0.dist-info/INSTALLER +1 -0
- data/vendor/rigid-0.2.0.dist-info/METADATA +23 -0
- data/vendor/rigid-0.2.0.dist-info/RECORD +49 -0
- data/vendor/rigid-0.2.0.dist-info/WHEEL +5 -0
- data/vendor/rigid-0.2.0.dist-info/entry_points.txt +3 -0
- data/vendor/rigid-0.2.0.dist-info/metadata.json +1 -0
- data/vendor/rigid-0.2.0.dist-info/top_level.txt +2 -0
- data/vendor/setuptools-28.8.0.dist-info/DESCRIPTION.rst +243 -0
- data/vendor/setuptools-28.8.0.dist-info/INSTALLER +1 -0
- data/vendor/setuptools-28.8.0.dist-info/METADATA +272 -0
- data/vendor/setuptools-28.8.0.dist-info/RECORD +143 -0
- data/vendor/setuptools-28.8.0.dist-info/WHEEL +6 -0
- data/vendor/setuptools-28.8.0.dist-info/dependency_links.txt +2 -0
- data/vendor/setuptools-28.8.0.dist-info/entry_points.txt +63 -0
- data/vendor/setuptools-28.8.0.dist-info/metadata.json +1 -0
- data/vendor/setuptools-28.8.0.dist-info/top_level.txt +3 -0
- data/vendor/setuptools-28.8.0.dist-info/zip-safe +1 -0
- data/vendor/tests/__init__.py +0 -0
- data/vendor/tests/__init__.pyc +0 -0
- data/vendor/tests/integration/__init__.py +0 -0
- data/vendor/tests/integration/__init__.pyc +0 -0
- data/vendor/tests/integration/test_app.py +63 -0
- data/vendor/tests/integration/test_app.pyc +0 -0
- data/vendor/tests/integration/test_apps.py +27 -0
- data/vendor/tests/integration/test_apps.pyc +0 -0
- data/vendor/tests/integration/test_deploy.py +128 -0
- data/vendor/tests/integration/test_deploy.pyc +0 -0
- data/vendor/tests/integration/test_domains.py +35 -0
- data/vendor/tests/integration/test_domains.pyc +0 -0
- data/vendor/tests/integration/test_login.py +37 -0
- data/vendor/tests/integration/test_login.pyc +0 -0
- data/vendor/tests/integration/test_promote.py +24 -0
- data/vendor/tests/integration/test_promote.pyc +0 -0
- data/vendor/tests/integration/test_token.py +33 -0
- data/vendor/tests/integration/test_token.pyc +0 -0
- data/vendor/tests/integration/test_whoami.py +24 -0
- data/vendor/tests/integration/test_whoami.pyc +0 -0
- data/vendor/tests/test_deploy.py +33 -0
- data/vendor/tests/test_deploy.pyc +0 -0
- data/vendor/tests/test_file_scanner.py +89 -0
- data/vendor/tests/test_file_scanner.pyc +0 -0
- data/vendor/tests/utils.py +78 -0
- data/vendor/tests/utils.pyc +0 -0
- data/vendor/wheel-0.30.0a0.dist-info/DESCRIPTION.rst +325 -0
- data/vendor/wheel-0.30.0a0.dist-info/INSTALLER +1 -0
- data/vendor/wheel-0.30.0a0.dist-info/LICENSE.txt +22 -0
- data/vendor/wheel-0.30.0a0.dist-info/METADATA +357 -0
- data/vendor/wheel-0.30.0a0.dist-info/RECORD +86 -0
- data/vendor/wheel-0.30.0a0.dist-info/WHEEL +6 -0
- data/vendor/wheel-0.30.0a0.dist-info/entry_points.txt +6 -0
- data/vendor/wheel-0.30.0a0.dist-info/metadata.json +1 -0
- data/vendor/wheel-0.30.0a0.dist-info/top_level.txt +1 -0
- data/vendor/yaml/__init__.py +315 -0
- data/vendor/yaml/__init__.pyc +0 -0
- data/vendor/yaml/composer.py +139 -0
- data/vendor/yaml/composer.pyc +0 -0
- data/vendor/yaml/constructor.py +675 -0
- data/vendor/yaml/constructor.pyc +0 -0
- data/vendor/yaml/cyaml.py +85 -0
- data/vendor/yaml/cyaml.pyc +0 -0
- data/vendor/yaml/dumper.py +62 -0
- data/vendor/yaml/dumper.pyc +0 -0
- data/vendor/yaml/emitter.py +1140 -0
- data/vendor/yaml/emitter.pyc +0 -0
- data/vendor/yaml/error.py +75 -0
- data/vendor/yaml/error.pyc +0 -0
- data/vendor/yaml/events.py +86 -0
- data/vendor/yaml/events.pyc +0 -0
- data/vendor/yaml/loader.py +40 -0
- data/vendor/yaml/loader.pyc +0 -0
- data/vendor/yaml/nodes.py +49 -0
- data/vendor/yaml/nodes.pyc +0 -0
- data/vendor/yaml/parser.py +589 -0
- data/vendor/yaml/parser.pyc +0 -0
- data/vendor/yaml/reader.py +190 -0
- data/vendor/yaml/reader.pyc +0 -0
- data/vendor/yaml/representer.py +486 -0
- data/vendor/yaml/representer.pyc +0 -0
- data/vendor/yaml/resolver.py +227 -0
- data/vendor/yaml/resolver.pyc +0 -0
- data/vendor/yaml/scanner.py +1453 -0
- data/vendor/yaml/scanner.pyc +0 -0
- data/vendor/yaml/serializer.py +111 -0
- data/vendor/yaml/serializer.pyc +0 -0
- data/vendor/yaml/tokens.py +104 -0
- data/vendor/yaml/tokens.pyc +0 -0
- metadata +407 -0
@@ -0,0 +1,426 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
"""
|
3
|
+
click.parser
|
4
|
+
~~~~~~~~~~~~
|
5
|
+
|
6
|
+
This module started out as largely a copy paste from the stdlib's
|
7
|
+
optparse module with the features removed that we do not need from
|
8
|
+
optparse because we implement them in Click on a higher level (for
|
9
|
+
instance type handling, help formatting and a lot more).
|
10
|
+
|
11
|
+
The plan is to remove more and more from here over time.
|
12
|
+
|
13
|
+
The reason this is a different module and not optparse from the stdlib
|
14
|
+
is that there are differences in 2.x and 3.x about the error messages
|
15
|
+
generated and optparse in the stdlib uses gettext for no good reason
|
16
|
+
and might cause us issues.
|
17
|
+
"""
|
18
|
+
import re
|
19
|
+
from collections import deque
|
20
|
+
from .exceptions import UsageError, NoSuchOption, BadOptionUsage, \
|
21
|
+
BadArgumentUsage
|
22
|
+
|
23
|
+
|
24
|
+
def _unpack_args(args, nargs_spec):
|
25
|
+
"""Given an iterable of arguments and an iterable of nargs specifications,
|
26
|
+
it returns a tuple with all the unpacked arguments at the first index
|
27
|
+
and all remaining arguments as the second.
|
28
|
+
|
29
|
+
The nargs specification is the number of arguments that should be consumed
|
30
|
+
or `-1` to indicate that this position should eat up all the remainders.
|
31
|
+
|
32
|
+
Missing items are filled with `None`.
|
33
|
+
"""
|
34
|
+
args = deque(args)
|
35
|
+
nargs_spec = deque(nargs_spec)
|
36
|
+
rv = []
|
37
|
+
spos = None
|
38
|
+
|
39
|
+
def _fetch(c):
|
40
|
+
try:
|
41
|
+
if spos is None:
|
42
|
+
return c.popleft()
|
43
|
+
else:
|
44
|
+
return c.pop()
|
45
|
+
except IndexError:
|
46
|
+
return None
|
47
|
+
|
48
|
+
while nargs_spec:
|
49
|
+
nargs = _fetch(nargs_spec)
|
50
|
+
if nargs == 1:
|
51
|
+
rv.append(_fetch(args))
|
52
|
+
elif nargs > 1:
|
53
|
+
x = [_fetch(args) for _ in range(nargs)]
|
54
|
+
# If we're reversed, we're pulling in the arguments in reverse,
|
55
|
+
# so we need to turn them around.
|
56
|
+
if spos is not None:
|
57
|
+
x.reverse()
|
58
|
+
rv.append(tuple(x))
|
59
|
+
elif nargs < 0:
|
60
|
+
if spos is not None:
|
61
|
+
raise TypeError('Cannot have two nargs < 0')
|
62
|
+
spos = len(rv)
|
63
|
+
rv.append(None)
|
64
|
+
|
65
|
+
# spos is the position of the wildcard (star). If it's not `None`,
|
66
|
+
# we fill it with the remainder.
|
67
|
+
if spos is not None:
|
68
|
+
rv[spos] = tuple(args)
|
69
|
+
args = []
|
70
|
+
rv[spos + 1:] = reversed(rv[spos + 1:])
|
71
|
+
|
72
|
+
return tuple(rv), list(args)
|
73
|
+
|
74
|
+
|
75
|
+
def _error_opt_args(nargs, opt):
|
76
|
+
if nargs == 1:
|
77
|
+
raise BadOptionUsage('%s option requires an argument' % opt)
|
78
|
+
raise BadOptionUsage('%s option requires %d arguments' % (opt, nargs))
|
79
|
+
|
80
|
+
|
81
|
+
def split_opt(opt):
|
82
|
+
first = opt[:1]
|
83
|
+
if first.isalnum():
|
84
|
+
return '', opt
|
85
|
+
if opt[1:2] == first:
|
86
|
+
return opt[:2], opt[2:]
|
87
|
+
return first, opt[1:]
|
88
|
+
|
89
|
+
|
90
|
+
def normalize_opt(opt, ctx):
|
91
|
+
if ctx is None or ctx.token_normalize_func is None:
|
92
|
+
return opt
|
93
|
+
prefix, opt = split_opt(opt)
|
94
|
+
return prefix + ctx.token_normalize_func(opt)
|
95
|
+
|
96
|
+
|
97
|
+
def split_arg_string(string):
|
98
|
+
"""Given an argument string this attempts to split it into small parts."""
|
99
|
+
rv = []
|
100
|
+
for match in re.finditer(r"('([^'\\]*(?:\\.[^'\\]*)*)'"
|
101
|
+
r'|"([^"\\]*(?:\\.[^"\\]*)*)"'
|
102
|
+
r'|\S+)\s*', string, re.S):
|
103
|
+
arg = match.group().strip()
|
104
|
+
if arg[:1] == arg[-1:] and arg[:1] in '"\'':
|
105
|
+
arg = arg[1:-1].encode('ascii', 'backslashreplace') \
|
106
|
+
.decode('unicode-escape')
|
107
|
+
try:
|
108
|
+
arg = type(string)(arg)
|
109
|
+
except UnicodeError:
|
110
|
+
pass
|
111
|
+
rv.append(arg)
|
112
|
+
return rv
|
113
|
+
|
114
|
+
|
115
|
+
class Option(object):
|
116
|
+
|
117
|
+
def __init__(self, opts, dest, action=None, nargs=1, const=None, obj=None):
|
118
|
+
self._short_opts = []
|
119
|
+
self._long_opts = []
|
120
|
+
self.prefixes = set()
|
121
|
+
|
122
|
+
for opt in opts:
|
123
|
+
prefix, value = split_opt(opt)
|
124
|
+
if not prefix:
|
125
|
+
raise ValueError('Invalid start character for option (%s)'
|
126
|
+
% opt)
|
127
|
+
self.prefixes.add(prefix[0])
|
128
|
+
if len(prefix) == 1 and len(value) == 1:
|
129
|
+
self._short_opts.append(opt)
|
130
|
+
else:
|
131
|
+
self._long_opts.append(opt)
|
132
|
+
self.prefixes.add(prefix)
|
133
|
+
|
134
|
+
if action is None:
|
135
|
+
action = 'store'
|
136
|
+
|
137
|
+
self.dest = dest
|
138
|
+
self.action = action
|
139
|
+
self.nargs = nargs
|
140
|
+
self.const = const
|
141
|
+
self.obj = obj
|
142
|
+
|
143
|
+
@property
|
144
|
+
def takes_value(self):
|
145
|
+
return self.action in ('store', 'append')
|
146
|
+
|
147
|
+
def process(self, value, state):
|
148
|
+
if self.action == 'store':
|
149
|
+
state.opts[self.dest] = value
|
150
|
+
elif self.action == 'store_const':
|
151
|
+
state.opts[self.dest] = self.const
|
152
|
+
elif self.action == 'append':
|
153
|
+
state.opts.setdefault(self.dest, []).append(value)
|
154
|
+
elif self.action == 'append_const':
|
155
|
+
state.opts.setdefault(self.dest, []).append(self.const)
|
156
|
+
elif self.action == 'count':
|
157
|
+
state.opts[self.dest] = state.opts.get(self.dest, 0) + 1
|
158
|
+
else:
|
159
|
+
raise ValueError('unknown action %r' % self.action)
|
160
|
+
state.order.append(self.obj)
|
161
|
+
|
162
|
+
|
163
|
+
class Argument(object):
|
164
|
+
|
165
|
+
def __init__(self, dest, nargs=1, obj=None):
|
166
|
+
self.dest = dest
|
167
|
+
self.nargs = nargs
|
168
|
+
self.obj = obj
|
169
|
+
|
170
|
+
def process(self, value, state):
|
171
|
+
if self.nargs > 1:
|
172
|
+
holes = sum(1 for x in value if x is None)
|
173
|
+
if holes == len(value):
|
174
|
+
value = None
|
175
|
+
elif holes != 0:
|
176
|
+
raise BadArgumentUsage('argument %s takes %d values'
|
177
|
+
% (self.dest, self.nargs))
|
178
|
+
state.opts[self.dest] = value
|
179
|
+
state.order.append(self.obj)
|
180
|
+
|
181
|
+
|
182
|
+
class ParsingState(object):
|
183
|
+
|
184
|
+
def __init__(self, rargs):
|
185
|
+
self.opts = {}
|
186
|
+
self.largs = []
|
187
|
+
self.rargs = rargs
|
188
|
+
self.order = []
|
189
|
+
|
190
|
+
|
191
|
+
class OptionParser(object):
|
192
|
+
"""The option parser is an internal class that is ultimately used to
|
193
|
+
parse options and arguments. It's modelled after optparse and brings
|
194
|
+
a similar but vastly simplified API. It should generally not be used
|
195
|
+
directly as the high level Click classes wrap it for you.
|
196
|
+
|
197
|
+
It's not nearly as extensible as optparse or argparse as it does not
|
198
|
+
implement features that are implemented on a higher level (such as
|
199
|
+
types or defaults).
|
200
|
+
|
201
|
+
:param ctx: optionally the :class:`~click.Context` where this parser
|
202
|
+
should go with.
|
203
|
+
"""
|
204
|
+
|
205
|
+
def __init__(self, ctx=None):
|
206
|
+
#: The :class:`~click.Context` for this parser. This might be
|
207
|
+
#: `None` for some advanced use cases.
|
208
|
+
self.ctx = ctx
|
209
|
+
#: This controls how the parser deals with interspersed arguments.
|
210
|
+
#: If this is set to `False`, the parser will stop on the first
|
211
|
+
#: non-option. Click uses this to implement nested subcommands
|
212
|
+
#: safely.
|
213
|
+
self.allow_interspersed_args = True
|
214
|
+
#: This tells the parser how to deal with unknown options. By
|
215
|
+
#: default it will error out (which is sensible), but there is a
|
216
|
+
#: second mode where it will ignore it and continue processing
|
217
|
+
#: after shifting all the unknown options into the resulting args.
|
218
|
+
self.ignore_unknown_options = False
|
219
|
+
if ctx is not None:
|
220
|
+
self.allow_interspersed_args = ctx.allow_interspersed_args
|
221
|
+
self.ignore_unknown_options = ctx.ignore_unknown_options
|
222
|
+
self._short_opt = {}
|
223
|
+
self._long_opt = {}
|
224
|
+
self._opt_prefixes = set(['-', '--'])
|
225
|
+
self._args = []
|
226
|
+
|
227
|
+
def add_option(self, opts, dest, action=None, nargs=1, const=None,
|
228
|
+
obj=None):
|
229
|
+
"""Adds a new option named `dest` to the parser. The destination
|
230
|
+
is not inferred (unlike with optparse) and needs to be explicitly
|
231
|
+
provided. Action can be any of ``store``, ``store_const``,
|
232
|
+
``append``, ``appnd_const`` or ``count``.
|
233
|
+
|
234
|
+
The `obj` can be used to identify the option in the order list
|
235
|
+
that is returned from the parser.
|
236
|
+
"""
|
237
|
+
if obj is None:
|
238
|
+
obj = dest
|
239
|
+
opts = [normalize_opt(opt, self.ctx) for opt in opts]
|
240
|
+
option = Option(opts, dest, action=action, nargs=nargs,
|
241
|
+
const=const, obj=obj)
|
242
|
+
self._opt_prefixes.update(option.prefixes)
|
243
|
+
for opt in option._short_opts:
|
244
|
+
self._short_opt[opt] = option
|
245
|
+
for opt in option._long_opts:
|
246
|
+
self._long_opt[opt] = option
|
247
|
+
|
248
|
+
def add_argument(self, dest, nargs=1, obj=None):
|
249
|
+
"""Adds a positional argument named `dest` to the parser.
|
250
|
+
|
251
|
+
The `obj` can be used to identify the option in the order list
|
252
|
+
that is returned from the parser.
|
253
|
+
"""
|
254
|
+
if obj is None:
|
255
|
+
obj = dest
|
256
|
+
self._args.append(Argument(dest=dest, nargs=nargs, obj=obj))
|
257
|
+
|
258
|
+
def parse_args(self, args):
|
259
|
+
"""Parses positional arguments and returns ``(values, args, order)``
|
260
|
+
for the parsed options and arguments as well as the leftover
|
261
|
+
arguments if there are any. The order is a list of objects as they
|
262
|
+
appear on the command line. If arguments appear multiple times they
|
263
|
+
will be memorized multiple times as well.
|
264
|
+
"""
|
265
|
+
state = ParsingState(args)
|
266
|
+
try:
|
267
|
+
self._process_args_for_options(state)
|
268
|
+
self._process_args_for_args(state)
|
269
|
+
except UsageError:
|
270
|
+
if self.ctx is None or not self.ctx.resilient_parsing:
|
271
|
+
raise
|
272
|
+
return state.opts, state.largs, state.order
|
273
|
+
|
274
|
+
def _process_args_for_args(self, state):
|
275
|
+
pargs, args = _unpack_args(state.largs + state.rargs,
|
276
|
+
[x.nargs for x in self._args])
|
277
|
+
|
278
|
+
for idx, arg in enumerate(self._args):
|
279
|
+
arg.process(pargs[idx], state)
|
280
|
+
|
281
|
+
state.largs = args
|
282
|
+
state.rargs = []
|
283
|
+
|
284
|
+
def _process_args_for_options(self, state):
|
285
|
+
while state.rargs:
|
286
|
+
arg = state.rargs.pop(0)
|
287
|
+
arglen = len(arg)
|
288
|
+
# Double dashes always handled explicitly regardless of what
|
289
|
+
# prefixes are valid.
|
290
|
+
if arg == '--':
|
291
|
+
return
|
292
|
+
elif arg[:1] in self._opt_prefixes and arglen > 1:
|
293
|
+
self._process_opts(arg, state)
|
294
|
+
elif self.allow_interspersed_args:
|
295
|
+
state.largs.append(arg)
|
296
|
+
else:
|
297
|
+
state.rargs.insert(0, arg)
|
298
|
+
return
|
299
|
+
|
300
|
+
# Say this is the original argument list:
|
301
|
+
# [arg0, arg1, ..., arg(i-1), arg(i), arg(i+1), ..., arg(N-1)]
|
302
|
+
# ^
|
303
|
+
# (we are about to process arg(i)).
|
304
|
+
#
|
305
|
+
# Then rargs is [arg(i), ..., arg(N-1)] and largs is a *subset* of
|
306
|
+
# [arg0, ..., arg(i-1)] (any options and their arguments will have
|
307
|
+
# been removed from largs).
|
308
|
+
#
|
309
|
+
# The while loop will usually consume 1 or more arguments per pass.
|
310
|
+
# If it consumes 1 (eg. arg is an option that takes no arguments),
|
311
|
+
# then after _process_arg() is done the situation is:
|
312
|
+
#
|
313
|
+
# largs = subset of [arg0, ..., arg(i)]
|
314
|
+
# rargs = [arg(i+1), ..., arg(N-1)]
|
315
|
+
#
|
316
|
+
# If allow_interspersed_args is false, largs will always be
|
317
|
+
# *empty* -- still a subset of [arg0, ..., arg(i-1)], but
|
318
|
+
# not a very interesting subset!
|
319
|
+
|
320
|
+
def _match_long_opt(self, opt, explicit_value, state):
|
321
|
+
if opt not in self._long_opt:
|
322
|
+
possibilities = [word for word in self._long_opt
|
323
|
+
if word.startswith(opt)]
|
324
|
+
raise NoSuchOption(opt, possibilities=possibilities)
|
325
|
+
|
326
|
+
option = self._long_opt[opt]
|
327
|
+
if option.takes_value:
|
328
|
+
# At this point it's safe to modify rargs by injecting the
|
329
|
+
# explicit value, because no exception is raised in this
|
330
|
+
# branch. This means that the inserted value will be fully
|
331
|
+
# consumed.
|
332
|
+
if explicit_value is not None:
|
333
|
+
state.rargs.insert(0, explicit_value)
|
334
|
+
|
335
|
+
nargs = option.nargs
|
336
|
+
if len(state.rargs) < nargs:
|
337
|
+
_error_opt_args(nargs, opt)
|
338
|
+
elif nargs == 1:
|
339
|
+
value = state.rargs.pop(0)
|
340
|
+
else:
|
341
|
+
value = tuple(state.rargs[:nargs])
|
342
|
+
del state.rargs[:nargs]
|
343
|
+
|
344
|
+
elif explicit_value is not None:
|
345
|
+
raise BadOptionUsage('%s option does not take a value' % opt)
|
346
|
+
|
347
|
+
else:
|
348
|
+
value = None
|
349
|
+
|
350
|
+
option.process(value, state)
|
351
|
+
|
352
|
+
def _match_short_opt(self, arg, state):
|
353
|
+
stop = False
|
354
|
+
i = 1
|
355
|
+
prefix = arg[0]
|
356
|
+
unknown_options = []
|
357
|
+
|
358
|
+
for ch in arg[1:]:
|
359
|
+
opt = normalize_opt(prefix + ch, self.ctx)
|
360
|
+
option = self._short_opt.get(opt)
|
361
|
+
i += 1
|
362
|
+
|
363
|
+
if not option:
|
364
|
+
if self.ignore_unknown_options:
|
365
|
+
unknown_options.append(ch)
|
366
|
+
continue
|
367
|
+
raise NoSuchOption(opt)
|
368
|
+
if option.takes_value:
|
369
|
+
# Any characters left in arg? Pretend they're the
|
370
|
+
# next arg, and stop consuming characters of arg.
|
371
|
+
if i < len(arg):
|
372
|
+
state.rargs.insert(0, arg[i:])
|
373
|
+
stop = True
|
374
|
+
|
375
|
+
nargs = option.nargs
|
376
|
+
if len(state.rargs) < nargs:
|
377
|
+
_error_opt_args(nargs, opt)
|
378
|
+
elif nargs == 1:
|
379
|
+
value = state.rargs.pop(0)
|
380
|
+
else:
|
381
|
+
value = tuple(state.rargs[:nargs])
|
382
|
+
del state.rargs[:nargs]
|
383
|
+
|
384
|
+
else:
|
385
|
+
value = None
|
386
|
+
|
387
|
+
option.process(value, state)
|
388
|
+
|
389
|
+
if stop:
|
390
|
+
break
|
391
|
+
|
392
|
+
# If we got any unknown options we re-combinate the string of the
|
393
|
+
# remaining options and re-attach the prefix, then report that
|
394
|
+
# to the state as new larg. This way there is basic combinatorics
|
395
|
+
# that can be achieved while still ignoring unknown arguments.
|
396
|
+
if self.ignore_unknown_options and unknown_options:
|
397
|
+
state.largs.append(prefix + ''.join(unknown_options))
|
398
|
+
|
399
|
+
def _process_opts(self, arg, state):
|
400
|
+
explicit_value = None
|
401
|
+
# Long option handling happens in two parts. The first part is
|
402
|
+
# supporting explicitly attached values. In any case, we will try
|
403
|
+
# to long match the option first.
|
404
|
+
if '=' in arg:
|
405
|
+
long_opt, explicit_value = arg.split('=', 1)
|
406
|
+
else:
|
407
|
+
long_opt = arg
|
408
|
+
norm_long_opt = normalize_opt(long_opt, self.ctx)
|
409
|
+
|
410
|
+
# At this point we will match the (assumed) long option through
|
411
|
+
# the long option matching code. Note that this allows options
|
412
|
+
# like "-foo" to be matched as long options.
|
413
|
+
try:
|
414
|
+
self._match_long_opt(norm_long_opt, explicit_value, state)
|
415
|
+
except NoSuchOption:
|
416
|
+
# At this point the long option matching failed, and we need
|
417
|
+
# to try with short options. However there is a special rule
|
418
|
+
# which says, that if we have a two character options prefix
|
419
|
+
# (applies to "--foo" for instance), we do not dispatch to the
|
420
|
+
# short option code and will instead raise the no option
|
421
|
+
# error.
|
422
|
+
if arg[:2] not in self._opt_prefixes:
|
423
|
+
return self._match_short_opt(arg, state)
|
424
|
+
if not self.ignore_unknown_options:
|
425
|
+
raise
|
426
|
+
state.largs.append(arg)
|
Binary file
|