video_chat_get 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (872) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rspec +3 -0
  4. data/.travis.yml +5 -0
  5. data/CODE_OF_CONDUCT.md +74 -0
  6. data/Gemfile +9 -0
  7. data/Gemfile.lock +43 -0
  8. data/LICENSE.txt +21 -0
  9. data/README.md +63 -0
  10. data/Rakefile +6 -0
  11. data/bin/console +14 -0
  12. data/bin/setup +8 -0
  13. data/exe/videochatget +5 -0
  14. data/lib/file_operats/file_operat_chatdata.rb +15 -0
  15. data/lib/progressbars/progressbar.rb +6 -0
  16. data/lib/requests/request.rb +34 -0
  17. data/lib/site_list/mildom_analyze.rb +71 -0
  18. data/lib/site_list/openrec_analyze.rb +105 -0
  19. data/lib/site_list/video_analyze.rb +5 -0
  20. data/lib/site_list/whowatch_analyze.rb +58 -0
  21. data/lib/site_list/youtubelive_analyze.rb +129 -0
  22. data/lib/video_chat_get.rb +55 -0
  23. data/lib/video_chat_get/version.rb +3 -0
  24. data/vendor/bundle/ruby/2.5.0/bin/htmldiff +29 -0
  25. data/vendor/bundle/ruby/2.5.0/bin/httpclient +27 -0
  26. data/vendor/bundle/ruby/2.5.0/bin/ldiff +29 -0
  27. data/vendor/bundle/ruby/2.5.0/bin/nokogiri +27 -0
  28. data/vendor/bundle/ruby/2.5.0/bin/rake +27 -0
  29. data/vendor/bundle/ruby/2.5.0/bin/rspec +27 -0
  30. data/vendor/bundle/ruby/2.5.0/cache/diff-lcs-1.3.gem +0 -0
  31. data/vendor/bundle/ruby/2.5.0/cache/httpclient-2.8.3.gem +0 -0
  32. data/vendor/bundle/ruby/2.5.0/cache/json-2.3.0.gem +0 -0
  33. data/vendor/bundle/ruby/2.5.0/cache/mini_portile2-2.4.0.gem +0 -0
  34. data/vendor/bundle/ruby/2.5.0/cache/nokogiri-1.10.9.gem +0 -0
  35. data/vendor/bundle/ruby/2.5.0/cache/rake-10.5.0.gem +0 -0
  36. data/vendor/bundle/ruby/2.5.0/cache/rspec-3.9.0.gem +0 -0
  37. data/vendor/bundle/ruby/2.5.0/cache/rspec-core-3.9.2.gem +0 -0
  38. data/vendor/bundle/ruby/2.5.0/cache/rspec-expectations-3.9.2.gem +0 -0
  39. data/vendor/bundle/ruby/2.5.0/cache/rspec-mocks-3.9.1.gem +0 -0
  40. data/vendor/bundle/ruby/2.5.0/cache/rspec-support-3.9.3.gem +0 -0
  41. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-16/2.5.0/json-2.3.0/gem.build_complete +0 -0
  42. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-16/2.5.0/json-2.3.0/gem_make.out +13 -0
  43. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-16/2.5.0/json-2.3.0/json/ext/generator.bundle +0 -0
  44. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-16/2.5.0/json-2.3.0/json/ext/parser.bundle +0 -0
  45. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-16/2.5.0/json-2.3.0/mkmf.log +60 -0
  46. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-16/2.5.0/nokogiri-1.10.9/gem.build_complete +0 -0
  47. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-16/2.5.0/nokogiri-1.10.9/gem_make.out +155 -0
  48. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-16/2.5.0/nokogiri-1.10.9/mkmf.log +542 -0
  49. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-16/2.5.0/nokogiri-1.10.9/nokogiri/nokogiri.bundle +0 -0
  50. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/.rspec +1 -0
  51. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/Code-of-Conduct.md +74 -0
  52. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/Contributing.md +83 -0
  53. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/History.md +220 -0
  54. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/License.md +39 -0
  55. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/Manifest.txt +37 -0
  56. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/README.rdoc +84 -0
  57. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/Rakefile +57 -0
  58. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/autotest/discover.rb +1 -0
  59. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/bin/htmldiff +32 -0
  60. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/bin/ldiff +6 -0
  61. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/docs/COPYING.txt +339 -0
  62. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/docs/artistic.txt +127 -0
  63. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff-lcs.rb +3 -0
  64. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs.rb +725 -0
  65. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/array.rb +7 -0
  66. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/block.rb +37 -0
  67. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/callbacks.rb +322 -0
  68. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/change.rb +181 -0
  69. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/htmldiff.rb +149 -0
  70. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/hunk.rb +276 -0
  71. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/internals.rb +307 -0
  72. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/ldiff.rb +167 -0
  73. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/string.rb +5 -0
  74. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/change_spec.rb +65 -0
  75. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/diff_spec.rb +47 -0
  76. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/fixtures/ds1.csv +50 -0
  77. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/fixtures/ds2.csv +51 -0
  78. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/hunk_spec.rb +72 -0
  79. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/issues_spec.rb +49 -0
  80. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/lcs_spec.rb +56 -0
  81. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/ldiff_spec.rb +47 -0
  82. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/patch_spec.rb +422 -0
  83. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/sdiff_spec.rb +214 -0
  84. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/spec_helper.rb +321 -0
  85. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/traverse_balanced_spec.rb +310 -0
  86. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/traverse_sequences_spec.rb +139 -0
  87. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/README.md +85 -0
  88. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/bin/httpclient +77 -0
  89. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/bin/jsonclient +85 -0
  90. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/lib/hexdump.rb +50 -0
  91. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/lib/http-access2.rb +55 -0
  92. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/lib/http-access2/cookie.rb +1 -0
  93. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/lib/http-access2/http.rb +1 -0
  94. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/lib/httpclient.rb +1327 -0
  95. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/lib/httpclient/auth.rb +924 -0
  96. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/lib/httpclient/cacert.pem +3952 -0
  97. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/lib/httpclient/cacert1024.pem +3866 -0
  98. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/lib/httpclient/connection.rb +88 -0
  99. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/lib/httpclient/cookie.rb +220 -0
  100. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/lib/httpclient/http.rb +1082 -0
  101. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/lib/httpclient/include_client.rb +85 -0
  102. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/lib/httpclient/jruby_ssl_socket.rb +588 -0
  103. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/lib/httpclient/session.rb +960 -0
  104. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/lib/httpclient/ssl_config.rb +424 -0
  105. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/lib/httpclient/ssl_socket.rb +150 -0
  106. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/lib/httpclient/timeout.rb +140 -0
  107. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/lib/httpclient/util.rb +222 -0
  108. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/lib/httpclient/version.rb +3 -0
  109. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/lib/httpclient/webagent-cookie.rb +459 -0
  110. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/lib/jsonclient.rb +63 -0
  111. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/lib/oauthclient.rb +111 -0
  112. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/async.rb +8 -0
  113. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/auth.rb +11 -0
  114. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/cookie.rb +18 -0
  115. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/dav.rb +103 -0
  116. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/howto.rb +49 -0
  117. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/jsonclient.rb +67 -0
  118. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/oauth_buzz.rb +57 -0
  119. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/oauth_friendfeed.rb +59 -0
  120. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/oauth_twitter.rb +61 -0
  121. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/ssl/0cert.pem +22 -0
  122. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/ssl/0key.pem +30 -0
  123. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/ssl/1000cert.pem +19 -0
  124. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/ssl/1000key.pem +18 -0
  125. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/ssl/htdocs/index.html +10 -0
  126. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/ssl/ssl_client.rb +22 -0
  127. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/ssl/webrick_httpsd.rb +29 -0
  128. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/stream.rb +21 -0
  129. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/thread.rb +27 -0
  130. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/wcat.rb +21 -0
  131. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/test/ca-chain.pem +44 -0
  132. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/test/ca.cert +23 -0
  133. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/test/client-pass.key +18 -0
  134. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/test/client.cert +19 -0
  135. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/test/client.key +15 -0
  136. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/test/helper.rb +131 -0
  137. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/test/htdigest +1 -0
  138. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/test/htpasswd +2 -0
  139. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/test/jruby_ssl_socket/test_pemutils.rb +32 -0
  140. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/test/runner.rb +2 -0
  141. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/test/server.cert +19 -0
  142. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/test/server.key +15 -0
  143. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/test/sslsvr.rb +65 -0
  144. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/test/subca.cert +21 -0
  145. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/test/test_auth.rb +492 -0
  146. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/test/test_cookie.rb +309 -0
  147. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/test/test_hexdump.rb +14 -0
  148. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/test/test_http-access2.rb +508 -0
  149. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/test/test_httpclient.rb +2145 -0
  150. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/test/test_include_client.rb +52 -0
  151. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/test/test_jsonclient.rb +80 -0
  152. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/test/test_ssl.rb +559 -0
  153. data/vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/test/test_webagent-cookie.rb +465 -0
  154. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/.gitignore +18 -0
  155. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/.travis.yml +24 -0
  156. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/CHANGES.md +391 -0
  157. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/Gemfile +14 -0
  158. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/LICENSE +56 -0
  159. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/README-json-jruby.md +33 -0
  160. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/README.md +409 -0
  161. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/Rakefile +413 -0
  162. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/VERSION +1 -0
  163. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/diagrams/.keep +0 -0
  164. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/fbuffer/fbuffer.h +187 -0
  165. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/generator/.sitearchdir.-.json.-.ext.time +0 -0
  166. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/generator/depend +1 -0
  167. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/generator/extconf.rb +4 -0
  168. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/generator/generator.c +1499 -0
  169. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/generator/generator.h +171 -0
  170. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/parser/.sitearchdir.-.json.-.ext.time +0 -0
  171. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/parser/depend +1 -0
  172. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/parser/extconf.rb +6 -0
  173. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/parser/parser.c +2136 -0
  174. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/parser/parser.h +91 -0
  175. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/parser/parser.rl +896 -0
  176. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/extconf.rb +2 -0
  177. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/install.rb +23 -0
  178. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/java/src/json/ext/ByteListTranscoder.java +166 -0
  179. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/java/src/json/ext/Generator.java +466 -0
  180. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/java/src/json/ext/GeneratorMethods.java +231 -0
  181. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/java/src/json/ext/GeneratorService.java +42 -0
  182. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/java/src/json/ext/GeneratorState.java +490 -0
  183. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/java/src/json/ext/OptionsReader.java +113 -0
  184. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/java/src/json/ext/Parser.java +2362 -0
  185. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/java/src/json/ext/Parser.rl +893 -0
  186. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/java/src/json/ext/ParserService.java +34 -0
  187. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/java/src/json/ext/RuntimeInfo.java +116 -0
  188. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/java/src/json/ext/StringDecoder.java +166 -0
  189. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/java/src/json/ext/StringEncoder.java +111 -0
  190. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/java/src/json/ext/Utils.java +88 -0
  191. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/json-java.gemspec +37 -0
  192. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/json.gemspec +0 -0
  193. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/json_pure.gemspec +38 -0
  194. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json.rb +63 -0
  195. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/bigdecimal.rb +29 -0
  196. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/complex.rb +29 -0
  197. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/core.rb +12 -0
  198. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/date.rb +34 -0
  199. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/date_time.rb +50 -0
  200. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/exception.rb +31 -0
  201. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/ostruct.rb +31 -0
  202. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/range.rb +29 -0
  203. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/rational.rb +28 -0
  204. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/regexp.rb +30 -0
  205. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/set.rb +29 -0
  206. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/struct.rb +30 -0
  207. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/symbol.rb +25 -0
  208. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/time.rb +38 -0
  209. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/common.rb +456 -0
  210. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/ext.rb +15 -0
  211. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/ext/.keep +0 -0
  212. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/generic_object.rb +71 -0
  213. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/pure.rb +15 -0
  214. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/pure/generator.rb +459 -0
  215. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/pure/parser.rb +319 -0
  216. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/version.rb +9 -0
  217. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/references/rfc7159.txt +899 -0
  218. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail10.json +1 -0
  219. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail11.json +1 -0
  220. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail12.json +1 -0
  221. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail13.json +1 -0
  222. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail14.json +1 -0
  223. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail18.json +1 -0
  224. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail19.json +1 -0
  225. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail2.json +1 -0
  226. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail20.json +1 -0
  227. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail21.json +1 -0
  228. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail22.json +1 -0
  229. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail23.json +1 -0
  230. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail24.json +1 -0
  231. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail25.json +1 -0
  232. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail27.json +2 -0
  233. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail28.json +2 -0
  234. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail3.json +1 -0
  235. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail4.json +1 -0
  236. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail5.json +1 -0
  237. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail6.json +1 -0
  238. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail7.json +1 -0
  239. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail8.json +1 -0
  240. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail9.json +1 -0
  241. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/obsolete_fail1.json +1 -0
  242. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/pass1.json +56 -0
  243. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/pass15.json +1 -0
  244. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/pass16.json +1 -0
  245. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/pass17.json +1 -0
  246. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/pass2.json +1 -0
  247. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/pass26.json +1 -0
  248. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/pass3.json +6 -0
  249. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/json_addition_test.rb +203 -0
  250. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/json_common_interface_test.rb +126 -0
  251. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/json_encoding_test.rb +107 -0
  252. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/json_ext_parser_test.rb +15 -0
  253. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/json_fixtures_test.rb +32 -0
  254. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/json_generator_test.rb +421 -0
  255. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/json_generic_object_test.rb +82 -0
  256. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/json_parser_test.rb +472 -0
  257. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/json_string_matching_test.rb +38 -0
  258. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/test_helper.rb +17 -0
  259. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tools/diff.sh +18 -0
  260. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tools/fuzz.rb +131 -0
  261. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tools/server.rb +62 -0
  262. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/.concourse.yml +83 -0
  263. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/.gitignore +7 -0
  264. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/.travis.yml +15 -0
  265. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/CHANGELOG.md +209 -0
  266. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/Gemfile +4 -0
  267. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/LICENSE.txt +20 -0
  268. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/README.md +245 -0
  269. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/Rakefile +29 -0
  270. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/appveyor.yml +25 -0
  271. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/concourse/mini_portile.yml +141 -0
  272. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/concourse/tasks/rake-test/task.ps1 +11 -0
  273. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/concourse/tasks/rake-test/task.sh +13 -0
  274. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/lib/mini_portile2.rb +3 -0
  275. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb +556 -0
  276. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile_cmake.rb +40 -0
  277. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/lib/mini_portile2/version.rb +3 -0
  278. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/mini_portile2.gemspec +42 -0
  279. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/test/assets/git/config +4 -0
  280. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/test/assets/gpg-fixtures/data +1 -0
  281. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/test/assets/gpg-fixtures/data.asc +9 -0
  282. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/test/assets/gpg-fixtures/data.invalid.asc +9 -0
  283. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/test/assets/patch 1.diff +7 -0
  284. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/test/assets/test mini portile-1.0.0/configure +11 -0
  285. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/test/assets/test-cmake-1.0/CMakeLists.txt +7 -0
  286. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/test/assets/test-cmake-1.0/hello.c +4 -0
  287. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/test/assets/test-download-archive.tar.gz +1 -0
  288. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/test/helper.rb +60 -0
  289. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/test/test_cmake.rb +64 -0
  290. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/test/test_cook.rb +115 -0
  291. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/test/test_digest.rb +215 -0
  292. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/test/test_download.rb +71 -0
  293. data/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/test/test_proxy.rb +121 -0
  294. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/LICENSE-DEPENDENCIES.md +1614 -0
  295. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/LICENSE.md +9 -0
  296. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/README.md +198 -0
  297. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/bin/nokogiri +118 -0
  298. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/dependencies.yml +74 -0
  299. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/.sitearchdir.-.nokogiri.time +0 -0
  300. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/Makefile +626 -0
  301. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/depend +358 -0
  302. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/extconf.rb +686 -0
  303. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_document.c +170 -0
  304. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_document.h +10 -0
  305. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_document.o +0 -0
  306. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_element_description.c +279 -0
  307. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_element_description.h +10 -0
  308. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_element_description.o +0 -0
  309. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_entity_lookup.c +32 -0
  310. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_entity_lookup.h +8 -0
  311. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_entity_lookup.o +0 -0
  312. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_sax_parser_context.c +116 -0
  313. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_sax_parser_context.h +11 -0
  314. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_sax_parser_context.o +0 -0
  315. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_sax_push_parser.c +87 -0
  316. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_sax_push_parser.h +9 -0
  317. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_sax_push_parser.o +0 -0
  318. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/nokogiri.bundle +0 -0
  319. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/nokogiri.c +141 -0
  320. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/nokogiri.h +121 -0
  321. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/nokogiri.o +0 -0
  322. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_attr.c +103 -0
  323. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_attr.h +9 -0
  324. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_attr.o +0 -0
  325. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_attribute_decl.c +70 -0
  326. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_attribute_decl.h +9 -0
  327. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_attribute_decl.o +0 -0
  328. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_cdata.c +62 -0
  329. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_cdata.h +9 -0
  330. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_cdata.o +0 -0
  331. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_comment.c +69 -0
  332. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_comment.h +9 -0
  333. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_comment.o +0 -0
  334. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_document.c +608 -0
  335. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_document.h +23 -0
  336. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_document.o +0 -0
  337. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_document_fragment.c +48 -0
  338. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_document_fragment.h +10 -0
  339. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_document_fragment.o +0 -0
  340. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_dtd.c +202 -0
  341. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_dtd.h +10 -0
  342. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_dtd.o +0 -0
  343. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_element_content.c +123 -0
  344. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_element_content.h +10 -0
  345. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_element_content.o +0 -0
  346. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_element_decl.c +69 -0
  347. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_element_decl.h +9 -0
  348. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_element_decl.o +0 -0
  349. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_encoding_handler.c +79 -0
  350. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_encoding_handler.h +8 -0
  351. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_encoding_handler.o +0 -0
  352. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_entity_decl.c +110 -0
  353. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_entity_decl.h +10 -0
  354. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_entity_decl.o +0 -0
  355. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_entity_reference.c +52 -0
  356. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_entity_reference.h +9 -0
  357. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_entity_reference.o +0 -0
  358. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_io.c +61 -0
  359. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_io.h +11 -0
  360. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_io.o +0 -0
  361. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_libxml2_hacks.c +112 -0
  362. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_libxml2_hacks.h +12 -0
  363. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_libxml2_hacks.o +0 -0
  364. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_namespace.c +111 -0
  365. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_namespace.h +14 -0
  366. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_namespace.o +0 -0
  367. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_node.c +1753 -0
  368. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_node.h +13 -0
  369. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_node.o +0 -0
  370. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_node_set.c +486 -0
  371. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_node_set.h +12 -0
  372. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_node_set.o +0 -0
  373. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_processing_instruction.c +56 -0
  374. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_processing_instruction.h +9 -0
  375. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_processing_instruction.o +0 -0
  376. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_reader.c +668 -0
  377. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_reader.h +10 -0
  378. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_reader.o +0 -0
  379. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_relax_ng.c +161 -0
  380. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_relax_ng.h +9 -0
  381. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_relax_ng.o +0 -0
  382. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_parser.c +310 -0
  383. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_parser.h +39 -0
  384. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_parser.o +0 -0
  385. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_parser_context.c +262 -0
  386. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_parser_context.h +10 -0
  387. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_parser_context.o +0 -0
  388. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_push_parser.c +159 -0
  389. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_push_parser.h +9 -0
  390. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_push_parser.o +0 -0
  391. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_schema.c +234 -0
  392. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_schema.h +9 -0
  393. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_schema.o +0 -0
  394. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_syntax_error.c +64 -0
  395. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_syntax_error.h +13 -0
  396. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_syntax_error.o +0 -0
  397. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_text.c +52 -0
  398. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_text.h +9 -0
  399. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_text.o +0 -0
  400. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_xpath_context.c +298 -0
  401. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_xpath_context.h +10 -0
  402. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_xpath_context.o +0 -0
  403. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xslt_stylesheet.c +270 -0
  404. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xslt_stylesheet.h +14 -0
  405. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xslt_stylesheet.o +0 -0
  406. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri.rb +144 -0
  407. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css.rb +27 -0
  408. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css/node.rb +52 -0
  409. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css/parser.rb +750 -0
  410. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css/parser.y +272 -0
  411. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css/parser_extras.rb +91 -0
  412. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css/syntax_error.rb +7 -0
  413. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css/tokenizer.rb +153 -0
  414. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css/tokenizer.rex +55 -0
  415. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css/xpath_visitor.rb +230 -0
  416. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/decorators/slop.rb +42 -0
  417. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html.rb +37 -0
  418. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/builder.rb +35 -0
  419. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/document.rb +335 -0
  420. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/document_fragment.rb +49 -0
  421. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/element_description.rb +23 -0
  422. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/element_description_defaults.rb +671 -0
  423. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/entity_lookup.rb +13 -0
  424. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/sax/parser.rb +62 -0
  425. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/sax/parser_context.rb +16 -0
  426. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/sax/push_parser.rb +36 -0
  427. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/nokogiri.bundle +0 -0
  428. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/syntax_error.rb +4 -0
  429. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/version.rb +109 -0
  430. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml.rb +75 -0
  431. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/attr.rb +14 -0
  432. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/attribute_decl.rb +18 -0
  433. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/builder.rb +446 -0
  434. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/cdata.rb +11 -0
  435. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/character_data.rb +7 -0
  436. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/document.rb +285 -0
  437. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/document_fragment.rb +160 -0
  438. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/dtd.rb +32 -0
  439. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/element_content.rb +36 -0
  440. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/element_decl.rb +13 -0
  441. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/entity_decl.rb +19 -0
  442. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/entity_reference.rb +18 -0
  443. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/namespace.rb +13 -0
  444. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/node.rb +902 -0
  445. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/node/save_options.rb +61 -0
  446. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/node_set.rb +371 -0
  447. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/notation.rb +6 -0
  448. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/parse_options.rb +120 -0
  449. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/pp.rb +2 -0
  450. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/pp/character_data.rb +18 -0
  451. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/pp/node.rb +56 -0
  452. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/processing_instruction.rb +8 -0
  453. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/reader.rb +112 -0
  454. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/relax_ng.rb +32 -0
  455. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/sax.rb +4 -0
  456. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/sax/document.rb +171 -0
  457. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/sax/parser.rb +122 -0
  458. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/sax/parser_context.rb +16 -0
  459. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/sax/push_parser.rb +60 -0
  460. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/schema.rb +63 -0
  461. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/searchable.rb +230 -0
  462. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/syntax_error.rb +70 -0
  463. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/text.rb +9 -0
  464. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/xpath.rb +10 -0
  465. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/xpath/syntax_error.rb +11 -0
  466. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/xpath_context.rb +16 -0
  467. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xslt.rb +56 -0
  468. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xslt/stylesheet.rb +25 -0
  469. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/xsd/xmlparser/nokogiri.rb +102 -0
  470. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes.patch +78 -0
  471. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/patches/libxml2/0002-Remove-script-macro-support.patch +40 -0
  472. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/patches/libxml2/0003-Update-entities-to-remove-handling-of-ssi.patch +44 -0
  473. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/patches/libxml2/0004-libxml2.la-is-in-top_builddir.patch +25 -0
  474. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/patches/libxml2/0005-Fix-infinite-loop-in-xmlStringLenDecodeEntities.patch +32 -0
  475. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/.autotest +7 -0
  476. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/.rubocop.yml +27 -0
  477. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/.togglerc +7 -0
  478. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/CONTRIBUTING.rdoc +38 -0
  479. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/History.rdoc +659 -0
  480. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/MIT-LICENSE +21 -0
  481. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/Manifest.txt +166 -0
  482. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/README.rdoc +139 -0
  483. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/Rakefile +81 -0
  484. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/bin/rake +33 -0
  485. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/command_line_usage.rdoc +158 -0
  486. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/example/Rakefile1 +38 -0
  487. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/example/Rakefile2 +35 -0
  488. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/example/a.c +6 -0
  489. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/example/b.c +6 -0
  490. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/example/main.c +11 -0
  491. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/glossary.rdoc +42 -0
  492. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/jamis.rb +591 -0
  493. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/proto_rake.rdoc +127 -0
  494. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/rake.1 +141 -0
  495. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/rakefile.rdoc +624 -0
  496. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/rational.rdoc +151 -0
  497. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.4.14.rdoc +23 -0
  498. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.4.15.rdoc +35 -0
  499. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.5.0.rdoc +53 -0
  500. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.5.3.rdoc +78 -0
  501. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.5.4.rdoc +46 -0
  502. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.6.0.rdoc +141 -0
  503. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.7.0.rdoc +119 -0
  504. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.7.1.rdoc +59 -0
  505. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.7.2.rdoc +121 -0
  506. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.7.3.rdoc +47 -0
  507. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.0.rdoc +114 -0
  508. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.2.rdoc +165 -0
  509. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.3.rdoc +112 -0
  510. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.4.rdoc +147 -0
  511. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.5.rdoc +53 -0
  512. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.6.rdoc +37 -0
  513. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.7.rdoc +55 -0
  514. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.0.rdoc +112 -0
  515. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.1.rdoc +52 -0
  516. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.2.2.rdoc +55 -0
  517. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.2.rdoc +49 -0
  518. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.3.rdoc +102 -0
  519. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.4.rdoc +60 -0
  520. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.5.rdoc +55 -0
  521. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.6.rdoc +64 -0
  522. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-10.0.0.rdoc +178 -0
  523. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-10.0.1.rdoc +58 -0
  524. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-10.0.2.rdoc +53 -0
  525. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-10.0.3.rdoc +191 -0
  526. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/doc/release_notes/rake-10.1.0.rdoc +61 -0
  527. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake.rb +79 -0
  528. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/alt_system.rb +110 -0
  529. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/application.rb +790 -0
  530. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/backtrace.rb +23 -0
  531. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/clean.rb +76 -0
  532. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/cloneable.rb +16 -0
  533. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/.document +1 -0
  534. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/compositepublisher.rb +21 -0
  535. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/ftptools.rb +137 -0
  536. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/publisher.rb +81 -0
  537. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/rubyforgepublisher.rb +18 -0
  538. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/sshpublisher.rb +61 -0
  539. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/contrib/sys.rb +4 -0
  540. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/cpu_counter.rb +125 -0
  541. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/default_loader.rb +14 -0
  542. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/dsl_definition.rb +201 -0
  543. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/early_time.rb +21 -0
  544. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/ext/core.rb +25 -0
  545. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/ext/module.rb +2 -0
  546. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/ext/pathname.rb +25 -0
  547. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/ext/string.rb +175 -0
  548. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/ext/time.rb +18 -0
  549. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/file_creation_task.rb +24 -0
  550. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/file_list.rb +428 -0
  551. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/file_task.rb +46 -0
  552. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/file_utils.rb +128 -0
  553. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/file_utils_ext.rb +144 -0
  554. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/gempackagetask.rb +4 -0
  555. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/invocation_chain.rb +56 -0
  556. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/invocation_exception_mixin.rb +16 -0
  557. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/late_time.rb +17 -0
  558. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/linked_list.rb +103 -0
  559. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/loaders/makefile.rb +53 -0
  560. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/multi_task.rb +13 -0
  561. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/name_space.rb +38 -0
  562. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/packagetask.rb +199 -0
  563. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/pathmap.rb +3 -0
  564. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/phony.rb +15 -0
  565. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/private_reader.rb +20 -0
  566. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/promise.rb +99 -0
  567. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/pseudo_status.rb +29 -0
  568. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/rake_module.rb +38 -0
  569. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/rake_test_loader.rb +22 -0
  570. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/rdoctask.rb +4 -0
  571. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/ruby182_test_unit_fix.rb +29 -0
  572. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/rule_recursion_overflow_error.rb +20 -0
  573. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/runtest.rb +27 -0
  574. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/scope.rb +42 -0
  575. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/task.rb +383 -0
  576. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/task_argument_error.rb +7 -0
  577. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/task_arguments.rb +98 -0
  578. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/task_manager.rb +307 -0
  579. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/tasklib.rb +24 -0
  580. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/testtask.rb +213 -0
  581. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/thread_history_display.rb +48 -0
  582. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/thread_pool.rb +164 -0
  583. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/trace_output.rb +22 -0
  584. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/version.rb +7 -0
  585. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/lib/rake/win32.rb +56 -0
  586. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/rakelib/publish.rake +20 -0
  587. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/rakelib/test_times.rake +25 -0
  588. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/file_creation.rb +34 -0
  589. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/helper.rb +129 -0
  590. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/support/rakefile_definitions.rb +478 -0
  591. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/support/ruby_runner.rb +34 -0
  592. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_private_reader.rb +42 -0
  593. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake.rb +40 -0
  594. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_application.rb +643 -0
  595. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_application_options.rb +468 -0
  596. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_backtrace.rb +119 -0
  597. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_clean.rb +61 -0
  598. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_cpu_counter.rb +68 -0
  599. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_definitions.rb +84 -0
  600. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_directory_task.rb +76 -0
  601. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_dsl.rb +40 -0
  602. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_early_time.rb +31 -0
  603. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_extension.rb +59 -0
  604. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_file_creation_task.rb +56 -0
  605. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_file_list.rb +670 -0
  606. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_file_list_path_map.rb +8 -0
  607. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_file_task.rb +197 -0
  608. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_file_utils.rb +314 -0
  609. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_ftp_file.rb +74 -0
  610. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_functional.rb +482 -0
  611. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_invocation_chain.rb +64 -0
  612. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_late_time.rb +18 -0
  613. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_linked_list.rb +84 -0
  614. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_makefile_loader.rb +46 -0
  615. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_multi_task.rb +64 -0
  616. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_name_space.rb +57 -0
  617. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_package_task.rb +79 -0
  618. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_path_map.rb +168 -0
  619. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_path_map_explode.rb +34 -0
  620. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_path_map_partial.rb +18 -0
  621. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_pathname_extensions.rb +15 -0
  622. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_pseudo_status.rb +21 -0
  623. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_rake_test_loader.rb +20 -0
  624. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_reduce_compat.rb +26 -0
  625. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_require.rb +40 -0
  626. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_rules.rb +388 -0
  627. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_scope.rb +44 -0
  628. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task.rb +393 -0
  629. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task_argument_parsing.rb +119 -0
  630. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task_arguments.rb +127 -0
  631. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task_lib.rb +9 -0
  632. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task_manager.rb +178 -0
  633. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task_manager_argument_resolution.rb +19 -0
  634. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_task_with_arguments.rb +172 -0
  635. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_test_task.rb +146 -0
  636. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_thread_pool.rb +145 -0
  637. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_top_level_functions.rb +71 -0
  638. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_rake_win32.rb +72 -0
  639. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_thread_history_display.rb +101 -0
  640. data/vendor/bundle/ruby/2.5.0/gems/rake-10.5.0/test/test_trace_output.rb +52 -0
  641. data/vendor/bundle/ruby/2.5.0/gems/rspec-3.9.0/LICENSE.md +27 -0
  642. data/vendor/bundle/ruby/2.5.0/gems/rspec-3.9.0/README.md +43 -0
  643. data/vendor/bundle/ruby/2.5.0/gems/rspec-3.9.0/lib/rspec.rb +3 -0
  644. data/vendor/bundle/ruby/2.5.0/gems/rspec-3.9.0/lib/rspec/version.rb +5 -0
  645. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/.document +5 -0
  646. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/.yardopts +8 -0
  647. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/Changelog.md +2291 -0
  648. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/LICENSE.md +26 -0
  649. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/README.md +384 -0
  650. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/exe/rspec +4 -0
  651. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/autorun.rb +3 -0
  652. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core.rb +186 -0
  653. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/backtrace_formatter.rb +65 -0
  654. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/bisect/coordinator.rb +62 -0
  655. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/bisect/example_minimizer.rb +173 -0
  656. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/bisect/fork_runner.rb +135 -0
  657. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/bisect/server.rb +61 -0
  658. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/bisect/shell_command.rb +126 -0
  659. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/bisect/shell_runner.rb +73 -0
  660. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/bisect/utilities.rb +58 -0
  661. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/configuration.rb +2363 -0
  662. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/configuration_options.rb +233 -0
  663. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/did_you_mean.rb +46 -0
  664. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/drb.rb +113 -0
  665. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/dsl.rb +98 -0
  666. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/example.rb +656 -0
  667. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/example_group.rb +900 -0
  668. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/example_status_persister.rb +235 -0
  669. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/filter_manager.rb +231 -0
  670. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/flat_map.rb +20 -0
  671. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters.rb +273 -0
  672. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/base_bisect_formatter.rb +45 -0
  673. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/base_formatter.rb +70 -0
  674. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/base_text_formatter.rb +75 -0
  675. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/bisect_drb_formatter.rb +29 -0
  676. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/bisect_progress_formatter.rb +157 -0
  677. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/console_codes.rb +68 -0
  678. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/deprecation_formatter.rb +223 -0
  679. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/documentation_formatter.rb +102 -0
  680. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/exception_presenter.rb +511 -0
  681. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/failure_list_formatter.rb +23 -0
  682. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/fallback_message_formatter.rb +28 -0
  683. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/helpers.rb +110 -0
  684. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/html_formatter.rb +153 -0
  685. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/html_printer.rb +414 -0
  686. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/html_snippet_extractor.rb +120 -0
  687. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/json_formatter.rb +102 -0
  688. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/profile_formatter.rb +68 -0
  689. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/progress_formatter.rb +29 -0
  690. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/protocol.rb +182 -0
  691. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/snippet_extractor.rb +134 -0
  692. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/syntax_highlighter.rb +91 -0
  693. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/hooks.rb +641 -0
  694. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/invocations.rb +87 -0
  695. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/memoized_helpers.rb +554 -0
  696. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/metadata.rb +498 -0
  697. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/metadata_filter.rb +255 -0
  698. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/minitest_assertions_adapter.rb +31 -0
  699. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/mocking_adapters/flexmock.rb +31 -0
  700. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/mocking_adapters/mocha.rb +57 -0
  701. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/mocking_adapters/null.rb +14 -0
  702. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/mocking_adapters/rr.rb +31 -0
  703. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/mocking_adapters/rspec.rb +32 -0
  704. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/notifications.rb +521 -0
  705. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/option_parser.rb +316 -0
  706. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/ordering.rb +158 -0
  707. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/output_wrapper.rb +29 -0
  708. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/pending.rb +165 -0
  709. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/profiler.rb +34 -0
  710. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/project_initializer.rb +48 -0
  711. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/project_initializer/.rspec +1 -0
  712. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/project_initializer/spec/spec_helper.rb +100 -0
  713. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/rake_task.rb +188 -0
  714. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/reporter.rb +265 -0
  715. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/ruby_project.rb +53 -0
  716. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/runner.rb +204 -0
  717. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/sandbox.rb +37 -0
  718. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/set.rb +54 -0
  719. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/shared_context.rb +55 -0
  720. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/shared_example_group.rb +271 -0
  721. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/shell_escape.rb +49 -0
  722. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/test_unit_assertions_adapter.rb +30 -0
  723. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/version.rb +9 -0
  724. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/warnings.rb +40 -0
  725. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.9.2/lib/rspec/core/world.rb +276 -0
  726. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/.document +5 -0
  727. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/.yardopts +6 -0
  728. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/Changelog.md +1191 -0
  729. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/LICENSE.md +25 -0
  730. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/README.md +320 -0
  731. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations.rb +82 -0
  732. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/block_snippet_extractor.rb +253 -0
  733. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/configuration.rb +215 -0
  734. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/expectation_target.rb +127 -0
  735. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/fail_with.rb +39 -0
  736. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/failure_aggregator.rb +194 -0
  737. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/handler.rb +170 -0
  738. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/minitest_integration.rb +58 -0
  739. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/syntax.rb +132 -0
  740. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/version.rb +8 -0
  741. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers.rb +1038 -0
  742. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/aliased_matcher.rb +116 -0
  743. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in.rb +52 -0
  744. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/all.rb +86 -0
  745. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/base_matcher.rb +193 -0
  746. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/be.rb +288 -0
  747. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/be_between.rb +77 -0
  748. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/be_instance_of.rb +26 -0
  749. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/be_kind_of.rb +20 -0
  750. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/be_within.rb +72 -0
  751. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/change.rb +428 -0
  752. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/compound.rb +276 -0
  753. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/contain_exactly.rb +302 -0
  754. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/cover.rb +24 -0
  755. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/eq.rb +40 -0
  756. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/eql.rb +34 -0
  757. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/equal.rb +81 -0
  758. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/exist.rb +90 -0
  759. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/has.rb +103 -0
  760. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/have_attributes.rb +114 -0
  761. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/include.rb +149 -0
  762. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/match.rb +106 -0
  763. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/operators.rb +128 -0
  764. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/output.rb +200 -0
  765. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/raise_error.rb +230 -0
  766. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/respond_to.rb +199 -0
  767. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/satisfy.rb +60 -0
  768. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/start_or_end_with.rb +94 -0
  769. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/throw_symbol.rb +132 -0
  770. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/yield.rb +441 -0
  771. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/composable.rb +171 -0
  772. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/dsl.rb +540 -0
  773. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/english_phrasing.rb +58 -0
  774. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/expecteds_for_multiple_diffs.rb +82 -0
  775. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/fail_matchers.rb +42 -0
  776. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/generated_descriptions.rb +41 -0
  777. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/matcher_delegator.rb +35 -0
  778. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/matcher_protocol.rb +99 -0
  779. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/.document +5 -0
  780. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/.yardopts +6 -0
  781. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/Changelog.md +1133 -0
  782. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/LICENSE.md +25 -0
  783. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/README.md +463 -0
  784. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks.rb +130 -0
  785. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance.rb +11 -0
  786. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/chain.rb +111 -0
  787. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/error_generator.rb +31 -0
  788. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/expect_chain_chain.rb +31 -0
  789. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/expectation_chain.rb +50 -0
  790. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/message_chains.rb +83 -0
  791. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/proxy.rb +116 -0
  792. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/recorder.rb +294 -0
  793. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/stub_chain.rb +51 -0
  794. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/stub_chain_chain.rb +23 -0
  795. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/argument_list_matcher.rb +100 -0
  796. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/argument_matchers.rb +322 -0
  797. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/configuration.rb +212 -0
  798. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/error_generator.rb +369 -0
  799. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/example_methods.rb +434 -0
  800. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/instance_method_stasher.rb +146 -0
  801. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/marshal_extension.rb +41 -0
  802. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/matchers/expectation_customization.rb +20 -0
  803. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/matchers/have_received.rb +134 -0
  804. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/matchers/receive.rb +132 -0
  805. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/matchers/receive_message_chain.rb +82 -0
  806. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/matchers/receive_messages.rb +77 -0
  807. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/message_chain.rb +87 -0
  808. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/message_expectation.rb +751 -0
  809. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/method_double.rb +287 -0
  810. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/method_reference.rb +202 -0
  811. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/minitest_integration.rb +68 -0
  812. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/mutate_const.rb +339 -0
  813. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/object_reference.rb +149 -0
  814. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/order_group.rb +81 -0
  815. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/proxy.rb +503 -0
  816. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/space.rb +238 -0
  817. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/standalone.rb +3 -0
  818. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/syntax.rb +325 -0
  819. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/targets.rb +124 -0
  820. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/test_double.rb +171 -0
  821. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/verifying_double.rb +129 -0
  822. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/verifying_message_expectation.rb +54 -0
  823. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/verifying_proxy.rb +220 -0
  824. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/version.rb +9 -0
  825. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/Changelog.md +302 -0
  826. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/LICENSE.md +23 -0
  827. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/README.md +40 -0
  828. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support.rb +149 -0
  829. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/caller_filter.rb +83 -0
  830. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/comparable_version.rb +46 -0
  831. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/differ.rb +215 -0
  832. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/directory_maker.rb +63 -0
  833. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/encoded_string.rb +161 -0
  834. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/fuzzy_matcher.rb +48 -0
  835. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/hunk_generator.rb +47 -0
  836. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/matcher_definition.rb +42 -0
  837. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/method_signature_verifier.rb +438 -0
  838. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/mutex.rb +73 -0
  839. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/object_formatter.rb +275 -0
  840. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/recursive_const_methods.rb +76 -0
  841. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/reentrant_mutex.rb +61 -0
  842. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/ruby_features.rb +190 -0
  843. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/source.rb +75 -0
  844. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/source/location.rb +21 -0
  845. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/source/node.rb +110 -0
  846. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/source/token.rb +87 -0
  847. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/spec.rb +81 -0
  848. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/deprecation_helpers.rb +64 -0
  849. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/formatting_support.rb +9 -0
  850. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/in_sub_process.rb +69 -0
  851. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/library_wide_checks.rb +150 -0
  852. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/shell_out.rb +89 -0
  853. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/stderr_splitter.rb +75 -0
  854. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/string_matcher.rb +46 -0
  855. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/with_isolated_directory.rb +13 -0
  856. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/with_isolated_stderr.rb +13 -0
  857. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/version.rb +7 -0
  858. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/warnings.rb +39 -0
  859. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.9.3/lib/rspec/support/with_keywords_when_needed.rb +33 -0
  860. data/vendor/bundle/ruby/2.5.0/specifications/diff-lcs-1.3.gemspec +61 -0
  861. data/vendor/bundle/ruby/2.5.0/specifications/httpclient-2.8.3.gemspec +21 -0
  862. data/vendor/bundle/ruby/2.5.0/specifications/json-2.3.0.gemspec +0 -0
  863. data/vendor/bundle/ruby/2.5.0/specifications/mini_portile2-2.4.0.gemspec +48 -0
  864. data/vendor/bundle/ruby/2.5.0/specifications/nokogiri-1.10.9.gemspec +85 -0
  865. data/vendor/bundle/ruby/2.5.0/specifications/rake-10.5.0.gemspec +43 -0
  866. data/vendor/bundle/ruby/2.5.0/specifications/rspec-3.9.0.gemspec +43 -0
  867. data/vendor/bundle/ruby/2.5.0/specifications/rspec-core-3.9.2.gemspec +63 -0
  868. data/vendor/bundle/ruby/2.5.0/specifications/rspec-expectations-3.9.2.gemspec +51 -0
  869. data/vendor/bundle/ruby/2.5.0/specifications/rspec-mocks-3.9.1.gemspec +51 -0
  870. data/vendor/bundle/ruby/2.5.0/specifications/rspec-support-3.9.3.gemspec +39 -0
  871. data/video_chat_get.gemspec +29 -0
  872. metadata +957 -0
@@ -0,0 +1,77 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # httpclient shell command.
4
+ #
5
+ # Usage: 1) % httpclient get https://www.google.co.jp/ q=ruby
6
+ # Usage: 2) % httpclient
7
+ #
8
+ # For 1) it issues a GET request to the given URI and shows the wiredump and
9
+ # the parsed result. For 2) it invokes irb shell with the binding that has a
10
+ # HTTPClient as 'self'. You can call HTTPClient instance methods like;
11
+ # > get "https://www.google.co.jp/", :q => :ruby
12
+ require 'httpclient'
13
+
14
+ method = ARGV.shift
15
+ if method == 'version'
16
+ puts HTTPClient::VERSION
17
+ exit
18
+ end
19
+
20
+ url = ARGV.shift
21
+ if method && url
22
+ client = HTTPClient.new
23
+ client.strict_response_size_check = true
24
+ if method == 'download'
25
+ print client.get_content(url)
26
+ else
27
+ client.debug_dev = STDERR
28
+ $DEBUG = true
29
+ require 'pp'
30
+ pp client.send(method, url, *ARGV)
31
+ end
32
+ exit
33
+ end
34
+
35
+ require 'irb'
36
+ require 'irb/completion'
37
+
38
+ class Runner
39
+ def initialize
40
+ @httpclient = HTTPClient.new
41
+ @httpclient.strict_response_size_check = true
42
+ end
43
+
44
+ def method_missing(msg, *a, &b)
45
+ debug, $DEBUG = $DEBUG, true
46
+ begin
47
+ @httpclient.send(msg, *a, &b)
48
+ ensure
49
+ $DEBUG = debug
50
+ end
51
+ end
52
+
53
+ def run
54
+ IRB.setup(nil)
55
+ ws = IRB::WorkSpace.new(binding)
56
+ irb = IRB::Irb.new(ws)
57
+ IRB.conf[:MAIN_CONTEXT] = irb.context
58
+
59
+ trap("SIGINT") do
60
+ irb.signal_handle
61
+ end
62
+
63
+ begin
64
+ catch(:IRB_EXIT) do
65
+ irb.eval_input
66
+ end
67
+ ensure
68
+ IRB.irb_at_exit
69
+ end
70
+ end
71
+
72
+ def to_s
73
+ 'HTTPClient'
74
+ end
75
+ end
76
+
77
+ Runner.new.run
@@ -0,0 +1,85 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # jsonclient shell command.
4
+ #
5
+ # Usage: 1) % jsonclient post https://www.example.com/ content.json
6
+ # Usage: 2) % jsonclient
7
+ #
8
+ # For 1) it issues a GET request to the given URI and shows the wiredump and
9
+ # the parsed result. For 2) it invokes irb shell with the binding that has a
10
+ # JSONClient as 'self'. You can call JSONClient instance methods like;
11
+ # > post "https://www.example.com/resource", {'hello' => 'world'}
12
+ require 'jsonclient'
13
+
14
+ method = ARGV.shift
15
+ url = ARGV.shift
16
+ body = []
17
+ if ['post', 'put'].include?(method)
18
+ if ARGV.size == 1 && File.exist?(ARGV[0])
19
+ body << File.read(ARGV[0])
20
+ else
21
+ body << ARGF.read
22
+ end
23
+ end
24
+ if method && url
25
+ require 'pp'
26
+ client = JSONClient.new
27
+ client.debug_dev = STDERR if $DEBUG
28
+ res = client.send(method, url, *body)
29
+ STDERR.puts('RESPONSE HEADER: ')
30
+ PP.pp(res.headers, STDERR)
31
+ if res.ok?
32
+ begin
33
+ puts JSON.pretty_generate(res.content)
34
+ rescue JSON::GeneratorError
35
+ puts res.content
36
+ end
37
+ exit 0
38
+ else
39
+ STDERR.puts res.content
40
+ exit 1
41
+ end
42
+ end
43
+
44
+ require 'irb'
45
+ require 'irb/completion'
46
+
47
+ class Runner
48
+ def initialize
49
+ @httpclient = JSONClient.new
50
+ end
51
+
52
+ def method_missing(msg, *a, &b)
53
+ debug, $DEBUG = $DEBUG, true
54
+ begin
55
+ @httpclient.send(msg, *a, &b)
56
+ ensure
57
+ $DEBUG = debug
58
+ end
59
+ end
60
+
61
+ def run
62
+ IRB.setup(nil)
63
+ ws = IRB::WorkSpace.new(binding)
64
+ irb = IRB::Irb.new(ws)
65
+ IRB.conf[:MAIN_CONTEXT] = irb.context
66
+
67
+ trap("SIGINT") do
68
+ irb.signal_handle
69
+ end
70
+
71
+ begin
72
+ catch(:IRB_EXIT) do
73
+ irb.eval_input
74
+ end
75
+ ensure
76
+ IRB.irb_at_exit
77
+ end
78
+ end
79
+
80
+ def to_s
81
+ 'JSONClient'
82
+ end
83
+ end
84
+
85
+ Runner.new.run
@@ -0,0 +1,50 @@
1
+ # encoding: binary
2
+
3
+ # This was written by Arai-san and published at
4
+ # http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-list/31987
5
+
6
+
7
+ module HexDump
8
+ # str must be in BINARY encoding in 1.9
9
+ def encode(str)
10
+ offset = 0
11
+ result = []
12
+ while raw = str.slice(offset, 16) and raw.length > 0
13
+ # data field
14
+ data = ''
15
+ for v in raw.unpack('N* a*')
16
+ if v.kind_of? Integer
17
+ data << sprintf("%08x ", v)
18
+ else
19
+ v.each_byte {|c| data << sprintf("%02x", c) }
20
+ end
21
+ end
22
+ # text field
23
+ text = raw.tr("\000-\037\177-\377", ".")
24
+ result << sprintf("%08x %-36s %s", offset, data, text)
25
+ offset += 16
26
+ # omit duplicate line
27
+ if /^(#{regex_quote_n(raw)})+/n =~ str[offset .. -1]
28
+ result << sprintf("%08x ...", offset)
29
+ offset += $&.length
30
+ # should print at the end
31
+ if offset == str.length
32
+ result << sprintf("%08x %-36s %s", offset-16, data, text)
33
+ end
34
+ end
35
+ end
36
+ result
37
+ end
38
+ module_function :encode
39
+
40
+ if RUBY_VERSION >= "1.9"
41
+ # raw must be in BINARY encoding in 1.9
42
+ def self.regex_quote_n(raw)
43
+ Regexp.quote(raw)
44
+ end
45
+ else
46
+ def self.regex_quote_n(raw)
47
+ Regexp.quote(raw, 'n')
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,55 @@
1
+ # HTTPAccess2 - HTTP accessing library.
2
+ # Copyright (C) 2000-2007 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>.
3
+
4
+ # This program is copyrighted free software by NAKAMURA, Hiroshi. You can
5
+ # redistribute it and/or modify it under the same terms of Ruby's license;
6
+ # either the dual license version in 2003, or any later version.
7
+
8
+ # http-access2.rb is based on http-access.rb in http-access/0.0.4. Some
9
+ # part of it is copyrighted by Maebashi-san who made and published
10
+ # http-access/0.0.4. http-access/0.0.4 did not include license notice but
11
+ # when I asked Maebashi-san he agreed that I can redistribute it under the
12
+ # same terms of Ruby. Many thanks to Maebashi-san.
13
+
14
+
15
+ require 'httpclient'
16
+
17
+
18
+ module HTTPAccess2
19
+ VERSION = ::HTTPClient::VERSION
20
+ RUBY_VERSION_STRING = ::HTTPClient::RUBY_VERSION_STRING
21
+ SSLEnabled = ::HTTPClient::SSLEnabled
22
+ SSPIEnabled = ::HTTPClient::SSPIEnabled
23
+ DEBUG_SSL = true
24
+
25
+ Util = ::HTTPClient::Util
26
+
27
+ class Client < ::HTTPClient
28
+ class RetryableResponse < StandardError
29
+ end
30
+ end
31
+
32
+ SSLConfig = ::HTTPClient::SSLConfig
33
+ BasicAuth = ::HTTPClient::BasicAuth
34
+ DigestAuth = ::HTTPClient::DigestAuth
35
+ NegotiateAuth = ::HTTPClient::NegotiateAuth
36
+ AuthFilterBase = ::HTTPClient::AuthFilterBase
37
+ WWWAuth = ::HTTPClient::WWWAuth
38
+ ProxyAuth = ::HTTPClient::ProxyAuth
39
+ Site = ::HTTPClient::Site
40
+ Connection = ::HTTPClient::Connection
41
+ SessionManager = ::HTTPClient::SessionManager
42
+ SSLSocketWrap = ::HTTPClient::SSLSocket
43
+ DebugSocket = ::HTTPClient::DebugSocket
44
+
45
+ class Session < ::HTTPClient::Session
46
+ class Error < StandardError
47
+ end
48
+ class InvalidState < Error
49
+ end
50
+ class BadResponse < Error
51
+ end
52
+ class KeepAliveDisconnected < Error
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,1327 @@
1
+ # HTTPClient - HTTP client library.
2
+ # Copyright (C) 2000-2015 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
+ #
4
+ # This program is copyrighted free software by NAKAMURA, Hiroshi. You can
5
+ # redistribute it and/or modify it under the same terms of Ruby's license;
6
+ # either the dual license version in 2003, or any later version.
7
+
8
+
9
+ require 'stringio'
10
+ require 'digest/sha1'
11
+
12
+ # Extra library
13
+ require 'httpclient/version'
14
+ require 'httpclient/util'
15
+ require 'httpclient/ssl_config'
16
+ require 'httpclient/connection'
17
+ require 'httpclient/session'
18
+ require 'httpclient/http'
19
+ require 'httpclient/auth'
20
+ require 'httpclient/cookie'
21
+
22
+ # :main:HTTPClient
23
+ # The HTTPClient class provides several methods for accessing Web resources
24
+ # via HTTP.
25
+ #
26
+ # HTTPClient instance is designed to be MT-safe. You can call a HTTPClient
27
+ # instance from several threads without synchronization after setting up an
28
+ # instance.
29
+ #
30
+ # clnt = HTTPClient.new
31
+ # clnt.set_cookie_store('/home/nahi/cookie.dat')
32
+ # urls.each do |url|
33
+ # Thread.new(url) do |u|
34
+ # p clnt.head(u).status
35
+ # end
36
+ # end
37
+ #
38
+ # == How to use
39
+ #
40
+ # At first, how to create your client. See initialize for more detail.
41
+ #
42
+ # 1. Create simple client.
43
+ #
44
+ # clnt = HTTPClient.new
45
+ #
46
+ # 2. Accessing resources through HTTP proxy. You can use environment
47
+ # variable 'http_proxy' or 'HTTP_PROXY' instead.
48
+ #
49
+ # clnt = HTTPClient.new('http://myproxy:8080')
50
+ #
51
+ # === How to retrieve web resources
52
+ #
53
+ # See get and get_content.
54
+ #
55
+ # 1. Get content of specified URL. It returns HTTP::Message object and
56
+ # calling 'body' method of it returns a content String.
57
+ #
58
+ # puts clnt.get('http://dev.ctor.org/').body
59
+ #
60
+ # 2. For getting content directly, use get_content. It follows redirect
61
+ # response and returns a String of whole result.
62
+ #
63
+ # puts clnt.get_content('http://dev.ctor.org/')
64
+ #
65
+ # 3. You can pass :follow_redirect option to follow redirect response in get.
66
+ #
67
+ # puts clnt.get('http://dev.ctor.org/', :follow_redirect => true)
68
+ #
69
+ # 4. Get content as chunks of String. It yields chunks of String.
70
+ #
71
+ # clnt.get_content('http://dev.ctor.org/') do |chunk|
72
+ # puts chunk
73
+ # end
74
+ #
75
+ # === Invoking other HTTP methods
76
+ #
77
+ # See head, get, post, put, delete, options, propfind, proppatch and trace.
78
+ # It returns a HTTP::Message instance as a response.
79
+ #
80
+ # 1. Do HEAD request.
81
+ #
82
+ # res = clnt.head(uri)
83
+ # p res.header['Last-Modified'][0]
84
+ #
85
+ # 2. Do GET request with query.
86
+ #
87
+ # query = { 'keyword' => 'ruby', 'lang' => 'en' }
88
+ # res = clnt.get(uri, query)
89
+ # p res.status
90
+ # p res.contenttype
91
+ # p res.header['X-Custom']
92
+ # puts res.body
93
+ #
94
+ # You can also use keyword argument style.
95
+ #
96
+ # res = clnt.get(uri, :query => { :keyword => 'ruby', :lang => 'en' })
97
+ #
98
+ # === How to POST
99
+ #
100
+ # See post.
101
+ #
102
+ # 1. Do POST a form data.
103
+ #
104
+ # body = { 'keyword' => 'ruby', 'lang' => 'en' }
105
+ # res = clnt.post(uri, body)
106
+ #
107
+ # Keyword argument style.
108
+ #
109
+ # res = clnt.post(uri, :body => ...)
110
+ #
111
+ # 2. Do multipart file upload with POST. No need to set extra header by
112
+ # yourself from httpclient/2.1.4.
113
+ #
114
+ # File.open('/tmp/post_data') do |file|
115
+ # body = { 'upload' => file, 'user' => 'nahi' }
116
+ # res = clnt.post(uri, body)
117
+ # end
118
+ #
119
+ # 3. Do multipart with custom body.
120
+ #
121
+ # File.open('/tmp/post_data') do |file|
122
+ # body = [{ 'Content-Type' => 'application/atom+xml; charset=UTF-8',
123
+ # :content => '<entry>...</entry>' },
124
+ # { 'Content-Type' => 'video/mp4',
125
+ # 'Content-Transfer-Encoding' => 'binary',
126
+ # :content => file }]
127
+ # res = clnt.post(uri, body)
128
+ # end
129
+ #
130
+ # === Accessing via SSL
131
+ #
132
+ # Ruby needs to be compiled with OpenSSL.
133
+ #
134
+ # 1. Get content of specified URL via SSL.
135
+ # Just pass an URL which starts with 'https://'.
136
+ #
137
+ # https_url = 'https://www.rsa.com'
138
+ # clnt.get(https_url)
139
+ #
140
+ # 2. Getting peer certificate from response.
141
+ #
142
+ # res = clnt.get(https_url)
143
+ # p res.peer_cert #=> returns OpenSSL::X509::Certificate
144
+ #
145
+ # 3. Configuring OpenSSL options. See HTTPClient::SSLConfig for more details.
146
+ #
147
+ # user_cert_file = 'cert.pem'
148
+ # user_key_file = 'privkey.pem'
149
+ # clnt.ssl_config.set_client_cert_file(user_cert_file, user_key_file)
150
+ # clnt.get(https_url)
151
+ #
152
+ # 4. Revocation check. On JRuby you can set following options to let
153
+ # HTTPClient to perform revocation check with CRL and OCSP:
154
+ #
155
+ # -J-Dcom.sun.security.enableCRLDP=true -J-Dcom.sun.net.ssl.checkRevocation=true
156
+ # ex. jruby -J-Dcom.sun.security.enableCRLDP=true -J-Dcom.sun.net.ssl.checkRevocation=true app.rb
157
+ # Revoked cert example: https://test-sspev.verisign.com:2443/test-SSPEV-revoked-verisign.html
158
+ #
159
+ # On other platform you can download CRL by yourself and set it via
160
+ # SSLConfig#add_crl.
161
+ #
162
+ # === Handling Cookies
163
+ #
164
+ # 1. Using volatile Cookies. Nothing to do. HTTPClient handles Cookies.
165
+ #
166
+ # clnt = HTTPClient.new
167
+ # res = clnt.get(url1) # receives Cookies.
168
+ # res = clnt.get(url2) # sends Cookies if needed.
169
+ # p res.cookies
170
+ #
171
+ # 2. Saving non volatile Cookies to a specified file. Need to set a file at
172
+ # first and invoke save method at last.
173
+ #
174
+ # clnt = HTTPClient.new
175
+ # clnt.set_cookie_store('/home/nahi/cookie.dat')
176
+ # clnt.get(url)
177
+ # ...
178
+ # clnt.save_cookie_store
179
+ #
180
+ # 3. Disabling Cookies.
181
+ #
182
+ # clnt = HTTPClient.new
183
+ # clnt.cookie_manager = nil
184
+ #
185
+ # === Configuring authentication credentials
186
+ #
187
+ # 1. Authentication with Web server. Supports BasicAuth, DigestAuth, and
188
+ # Negotiate/NTLM (requires ruby/ntlm module).
189
+ #
190
+ # clnt = HTTPClient.new
191
+ # domain = 'http://dev.ctor.org/http-access2/'
192
+ # user = 'user'
193
+ # password = 'user'
194
+ # clnt.set_auth(domain, user, password)
195
+ # p clnt.get('http://dev.ctor.org/http-access2/login').status
196
+ #
197
+ # 2. Authentication with Proxy server. Supports BasicAuth and NTLM
198
+ # (requires win32/sspi)
199
+ #
200
+ # clnt = HTTPClient.new(proxy)
201
+ # user = 'proxy'
202
+ # password = 'proxy'
203
+ # clnt.set_proxy_auth(user, password)
204
+ # p clnt.get(url)
205
+ #
206
+ # === Invoking HTTP methods with custom header
207
+ #
208
+ # Pass a Hash or an Array for header argument.
209
+ #
210
+ # header = { 'Accept' => 'text/html' }
211
+ # clnt.get(uri, query, header)
212
+ #
213
+ # header = [['Accept', 'image/jpeg'], ['Accept', 'image/png']]
214
+ # clnt.get_content(uri, query, header)
215
+ #
216
+ # === Invoking HTTP methods asynchronously
217
+ #
218
+ # See head_async, get_async, post_async, put_async, delete_async,
219
+ # options_async, propfind_async, proppatch_async, and trace_async.
220
+ # It immediately returns a HTTPClient::Connection instance as a returning value.
221
+ #
222
+ # connection = clnt.post_async(url, body)
223
+ # print 'posting.'
224
+ # while true
225
+ # break if connection.finished?
226
+ # print '.'
227
+ # sleep 1
228
+ # end
229
+ # puts '.'
230
+ # res = connection.pop
231
+ # p res.status
232
+ # p res.body.read # res.body is an IO for the res of async method.
233
+ #
234
+ # === Shortcut methods
235
+ #
236
+ # You can invoke get_content, get, etc. without creating HTTPClient instance.
237
+ #
238
+ # ruby -rhttpclient -e 'puts HTTPClient.get_content(ARGV.shift)' http://dev.ctor.org/
239
+ # ruby -rhttpclient -e 'p HTTPClient.head(ARGV.shift).header["last-modified"]' http://dev.ctor.org/
240
+ #
241
+ class HTTPClient
242
+ RUBY_VERSION_STRING = "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE})"
243
+ LIB_NAME = "(#{VERSION}, #{RUBY_VERSION_STRING})"
244
+
245
+ include Util
246
+
247
+ # Raised for indicating running environment configuration error for example
248
+ # accessing via SSL under the ruby which is not compiled with OpenSSL.
249
+ class ConfigurationError < StandardError
250
+ end
251
+
252
+ # Raised for indicating HTTP response error.
253
+ class BadResponseError < RuntimeError
254
+ # HTTP::Message:: a response
255
+ attr_reader :res
256
+
257
+ def initialize(msg, res = nil) # :nodoc:
258
+ super(msg)
259
+ @res = res
260
+ end
261
+ end
262
+
263
+ # Raised for indicating a timeout error.
264
+ class TimeoutError < RuntimeError
265
+ end
266
+
267
+ # Raised for indicating a connection timeout error.
268
+ # You can configure connection timeout via HTTPClient#connect_timeout=.
269
+ class ConnectTimeoutError < TimeoutError
270
+ end
271
+
272
+ # Raised for indicating a request sending timeout error.
273
+ # You can configure request sending timeout via HTTPClient#send_timeout=.
274
+ class SendTimeoutError < TimeoutError
275
+ end
276
+
277
+ # Raised for indicating a response receiving timeout error.
278
+ # You can configure response receiving timeout via
279
+ # HTTPClient#receive_timeout=.
280
+ class ReceiveTimeoutError < TimeoutError
281
+ end
282
+
283
+ # Deprecated. just for backward compatibility
284
+ class Session
285
+ BadResponse = ::HTTPClient::BadResponseError
286
+ end
287
+
288
+ class << self
289
+ %w(get_content post_content head get post put delete options propfind proppatch trace).each do |name|
290
+ eval <<-EOD
291
+ def #{name}(*arg, &block)
292
+ clnt = new
293
+ begin
294
+ clnt.#{name}(*arg, &block)
295
+ ensure
296
+ clnt.reset_all
297
+ end
298
+ end
299
+ EOD
300
+ end
301
+
302
+ private
303
+
304
+ def attr_proxy(symbol, assignable = false)
305
+ name = symbol.to_s
306
+ define_method(name) {
307
+ @session_manager.__send__(name)
308
+ }
309
+ if assignable
310
+ aname = name + '='
311
+ define_method(aname) { |rhs|
312
+ @session_manager.__send__(aname, rhs)
313
+ }
314
+ end
315
+ end
316
+ end
317
+
318
+ # HTTPClient::SSLConfig:: SSL configurator.
319
+ attr_reader :ssl_config
320
+ # HTTPClient::CookieManager:: Cookies configurator.
321
+ attr_accessor :cookie_manager
322
+ # An array of response HTTP message body String which is used for loop-back
323
+ # test. See test/* to see how to use it. If you want to do loop-back test
324
+ # of HTTP header, use test_loopback_http_response instead.
325
+ attr_reader :test_loopback_response
326
+ # An array of request filter which can trap HTTP request/response.
327
+ # See HTTPClient::WWWAuth to see how to use it.
328
+ attr_reader :request_filter
329
+ # HTTPClient::ProxyAuth:: Proxy authentication handler.
330
+ attr_reader :proxy_auth
331
+ # HTTPClient::WWWAuth:: WWW authentication handler.
332
+ attr_reader :www_auth
333
+ # How many times get_content and post_content follows HTTP redirect.
334
+ # 10 by default.
335
+ attr_accessor :follow_redirect_count
336
+ # Base url of resources.
337
+ attr_accessor :base_url
338
+ # Default request header.
339
+ attr_accessor :default_header
340
+
341
+ # Set HTTP version as a String:: 'HTTP/1.0' or 'HTTP/1.1'
342
+ attr_proxy(:protocol_version, true)
343
+ # Connect timeout in sec.
344
+ attr_proxy(:connect_timeout, true)
345
+ # Request sending timeout in sec.
346
+ attr_proxy(:send_timeout, true)
347
+ # Response receiving timeout in sec.
348
+ attr_proxy(:receive_timeout, true)
349
+ # Reuse the same connection within this timeout in sec. from last used.
350
+ attr_proxy(:keep_alive_timeout, true)
351
+ # Size of reading block for non-chunked response.
352
+ attr_proxy(:read_block_size, true)
353
+ # Negotiation retry count for authentication. 5 by default.
354
+ attr_proxy(:protocol_retry_count, true)
355
+ # if your ruby is older than 2005-09-06, do not set socket_sync = false to
356
+ # avoid an SSL socket blocking bug in openssl/buffering.rb.
357
+ attr_proxy(:socket_sync, true)
358
+ # Enables TCP keepalive; no timing settings exist at present
359
+ attr_proxy(:tcp_keepalive, true)
360
+ # User-Agent header in HTTP request.
361
+ attr_proxy(:agent_name, true)
362
+ # From header in HTTP request.
363
+ attr_proxy(:from, true)
364
+ # An array of response HTTP String (not a HTTP message body) which is used
365
+ # for loopback test. See test/* to see how to use it.
366
+ attr_proxy(:test_loopback_http_response)
367
+ # Decompress a compressed (with gzip or deflate) content body transparently. false by default.
368
+ attr_proxy(:transparent_gzip_decompression, true)
369
+ # Raise BadResponseError if response size does not match with Content-Length header in response. false by default.
370
+ # TODO: enable by default
371
+ attr_proxy(:strict_response_size_check, true)
372
+ # Local socket address. Set HTTPClient#socket_local.host and HTTPClient#socket_local.port to specify local binding hostname and port of TCP socket.
373
+ attr_proxy(:socket_local, true)
374
+
375
+ # Default header for PROPFIND request.
376
+ PROPFIND_DEFAULT_EXTHEADER = { 'Depth' => '0' }
377
+
378
+ # Default User-Agent header
379
+ DEFAULT_AGENT_NAME = 'HTTPClient/1.0'
380
+
381
+ # Creates a HTTPClient instance which manages sessions, cookies, etc.
382
+ #
383
+ # HTTPClient.new takes optional arguments as a Hash.
384
+ # * :proxy - proxy url string
385
+ # * :agent_name - User-Agent String
386
+ # * :from - from header String
387
+ # * :base_url - base URL of resources
388
+ # * :default_header - header Hash all HTTP requests should have
389
+ # * :force_basic_auth - flag for sending Authorization header w/o gettin 401 first
390
+ # User-Agent and From are embedded in HTTP request Header if given.
391
+ # From header is not set without setting it explicitly.
392
+ #
393
+ # proxy = 'http://myproxy:8080'
394
+ # agent_name = 'MyAgent/0.1'
395
+ # from = 'from@example.com'
396
+ # HTTPClient.new(proxy, agent_name, from)
397
+ #
398
+ # After you set :base_url, all resources you pass to get, post and other
399
+ # methods are recognized to be prefixed with base_url. Say base_url is
400
+ # 'https://api.example.com/v1/, get('users') is the same as
401
+ # get('https://api.example.com/v1/users') internally. You can also pass
402
+ # full URL from 'http://' even after setting base_url.
403
+ #
404
+ # The expected base_url and path behavior is the following. Please take
405
+ # care of '/' in base_url and path.
406
+ #
407
+ # The last '/' is important for base_url:
408
+ # 1. http://foo/bar/baz/ + path -> http://foo/bar/baz/path
409
+ # 2. http://foo/bar/baz + path -> http://foo/bar/path
410
+ # Relative path handling:
411
+ # 3. http://foo/bar/baz/ + ../path -> http://foo/bar/path
412
+ # 4. http://foo/bar/baz + ../path -> http://foo/path
413
+ # 5. http://foo/bar/baz/ + ./path -> http://foo/bar/baz/path
414
+ # 6. http://foo/bar/baz + ./path -> http://foo/bar/path
415
+ # The leading '/' of path means absolute path:
416
+ # 7. http://foo/bar/baz/ + /path -> http://foo/path
417
+ # 8. http://foo/bar/baz + /path -> http://foo/path
418
+ #
419
+ # :default_header is for providing default headers Hash that all HTTP
420
+ # requests should have, such as custom 'Authorization' header in API.
421
+ # You can override :default_header with :header Hash parameter in HTTP
422
+ # request methods.
423
+ #
424
+ # :force_basic_auth turns on/off the BasicAuth force flag. Generally
425
+ # HTTP client must send Authorization header after it gets 401 error
426
+ # from server from security reason. But in some situation (e.g. API
427
+ # client) you might want to send Authorization from the beginning.
428
+ def initialize(*args, &block)
429
+ proxy, agent_name, from, base_url, default_header, force_basic_auth =
430
+ keyword_argument(args, :proxy, :agent_name, :from, :base_url, :default_header, :force_basic_auth)
431
+ @proxy = nil # assigned later.
432
+ @no_proxy = nil
433
+ @no_proxy_regexps = []
434
+ @base_url = base_url
435
+ @default_header = default_header || {}
436
+ @www_auth = WWWAuth.new
437
+ @proxy_auth = ProxyAuth.new
438
+ @www_auth.basic_auth.force_auth = @proxy_auth.basic_auth.force_auth = force_basic_auth
439
+ @request_filter = [@proxy_auth, @www_auth]
440
+ @debug_dev = nil
441
+ @redirect_uri_callback = method(:default_redirect_uri_callback)
442
+ @test_loopback_response = []
443
+ @session_manager = SessionManager.new(self)
444
+ @session_manager.agent_name = agent_name || DEFAULT_AGENT_NAME
445
+ @session_manager.from = from
446
+ @session_manager.ssl_config = @ssl_config = SSLConfig.new(self)
447
+ @cookie_manager = CookieManager.new
448
+ @follow_redirect_count = 10
449
+ load_environment
450
+ self.proxy = proxy if proxy
451
+ keep_webmock_compat
452
+ instance_eval(&block) if block
453
+ end
454
+
455
+ # webmock 1.6.2 depends on HTTP::Message#body.content to work.
456
+ # let's keep it work iif webmock is loaded for a while.
457
+ def keep_webmock_compat
458
+ if respond_to?(:do_get_block_with_webmock)
459
+ ::HTTP::Message.module_eval do
460
+ def body
461
+ def (o = self.content).content
462
+ self
463
+ end
464
+ o
465
+ end
466
+ end
467
+ end
468
+ end
469
+
470
+ # Returns debug device if exists. See debug_dev=.
471
+ def debug_dev
472
+ @debug_dev
473
+ end
474
+
475
+ # Sets debug device. Once debug device is set, all HTTP requests and
476
+ # responses are dumped to given device. dev must respond to << for dump.
477
+ #
478
+ # Calling this method resets all existing sessions.
479
+ def debug_dev=(dev)
480
+ @debug_dev = dev
481
+ reset_all
482
+ @session_manager.debug_dev = dev
483
+ end
484
+
485
+ # Returns URI object of HTTP proxy if exists.
486
+ def proxy
487
+ @proxy
488
+ end
489
+
490
+ # Sets HTTP proxy used for HTTP connection. Given proxy can be an URI,
491
+ # a String or nil. You can set user/password for proxy authentication like
492
+ # HTTPClient#proxy = 'http://user:passwd@myproxy:8080'
493
+ #
494
+ # You can use environment variable 'http_proxy' or 'HTTP_PROXY' for it.
495
+ # You need to use 'cgi_http_proxy' or 'CGI_HTTP_PROXY' instead if you run
496
+ # HTTPClient from CGI environment from security reason. (HTTPClient checks
497
+ # 'REQUEST_METHOD' environment variable whether it's CGI or not)
498
+ #
499
+ # Calling this method resets all existing sessions.
500
+ def proxy=(proxy)
501
+ if proxy.nil? || proxy.to_s.empty?
502
+ @proxy = nil
503
+ @proxy_auth.reset_challenge
504
+ else
505
+ @proxy = urify(proxy)
506
+ if @proxy.scheme == nil or @proxy.scheme.downcase != 'http' or
507
+ @proxy.host == nil or @proxy.port == nil
508
+ raise ArgumentError.new("unsupported proxy #{proxy}")
509
+ end
510
+ @proxy_auth.reset_challenge
511
+ if @proxy.user || @proxy.password
512
+ @proxy_auth.set_auth(@proxy.user, @proxy.password)
513
+ end
514
+ end
515
+ reset_all
516
+ @session_manager.proxy = @proxy
517
+ @proxy
518
+ end
519
+
520
+ # Returns NO_PROXY setting String if given.
521
+ def no_proxy
522
+ @no_proxy
523
+ end
524
+
525
+ # Sets NO_PROXY setting String. no_proxy must be a comma separated String.
526
+ # Each entry must be 'host' or 'host:port' such as;
527
+ # HTTPClient#no_proxy = 'example.com,example.co.jp:443'
528
+ #
529
+ # 'localhost' is treated as a no_proxy site regardless of explicitly listed.
530
+ # HTTPClient checks given URI objects before accessing it.
531
+ # 'host' is tail string match. No IP-addr conversion.
532
+ #
533
+ # You can use environment variable 'no_proxy' or 'NO_PROXY' for it.
534
+ #
535
+ # Calling this method resets all existing sessions.
536
+ def no_proxy=(no_proxy)
537
+ @no_proxy = no_proxy
538
+ @no_proxy_regexps.clear
539
+ if @no_proxy
540
+ @no_proxy.scan(/([^\s:,]+)(?::(\d+))?/) do |host, port|
541
+ if host[0] == ?.
542
+ regexp = /#{Regexp.quote(host)}\z/i
543
+ else
544
+ regexp = /(\A|\.)#{Regexp.quote(host)}\z/i
545
+ end
546
+ @no_proxy_regexps << [regexp, port]
547
+ end
548
+ end
549
+ reset_all
550
+ end
551
+
552
+ # Sets credential for Web server authentication.
553
+ # domain:: a String or an URI to specify where HTTPClient should use this
554
+ # credential. If you set uri to nil, HTTPClient uses this credential
555
+ # wherever a server requires it.
556
+ # user:: username String.
557
+ # passwd:: password String.
558
+ #
559
+ # You can set multiple credentials for each uri.
560
+ #
561
+ # clnt.set_auth('http://www.example.com/foo/', 'foo_user', 'passwd')
562
+ # clnt.set_auth('http://www.example.com/bar/', 'bar_user', 'passwd')
563
+ #
564
+ # Calling this method resets all existing sessions.
565
+ def set_auth(domain, user, passwd)
566
+ uri = to_resource_url(domain)
567
+ @www_auth.set_auth(uri, user, passwd)
568
+ reset_all
569
+ end
570
+
571
+ # Deprecated. Use set_auth instead.
572
+ def set_basic_auth(domain, user, passwd)
573
+ uri = to_resource_url(domain)
574
+ @www_auth.basic_auth.set(uri, user, passwd)
575
+ reset_all
576
+ end
577
+
578
+ # Sets credential for Proxy authentication.
579
+ # user:: username String.
580
+ # passwd:: password String.
581
+ #
582
+ # Calling this method resets all existing sessions.
583
+ def set_proxy_auth(user, passwd)
584
+ @proxy_auth.set_auth(user, passwd)
585
+ reset_all
586
+ end
587
+
588
+ # Turn on/off the BasicAuth force flag. Generally HTTP client must
589
+ # send Authorization header after it gets 401 error from server from
590
+ # security reason. But in some situation (e.g. API client) you might
591
+ # want to send Authorization from the beginning.
592
+ def force_basic_auth=(force_basic_auth)
593
+ @www_auth.basic_auth.force_auth = @proxy_auth.basic_auth.force_auth = force_basic_auth
594
+ end
595
+
596
+ # Sets the filename where non-volatile Cookies be saved by calling
597
+ # save_cookie_store.
598
+ # This method tries to load and managing Cookies from the specified file.
599
+ #
600
+ # Calling this method resets all existing sessions.
601
+ def set_cookie_store(filename)
602
+ @cookie_manager.cookies_file = filename
603
+ @cookie_manager.load_cookies if filename
604
+ reset_all
605
+ end
606
+
607
+ # Try to save Cookies to the file specified in set_cookie_store. Unexpected
608
+ # error will be raised if you don't call set_cookie_store first.
609
+ def save_cookie_store
610
+ @cookie_manager.save_cookies
611
+ end
612
+
613
+ # Returns stored cookies.
614
+ def cookies
615
+ if @cookie_manager
616
+ @cookie_manager.cookies
617
+ end
618
+ end
619
+
620
+ # Sets callback proc when HTTP redirect status is returned for get_content
621
+ # and post_content. default_redirect_uri_callback is used by default.
622
+ #
623
+ # If you need strict implementation which does not allow relative URI
624
+ # redirection, set strict_redirect_uri_callback instead.
625
+ #
626
+ # clnt.redirect_uri_callback = clnt.method(:strict_redirect_uri_callback)
627
+ #
628
+ def redirect_uri_callback=(redirect_uri_callback)
629
+ @redirect_uri_callback = redirect_uri_callback
630
+ end
631
+
632
+ # Retrieves a web resource.
633
+ #
634
+ # uri:: a String or an URI object which represents an URL of web resource.
635
+ # query:: a Hash or an Array of query part of URL.
636
+ # e.g. { "a" => "b" } => 'http://host/part?a=b'.
637
+ # Give an array to pass multiple value like
638
+ # [["a", "b"], ["a", "c"]] => 'http://host/part?a=b&a=c'.
639
+ # header:: a Hash or an Array of extra headers. e.g.
640
+ # { 'Accept' => 'text/html' } or
641
+ # [['Accept', 'image/jpeg'], ['Accept', 'image/png']].
642
+ # &block:: Give a block to get chunked message-body of response like
643
+ # get_content(uri) { |chunked_body| ... }.
644
+ # Size of each chunk may not be the same.
645
+ #
646
+ # get_content follows HTTP redirect status (see HTTP::Status.redirect?)
647
+ # internally and try to retrieve content from redirected URL. See
648
+ # redirect_uri_callback= how HTTP redirection is handled.
649
+ #
650
+ # If you need to get full HTTP response including HTTP status and headers,
651
+ # use get method. get returns HTTP::Message as a response and you need to
652
+ # follow HTTP redirect by yourself if you need.
653
+ def get_content(uri, *args, &block)
654
+ query, header = keyword_argument(args, :query, :header)
655
+ success_content(follow_redirect(:get, uri, query, nil, header || {}, &block))
656
+ end
657
+
658
+ # Posts a content.
659
+ #
660
+ # uri:: a String or an URI object which represents an URL of web resource.
661
+ # body:: a Hash or an Array of body part. e.g.
662
+ # { "a" => "b" } => 'a=b'
663
+ # Give an array to pass multiple value like
664
+ # [["a", "b"], ["a", "c"]] => 'a=b&a=c'
665
+ # When you pass a File as a value, it will be posted as a
666
+ # multipart/form-data. e.g.
667
+ # { 'upload' => file }
668
+ # You can also send custom multipart by passing an array of hashes.
669
+ # Each part must have a :content attribute which can be a file, all
670
+ # other keys will become headers.
671
+ # [{ 'Content-Type' => 'text/plain', :content => "some text" },
672
+ # { 'Content-Type' => 'video/mp4', :content => File.new('video.mp4') }]
673
+ # => <Two parts with custom Content-Type header>
674
+ # header:: a Hash or an Array of extra headers. e.g.
675
+ # { 'Accept' => 'text/html' }
676
+ # or
677
+ # [['Accept', 'image/jpeg'], ['Accept', 'image/png']].
678
+ # &block:: Give a block to get chunked message-body of response like
679
+ # post_content(uri) { |chunked_body| ... }.
680
+ # Size of each chunk may not be the same.
681
+ #
682
+ # post_content follows HTTP redirect status (see HTTP::Status.redirect?)
683
+ # internally and try to post the content to redirected URL. See
684
+ # redirect_uri_callback= how HTTP redirection is handled.
685
+ # Bear in mind that you should not depend on post_content because it sends
686
+ # the same POST method to the new location which is prohibited in HTTP spec.
687
+ #
688
+ # If you need to get full HTTP response including HTTP status and headers,
689
+ # use post method.
690
+ def post_content(uri, *args, &block)
691
+ if hashy_argument_has_keys(args, :query, :body)
692
+ query, body, header = keyword_argument(args, :query, :body, :header)
693
+ else
694
+ query = nil
695
+ body, header = keyword_argument(args, :body, :header)
696
+ end
697
+ success_content(follow_redirect(:post, uri, query, body, header || {}, &block))
698
+ end
699
+
700
+ # A method for redirect uri callback. How to use:
701
+ # clnt.redirect_uri_callback = clnt.method(:strict_redirect_uri_callback)
702
+ # This callback does not allow relative redirect such as
703
+ # Location: ../foo/
704
+ # in HTTP header. (raises BadResponseError instead)
705
+ def strict_redirect_uri_callback(uri, res)
706
+ newuri = urify(res.header['location'][0])
707
+ if https?(uri) && !https?(newuri)
708
+ raise BadResponseError.new("redirecting to non-https resource")
709
+ end
710
+ if !http?(newuri) && !https?(newuri)
711
+ raise BadResponseError.new("unexpected location: #{newuri}", res)
712
+ end
713
+ puts "redirect to: #{newuri}" if $DEBUG
714
+ newuri
715
+ end
716
+
717
+ # A default method for redirect uri callback. This method is used by
718
+ # HTTPClient instance by default.
719
+ # This callback allows relative redirect such as
720
+ # Location: ../foo/
721
+ # in HTTP header.
722
+ def default_redirect_uri_callback(uri, res)
723
+ newuri = urify(res.header['location'][0])
724
+ if !http?(newuri) && !https?(newuri)
725
+ warn("#{newuri}: a relative URI in location header which is not recommended")
726
+ warn("'The field value consists of a single absolute URI' in HTTP spec")
727
+ newuri = uri + newuri
728
+ end
729
+ if https?(uri) && !https?(newuri)
730
+ raise BadResponseError.new("redirecting to non-https resource")
731
+ end
732
+ puts "redirect to: #{newuri}" if $DEBUG
733
+ newuri
734
+ end
735
+
736
+ # Sends HEAD request to the specified URL. See request for arguments.
737
+ def head(uri, *args)
738
+ request(:head, uri, argument_to_hash(args, :query, :header, :follow_redirect))
739
+ end
740
+
741
+ # Sends GET request to the specified URL. See request for arguments.
742
+ def get(uri, *args, &block)
743
+ request(:get, uri, argument_to_hash(args, :query, :header, :follow_redirect), &block)
744
+ end
745
+
746
+ # Sends PATCH request to the specified URL. See request for arguments.
747
+ def patch(uri, *args, &block)
748
+ if hashy_argument_has_keys(args, :query, :body)
749
+ new_args = args[0]
750
+ else
751
+ new_args = argument_to_hash(args, :body, :header)
752
+ end
753
+ request(:patch, uri, new_args, &block)
754
+ end
755
+
756
+ # Sends POST request to the specified URL. See request for arguments.
757
+ # You should not depend on :follow_redirect => true for POST method. It
758
+ # sends the same POST method to the new location which is prohibited in HTTP spec.
759
+ def post(uri, *args, &block)
760
+ if hashy_argument_has_keys(args, :query, :body)
761
+ new_args = args[0]
762
+ else
763
+ new_args = argument_to_hash(args, :body, :header, :follow_redirect)
764
+ end
765
+ request(:post, uri, new_args, &block)
766
+ end
767
+
768
+ # Sends PUT request to the specified URL. See request for arguments.
769
+ def put(uri, *args, &block)
770
+ if hashy_argument_has_keys(args, :query, :body)
771
+ new_args = args[0]
772
+ else
773
+ new_args = argument_to_hash(args, :body, :header)
774
+ end
775
+ request(:put, uri, new_args, &block)
776
+ end
777
+
778
+ # Sends DELETE request to the specified URL. See request for arguments.
779
+ def delete(uri, *args, &block)
780
+ request(:delete, uri, argument_to_hash(args, :body, :header, :query), &block)
781
+ end
782
+
783
+ # Sends OPTIONS request to the specified URL. See request for arguments.
784
+ def options(uri, *args, &block)
785
+ new_args = argument_to_hash(args, :header, :query, :body)
786
+ request(:options, uri, new_args, &block)
787
+ end
788
+
789
+ # Sends PROPFIND request to the specified URL. See request for arguments.
790
+ def propfind(uri, *args, &block)
791
+ request(:propfind, uri, argument_to_hash(args, :header), &block)
792
+ end
793
+
794
+ # Sends PROPPATCH request to the specified URL. See request for arguments.
795
+ def proppatch(uri, *args, &block)
796
+ request(:proppatch, uri, argument_to_hash(args, :body, :header), &block)
797
+ end
798
+
799
+ # Sends TRACE request to the specified URL. See request for arguments.
800
+ def trace(uri, *args, &block)
801
+ request('TRACE', uri, argument_to_hash(args, :query, :header), &block)
802
+ end
803
+
804
+ # Sends a request to the specified URL.
805
+ #
806
+ # method:: HTTP method to be sent. method.to_s.upcase is used.
807
+ # uri:: a String or an URI object which represents an URL of web resource.
808
+ # query:: a Hash or an Array of query part of URL.
809
+ # e.g. { "a" => "b" } => 'http://host/part?a=b'
810
+ # Give an array to pass multiple value like
811
+ # [["a", "b"], ["a", "c"]] => 'http://host/part?a=b&a=c'
812
+ # body:: a Hash or an Array of body part. e.g.
813
+ # { "a" => "b" }
814
+ # => 'a=b'
815
+ # Give an array to pass multiple value like
816
+ # [["a", "b"], ["a", "c"]]
817
+ # => 'a=b&a=c'.
818
+ # When the given method is 'POST' and the given body contains a file
819
+ # as a value, it will be posted as a multipart/form-data. e.g.
820
+ # { 'upload' => file }
821
+ # You can also send custom multipart by passing an array of hashes.
822
+ # Each part must have a :content attribute which can be a file, all
823
+ # other keys will become headers.
824
+ # [{ 'Content-Type' => 'text/plain', :content => "some text" },
825
+ # { 'Content-Type' => 'video/mp4', :content => File.new('video.mp4') }]
826
+ # => <Two parts with custom Content-Type header>
827
+ # See HTTP::Message.file? for actual condition of 'a file'.
828
+ # header:: a Hash or an Array of extra headers. e.g.
829
+ # { 'Accept' => 'text/html' } or
830
+ # [['Accept', 'image/jpeg'], ['Accept', 'image/png']].
831
+ # &block:: Give a block to get chunked message-body of response like
832
+ # get(uri) { |chunked_body| ... }.
833
+ # Size of each chunk may not be the same.
834
+ #
835
+ # You can also pass a String as a body. HTTPClient just sends a String as
836
+ # a HTTP request message body.
837
+ #
838
+ # When you pass an IO as a body, HTTPClient sends it as a HTTP request with
839
+ # chunked encoding (Transfer-Encoding: chunked in HTTP header) if IO does not
840
+ # respond to :size. Bear in mind that some server application does not support
841
+ # chunked request. At least cgi.rb does not support it.
842
+ def request(method, uri, *args, &block)
843
+ query, body, header, follow_redirect = keyword_argument(args, :query, :body, :header, :follow_redirect)
844
+ if method == :propfind
845
+ header ||= PROPFIND_DEFAULT_EXTHEADER
846
+ else
847
+ header ||= {}
848
+ end
849
+ uri = to_resource_url(uri)
850
+ if block
851
+ filtered_block = adapt_block(&block)
852
+ end
853
+ if follow_redirect
854
+ follow_redirect(method, uri, query, body, header, &block)
855
+ else
856
+ do_request(method, uri, query, body, header, &filtered_block)
857
+ end
858
+ end
859
+
860
+ # Sends HEAD request in async style. See request_async for arguments.
861
+ # It immediately returns a HTTPClient::Connection instance as a result.
862
+ def head_async(uri, *args)
863
+ request_async2(:head, uri, argument_to_hash(args, :query, :header))
864
+ end
865
+
866
+ # Sends GET request in async style. See request_async for arguments.
867
+ # It immediately returns a HTTPClient::Connection instance as a result.
868
+ def get_async(uri, *args)
869
+ request_async2(:get, uri, argument_to_hash(args, :query, :header))
870
+ end
871
+
872
+ # Sends PATCH request in async style. See request_async2 for arguments.
873
+ # It immediately returns a HTTPClient::Connection instance as a result.
874
+ def patch_async(uri, *args)
875
+ if hashy_argument_has_keys(args, :query, :body)
876
+ new_args = args[0]
877
+ else
878
+ new_args = argument_to_hash(args, :body, :header)
879
+ end
880
+ request_async2(:patch, uri, new_args)
881
+ end
882
+
883
+ # Sends POST request in async style. See request_async for arguments.
884
+ # It immediately returns a HTTPClient::Connection instance as a result.
885
+ def post_async(uri, *args)
886
+ if hashy_argument_has_keys(args, :query, :body)
887
+ new_args = args[0]
888
+ else
889
+ new_args = argument_to_hash(args, :body, :header)
890
+ end
891
+ request_async2(:post, uri, new_args)
892
+ end
893
+
894
+ # Sends PUT request in async style. See request_async2 for arguments.
895
+ # It immediately returns a HTTPClient::Connection instance as a result.
896
+ def put_async(uri, *args)
897
+ if hashy_argument_has_keys(args, :query, :body)
898
+ new_args = args[0]
899
+ else
900
+ new_args = argument_to_hash(args, :body, :header)
901
+ end
902
+ request_async2(:put, uri, new_args)
903
+ end
904
+
905
+ # Sends DELETE request in async style. See request_async2 for arguments.
906
+ # It immediately returns a HTTPClient::Connection instance as a result.
907
+ def delete_async(uri, *args)
908
+ request_async2(:delete, uri, argument_to_hash(args, :body, :header, :query))
909
+ end
910
+
911
+ # Sends OPTIONS request in async style. See request_async2 for arguments.
912
+ # It immediately returns a HTTPClient::Connection instance as a result.
913
+ def options_async(uri, *args)
914
+ request_async2(:options, uri, argument_to_hash(args, :header, :query, :body))
915
+ end
916
+
917
+ # Sends PROPFIND request in async style. See request_async2 for arguments.
918
+ # It immediately returns a HTTPClient::Connection instance as a result.
919
+ def propfind_async(uri, *args)
920
+ request_async2(:propfind, uri, argument_to_hash(args, :body, :header))
921
+ end
922
+
923
+ # Sends PROPPATCH request in async style. See request_async2 for arguments.
924
+ # It immediately returns a HTTPClient::Connection instance as a result.
925
+ def proppatch_async(uri, *args)
926
+ request_async2(:proppatch, uri, argument_to_hash(args, :body, :header))
927
+ end
928
+
929
+ # Sends TRACE request in async style. See request_async2 for arguments.
930
+ # It immediately returns a HTTPClient::Connection instance as a result.
931
+ def trace_async(uri, *args)
932
+ request_async2(:trace, uri, argument_to_hash(args, :query, :header))
933
+ end
934
+
935
+ # Sends a request in async style. request method creates new Thread for
936
+ # HTTP connection and returns a HTTPClient::Connection instance immediately.
937
+ #
938
+ # Arguments definition is the same as request.
939
+ def request_async(method, uri, query = nil, body = nil, header = {})
940
+ uri = to_resource_url(uri)
941
+ do_request_async(method, uri, query, body, header)
942
+ end
943
+
944
+ # new method that has same signature as 'request'
945
+ def request_async2(method, uri, *args)
946
+ query, body, header = keyword_argument(args, :query, :body, :header)
947
+ if [:post, :put].include?(method)
948
+ body ||= ''
949
+ end
950
+ if method == :propfind
951
+ header ||= PROPFIND_DEFAULT_EXTHEADER
952
+ else
953
+ header ||= {}
954
+ end
955
+ uri = to_resource_url(uri)
956
+ do_request_async(method, uri, query, body, header)
957
+ end
958
+
959
+ # Resets internal session for the given URL. Keep-alive connection for the
960
+ # site (host-port pair) is disconnected if exists.
961
+ def reset(uri)
962
+ uri = to_resource_url(uri)
963
+ @session_manager.reset(uri)
964
+ end
965
+
966
+ # Resets all of internal sessions. Keep-alive connections are disconnected.
967
+ def reset_all
968
+ @session_manager.reset_all
969
+ end
970
+
971
+ private
972
+
973
+ class RetryableResponse < StandardError # :nodoc:
974
+ attr_reader :res
975
+
976
+ def initialize(res = nil)
977
+ @res = res
978
+ end
979
+ end
980
+
981
+ class KeepAliveDisconnected < StandardError # :nodoc:
982
+ attr_reader :sess
983
+ attr_reader :cause
984
+ def initialize(sess = nil, cause = nil)
985
+ super("#{self.class.name}: #{cause ? cause.message : nil}")
986
+ @sess = sess
987
+ @cause = cause
988
+ end
989
+ end
990
+
991
+ def hashy_argument_has_keys(args, *key)
992
+ # if the given arg is a single Hash and...
993
+ args.size == 1 and Hash === args[0] and
994
+ # it has any one of the key
995
+ key.all? { |e| args[0].key?(e) }
996
+ end
997
+
998
+ def do_request(method, uri, query, body, header, &block)
999
+ res = nil
1000
+ if HTTP::Message.file?(body)
1001
+ pos = body.pos rescue nil
1002
+ end
1003
+ retry_count = @session_manager.protocol_retry_count
1004
+ proxy = no_proxy?(uri) ? nil : @proxy
1005
+ previous_request = previous_response = nil
1006
+ while retry_count > 0
1007
+ body.pos = pos if pos
1008
+ req = create_request(method, uri, query, body, header)
1009
+ if previous_request
1010
+ # to remember IO positions to read
1011
+ req.http_body.positions = previous_request.http_body.positions
1012
+ end
1013
+ begin
1014
+ protect_keep_alive_disconnected do
1015
+ # TODO: remove Connection.new
1016
+ # We want to delete Connection usage in do_get_block but Newrelic gem depends on it.
1017
+ # https://github.com/newrelic/rpm/blob/master/lib/new_relic/agent/instrumentation/httpclient.rb#L34-L36
1018
+ conn = Connection.new
1019
+ res = do_get_block(req, proxy, conn, &block)
1020
+ # Webmock's do_get_block returns ConditionVariable
1021
+ if !res.respond_to?(:previous)
1022
+ res = conn.pop
1023
+ end
1024
+ end
1025
+ res.previous = previous_response
1026
+ break
1027
+ rescue RetryableResponse => e
1028
+ previous_request = req
1029
+ previous_response = res = e.res
1030
+ retry_count -= 1
1031
+ end
1032
+ end
1033
+ res
1034
+ end
1035
+
1036
+ def do_request_async(method, uri, query, body, header)
1037
+ conn = Connection.new
1038
+ t = Thread.new(conn) { |tconn|
1039
+ begin
1040
+ if HTTP::Message.file?(body)
1041
+ pos = body.pos rescue nil
1042
+ end
1043
+ retry_count = @session_manager.protocol_retry_count
1044
+ proxy = no_proxy?(uri) ? nil : @proxy
1045
+ while retry_count > 0
1046
+ body.pos = pos if pos
1047
+ req = create_request(method, uri, query, body, header)
1048
+ begin
1049
+ protect_keep_alive_disconnected do
1050
+ do_get_stream(req, proxy, tconn)
1051
+ end
1052
+ break
1053
+ rescue RetryableResponse
1054
+ retry_count -= 1
1055
+ end
1056
+ end
1057
+ rescue Exception => e
1058
+ conn.push e
1059
+ end
1060
+ }
1061
+ conn.async_thread = t
1062
+ conn
1063
+ end
1064
+
1065
+ def load_environment
1066
+ # http_proxy
1067
+ if getenv('REQUEST_METHOD')
1068
+ # HTTP_PROXY conflicts with the environment variable usage in CGI where
1069
+ # HTTP_* is used for HTTP header information. Unlike open-uri, we
1070
+ # simply ignore http_proxy in CGI env and use cgi_http_proxy instead.
1071
+ self.proxy = getenv('cgi_http_proxy')
1072
+ else
1073
+ self.proxy = getenv('http_proxy')
1074
+ end
1075
+ # no_proxy
1076
+ self.no_proxy = getenv('no_proxy')
1077
+ end
1078
+
1079
+ def getenv(name)
1080
+ ENV[name.downcase] || ENV[name.upcase]
1081
+ end
1082
+
1083
+ def adapt_block(&block)
1084
+ return block if block.arity == 2
1085
+ proc { |r, str| block.call(str) }
1086
+ end
1087
+
1088
+ def follow_redirect(method, uri, query, body, header, &block)
1089
+ uri = to_resource_url(uri)
1090
+ if block
1091
+ b = adapt_block(&block)
1092
+ filtered_block = proc { |r, str|
1093
+ b.call(r, str) if r.ok?
1094
+ }
1095
+ end
1096
+ if HTTP::Message.file?(body)
1097
+ pos = body.pos rescue nil
1098
+ end
1099
+ retry_number = 0
1100
+ previous = nil
1101
+ request_query = query
1102
+ while retry_number < @follow_redirect_count
1103
+ body.pos = pos if pos
1104
+ res = do_request(method, uri, request_query, body, header, &filtered_block)
1105
+ res.previous = previous
1106
+ if res.redirect?
1107
+ if res.header['location'].empty?
1108
+ raise BadResponseError.new("Missing Location header for redirect", res)
1109
+ end
1110
+ method = :get if res.see_other? # See RFC2616 10.3.4
1111
+ uri = urify(@redirect_uri_callback.call(uri, res))
1112
+ # To avoid duped query parameter. 'location' must include query part.
1113
+ request_query = nil
1114
+ previous = res
1115
+ retry_number += 1
1116
+ else
1117
+ return res
1118
+ end
1119
+ end
1120
+ raise BadResponseError.new("retry count exceeded", res)
1121
+ end
1122
+
1123
+ def success_content(res)
1124
+ if res.ok?
1125
+ return res.content
1126
+ else
1127
+ raise BadResponseError.new("unexpected response: #{res.header.inspect}", res)
1128
+ end
1129
+ end
1130
+
1131
+ def protect_keep_alive_disconnected
1132
+ begin
1133
+ yield
1134
+ rescue KeepAliveDisconnected
1135
+ # Force to create new connection
1136
+ Thread.current[:HTTPClient_AcquireNewConnection] = true
1137
+ begin
1138
+ yield
1139
+ ensure
1140
+ Thread.current[:HTTPClient_AcquireNewConnection] = false
1141
+ end
1142
+ end
1143
+ end
1144
+
1145
+ def create_request(method, uri, query, body, header)
1146
+ method = method.to_s.upcase
1147
+ if header.is_a?(Hash)
1148
+ header = @default_header.merge(header).to_a
1149
+ else
1150
+ header = @default_header.to_a + header.dup
1151
+ end
1152
+ boundary = nil
1153
+ if body
1154
+ _, content_type = header.find { |key, value|
1155
+ key.to_s.downcase == 'content-type'
1156
+ }
1157
+ if content_type
1158
+ if /\Amultipart/ =~ content_type
1159
+ if content_type =~ /boundary=(.+)\z/
1160
+ boundary = $1
1161
+ else
1162
+ boundary = create_boundary
1163
+ content_type = "#{content_type}; boundary=#{boundary}"
1164
+ header = override_header(header, 'content-type', content_type)
1165
+ end
1166
+ end
1167
+ else
1168
+ if file_in_form_data?(body)
1169
+ boundary = create_boundary
1170
+ content_type = "multipart/form-data; boundary=#{boundary}"
1171
+ else
1172
+ content_type = 'application/x-www-form-urlencoded'
1173
+ end
1174
+ header << ['Content-Type', content_type]
1175
+ end
1176
+ end
1177
+ req = HTTP::Message.new_request(method, uri, query, body, boundary)
1178
+ header.each do |key, value|
1179
+ req.header.add(key.to_s, value)
1180
+ end
1181
+ if @cookie_manager
1182
+ cookie_value = @cookie_manager.cookie_value(uri)
1183
+ if cookie_value
1184
+ req.header.add('Cookie', cookie_value)
1185
+ end
1186
+ end
1187
+ req
1188
+ end
1189
+
1190
+ def create_boundary
1191
+ Digest::SHA1.hexdigest(Time.now.to_s)
1192
+ end
1193
+
1194
+ def file_in_form_data?(body)
1195
+ HTTP::Message.multiparam_query?(body) &&
1196
+ body.any? { |k, v| HTTP::Message.file?(v) }
1197
+ end
1198
+
1199
+ def override_header(header, key, value)
1200
+ result = []
1201
+ header.each do |k, v|
1202
+ if k.to_s.downcase == key
1203
+ result << [key, value]
1204
+ else
1205
+ result << [k, v]
1206
+ end
1207
+ end
1208
+ result
1209
+ end
1210
+
1211
+ NO_PROXY_HOSTS = ['localhost']
1212
+
1213
+ def no_proxy?(uri)
1214
+ if !@proxy or NO_PROXY_HOSTS.include?(uri.host)
1215
+ return true
1216
+ end
1217
+ @no_proxy_regexps.each do |regexp, port|
1218
+ if !port || uri.port == port.to_i
1219
+ if regexp =~ uri.host
1220
+ return true
1221
+ end
1222
+ end
1223
+ end
1224
+ false
1225
+ end
1226
+
1227
+ # !! CAUTION !!
1228
+ # Method 'do_get*' runs under MT conditon. Be careful to change.
1229
+ def do_get_block(req, proxy, conn, &block)
1230
+ @request_filter.each do |filter|
1231
+ filter.filter_request(req)
1232
+ end
1233
+ if str = @test_loopback_response.shift
1234
+ dump_dummy_request_response(req.http_body.dump, str) if @debug_dev
1235
+ res = HTTP::Message.new_response(str, req.header)
1236
+ conn.push(res)
1237
+ return res
1238
+ end
1239
+ content = block ? nil : ''
1240
+ res = HTTP::Message.new_response(content, req.header)
1241
+ @debug_dev << "= Request\n\n" if @debug_dev
1242
+ sess = @session_manager.query(req, proxy)
1243
+ res.peer_cert = sess.ssl_peer_cert
1244
+ @debug_dev << "\n\n= Response\n\n" if @debug_dev
1245
+ do_get_header(req, res, sess)
1246
+ conn.push(res)
1247
+ sess.get_body do |part|
1248
+ set_encoding(part, res.body_encoding)
1249
+ if block
1250
+ block.call(res, part.dup)
1251
+ else
1252
+ content << part
1253
+ end
1254
+ end
1255
+ # there could be a race condition but it's OK to cache unreusable
1256
+ # connection because we do retry for that case.
1257
+ @session_manager.keep(sess) unless sess.closed?
1258
+ commands = @request_filter.collect { |filter|
1259
+ filter.filter_response(req, res)
1260
+ }
1261
+ if commands.find { |command| command == :retry }
1262
+ raise RetryableResponse.new(res)
1263
+ end
1264
+ res
1265
+ end
1266
+
1267
+ def do_get_stream(req, proxy, conn)
1268
+ @request_filter.each do |filter|
1269
+ filter.filter_request(req)
1270
+ end
1271
+ if str = @test_loopback_response.shift
1272
+ dump_dummy_request_response(req.http_body.dump, str) if @debug_dev
1273
+ conn.push(HTTP::Message.new_response(StringIO.new(str), req.header))
1274
+ return
1275
+ end
1276
+ piper, pipew = IO.pipe
1277
+ pipew.binmode
1278
+ res = HTTP::Message.new_response(piper, req.header)
1279
+ @debug_dev << "= Request\n\n" if @debug_dev
1280
+ sess = @session_manager.query(req, proxy)
1281
+ res.peer_cert = sess.ssl_peer_cert
1282
+ @debug_dev << "\n\n= Response\n\n" if @debug_dev
1283
+ do_get_header(req, res, sess)
1284
+ conn.push(res)
1285
+ sess.get_body do |part|
1286
+ set_encoding(part, res.body_encoding)
1287
+ pipew.write(part)
1288
+ end
1289
+ pipew.close
1290
+ @session_manager.keep(sess) unless sess.closed?
1291
+ _ = @request_filter.collect { |filter|
1292
+ filter.filter_response(req, res)
1293
+ }
1294
+ # ignore commands (not retryable in async mode)
1295
+ res
1296
+ end
1297
+
1298
+ def do_get_header(req, res, sess)
1299
+ res.http_version, res.status, res.reason, headers = sess.get_header
1300
+ res.header.set_headers(headers)
1301
+ if @cookie_manager
1302
+ res.header['set-cookie'].each do |cookie|
1303
+ @cookie_manager.parse(cookie, req.header.request_uri)
1304
+ end
1305
+ end
1306
+ end
1307
+
1308
+ def dump_dummy_request_response(req, res)
1309
+ @debug_dev << "= Dummy Request\n\n"
1310
+ @debug_dev << req
1311
+ @debug_dev << "\n\n= Dummy Response\n\n"
1312
+ @debug_dev << res
1313
+ end
1314
+
1315
+ def set_encoding(str, encoding)
1316
+ str.force_encoding(encoding) if encoding
1317
+ end
1318
+
1319
+ def to_resource_url(uri)
1320
+ u = urify(uri)
1321
+ if @base_url && u.scheme.nil? && u.host.nil?
1322
+ urify(@base_url) + uri
1323
+ else
1324
+ u
1325
+ end
1326
+ end
1327
+ end