rigid 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (364) hide show
  1. checksums.yaml +7 -0
  2. data/bin/rigid +4 -0
  3. data/rigid +16 -0
  4. data/vendor/PyYAML-3.12.dist-info/DESCRIPTION.rst +12 -0
  5. data/vendor/PyYAML-3.12.dist-info/INSTALLER +1 -0
  6. data/vendor/PyYAML-3.12.dist-info/METADATA +35 -0
  7. data/vendor/PyYAML-3.12.dist-info/RECORD +42 -0
  8. data/vendor/PyYAML-3.12.dist-info/WHEEL +5 -0
  9. data/vendor/PyYAML-3.12.dist-info/metadata.json +1 -0
  10. data/vendor/PyYAML-3.12.dist-info/top_level.txt +2 -0
  11. data/vendor/_yaml.so +0 -0
  12. data/vendor/click/__init__.py +98 -0
  13. data/vendor/click/__init__.pyc +0 -0
  14. data/vendor/click/_bashcomplete.py +83 -0
  15. data/vendor/click/_bashcomplete.pyc +0 -0
  16. data/vendor/click/_compat.py +642 -0
  17. data/vendor/click/_compat.pyc +0 -0
  18. data/vendor/click/_termui_impl.py +547 -0
  19. data/vendor/click/_termui_impl.pyc +0 -0
  20. data/vendor/click/_textwrap.py +38 -0
  21. data/vendor/click/_textwrap.pyc +0 -0
  22. data/vendor/click/_unicodefun.py +119 -0
  23. data/vendor/click/_unicodefun.pyc +0 -0
  24. data/vendor/click/_winconsole.py +273 -0
  25. data/vendor/click/_winconsole.pyc +0 -0
  26. data/vendor/click/core.py +1738 -0
  27. data/vendor/click/core.pyc +0 -0
  28. data/vendor/click/decorators.py +304 -0
  29. data/vendor/click/decorators.pyc +0 -0
  30. data/vendor/click/exceptions.py +201 -0
  31. data/vendor/click/exceptions.pyc +0 -0
  32. data/vendor/click/formatting.py +256 -0
  33. data/vendor/click/formatting.pyc +0 -0
  34. data/vendor/click/globals.py +48 -0
  35. data/vendor/click/globals.pyc +0 -0
  36. data/vendor/click/parser.py +426 -0
  37. data/vendor/click/parser.pyc +0 -0
  38. data/vendor/click/termui.py +539 -0
  39. data/vendor/click/termui.pyc +0 -0
  40. data/vendor/click/testing.py +322 -0
  41. data/vendor/click/testing.pyc +0 -0
  42. data/vendor/click/types.py +550 -0
  43. data/vendor/click/types.pyc +0 -0
  44. data/vendor/click/utils.py +415 -0
  45. data/vendor/click/utils.pyc +0 -0
  46. data/vendor/click-6.6.dist-info/DESCRIPTION.rst +3 -0
  47. data/vendor/click-6.6.dist-info/INSTALLER +1 -0
  48. data/vendor/click-6.6.dist-info/METADATA +16 -0
  49. data/vendor/click-6.6.dist-info/RECORD +41 -0
  50. data/vendor/click-6.6.dist-info/WHEEL +6 -0
  51. data/vendor/click-6.6.dist-info/metadata.json +1 -0
  52. data/vendor/click-6.6.dist-info/top_level.txt +1 -0
  53. data/vendor/easy_install.py +5 -0
  54. data/vendor/easy_install.pyc +0 -0
  55. data/vendor/pip-9.0.1.dist-info/DESCRIPTION.rst +39 -0
  56. data/vendor/pip-9.0.1.dist-info/INSTALLER +1 -0
  57. data/vendor/pip-9.0.1.dist-info/METADATA +69 -0
  58. data/vendor/pip-9.0.1.dist-info/RECORD +501 -0
  59. data/vendor/pip-9.0.1.dist-info/WHEEL +6 -0
  60. data/vendor/pip-9.0.1.dist-info/entry_points.txt +5 -0
  61. data/vendor/pip-9.0.1.dist-info/metadata.json +1 -0
  62. data/vendor/pip-9.0.1.dist-info/top_level.txt +1 -0
  63. data/vendor/pkg_resources/__init__.py +3051 -0
  64. data/vendor/pkg_resources/__init__.pyc +0 -0
  65. data/vendor/pkg_resources/_vendor/__init__.py +0 -0
  66. data/vendor/pkg_resources/_vendor/__init__.pyc +0 -0
  67. data/vendor/pkg_resources/_vendor/appdirs.py +552 -0
  68. data/vendor/pkg_resources/_vendor/appdirs.pyc +0 -0
  69. data/vendor/pkg_resources/_vendor/packaging/__about__.py +21 -0
  70. data/vendor/pkg_resources/_vendor/packaging/__about__.pyc +0 -0
  71. data/vendor/pkg_resources/_vendor/packaging/__init__.py +14 -0
  72. data/vendor/pkg_resources/_vendor/packaging/__init__.pyc +0 -0
  73. data/vendor/pkg_resources/_vendor/packaging/_compat.py +30 -0
  74. data/vendor/pkg_resources/_vendor/packaging/_compat.pyc +0 -0
  75. data/vendor/pkg_resources/_vendor/packaging/_structures.py +68 -0
  76. data/vendor/pkg_resources/_vendor/packaging/_structures.pyc +0 -0
  77. data/vendor/pkg_resources/_vendor/packaging/markers.py +287 -0
  78. data/vendor/pkg_resources/_vendor/packaging/markers.pyc +0 -0
  79. data/vendor/pkg_resources/_vendor/packaging/requirements.py +127 -0
  80. data/vendor/pkg_resources/_vendor/packaging/requirements.pyc +0 -0
  81. data/vendor/pkg_resources/_vendor/packaging/specifiers.py +774 -0
  82. data/vendor/pkg_resources/_vendor/packaging/specifiers.pyc +0 -0
  83. data/vendor/pkg_resources/_vendor/packaging/utils.py +14 -0
  84. data/vendor/pkg_resources/_vendor/packaging/utils.pyc +0 -0
  85. data/vendor/pkg_resources/_vendor/packaging/version.py +393 -0
  86. data/vendor/pkg_resources/_vendor/packaging/version.pyc +0 -0
  87. data/vendor/pkg_resources/_vendor/pyparsing.py +5696 -0
  88. data/vendor/pkg_resources/_vendor/pyparsing.pyc +0 -0
  89. data/vendor/pkg_resources/_vendor/six.py +868 -0
  90. data/vendor/pkg_resources/_vendor/six.pyc +0 -0
  91. data/vendor/pkg_resources/extern/__init__.py +73 -0
  92. data/vendor/pkg_resources/extern/__init__.pyc +0 -0
  93. data/vendor/requests/__init__.py +86 -0
  94. data/vendor/requests/__init__.pyc +0 -0
  95. data/vendor/requests/adapters.py +503 -0
  96. data/vendor/requests/adapters.pyc +0 -0
  97. data/vendor/requests/api.py +148 -0
  98. data/vendor/requests/api.pyc +0 -0
  99. data/vendor/requests/auth.py +252 -0
  100. data/vendor/requests/auth.pyc +0 -0
  101. data/vendor/requests/cacert.pem +5616 -0
  102. data/vendor/requests/certs.py +25 -0
  103. data/vendor/requests/certs.pyc +0 -0
  104. data/vendor/requests/compat.py +66 -0
  105. data/vendor/requests/compat.pyc +0 -0
  106. data/vendor/requests/cookies.py +540 -0
  107. data/vendor/requests/cookies.pyc +0 -0
  108. data/vendor/requests/exceptions.py +114 -0
  109. data/vendor/requests/exceptions.pyc +0 -0
  110. data/vendor/requests/hooks.py +34 -0
  111. data/vendor/requests/hooks.pyc +0 -0
  112. data/vendor/requests/models.py +873 -0
  113. data/vendor/requests/models.pyc +0 -0
  114. data/vendor/requests/packages/__init__.py +36 -0
  115. data/vendor/requests/packages/__init__.pyc +0 -0
  116. data/vendor/requests/packages/chardet/__init__.py +32 -0
  117. data/vendor/requests/packages/chardet/__init__.pyc +0 -0
  118. data/vendor/requests/packages/chardet/big5freq.py +925 -0
  119. data/vendor/requests/packages/chardet/big5freq.pyc +0 -0
  120. data/vendor/requests/packages/chardet/big5prober.py +42 -0
  121. data/vendor/requests/packages/chardet/big5prober.pyc +0 -0
  122. data/vendor/requests/packages/chardet/chardetect.py +80 -0
  123. data/vendor/requests/packages/chardet/chardetect.pyc +0 -0
  124. data/vendor/requests/packages/chardet/chardistribution.py +231 -0
  125. data/vendor/requests/packages/chardet/chardistribution.pyc +0 -0
  126. data/vendor/requests/packages/chardet/charsetgroupprober.py +106 -0
  127. data/vendor/requests/packages/chardet/charsetgroupprober.pyc +0 -0
  128. data/vendor/requests/packages/chardet/charsetprober.py +62 -0
  129. data/vendor/requests/packages/chardet/charsetprober.pyc +0 -0
  130. data/vendor/requests/packages/chardet/codingstatemachine.py +61 -0
  131. data/vendor/requests/packages/chardet/codingstatemachine.pyc +0 -0
  132. data/vendor/requests/packages/chardet/compat.py +34 -0
  133. data/vendor/requests/packages/chardet/compat.pyc +0 -0
  134. data/vendor/requests/packages/chardet/constants.py +39 -0
  135. data/vendor/requests/packages/chardet/constants.pyc +0 -0
  136. data/vendor/requests/packages/chardet/cp949prober.py +44 -0
  137. data/vendor/requests/packages/chardet/cp949prober.pyc +0 -0
  138. data/vendor/requests/packages/chardet/escprober.py +86 -0
  139. data/vendor/requests/packages/chardet/escprober.pyc +0 -0
  140. data/vendor/requests/packages/chardet/escsm.py +242 -0
  141. data/vendor/requests/packages/chardet/escsm.pyc +0 -0
  142. data/vendor/requests/packages/chardet/eucjpprober.py +90 -0
  143. data/vendor/requests/packages/chardet/eucjpprober.pyc +0 -0
  144. data/vendor/requests/packages/chardet/euckrfreq.py +596 -0
  145. data/vendor/requests/packages/chardet/euckrfreq.pyc +0 -0
  146. data/vendor/requests/packages/chardet/euckrprober.py +42 -0
  147. data/vendor/requests/packages/chardet/euckrprober.pyc +0 -0
  148. data/vendor/requests/packages/chardet/euctwfreq.py +428 -0
  149. data/vendor/requests/packages/chardet/euctwfreq.pyc +0 -0
  150. data/vendor/requests/packages/chardet/euctwprober.py +41 -0
  151. data/vendor/requests/packages/chardet/euctwprober.pyc +0 -0
  152. data/vendor/requests/packages/chardet/gb2312freq.py +472 -0
  153. data/vendor/requests/packages/chardet/gb2312freq.pyc +0 -0
  154. data/vendor/requests/packages/chardet/gb2312prober.py +41 -0
  155. data/vendor/requests/packages/chardet/gb2312prober.pyc +0 -0
  156. data/vendor/requests/packages/chardet/hebrewprober.py +283 -0
  157. data/vendor/requests/packages/chardet/hebrewprober.pyc +0 -0
  158. data/vendor/requests/packages/chardet/jisfreq.py +569 -0
  159. data/vendor/requests/packages/chardet/jisfreq.pyc +0 -0
  160. data/vendor/requests/packages/chardet/jpcntx.py +227 -0
  161. data/vendor/requests/packages/chardet/jpcntx.pyc +0 -0
  162. data/vendor/requests/packages/chardet/langbulgarianmodel.py +229 -0
  163. data/vendor/requests/packages/chardet/langbulgarianmodel.pyc +0 -0
  164. data/vendor/requests/packages/chardet/langcyrillicmodel.py +329 -0
  165. data/vendor/requests/packages/chardet/langcyrillicmodel.pyc +0 -0
  166. data/vendor/requests/packages/chardet/langgreekmodel.py +225 -0
  167. data/vendor/requests/packages/chardet/langgreekmodel.pyc +0 -0
  168. data/vendor/requests/packages/chardet/langhebrewmodel.py +201 -0
  169. data/vendor/requests/packages/chardet/langhebrewmodel.pyc +0 -0
  170. data/vendor/requests/packages/chardet/langhungarianmodel.py +225 -0
  171. data/vendor/requests/packages/chardet/langhungarianmodel.pyc +0 -0
  172. data/vendor/requests/packages/chardet/langthaimodel.py +200 -0
  173. data/vendor/requests/packages/chardet/langthaimodel.pyc +0 -0
  174. data/vendor/requests/packages/chardet/latin1prober.py +139 -0
  175. data/vendor/requests/packages/chardet/latin1prober.pyc +0 -0
  176. data/vendor/requests/packages/chardet/mbcharsetprober.py +86 -0
  177. data/vendor/requests/packages/chardet/mbcharsetprober.pyc +0 -0
  178. data/vendor/requests/packages/chardet/mbcsgroupprober.py +54 -0
  179. data/vendor/requests/packages/chardet/mbcsgroupprober.pyc +0 -0
  180. data/vendor/requests/packages/chardet/mbcssm.py +572 -0
  181. data/vendor/requests/packages/chardet/mbcssm.pyc +0 -0
  182. data/vendor/requests/packages/chardet/sbcharsetprober.py +120 -0
  183. data/vendor/requests/packages/chardet/sbcharsetprober.pyc +0 -0
  184. data/vendor/requests/packages/chardet/sbcsgroupprober.py +69 -0
  185. data/vendor/requests/packages/chardet/sbcsgroupprober.pyc +0 -0
  186. data/vendor/requests/packages/chardet/sjisprober.py +91 -0
  187. data/vendor/requests/packages/chardet/sjisprober.pyc +0 -0
  188. data/vendor/requests/packages/chardet/universaldetector.py +170 -0
  189. data/vendor/requests/packages/chardet/universaldetector.pyc +0 -0
  190. data/vendor/requests/packages/chardet/utf8prober.py +76 -0
  191. data/vendor/requests/packages/chardet/utf8prober.pyc +0 -0
  192. data/vendor/requests/packages/urllib3/__init__.py +96 -0
  193. data/vendor/requests/packages/urllib3/__init__.pyc +0 -0
  194. data/vendor/requests/packages/urllib3/_collections.py +324 -0
  195. data/vendor/requests/packages/urllib3/_collections.pyc +0 -0
  196. data/vendor/requests/packages/urllib3/connection.py +330 -0
  197. data/vendor/requests/packages/urllib3/connection.pyc +0 -0
  198. data/vendor/requests/packages/urllib3/connectionpool.py +866 -0
  199. data/vendor/requests/packages/urllib3/connectionpool.pyc +0 -0
  200. data/vendor/requests/packages/urllib3/contrib/__init__.py +0 -0
  201. data/vendor/requests/packages/urllib3/contrib/__init__.pyc +0 -0
  202. data/vendor/requests/packages/urllib3/contrib/appengine.py +231 -0
  203. data/vendor/requests/packages/urllib3/contrib/appengine.pyc +0 -0
  204. data/vendor/requests/packages/urllib3/contrib/ntlmpool.py +115 -0
  205. data/vendor/requests/packages/urllib3/contrib/ntlmpool.pyc +0 -0
  206. data/vendor/requests/packages/urllib3/contrib/pyopenssl.py +358 -0
  207. data/vendor/requests/packages/urllib3/contrib/pyopenssl.pyc +0 -0
  208. data/vendor/requests/packages/urllib3/contrib/socks.py +172 -0
  209. data/vendor/requests/packages/urllib3/contrib/socks.pyc +0 -0
  210. data/vendor/requests/packages/urllib3/exceptions.py +209 -0
  211. data/vendor/requests/packages/urllib3/exceptions.pyc +0 -0
  212. data/vendor/requests/packages/urllib3/fields.py +178 -0
  213. data/vendor/requests/packages/urllib3/fields.pyc +0 -0
  214. data/vendor/requests/packages/urllib3/filepost.py +94 -0
  215. data/vendor/requests/packages/urllib3/filepost.pyc +0 -0
  216. data/vendor/requests/packages/urllib3/packages/__init__.py +5 -0
  217. data/vendor/requests/packages/urllib3/packages/__init__.pyc +0 -0
  218. data/vendor/requests/packages/urllib3/packages/ordered_dict.py +259 -0
  219. data/vendor/requests/packages/urllib3/packages/ordered_dict.pyc +0 -0
  220. data/vendor/requests/packages/urllib3/packages/six.py +868 -0
  221. data/vendor/requests/packages/urllib3/packages/six.pyc +0 -0
  222. data/vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py +13 -0
  223. data/vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.pyc +0 -0
  224. data/vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py +105 -0
  225. data/vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.pyc +0 -0
  226. data/vendor/requests/packages/urllib3/poolmanager.py +367 -0
  227. data/vendor/requests/packages/urllib3/poolmanager.pyc +0 -0
  228. data/vendor/requests/packages/urllib3/request.py +151 -0
  229. data/vendor/requests/packages/urllib3/request.pyc +0 -0
  230. data/vendor/requests/packages/urllib3/response.py +530 -0
  231. data/vendor/requests/packages/urllib3/response.pyc +0 -0
  232. data/vendor/requests/packages/urllib3/util/__init__.py +46 -0
  233. data/vendor/requests/packages/urllib3/util/__init__.pyc +0 -0
  234. data/vendor/requests/packages/urllib3/util/connection.py +144 -0
  235. data/vendor/requests/packages/urllib3/util/connection.pyc +0 -0
  236. data/vendor/requests/packages/urllib3/util/request.py +72 -0
  237. data/vendor/requests/packages/urllib3/util/request.pyc +0 -0
  238. data/vendor/requests/packages/urllib3/util/response.py +74 -0
  239. data/vendor/requests/packages/urllib3/util/response.pyc +0 -0
  240. data/vendor/requests/packages/urllib3/util/retry.py +300 -0
  241. data/vendor/requests/packages/urllib3/util/retry.pyc +0 -0
  242. data/vendor/requests/packages/urllib3/util/ssl_.py +320 -0
  243. data/vendor/requests/packages/urllib3/util/ssl_.pyc +0 -0
  244. data/vendor/requests/packages/urllib3/util/timeout.py +242 -0
  245. data/vendor/requests/packages/urllib3/util/timeout.pyc +0 -0
  246. data/vendor/requests/packages/urllib3/util/url.py +217 -0
  247. data/vendor/requests/packages/urllib3/util/url.pyc +0 -0
  248. data/vendor/requests/sessions.py +712 -0
  249. data/vendor/requests/sessions.pyc +0 -0
  250. data/vendor/requests/status_codes.py +91 -0
  251. data/vendor/requests/status_codes.pyc +0 -0
  252. data/vendor/requests/structures.py +105 -0
  253. data/vendor/requests/structures.pyc +0 -0
  254. data/vendor/requests/utils.py +817 -0
  255. data/vendor/requests/utils.pyc +0 -0
  256. data/vendor/requests-2.11.1.dist-info/DESCRIPTION.rst +1294 -0
  257. data/vendor/requests-2.11.1.dist-info/INSTALLER +1 -0
  258. data/vendor/requests-2.11.1.dist-info/METADATA +1323 -0
  259. data/vendor/requests-2.11.1.dist-info/RECORD +170 -0
  260. data/vendor/requests-2.11.1.dist-info/WHEEL +6 -0
  261. data/vendor/requests-2.11.1.dist-info/metadata.json +1 -0
  262. data/vendor/requests-2.11.1.dist-info/top_level.txt +1 -0
  263. data/vendor/rigid/__init__.py +1 -0
  264. data/vendor/rigid/__init__.pyc +0 -0
  265. data/vendor/rigid/api.py +129 -0
  266. data/vendor/rigid/api.pyc +0 -0
  267. data/vendor/rigid/commands/__init__.py +260 -0
  268. data/vendor/rigid/commands/__init__.pyc +0 -0
  269. data/vendor/rigid/commands/deploy.py +0 -0
  270. data/vendor/rigid/commands/deploy.pyc +0 -0
  271. data/vendor/rigid/deploy.py +70 -0
  272. data/vendor/rigid/deploy.pyc +0 -0
  273. data/vendor/rigid/file_scanner.py +63 -0
  274. data/vendor/rigid/file_scanner.pyc +0 -0
  275. data/vendor/rigid/utils.py +17 -0
  276. data/vendor/rigid/utils.pyc +0 -0
  277. data/vendor/rigid-0.2.0.dist-info/DESCRIPTION.rst +3 -0
  278. data/vendor/rigid-0.2.0.dist-info/INSTALLER +1 -0
  279. data/vendor/rigid-0.2.0.dist-info/METADATA +23 -0
  280. data/vendor/rigid-0.2.0.dist-info/RECORD +49 -0
  281. data/vendor/rigid-0.2.0.dist-info/WHEEL +5 -0
  282. data/vendor/rigid-0.2.0.dist-info/entry_points.txt +3 -0
  283. data/vendor/rigid-0.2.0.dist-info/metadata.json +1 -0
  284. data/vendor/rigid-0.2.0.dist-info/top_level.txt +2 -0
  285. data/vendor/setuptools-28.8.0.dist-info/DESCRIPTION.rst +243 -0
  286. data/vendor/setuptools-28.8.0.dist-info/INSTALLER +1 -0
  287. data/vendor/setuptools-28.8.0.dist-info/METADATA +272 -0
  288. data/vendor/setuptools-28.8.0.dist-info/RECORD +143 -0
  289. data/vendor/setuptools-28.8.0.dist-info/WHEEL +6 -0
  290. data/vendor/setuptools-28.8.0.dist-info/dependency_links.txt +2 -0
  291. data/vendor/setuptools-28.8.0.dist-info/entry_points.txt +63 -0
  292. data/vendor/setuptools-28.8.0.dist-info/metadata.json +1 -0
  293. data/vendor/setuptools-28.8.0.dist-info/top_level.txt +3 -0
  294. data/vendor/setuptools-28.8.0.dist-info/zip-safe +1 -0
  295. data/vendor/tests/__init__.py +0 -0
  296. data/vendor/tests/__init__.pyc +0 -0
  297. data/vendor/tests/integration/__init__.py +0 -0
  298. data/vendor/tests/integration/__init__.pyc +0 -0
  299. data/vendor/tests/integration/test_app.py +63 -0
  300. data/vendor/tests/integration/test_app.pyc +0 -0
  301. data/vendor/tests/integration/test_apps.py +27 -0
  302. data/vendor/tests/integration/test_apps.pyc +0 -0
  303. data/vendor/tests/integration/test_deploy.py +128 -0
  304. data/vendor/tests/integration/test_deploy.pyc +0 -0
  305. data/vendor/tests/integration/test_domains.py +35 -0
  306. data/vendor/tests/integration/test_domains.pyc +0 -0
  307. data/vendor/tests/integration/test_login.py +37 -0
  308. data/vendor/tests/integration/test_login.pyc +0 -0
  309. data/vendor/tests/integration/test_promote.py +24 -0
  310. data/vendor/tests/integration/test_promote.pyc +0 -0
  311. data/vendor/tests/integration/test_token.py +33 -0
  312. data/vendor/tests/integration/test_token.pyc +0 -0
  313. data/vendor/tests/integration/test_whoami.py +24 -0
  314. data/vendor/tests/integration/test_whoami.pyc +0 -0
  315. data/vendor/tests/test_deploy.py +33 -0
  316. data/vendor/tests/test_deploy.pyc +0 -0
  317. data/vendor/tests/test_file_scanner.py +89 -0
  318. data/vendor/tests/test_file_scanner.pyc +0 -0
  319. data/vendor/tests/utils.py +78 -0
  320. data/vendor/tests/utils.pyc +0 -0
  321. data/vendor/wheel-0.30.0a0.dist-info/DESCRIPTION.rst +325 -0
  322. data/vendor/wheel-0.30.0a0.dist-info/INSTALLER +1 -0
  323. data/vendor/wheel-0.30.0a0.dist-info/LICENSE.txt +22 -0
  324. data/vendor/wheel-0.30.0a0.dist-info/METADATA +357 -0
  325. data/vendor/wheel-0.30.0a0.dist-info/RECORD +86 -0
  326. data/vendor/wheel-0.30.0a0.dist-info/WHEEL +6 -0
  327. data/vendor/wheel-0.30.0a0.dist-info/entry_points.txt +6 -0
  328. data/vendor/wheel-0.30.0a0.dist-info/metadata.json +1 -0
  329. data/vendor/wheel-0.30.0a0.dist-info/top_level.txt +1 -0
  330. data/vendor/yaml/__init__.py +315 -0
  331. data/vendor/yaml/__init__.pyc +0 -0
  332. data/vendor/yaml/composer.py +139 -0
  333. data/vendor/yaml/composer.pyc +0 -0
  334. data/vendor/yaml/constructor.py +675 -0
  335. data/vendor/yaml/constructor.pyc +0 -0
  336. data/vendor/yaml/cyaml.py +85 -0
  337. data/vendor/yaml/cyaml.pyc +0 -0
  338. data/vendor/yaml/dumper.py +62 -0
  339. data/vendor/yaml/dumper.pyc +0 -0
  340. data/vendor/yaml/emitter.py +1140 -0
  341. data/vendor/yaml/emitter.pyc +0 -0
  342. data/vendor/yaml/error.py +75 -0
  343. data/vendor/yaml/error.pyc +0 -0
  344. data/vendor/yaml/events.py +86 -0
  345. data/vendor/yaml/events.pyc +0 -0
  346. data/vendor/yaml/loader.py +40 -0
  347. data/vendor/yaml/loader.pyc +0 -0
  348. data/vendor/yaml/nodes.py +49 -0
  349. data/vendor/yaml/nodes.pyc +0 -0
  350. data/vendor/yaml/parser.py +589 -0
  351. data/vendor/yaml/parser.pyc +0 -0
  352. data/vendor/yaml/reader.py +190 -0
  353. data/vendor/yaml/reader.pyc +0 -0
  354. data/vendor/yaml/representer.py +486 -0
  355. data/vendor/yaml/representer.pyc +0 -0
  356. data/vendor/yaml/resolver.py +227 -0
  357. data/vendor/yaml/resolver.pyc +0 -0
  358. data/vendor/yaml/scanner.py +1453 -0
  359. data/vendor/yaml/scanner.pyc +0 -0
  360. data/vendor/yaml/serializer.py +111 -0
  361. data/vendor/yaml/serializer.pyc +0 -0
  362. data/vendor/yaml/tokens.py +104 -0
  363. data/vendor/yaml/tokens.pyc +0 -0
  364. metadata +407 -0
@@ -0,0 +1,358 @@
1
+ '''SSL with SNI_-support for Python 2. Follow these instructions if you would
2
+ like to verify SSL certificates in Python 2. Note, the default libraries do
3
+ *not* do certificate checking; you need to do additional work to validate
4
+ certificates yourself.
5
+
6
+ This needs the following packages installed:
7
+
8
+ * pyOpenSSL (tested with 0.13)
9
+ * ndg-httpsclient (tested with 0.3.2)
10
+ * pyasn1 (tested with 0.1.6)
11
+
12
+ You can install them with the following command:
13
+
14
+ pip install pyopenssl ndg-httpsclient pyasn1
15
+
16
+ To activate certificate checking, call
17
+ :func:`~urllib3.contrib.pyopenssl.inject_into_urllib3` from your Python code
18
+ before you begin making HTTP requests. This can be done in a ``sitecustomize``
19
+ module, or at any other time before your application begins using ``urllib3``,
20
+ like this::
21
+
22
+ try:
23
+ import urllib3.contrib.pyopenssl
24
+ urllib3.contrib.pyopenssl.inject_into_urllib3()
25
+ except ImportError:
26
+ pass
27
+
28
+ Now you can use :mod:`urllib3` as you normally would, and it will support SNI
29
+ when the required modules are installed.
30
+
31
+ Activating this module also has the positive side effect of disabling SSL/TLS
32
+ compression in Python 2 (see `CRIME attack`_).
33
+
34
+ If you want to configure the default list of supported cipher suites, you can
35
+ set the ``urllib3.contrib.pyopenssl.DEFAULT_SSL_CIPHER_LIST`` variable.
36
+
37
+ Module Variables
38
+ ----------------
39
+
40
+ :var DEFAULT_SSL_CIPHER_LIST: The list of supported SSL/TLS cipher suites.
41
+
42
+ .. _sni: https://en.wikipedia.org/wiki/Server_Name_Indication
43
+ .. _crime attack: https://en.wikipedia.org/wiki/CRIME_(security_exploit)
44
+
45
+ '''
46
+ from __future__ import absolute_import
47
+
48
+ try:
49
+ from ndg.httpsclient.ssl_peer_verification import SUBJ_ALT_NAME_SUPPORT
50
+ from ndg.httpsclient.subj_alt_name import SubjectAltName as BaseSubjectAltName
51
+ except SyntaxError as e:
52
+ raise ImportError(e)
53
+
54
+ import OpenSSL.SSL
55
+ from pyasn1.codec.der import decoder as der_decoder
56
+ from pyasn1.type import univ, constraint
57
+ from socket import timeout, error as SocketError
58
+
59
+ try: # Platform-specific: Python 2
60
+ from socket import _fileobject
61
+ except ImportError: # Platform-specific: Python 3
62
+ _fileobject = None
63
+ from urllib3.packages.backports.makefile import backport_makefile
64
+
65
+ import ssl
66
+ import select
67
+ import six
68
+
69
+ from .. import connection
70
+ from .. import util
71
+
72
+ __all__ = ['inject_into_urllib3', 'extract_from_urllib3']
73
+
74
+ # SNI only *really* works if we can read the subjectAltName of certificates.
75
+ HAS_SNI = SUBJ_ALT_NAME_SUPPORT
76
+
77
+ # Map from urllib3 to PyOpenSSL compatible parameter-values.
78
+ _openssl_versions = {
79
+ ssl.PROTOCOL_SSLv23: OpenSSL.SSL.SSLv23_METHOD,
80
+ ssl.PROTOCOL_TLSv1: OpenSSL.SSL.TLSv1_METHOD,
81
+ }
82
+
83
+ if hasattr(ssl, 'PROTOCOL_TLSv1_1') and hasattr(OpenSSL.SSL, 'TLSv1_1_METHOD'):
84
+ _openssl_versions[ssl.PROTOCOL_TLSv1_1] = OpenSSL.SSL.TLSv1_1_METHOD
85
+
86
+ if hasattr(ssl, 'PROTOCOL_TLSv1_2') and hasattr(OpenSSL.SSL, 'TLSv1_2_METHOD'):
87
+ _openssl_versions[ssl.PROTOCOL_TLSv1_2] = OpenSSL.SSL.TLSv1_2_METHOD
88
+
89
+ try:
90
+ _openssl_versions.update({ssl.PROTOCOL_SSLv3: OpenSSL.SSL.SSLv3_METHOD})
91
+ except AttributeError:
92
+ pass
93
+
94
+ _openssl_verify = {
95
+ ssl.CERT_NONE: OpenSSL.SSL.VERIFY_NONE,
96
+ ssl.CERT_OPTIONAL: OpenSSL.SSL.VERIFY_PEER,
97
+ ssl.CERT_REQUIRED:
98
+ OpenSSL.SSL.VERIFY_PEER + OpenSSL.SSL.VERIFY_FAIL_IF_NO_PEER_CERT,
99
+ }
100
+
101
+ DEFAULT_SSL_CIPHER_LIST = util.ssl_.DEFAULT_CIPHERS.encode('ascii')
102
+
103
+ # OpenSSL will only write 16K at a time
104
+ SSL_WRITE_BLOCKSIZE = 16384
105
+
106
+ orig_util_HAS_SNI = util.HAS_SNI
107
+ orig_connection_ssl_wrap_socket = connection.ssl_wrap_socket
108
+
109
+
110
+ def inject_into_urllib3():
111
+ 'Monkey-patch urllib3 with PyOpenSSL-backed SSL-support.'
112
+
113
+ connection.ssl_wrap_socket = ssl_wrap_socket
114
+ util.HAS_SNI = HAS_SNI
115
+ util.IS_PYOPENSSL = True
116
+
117
+
118
+ def extract_from_urllib3():
119
+ 'Undo monkey-patching by :func:`inject_into_urllib3`.'
120
+
121
+ connection.ssl_wrap_socket = orig_connection_ssl_wrap_socket
122
+ util.HAS_SNI = orig_util_HAS_SNI
123
+ util.IS_PYOPENSSL = False
124
+
125
+
126
+ # Note: This is a slightly bug-fixed version of same from ndg-httpsclient.
127
+ class SubjectAltName(BaseSubjectAltName):
128
+ '''ASN.1 implementation for subjectAltNames support'''
129
+
130
+ # There is no limit to how many SAN certificates a certificate may have,
131
+ # however this needs to have some limit so we'll set an arbitrarily high
132
+ # limit.
133
+ sizeSpec = univ.SequenceOf.sizeSpec + \
134
+ constraint.ValueSizeConstraint(1, 1024)
135
+
136
+
137
+ # Note: This is a slightly bug-fixed version of same from ndg-httpsclient.
138
+ def get_subj_alt_name(peer_cert):
139
+ # Search through extensions
140
+ dns_name = []
141
+ if not SUBJ_ALT_NAME_SUPPORT:
142
+ return dns_name
143
+
144
+ general_names = SubjectAltName()
145
+ for i in range(peer_cert.get_extension_count()):
146
+ ext = peer_cert.get_extension(i)
147
+ ext_name = ext.get_short_name()
148
+ if ext_name != b'subjectAltName':
149
+ continue
150
+
151
+ # PyOpenSSL returns extension data in ASN.1 encoded form
152
+ ext_dat = ext.get_data()
153
+ decoded_dat = der_decoder.decode(ext_dat,
154
+ asn1Spec=general_names)
155
+
156
+ for name in decoded_dat:
157
+ if not isinstance(name, SubjectAltName):
158
+ continue
159
+ for entry in range(len(name)):
160
+ component = name.getComponentByPosition(entry)
161
+ if component.getName() != 'dNSName':
162
+ continue
163
+ dns_name.append(str(component.getComponent()))
164
+
165
+ return dns_name
166
+
167
+
168
+ class WrappedSocket(object):
169
+ '''API-compatibility wrapper for Python OpenSSL's Connection-class.
170
+
171
+ Note: _makefile_refs, _drop() and _reuse() are needed for the garbage
172
+ collector of pypy.
173
+ '''
174
+
175
+ def __init__(self, connection, socket, suppress_ragged_eofs=True):
176
+ self.connection = connection
177
+ self.socket = socket
178
+ self.suppress_ragged_eofs = suppress_ragged_eofs
179
+ self._makefile_refs = 0
180
+ self._closed = False
181
+
182
+ def fileno(self):
183
+ return self.socket.fileno()
184
+
185
+ # Copy-pasted from Python 3.5 source code
186
+ def _decref_socketios(self):
187
+ if self._makefile_refs > 0:
188
+ self._makefile_refs -= 1
189
+ if self._closed:
190
+ self.close()
191
+
192
+ def recv(self, *args, **kwargs):
193
+ try:
194
+ data = self.connection.recv(*args, **kwargs)
195
+ except OpenSSL.SSL.SysCallError as e:
196
+ if self.suppress_ragged_eofs and e.args == (-1, 'Unexpected EOF'):
197
+ return b''
198
+ else:
199
+ raise SocketError(str(e))
200
+ except OpenSSL.SSL.ZeroReturnError as e:
201
+ if self.connection.get_shutdown() == OpenSSL.SSL.RECEIVED_SHUTDOWN:
202
+ return b''
203
+ else:
204
+ raise
205
+ except OpenSSL.SSL.WantReadError:
206
+ rd, wd, ed = select.select(
207
+ [self.socket], [], [], self.socket.gettimeout())
208
+ if not rd:
209
+ raise timeout('The read operation timed out')
210
+ else:
211
+ return self.recv(*args, **kwargs)
212
+ else:
213
+ return data
214
+
215
+ def recv_into(self, *args, **kwargs):
216
+ try:
217
+ return self.connection.recv_into(*args, **kwargs)
218
+ except OpenSSL.SSL.SysCallError as e:
219
+ if self.suppress_ragged_eofs and e.args == (-1, 'Unexpected EOF'):
220
+ return 0
221
+ else:
222
+ raise SocketError(str(e))
223
+ except OpenSSL.SSL.ZeroReturnError as e:
224
+ if self.connection.get_shutdown() == OpenSSL.SSL.RECEIVED_SHUTDOWN:
225
+ return 0
226
+ else:
227
+ raise
228
+ except OpenSSL.SSL.WantReadError:
229
+ rd, wd, ed = select.select(
230
+ [self.socket], [], [], self.socket.gettimeout())
231
+ if not rd:
232
+ raise timeout('The read operation timed out')
233
+ else:
234
+ return self.recv_into(*args, **kwargs)
235
+
236
+ def settimeout(self, timeout):
237
+ return self.socket.settimeout(timeout)
238
+
239
+ def _send_until_done(self, data):
240
+ while True:
241
+ try:
242
+ return self.connection.send(data)
243
+ except OpenSSL.SSL.WantWriteError:
244
+ _, wlist, _ = select.select([], [self.socket], [],
245
+ self.socket.gettimeout())
246
+ if not wlist:
247
+ raise timeout()
248
+ continue
249
+
250
+ def sendall(self, data):
251
+ total_sent = 0
252
+ while total_sent < len(data):
253
+ sent = self._send_until_done(data[total_sent:total_sent + SSL_WRITE_BLOCKSIZE])
254
+ total_sent += sent
255
+
256
+ def shutdown(self):
257
+ # FIXME rethrow compatible exceptions should we ever use this
258
+ self.connection.shutdown()
259
+
260
+ def close(self):
261
+ if self._makefile_refs < 1:
262
+ try:
263
+ self._closed = True
264
+ return self.connection.close()
265
+ except OpenSSL.SSL.Error:
266
+ return
267
+ else:
268
+ self._makefile_refs -= 1
269
+
270
+ def getpeercert(self, binary_form=False):
271
+ x509 = self.connection.get_peer_certificate()
272
+
273
+ if not x509:
274
+ return x509
275
+
276
+ if binary_form:
277
+ return OpenSSL.crypto.dump_certificate(
278
+ OpenSSL.crypto.FILETYPE_ASN1,
279
+ x509)
280
+
281
+ return {
282
+ 'subject': (
283
+ (('commonName', x509.get_subject().CN),),
284
+ ),
285
+ 'subjectAltName': [
286
+ ('DNS', value)
287
+ for value in get_subj_alt_name(x509)
288
+ ]
289
+ }
290
+
291
+ def _reuse(self):
292
+ self._makefile_refs += 1
293
+
294
+ def _drop(self):
295
+ if self._makefile_refs < 1:
296
+ self.close()
297
+ else:
298
+ self._makefile_refs -= 1
299
+
300
+
301
+ if _fileobject: # Platform-specific: Python 2
302
+ def makefile(self, mode, bufsize=-1):
303
+ self._makefile_refs += 1
304
+ return _fileobject(self, mode, bufsize, close=True)
305
+ else: # Platform-specific: Python 3
306
+ makefile = backport_makefile
307
+
308
+ WrappedSocket.makefile = makefile
309
+
310
+
311
+ def _verify_callback(cnx, x509, err_no, err_depth, return_code):
312
+ return err_no == 0
313
+
314
+
315
+ def ssl_wrap_socket(sock, keyfile=None, certfile=None, cert_reqs=None,
316
+ ca_certs=None, server_hostname=None,
317
+ ssl_version=None, ca_cert_dir=None):
318
+ ctx = OpenSSL.SSL.Context(_openssl_versions[ssl_version])
319
+ if certfile:
320
+ keyfile = keyfile or certfile # Match behaviour of the normal python ssl library
321
+ ctx.use_certificate_file(certfile)
322
+ if keyfile:
323
+ ctx.use_privatekey_file(keyfile)
324
+ if cert_reqs != ssl.CERT_NONE:
325
+ ctx.set_verify(_openssl_verify[cert_reqs], _verify_callback)
326
+ if ca_certs or ca_cert_dir:
327
+ try:
328
+ ctx.load_verify_locations(ca_certs, ca_cert_dir)
329
+ except OpenSSL.SSL.Error as e:
330
+ raise ssl.SSLError('bad ca_certs: %r' % ca_certs, e)
331
+ else:
332
+ ctx.set_default_verify_paths()
333
+
334
+ # Disable TLS compression to mitigate CRIME attack (issue #309)
335
+ OP_NO_COMPRESSION = 0x20000
336
+ ctx.set_options(OP_NO_COMPRESSION)
337
+
338
+ # Set list of supported ciphersuites.
339
+ ctx.set_cipher_list(DEFAULT_SSL_CIPHER_LIST)
340
+
341
+ cnx = OpenSSL.SSL.Connection(ctx, sock)
342
+ if isinstance(server_hostname, six.text_type): # Platform-specific: Python 3
343
+ server_hostname = server_hostname.encode('utf-8')
344
+ cnx.set_tlsext_host_name(server_hostname)
345
+ cnx.set_connect_state()
346
+ while True:
347
+ try:
348
+ cnx.do_handshake()
349
+ except OpenSSL.SSL.WantReadError:
350
+ rd, _, _ = select.select([sock], [], [], sock.gettimeout())
351
+ if not rd:
352
+ raise timeout('select timed out')
353
+ continue
354
+ except OpenSSL.SSL.Error as e:
355
+ raise ssl.SSLError('bad handshake: %r' % e)
356
+ break
357
+
358
+ return WrappedSocket(cnx, sock)
@@ -0,0 +1,172 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ SOCKS support for urllib3
4
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
5
+
6
+ This contrib module contains provisional support for SOCKS proxies from within
7
+ urllib3. This module supports SOCKS4 (specifically the SOCKS4A variant) and
8
+ SOCKS5. To enable its functionality, either install PySocks or install this
9
+ module with the ``socks`` extra.
10
+
11
+ Known Limitations:
12
+
13
+ - Currently PySocks does not support contacting remote websites via literal
14
+ IPv6 addresses. Any such connection attempt will fail.
15
+ - Currently PySocks does not support IPv6 connections to the SOCKS proxy. Any
16
+ such connection attempt will fail.
17
+ """
18
+ from __future__ import absolute_import
19
+
20
+ try:
21
+ import socks
22
+ except ImportError:
23
+ import warnings
24
+ from ..exceptions import DependencyWarning
25
+
26
+ warnings.warn((
27
+ 'SOCKS support in urllib3 requires the installation of optional '
28
+ 'dependencies: specifically, PySocks. For more information, see '
29
+ 'https://urllib3.readthedocs.io/en/latest/contrib.html#socks-proxies'
30
+ ),
31
+ DependencyWarning
32
+ )
33
+ raise
34
+
35
+ from socket import error as SocketError, timeout as SocketTimeout
36
+
37
+ from ..connection import (
38
+ HTTPConnection, HTTPSConnection
39
+ )
40
+ from ..connectionpool import (
41
+ HTTPConnectionPool, HTTPSConnectionPool
42
+ )
43
+ from ..exceptions import ConnectTimeoutError, NewConnectionError
44
+ from ..poolmanager import PoolManager
45
+ from ..util.url import parse_url
46
+
47
+ try:
48
+ import ssl
49
+ except ImportError:
50
+ ssl = None
51
+
52
+
53
+ class SOCKSConnection(HTTPConnection):
54
+ """
55
+ A plain-text HTTP connection that connects via a SOCKS proxy.
56
+ """
57
+ def __init__(self, *args, **kwargs):
58
+ self._socks_options = kwargs.pop('_socks_options')
59
+ super(SOCKSConnection, self).__init__(*args, **kwargs)
60
+
61
+ def _new_conn(self):
62
+ """
63
+ Establish a new connection via the SOCKS proxy.
64
+ """
65
+ extra_kw = {}
66
+ if self.source_address:
67
+ extra_kw['source_address'] = self.source_address
68
+
69
+ if self.socket_options:
70
+ extra_kw['socket_options'] = self.socket_options
71
+
72
+ try:
73
+ conn = socks.create_connection(
74
+ (self.host, self.port),
75
+ proxy_type=self._socks_options['socks_version'],
76
+ proxy_addr=self._socks_options['proxy_host'],
77
+ proxy_port=self._socks_options['proxy_port'],
78
+ proxy_username=self._socks_options['username'],
79
+ proxy_password=self._socks_options['password'],
80
+ timeout=self.timeout,
81
+ **extra_kw
82
+ )
83
+
84
+ except SocketTimeout as e:
85
+ raise ConnectTimeoutError(
86
+ self, "Connection to %s timed out. (connect timeout=%s)" %
87
+ (self.host, self.timeout))
88
+
89
+ except socks.ProxyError as e:
90
+ # This is fragile as hell, but it seems to be the only way to raise
91
+ # useful errors here.
92
+ if e.socket_err:
93
+ error = e.socket_err
94
+ if isinstance(error, SocketTimeout):
95
+ raise ConnectTimeoutError(
96
+ self,
97
+ "Connection to %s timed out. (connect timeout=%s)" %
98
+ (self.host, self.timeout)
99
+ )
100
+ else:
101
+ raise NewConnectionError(
102
+ self,
103
+ "Failed to establish a new connection: %s" % error
104
+ )
105
+ else:
106
+ raise NewConnectionError(
107
+ self,
108
+ "Failed to establish a new connection: %s" % e
109
+ )
110
+
111
+ except SocketError as e: # Defensive: PySocks should catch all these.
112
+ raise NewConnectionError(
113
+ self, "Failed to establish a new connection: %s" % e)
114
+
115
+ return conn
116
+
117
+
118
+ # We don't need to duplicate the Verified/Unverified distinction from
119
+ # urllib3/connection.py here because the HTTPSConnection will already have been
120
+ # correctly set to either the Verified or Unverified form by that module. This
121
+ # means the SOCKSHTTPSConnection will automatically be the correct type.
122
+ class SOCKSHTTPSConnection(SOCKSConnection, HTTPSConnection):
123
+ pass
124
+
125
+
126
+ class SOCKSHTTPConnectionPool(HTTPConnectionPool):
127
+ ConnectionCls = SOCKSConnection
128
+
129
+
130
+ class SOCKSHTTPSConnectionPool(HTTPSConnectionPool):
131
+ ConnectionCls = SOCKSHTTPSConnection
132
+
133
+
134
+ class SOCKSProxyManager(PoolManager):
135
+ """
136
+ A version of the urllib3 ProxyManager that routes connections via the
137
+ defined SOCKS proxy.
138
+ """
139
+ pool_classes_by_scheme = {
140
+ 'http': SOCKSHTTPConnectionPool,
141
+ 'https': SOCKSHTTPSConnectionPool,
142
+ }
143
+
144
+ def __init__(self, proxy_url, username=None, password=None,
145
+ num_pools=10, headers=None, **connection_pool_kw):
146
+ parsed = parse_url(proxy_url)
147
+
148
+ if parsed.scheme == 'socks5':
149
+ socks_version = socks.PROXY_TYPE_SOCKS5
150
+ elif parsed.scheme == 'socks4':
151
+ socks_version = socks.PROXY_TYPE_SOCKS4
152
+ else:
153
+ raise ValueError(
154
+ "Unable to determine SOCKS version from %s" % proxy_url
155
+ )
156
+
157
+ self.proxy_url = proxy_url
158
+
159
+ socks_options = {
160
+ 'socks_version': socks_version,
161
+ 'proxy_host': parsed.host,
162
+ 'proxy_port': parsed.port,
163
+ 'username': username,
164
+ 'password': password,
165
+ }
166
+ connection_pool_kw['_socks_options'] = socks_options
167
+
168
+ super(SOCKSProxyManager, self).__init__(
169
+ num_pools, headers, **connection_pool_kw
170
+ )
171
+
172
+ self.pool_classes_by_scheme = SOCKSProxyManager.pool_classes_by_scheme