@ai-ecoverse/wasix-ruby 3.4.11-3 → 3.4.11-5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1126) hide show
  1. package/PRESTAGE.md +40 -38
  2. package/bin/bundle +1 -1
  3. package/bin/bundler +1 -1
  4. package/bin/erb +1 -1
  5. package/bin/gem +1 -1
  6. package/bin/irb +1 -1
  7. package/bin/rake +1 -1
  8. package/bin/ruby.wasm +0 -0
  9. package/lib/ruby/3.4.0/wasm32-wasi/rbconfig.rb +3 -3
  10. package/package.json +16 -14
  11. package/lib/ruby/3.4.11/English.gemspec +0 -22
  12. package/lib/ruby/3.4.11/English.rb +0 -164
  13. package/lib/ruby/3.4.11/benchmark.gemspec +0 -32
  14. package/lib/ruby/3.4.11/benchmark.rb +0 -594
  15. package/lib/ruby/3.4.11/bundled_gems.rb +0 -248
  16. package/lib/ruby/3.4.11/bundler/.document +0 -1
  17. package/lib/ruby/3.4.11/bundler/build_metadata.rb +0 -43
  18. package/lib/ruby/3.4.11/bundler/bundler.gemspec +0 -45
  19. package/lib/ruby/3.4.11/bundler/capistrano.rb +0 -22
  20. package/lib/ruby/3.4.11/bundler/checksum.rb +0 -264
  21. package/lib/ruby/3.4.11/bundler/ci_detector.rb +0 -75
  22. package/lib/ruby/3.4.11/bundler/cli/add.rb +0 -49
  23. package/lib/ruby/3.4.11/bundler/cli/binstubs.rb +0 -57
  24. package/lib/ruby/3.4.11/bundler/cli/cache.rb +0 -43
  25. package/lib/ruby/3.4.11/bundler/cli/check.rb +0 -40
  26. package/lib/ruby/3.4.11/bundler/cli/clean.rb +0 -25
  27. package/lib/ruby/3.4.11/bundler/cli/common.rb +0 -138
  28. package/lib/ruby/3.4.11/bundler/cli/config.rb +0 -204
  29. package/lib/ruby/3.4.11/bundler/cli/console.rb +0 -42
  30. package/lib/ruby/3.4.11/bundler/cli/doctor/diagnose.rb +0 -167
  31. package/lib/ruby/3.4.11/bundler/cli/doctor/ssl.rb +0 -249
  32. package/lib/ruby/3.4.11/bundler/cli/doctor.rb +0 -33
  33. package/lib/ruby/3.4.11/bundler/cli/exec.rb +0 -89
  34. package/lib/ruby/3.4.11/bundler/cli/fund.rb +0 -36
  35. package/lib/ruby/3.4.11/bundler/cli/gem.rb +0 -467
  36. package/lib/ruby/3.4.11/bundler/cli/info.rb +0 -83
  37. package/lib/ruby/3.4.11/bundler/cli/init.rb +0 -51
  38. package/lib/ruby/3.4.11/bundler/cli/inject.rb +0 -60
  39. package/lib/ruby/3.4.11/bundler/cli/install.rb +0 -199
  40. package/lib/ruby/3.4.11/bundler/cli/issue.rb +0 -41
  41. package/lib/ruby/3.4.11/bundler/cli/list.rb +0 -66
  42. package/lib/ruby/3.4.11/bundler/cli/lock.rb +0 -94
  43. package/lib/ruby/3.4.11/bundler/cli/open.rb +0 -29
  44. package/lib/ruby/3.4.11/bundler/cli/outdated.rb +0 -297
  45. package/lib/ruby/3.4.11/bundler/cli/platform.rb +0 -48
  46. package/lib/ruby/3.4.11/bundler/cli/plugin.rb +0 -35
  47. package/lib/ruby/3.4.11/bundler/cli/pristine.rb +0 -60
  48. package/lib/ruby/3.4.11/bundler/cli/remove.rb +0 -17
  49. package/lib/ruby/3.4.11/bundler/cli/show.rb +0 -75
  50. package/lib/ruby/3.4.11/bundler/cli/update.rb +0 -123
  51. package/lib/ruby/3.4.11/bundler/cli/viz.rb +0 -31
  52. package/lib/ruby/3.4.11/bundler/cli.rb +0 -790
  53. package/lib/ruby/3.4.11/bundler/compact_index_client/cache.rb +0 -96
  54. package/lib/ruby/3.4.11/bundler/compact_index_client/cache_file.rb +0 -148
  55. package/lib/ruby/3.4.11/bundler/compact_index_client/parser.rb +0 -84
  56. package/lib/ruby/3.4.11/bundler/compact_index_client/updater.rb +0 -105
  57. package/lib/ruby/3.4.11/bundler/compact_index_client.rb +0 -97
  58. package/lib/ruby/3.4.11/bundler/constants.rb +0 -14
  59. package/lib/ruby/3.4.11/bundler/current_ruby.rb +0 -82
  60. package/lib/ruby/3.4.11/bundler/definition.rb +0 -1187
  61. package/lib/ruby/3.4.11/bundler/dependency.rb +0 -151
  62. package/lib/ruby/3.4.11/bundler/deployment.rb +0 -69
  63. package/lib/ruby/3.4.11/bundler/deprecate.rb +0 -44
  64. package/lib/ruby/3.4.11/bundler/digest.rb +0 -71
  65. package/lib/ruby/3.4.11/bundler/dsl.rb +0 -638
  66. package/lib/ruby/3.4.11/bundler/endpoint_specification.rb +0 -174
  67. package/lib/ruby/3.4.11/bundler/env.rb +0 -148
  68. package/lib/ruby/3.4.11/bundler/environment_preserver.rb +0 -68
  69. package/lib/ruby/3.4.11/bundler/errors.rb +0 -281
  70. package/lib/ruby/3.4.11/bundler/feature_flag.rb +0 -50
  71. package/lib/ruby/3.4.11/bundler/fetcher/base.rb +0 -52
  72. package/lib/ruby/3.4.11/bundler/fetcher/compact_index.rb +0 -120
  73. package/lib/ruby/3.4.11/bundler/fetcher/dependency.rb +0 -78
  74. package/lib/ruby/3.4.11/bundler/fetcher/downloader.rb +0 -91
  75. package/lib/ruby/3.4.11/bundler/fetcher/gem_remote_fetcher.rb +0 -16
  76. package/lib/ruby/3.4.11/bundler/fetcher/index.rb +0 -25
  77. package/lib/ruby/3.4.11/bundler/fetcher.rb +0 -331
  78. package/lib/ruby/3.4.11/bundler/force_platform.rb +0 -16
  79. package/lib/ruby/3.4.11/bundler/friendly_errors.rb +0 -126
  80. package/lib/ruby/3.4.11/bundler/gem_helper.rb +0 -237
  81. package/lib/ruby/3.4.11/bundler/gem_helpers.rb +0 -144
  82. package/lib/ruby/3.4.11/bundler/gem_tasks.rb +0 -7
  83. package/lib/ruby/3.4.11/bundler/gem_version_promoter.rb +0 -147
  84. package/lib/ruby/3.4.11/bundler/graph.rb +0 -152
  85. package/lib/ruby/3.4.11/bundler/index.rb +0 -205
  86. package/lib/ruby/3.4.11/bundler/injector.rb +0 -285
  87. package/lib/ruby/3.4.11/bundler/inline.rb +0 -98
  88. package/lib/ruby/3.4.11/bundler/installer/gem_installer.rb +0 -85
  89. package/lib/ruby/3.4.11/bundler/installer/parallel_installer.rb +0 -203
  90. package/lib/ruby/3.4.11/bundler/installer/standalone.rb +0 -113
  91. package/lib/ruby/3.4.11/bundler/installer.rb +0 -243
  92. package/lib/ruby/3.4.11/bundler/lazy_specification.rb +0 -243
  93. package/lib/ruby/3.4.11/bundler/lockfile_generator.rb +0 -104
  94. package/lib/ruby/3.4.11/bundler/lockfile_parser.rb +0 -300
  95. package/lib/ruby/3.4.11/bundler/man/.document +0 -1
  96. package/lib/ruby/3.4.11/bundler/man/bundle-add.1 +0 -76
  97. package/lib/ruby/3.4.11/bundler/man/bundle-add.1.ronn +0 -87
  98. package/lib/ruby/3.4.11/bundler/man/bundle-binstubs.1 +0 -33
  99. package/lib/ruby/3.4.11/bundler/man/bundle-binstubs.1.ronn +0 -44
  100. package/lib/ruby/3.4.11/bundler/man/bundle-cache.1 +0 -68
  101. package/lib/ruby/3.4.11/bundler/man/bundle-cache.1.ronn +0 -108
  102. package/lib/ruby/3.4.11/bundler/man/bundle-check.1 +0 -24
  103. package/lib/ruby/3.4.11/bundler/man/bundle-check.1.ronn +0 -31
  104. package/lib/ruby/3.4.11/bundler/man/bundle-clean.1 +0 -17
  105. package/lib/ruby/3.4.11/bundler/man/bundle-clean.1.ronn +0 -18
  106. package/lib/ruby/3.4.11/bundler/man/bundle-config.1 +0 -317
  107. package/lib/ruby/3.4.11/bundler/man/bundle-config.1.ronn +0 -408
  108. package/lib/ruby/3.4.11/bundler/man/bundle-console.1 +0 -33
  109. package/lib/ruby/3.4.11/bundler/man/bundle-console.1.ronn +0 -39
  110. package/lib/ruby/3.4.11/bundler/man/bundle-doctor.1 +0 -30
  111. package/lib/ruby/3.4.11/bundler/man/bundle-doctor.1.ronn +0 -33
  112. package/lib/ruby/3.4.11/bundler/man/bundle-env.1 +0 -9
  113. package/lib/ruby/3.4.11/bundler/man/bundle-env.1.ronn +0 -10
  114. package/lib/ruby/3.4.11/bundler/man/bundle-exec.1 +0 -107
  115. package/lib/ruby/3.4.11/bundler/man/bundle-exec.1.ronn +0 -154
  116. package/lib/ruby/3.4.11/bundler/man/bundle-fund.1 +0 -22
  117. package/lib/ruby/3.4.11/bundler/man/bundle-fund.1.ronn +0 -25
  118. package/lib/ruby/3.4.11/bundler/man/bundle-gem.1 +0 -87
  119. package/lib/ruby/3.4.11/bundler/man/bundle-gem.1.ronn +0 -149
  120. package/lib/ruby/3.4.11/bundler/man/bundle-help.1 +0 -9
  121. package/lib/ruby/3.4.11/bundler/man/bundle-help.1.ronn +0 -12
  122. package/lib/ruby/3.4.11/bundler/man/bundle-info.1 +0 -17
  123. package/lib/ruby/3.4.11/bundler/man/bundle-info.1.ronn +0 -21
  124. package/lib/ruby/3.4.11/bundler/man/bundle-init.1 +0 -20
  125. package/lib/ruby/3.4.11/bundler/man/bundle-init.1.ronn +0 -32
  126. package/lib/ruby/3.4.11/bundler/man/bundle-inject.1 +0 -31
  127. package/lib/ruby/3.4.11/bundler/man/bundle-inject.1.ronn +0 -32
  128. package/lib/ruby/3.4.11/bundler/man/bundle-install.1 +0 -218
  129. package/lib/ruby/3.4.11/bundler/man/bundle-install.1.ronn +0 -387
  130. package/lib/ruby/3.4.11/bundler/man/bundle-issue.1 +0 -45
  131. package/lib/ruby/3.4.11/bundler/man/bundle-issue.1.ronn +0 -37
  132. package/lib/ruby/3.4.11/bundler/man/bundle-licenses.1 +0 -9
  133. package/lib/ruby/3.4.11/bundler/man/bundle-licenses.1.ronn +0 -10
  134. package/lib/ruby/3.4.11/bundler/man/bundle-list.1 +0 -35
  135. package/lib/ruby/3.4.11/bundler/man/bundle-list.1.ronn +0 -36
  136. package/lib/ruby/3.4.11/bundler/man/bundle-lock.1 +0 -75
  137. package/lib/ruby/3.4.11/bundler/man/bundle-lock.1.ronn +0 -115
  138. package/lib/ruby/3.4.11/bundler/man/bundle-open.1 +0 -32
  139. package/lib/ruby/3.4.11/bundler/man/bundle-open.1.ronn +0 -28
  140. package/lib/ruby/3.4.11/bundler/man/bundle-outdated.1 +0 -103
  141. package/lib/ruby/3.4.11/bundler/man/bundle-outdated.1.ronn +0 -110
  142. package/lib/ruby/3.4.11/bundler/man/bundle-platform.1 +0 -49
  143. package/lib/ruby/3.4.11/bundler/man/bundle-platform.1.ronn +0 -49
  144. package/lib/ruby/3.4.11/bundler/man/bundle-plugin.1 +0 -58
  145. package/lib/ruby/3.4.11/bundler/man/bundle-plugin.1.ronn +0 -63
  146. package/lib/ruby/3.4.11/bundler/man/bundle-pristine.1 +0 -23
  147. package/lib/ruby/3.4.11/bundler/man/bundle-pristine.1.ronn +0 -34
  148. package/lib/ruby/3.4.11/bundler/man/bundle-remove.1 +0 -21
  149. package/lib/ruby/3.4.11/bundler/man/bundle-remove.1.ronn +0 -23
  150. package/lib/ruby/3.4.11/bundler/man/bundle-show.1 +0 -19
  151. package/lib/ruby/3.4.11/bundler/man/bundle-show.1.ronn +0 -25
  152. package/lib/ruby/3.4.11/bundler/man/bundle-update.1 +0 -281
  153. package/lib/ruby/3.4.11/bundler/man/bundle-update.1.ronn +0 -359
  154. package/lib/ruby/3.4.11/bundler/man/bundle-version.1 +0 -22
  155. package/lib/ruby/3.4.11/bundler/man/bundle-version.1.ronn +0 -24
  156. package/lib/ruby/3.4.11/bundler/man/bundle-viz.1 +0 -30
  157. package/lib/ruby/3.4.11/bundler/man/bundle-viz.1.ronn +0 -36
  158. package/lib/ruby/3.4.11/bundler/man/bundle.1 +0 -102
  159. package/lib/ruby/3.4.11/bundler/man/bundle.1.ronn +0 -116
  160. package/lib/ruby/3.4.11/bundler/man/gemfile.5 +0 -472
  161. package/lib/ruby/3.4.11/bundler/man/gemfile.5.ronn +0 -558
  162. package/lib/ruby/3.4.11/bundler/man/index.txt +0 -33
  163. package/lib/ruby/3.4.11/bundler/match_metadata.rb +0 -30
  164. package/lib/ruby/3.4.11/bundler/match_platform.rb +0 -23
  165. package/lib/ruby/3.4.11/bundler/match_remote_metadata.rb +0 -29
  166. package/lib/ruby/3.4.11/bundler/materialization.rb +0 -59
  167. package/lib/ruby/3.4.11/bundler/mirror.rb +0 -221
  168. package/lib/ruby/3.4.11/bundler/plugin/api/source.rb +0 -322
  169. package/lib/ruby/3.4.11/bundler/plugin/api.rb +0 -81
  170. package/lib/ruby/3.4.11/bundler/plugin/dsl.rb +0 -53
  171. package/lib/ruby/3.4.11/bundler/plugin/events.rb +0 -85
  172. package/lib/ruby/3.4.11/bundler/plugin/index.rb +0 -197
  173. package/lib/ruby/3.4.11/bundler/plugin/installer/git.rb +0 -34
  174. package/lib/ruby/3.4.11/bundler/plugin/installer/path.rb +0 -26
  175. package/lib/ruby/3.4.11/bundler/plugin/installer/rubygems.rb +0 -19
  176. package/lib/ruby/3.4.11/bundler/plugin/installer.rb +0 -132
  177. package/lib/ruby/3.4.11/bundler/plugin/source_list.rb +0 -31
  178. package/lib/ruby/3.4.11/bundler/plugin.rb +0 -378
  179. package/lib/ruby/3.4.11/bundler/process_lock.rb +0 -20
  180. package/lib/ruby/3.4.11/bundler/remote_specification.rb +0 -126
  181. package/lib/ruby/3.4.11/bundler/resolver/base.rb +0 -118
  182. package/lib/ruby/3.4.11/bundler/resolver/candidate.rb +0 -85
  183. package/lib/ruby/3.4.11/bundler/resolver/incompatibility.rb +0 -15
  184. package/lib/ruby/3.4.11/bundler/resolver/package.rb +0 -94
  185. package/lib/ruby/3.4.11/bundler/resolver/root.rb +0 -25
  186. package/lib/ruby/3.4.11/bundler/resolver/spec_group.rb +0 -74
  187. package/lib/ruby/3.4.11/bundler/resolver/strategy.rb +0 -40
  188. package/lib/ruby/3.4.11/bundler/resolver.rb +0 -526
  189. package/lib/ruby/3.4.11/bundler/retry.rb +0 -66
  190. package/lib/ruby/3.4.11/bundler/ruby_dsl.rb +0 -62
  191. package/lib/ruby/3.4.11/bundler/ruby_version.rb +0 -137
  192. package/lib/ruby/3.4.11/bundler/rubygems_ext.rb +0 -485
  193. package/lib/ruby/3.4.11/bundler/rubygems_gem_installer.rb +0 -172
  194. package/lib/ruby/3.4.11/bundler/rubygems_integration.rb +0 -455
  195. package/lib/ruby/3.4.11/bundler/runtime.rb +0 -320
  196. package/lib/ruby/3.4.11/bundler/safe_marshal.rb +0 -31
  197. package/lib/ruby/3.4.11/bundler/self_manager.rb +0 -206
  198. package/lib/ruby/3.4.11/bundler/settings/validator.rb +0 -102
  199. package/lib/ruby/3.4.11/bundler/settings.rb +0 -599
  200. package/lib/ruby/3.4.11/bundler/setup.rb +0 -39
  201. package/lib/ruby/3.4.11/bundler/shared_helpers.rb +0 -398
  202. package/lib/ruby/3.4.11/bundler/similarity_detector.rb +0 -63
  203. package/lib/ruby/3.4.11/bundler/source/gemspec.rb +0 -15
  204. package/lib/ruby/3.4.11/bundler/source/git/git_proxy.rb +0 -472
  205. package/lib/ruby/3.4.11/bundler/source/git.rb +0 -452
  206. package/lib/ruby/3.4.11/bundler/source/metadata.rb +0 -63
  207. package/lib/ruby/3.4.11/bundler/source/path/installer.rb +0 -53
  208. package/lib/ruby/3.4.11/bundler/source/path.rb +0 -250
  209. package/lib/ruby/3.4.11/bundler/source/rubygems/remote.rb +0 -76
  210. package/lib/ruby/3.4.11/bundler/source/rubygems.rb +0 -522
  211. package/lib/ruby/3.4.11/bundler/source/rubygems_aggregate.rb +0 -68
  212. package/lib/ruby/3.4.11/bundler/source.rb +0 -118
  213. package/lib/ruby/3.4.11/bundler/source_list.rb +0 -273
  214. package/lib/ruby/3.4.11/bundler/source_map.rb +0 -71
  215. package/lib/ruby/3.4.11/bundler/spec_set.rb +0 -395
  216. package/lib/ruby/3.4.11/bundler/stub_specification.rb +0 -146
  217. package/lib/ruby/3.4.11/bundler/templates/.document +0 -1
  218. package/lib/ruby/3.4.11/bundler/templates/Executable +0 -27
  219. package/lib/ruby/3.4.11/bundler/templates/Executable.bundler +0 -109
  220. package/lib/ruby/3.4.11/bundler/templates/Executable.standalone +0 -14
  221. package/lib/ruby/3.4.11/bundler/templates/Gemfile +0 -5
  222. package/lib/ruby/3.4.11/bundler/templates/newgem/CHANGELOG.md.tt +0 -5
  223. package/lib/ruby/3.4.11/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +0 -132
  224. package/lib/ruby/3.4.11/bundler/templates/newgem/Cargo.toml.tt +0 -7
  225. package/lib/ruby/3.4.11/bundler/templates/newgem/Gemfile.tt +0 -24
  226. package/lib/ruby/3.4.11/bundler/templates/newgem/LICENSE.txt.tt +0 -21
  227. package/lib/ruby/3.4.11/bundler/templates/newgem/README.md.tt +0 -49
  228. package/lib/ruby/3.4.11/bundler/templates/newgem/Rakefile.tt +0 -67
  229. package/lib/ruby/3.4.11/bundler/templates/newgem/bin/console.tt +0 -11
  230. package/lib/ruby/3.4.11/bundler/templates/newgem/bin/setup.tt +0 -8
  231. package/lib/ruby/3.4.11/bundler/templates/newgem/circleci/config.yml.tt +0 -25
  232. package/lib/ruby/3.4.11/bundler/templates/newgem/exe/newgem.tt +0 -3
  233. package/lib/ruby/3.4.11/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +0 -15
  234. package/lib/ruby/3.4.11/bundler/templates/newgem/ext/newgem/extconf-c.rb.tt +0 -10
  235. package/lib/ruby/3.4.11/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt +0 -6
  236. package/lib/ruby/3.4.11/bundler/templates/newgem/ext/newgem/newgem.c.tt +0 -9
  237. package/lib/ruby/3.4.11/bundler/templates/newgem/ext/newgem/newgem.h.tt +0 -6
  238. package/lib/ruby/3.4.11/bundler/templates/newgem/ext/newgem/src/lib.rs.tt +0 -12
  239. package/lib/ruby/3.4.11/bundler/templates/newgem/github/workflows/main.yml.tt +0 -37
  240. package/lib/ruby/3.4.11/bundler/templates/newgem/gitignore.tt +0 -23
  241. package/lib/ruby/3.4.11/bundler/templates/newgem/gitlab-ci.yml.tt +0 -18
  242. package/lib/ruby/3.4.11/bundler/templates/newgem/lib/newgem/version.rb.tt +0 -9
  243. package/lib/ruby/3.4.11/bundler/templates/newgem/lib/newgem.rb.tt +0 -15
  244. package/lib/ruby/3.4.11/bundler/templates/newgem/newgem.gemspec.tt +0 -52
  245. package/lib/ruby/3.4.11/bundler/templates/newgem/rspec.tt +0 -3
  246. package/lib/ruby/3.4.11/bundler/templates/newgem/rubocop.yml.tt +0 -8
  247. package/lib/ruby/3.4.11/bundler/templates/newgem/sig/newgem.rbs.tt +0 -8
  248. package/lib/ruby/3.4.11/bundler/templates/newgem/spec/newgem_spec.rb.tt +0 -11
  249. package/lib/ruby/3.4.11/bundler/templates/newgem/spec/spec_helper.rb.tt +0 -15
  250. package/lib/ruby/3.4.11/bundler/templates/newgem/standard.yml.tt +0 -3
  251. package/lib/ruby/3.4.11/bundler/templates/newgem/test/minitest/test_helper.rb.tt +0 -6
  252. package/lib/ruby/3.4.11/bundler/templates/newgem/test/minitest/test_newgem.rb.tt +0 -13
  253. package/lib/ruby/3.4.11/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt +0 -15
  254. package/lib/ruby/3.4.11/bundler/templates/newgem/test/test-unit/test_helper.rb.tt +0 -6
  255. package/lib/ruby/3.4.11/bundler/ui/rg_proxy.rb +0 -19
  256. package/lib/ruby/3.4.11/bundler/ui/shell.rb +0 -187
  257. package/lib/ruby/3.4.11/bundler/ui/silent.rb +0 -96
  258. package/lib/ruby/3.4.11/bundler/ui.rb +0 -9
  259. package/lib/ruby/3.4.11/bundler/uri_credentials_filter.rb +0 -43
  260. package/lib/ruby/3.4.11/bundler/uri_normalizer.rb +0 -23
  261. package/lib/ruby/3.4.11/bundler/vendor/.document +0 -1
  262. package/lib/ruby/3.4.11/bundler/vendor/connection_pool/.document +0 -1
  263. package/lib/ruby/3.4.11/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +0 -224
  264. package/lib/ruby/3.4.11/bundler/vendor/connection_pool/lib/connection_pool/version.rb +0 -3
  265. package/lib/ruby/3.4.11/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +0 -56
  266. package/lib/ruby/3.4.11/bundler/vendor/connection_pool/lib/connection_pool.rb +0 -186
  267. package/lib/ruby/3.4.11/bundler/vendor/fileutils/.document +0 -1
  268. package/lib/ruby/3.4.11/bundler/vendor/fileutils/lib/fileutils.rb +0 -2696
  269. package/lib/ruby/3.4.11/bundler/vendor/net-http-persistent/.document +0 -1
  270. package/lib/ruby/3.4.11/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb +0 -41
  271. package/lib/ruby/3.4.11/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb +0 -65
  272. package/lib/ruby/3.4.11/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +0 -79
  273. package/lib/ruby/3.4.11/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +0 -1111
  274. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/.document +0 -1
  275. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb +0 -20
  276. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb +0 -169
  277. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb +0 -182
  278. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb +0 -150
  279. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/package.rb +0 -43
  280. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb +0 -121
  281. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb +0 -45
  282. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb +0 -19
  283. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb +0 -61
  284. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/strategy.rb +0 -42
  285. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/term.rb +0 -105
  286. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/version.rb +0 -3
  287. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb +0 -129
  288. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +0 -423
  289. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +0 -236
  290. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb +0 -178
  291. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub.rb +0 -31
  292. package/lib/ruby/3.4.11/bundler/vendor/securerandom/.document +0 -1
  293. package/lib/ruby/3.4.11/bundler/vendor/securerandom/lib/securerandom.rb +0 -102
  294. package/lib/ruby/3.4.11/bundler/vendor/thor/.document +0 -1
  295. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions/create_file.rb +0 -105
  296. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions/create_link.rb +0 -61
  297. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions/directory.rb +0 -108
  298. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +0 -143
  299. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +0 -371
  300. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +0 -130
  301. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions.rb +0 -340
  302. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/base.rb +0 -825
  303. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/command.rb +0 -151
  304. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +0 -107
  305. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/error.rb +0 -106
  306. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/group.rb +0 -292
  307. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/invocation.rb +0 -178
  308. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/line_editor/basic.rb +0 -37
  309. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/line_editor/readline.rb +0 -88
  310. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/line_editor.rb +0 -17
  311. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/nested_context.rb +0 -29
  312. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/parser/argument.rb +0 -86
  313. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/parser/arguments.rb +0 -195
  314. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/parser/option.rb +0 -178
  315. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/parser/options.rb +0 -294
  316. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/parser.rb +0 -4
  317. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/rake_compat.rb +0 -72
  318. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/runner.rb +0 -335
  319. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/basic.rb +0 -388
  320. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/color.rb +0 -112
  321. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/column_printer.rb +0 -29
  322. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/html.rb +0 -81
  323. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/table_printer.rb +0 -118
  324. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/terminal.rb +0 -42
  325. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb +0 -38
  326. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell.rb +0 -81
  327. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/util.rb +0 -285
  328. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/version.rb +0 -3
  329. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor.rb +0 -674
  330. package/lib/ruby/3.4.11/bundler/vendor/tsort/.document +0 -1
  331. package/lib/ruby/3.4.11/bundler/vendor/tsort/lib/tsort.rb +0 -455
  332. package/lib/ruby/3.4.11/bundler/vendor/uri/.document +0 -1
  333. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/common.rb +0 -880
  334. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/file.rb +0 -100
  335. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/ftp.rb +0 -267
  336. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/generic.rb +0 -1592
  337. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/http.rb +0 -125
  338. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/https.rb +0 -23
  339. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/ldap.rb +0 -261
  340. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/ldaps.rb +0 -22
  341. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/mailto.rb +0 -293
  342. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +0 -546
  343. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +0 -206
  344. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/version.rb +0 -6
  345. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/ws.rb +0 -83
  346. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/wss.rb +0 -23
  347. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri.rb +0 -104
  348. package/lib/ruby/3.4.11/bundler/vendored_fileutils.rb +0 -4
  349. package/lib/ruby/3.4.11/bundler/vendored_net_http.rb +0 -23
  350. package/lib/ruby/3.4.11/bundler/vendored_persistent.rb +0 -11
  351. package/lib/ruby/3.4.11/bundler/vendored_pub_grub.rb +0 -4
  352. package/lib/ruby/3.4.11/bundler/vendored_securerandom.rb +0 -12
  353. package/lib/ruby/3.4.11/bundler/vendored_thor.rb +0 -8
  354. package/lib/ruby/3.4.11/bundler/vendored_timeout.rb +0 -12
  355. package/lib/ruby/3.4.11/bundler/vendored_tsort.rb +0 -4
  356. package/lib/ruby/3.4.11/bundler/vendored_uri.rb +0 -21
  357. package/lib/ruby/3.4.11/bundler/version.rb +0 -13
  358. package/lib/ruby/3.4.11/bundler/vlad.rb +0 -17
  359. package/lib/ruby/3.4.11/bundler/worker.rb +0 -117
  360. package/lib/ruby/3.4.11/bundler/yaml_serializer.rb +0 -98
  361. package/lib/ruby/3.4.11/bundler.rb +0 -701
  362. package/lib/ruby/3.4.11/cgi/cgi.gemspec +0 -43
  363. package/lib/ruby/3.4.11/cgi/cookie.rb +0 -210
  364. package/lib/ruby/3.4.11/cgi/core.rb +0 -900
  365. package/lib/ruby/3.4.11/cgi/html.rb +0 -1035
  366. package/lib/ruby/3.4.11/cgi/session/pstore.rb +0 -91
  367. package/lib/ruby/3.4.11/cgi/session.rb +0 -562
  368. package/lib/ruby/3.4.11/cgi/util.rb +0 -258
  369. package/lib/ruby/3.4.11/cgi.rb +0 -297
  370. package/lib/ruby/3.4.11/delegate.gemspec +0 -29
  371. package/lib/ruby/3.4.11/delegate.rb +0 -444
  372. package/lib/ruby/3.4.11/did_you_mean/core_ext/name_error.rb +0 -57
  373. package/lib/ruby/3.4.11/did_you_mean/did_you_mean.gemspec +0 -25
  374. package/lib/ruby/3.4.11/did_you_mean/experimental.rb +0 -2
  375. package/lib/ruby/3.4.11/did_you_mean/formatter.rb +0 -44
  376. package/lib/ruby/3.4.11/did_you_mean/formatters/plain_formatter.rb +0 -4
  377. package/lib/ruby/3.4.11/did_you_mean/formatters/verbose_formatter.rb +0 -10
  378. package/lib/ruby/3.4.11/did_you_mean/jaro_winkler.rb +0 -84
  379. package/lib/ruby/3.4.11/did_you_mean/levenshtein.rb +0 -57
  380. package/lib/ruby/3.4.11/did_you_mean/spell_checker.rb +0 -46
  381. package/lib/ruby/3.4.11/did_you_mean/spell_checkers/key_error_checker.rb +0 -28
  382. package/lib/ruby/3.4.11/did_you_mean/spell_checkers/method_name_checker.rb +0 -79
  383. package/lib/ruby/3.4.11/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb +0 -49
  384. package/lib/ruby/3.4.11/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb +0 -85
  385. package/lib/ruby/3.4.11/did_you_mean/spell_checkers/name_error_checkers.rb +0 -20
  386. package/lib/ruby/3.4.11/did_you_mean/spell_checkers/null_checker.rb +0 -6
  387. package/lib/ruby/3.4.11/did_you_mean/spell_checkers/pattern_key_name_checker.rb +0 -28
  388. package/lib/ruby/3.4.11/did_you_mean/spell_checkers/require_path_checker.rb +0 -39
  389. package/lib/ruby/3.4.11/did_you_mean/tree_spell_checker.rb +0 -109
  390. package/lib/ruby/3.4.11/did_you_mean/verbose.rb +0 -2
  391. package/lib/ruby/3.4.11/did_you_mean/version.rb +0 -3
  392. package/lib/ruby/3.4.11/did_you_mean.rb +0 -131
  393. package/lib/ruby/3.4.11/erb/compiler.rb +0 -472
  394. package/lib/ruby/3.4.11/erb/def_method.rb +0 -47
  395. package/lib/ruby/3.4.11/erb/util.rb +0 -63
  396. package/lib/ruby/3.4.11/erb/version.rb +0 -5
  397. package/lib/ruby/3.4.11/erb.gemspec +0 -38
  398. package/lib/ruby/3.4.11/erb.rb +0 -509
  399. package/lib/ruby/3.4.11/error_highlight/base.rb +0 -830
  400. package/lib/ruby/3.4.11/error_highlight/core_ext.rb +0 -47
  401. package/lib/ruby/3.4.11/error_highlight/error_highlight.gemspec +0 -27
  402. package/lib/ruby/3.4.11/error_highlight/formatter.rb +0 -74
  403. package/lib/ruby/3.4.11/error_highlight/version.rb +0 -3
  404. package/lib/ruby/3.4.11/error_highlight.rb +0 -2
  405. package/lib/ruby/3.4.11/fileutils.gemspec +0 -31
  406. package/lib/ruby/3.4.11/fileutils.rb +0 -2696
  407. package/lib/ruby/3.4.11/find.gemspec +0 -29
  408. package/lib/ruby/3.4.11/find.rb +0 -90
  409. package/lib/ruby/3.4.11/forwardable/forwardable.gemspec +0 -26
  410. package/lib/ruby/3.4.11/forwardable/impl.rb +0 -17
  411. package/lib/ruby/3.4.11/forwardable.rb +0 -321
  412. package/lib/ruby/3.4.11/ipaddr.gemspec +0 -36
  413. package/lib/ruby/3.4.11/ipaddr.rb +0 -841
  414. package/lib/ruby/3.4.11/irb/cmd/nop.rb +0 -4
  415. package/lib/ruby/3.4.11/irb/color.rb +0 -262
  416. package/lib/ruby/3.4.11/irb/color_printer.rb +0 -55
  417. package/lib/ruby/3.4.11/irb/command/backtrace.rb +0 -17
  418. package/lib/ruby/3.4.11/irb/command/base.rb +0 -60
  419. package/lib/ruby/3.4.11/irb/command/break.rb +0 -17
  420. package/lib/ruby/3.4.11/irb/command/catch.rb +0 -17
  421. package/lib/ruby/3.4.11/irb/command/cd.rb +0 -51
  422. package/lib/ruby/3.4.11/irb/command/chws.rb +0 -40
  423. package/lib/ruby/3.4.11/irb/command/context.rb +0 -16
  424. package/lib/ruby/3.4.11/irb/command/continue.rb +0 -17
  425. package/lib/ruby/3.4.11/irb/command/debug.rb +0 -73
  426. package/lib/ruby/3.4.11/irb/command/delete.rb +0 -17
  427. package/lib/ruby/3.4.11/irb/command/disable_irb.rb +0 -19
  428. package/lib/ruby/3.4.11/irb/command/edit.rb +0 -63
  429. package/lib/ruby/3.4.11/irb/command/exit.rb +0 -18
  430. package/lib/ruby/3.4.11/irb/command/finish.rb +0 -17
  431. package/lib/ruby/3.4.11/irb/command/force_exit.rb +0 -18
  432. package/lib/ruby/3.4.11/irb/command/help.rb +0 -83
  433. package/lib/ruby/3.4.11/irb/command/history.rb +0 -45
  434. package/lib/ruby/3.4.11/irb/command/info.rb +0 -17
  435. package/lib/ruby/3.4.11/irb/command/internal_helpers.rb +0 -27
  436. package/lib/ruby/3.4.11/irb/command/irb_info.rb +0 -33
  437. package/lib/ruby/3.4.11/irb/command/load.rb +0 -91
  438. package/lib/ruby/3.4.11/irb/command/ls.rb +0 -167
  439. package/lib/ruby/3.4.11/irb/command/measure.rb +0 -49
  440. package/lib/ruby/3.4.11/irb/command/next.rb +0 -17
  441. package/lib/ruby/3.4.11/irb/command/pushws.rb +0 -65
  442. package/lib/ruby/3.4.11/irb/command/show_doc.rb +0 -51
  443. package/lib/ruby/3.4.11/irb/command/show_source.rb +0 -74
  444. package/lib/ruby/3.4.11/irb/command/step.rb +0 -17
  445. package/lib/ruby/3.4.11/irb/command/subirb.rb +0 -123
  446. package/lib/ruby/3.4.11/irb/command/whereami.rb +0 -23
  447. package/lib/ruby/3.4.11/irb/command.rb +0 -23
  448. package/lib/ruby/3.4.11/irb/completion.rb +0 -504
  449. package/lib/ruby/3.4.11/irb/context.rb +0 -716
  450. package/lib/ruby/3.4.11/irb/debug/ui.rb +0 -101
  451. package/lib/ruby/3.4.11/irb/debug.rb +0 -127
  452. package/lib/ruby/3.4.11/irb/default_commands.rb +0 -276
  453. package/lib/ruby/3.4.11/irb/easter-egg.rb +0 -152
  454. package/lib/ruby/3.4.11/irb/ext/change-ws.rb +0 -37
  455. package/lib/ruby/3.4.11/irb/ext/eval_history.rb +0 -149
  456. package/lib/ruby/3.4.11/irb/ext/loader.rb +0 -127
  457. package/lib/ruby/3.4.11/irb/ext/multi-irb.rb +0 -258
  458. package/lib/ruby/3.4.11/irb/ext/tracer.rb +0 -39
  459. package/lib/ruby/3.4.11/irb/ext/use-loader.rb +0 -67
  460. package/lib/ruby/3.4.11/irb/ext/workspaces.rb +0 -36
  461. package/lib/ruby/3.4.11/irb/frame.rb +0 -80
  462. package/lib/ruby/3.4.11/irb/help.rb +0 -28
  463. package/lib/ruby/3.4.11/irb/helper_method/base.rb +0 -16
  464. package/lib/ruby/3.4.11/irb/helper_method/conf.rb +0 -11
  465. package/lib/ruby/3.4.11/irb/helper_method.rb +0 -29
  466. package/lib/ruby/3.4.11/irb/history.rb +0 -112
  467. package/lib/ruby/3.4.11/irb/init.rb +0 -538
  468. package/lib/ruby/3.4.11/irb/input-method.rb +0 -515
  469. package/lib/ruby/3.4.11/irb/inspector.rb +0 -131
  470. package/lib/ruby/3.4.11/irb/irb.gemspec +0 -46
  471. package/lib/ruby/3.4.11/irb/lc/error.rb +0 -52
  472. package/lib/ruby/3.4.11/irb/lc/help-message +0 -55
  473. package/lib/ruby/3.4.11/irb/lc/ja/error.rb +0 -53
  474. package/lib/ruby/3.4.11/irb/lc/ja/help-message +0 -58
  475. package/lib/ruby/3.4.11/irb/locale.rb +0 -153
  476. package/lib/ruby/3.4.11/irb/nesting_parser.rb +0 -239
  477. package/lib/ruby/3.4.11/irb/notifier.rb +0 -230
  478. package/lib/ruby/3.4.11/irb/output-method.rb +0 -80
  479. package/lib/ruby/3.4.11/irb/pager.rb +0 -100
  480. package/lib/ruby/3.4.11/irb/ruby-lex.rb +0 -476
  481. package/lib/ruby/3.4.11/irb/ruby_logo.aa +0 -118
  482. package/lib/ruby/3.4.11/irb/source_finder.rb +0 -138
  483. package/lib/ruby/3.4.11/irb/statement.rb +0 -80
  484. package/lib/ruby/3.4.11/irb/version.rb +0 -11
  485. package/lib/ruby/3.4.11/irb/workspace.rb +0 -171
  486. package/lib/ruby/3.4.11/irb/ws-for-case-2.rb +0 -9
  487. package/lib/ruby/3.4.11/irb/xmp.rb +0 -164
  488. package/lib/ruby/3.4.11/irb.rb +0 -1593
  489. package/lib/ruby/3.4.11/logger/errors.rb +0 -9
  490. package/lib/ruby/3.4.11/logger/formatter.rb +0 -36
  491. package/lib/ruby/3.4.11/logger/log_device.rb +0 -236
  492. package/lib/ruby/3.4.11/logger/logger.gemspec +0 -22
  493. package/lib/ruby/3.4.11/logger/period.rb +0 -47
  494. package/lib/ruby/3.4.11/logger/severity.rb +0 -38
  495. package/lib/ruby/3.4.11/logger/version.rb +0 -5
  496. package/lib/ruby/3.4.11/logger.rb +0 -761
  497. package/lib/ruby/3.4.11/mkmf.rb +0 -3045
  498. package/lib/ruby/3.4.11/net/http/exceptions.rb +0 -34
  499. package/lib/ruby/3.4.11/net/http/generic_request.rb +0 -414
  500. package/lib/ruby/3.4.11/net/http/header.rb +0 -981
  501. package/lib/ruby/3.4.11/net/http/net-http.gemspec +0 -39
  502. package/lib/ruby/3.4.11/net/http/proxy_delta.rb +0 -17
  503. package/lib/ruby/3.4.11/net/http/request.rb +0 -88
  504. package/lib/ruby/3.4.11/net/http/requests.rb +0 -430
  505. package/lib/ruby/3.4.11/net/http/response.rb +0 -738
  506. package/lib/ruby/3.4.11/net/http/responses.rb +0 -1174
  507. package/lib/ruby/3.4.11/net/http/status.rb +0 -84
  508. package/lib/ruby/3.4.11/net/http.rb +0 -2574
  509. package/lib/ruby/3.4.11/net/https.rb +0 -23
  510. package/lib/ruby/3.4.11/net/net-protocol.gemspec +0 -34
  511. package/lib/ruby/3.4.11/net/protocol.rb +0 -544
  512. package/lib/ruby/3.4.11/open-uri.gemspec +0 -32
  513. package/lib/ruby/3.4.11/open-uri.rb +0 -895
  514. package/lib/ruby/3.4.11/open3/open3.gemspec +0 -33
  515. package/lib/ruby/3.4.11/open3/version.rb +0 -3
  516. package/lib/ruby/3.4.11/open3.rb +0 -1410
  517. package/lib/ruby/3.4.11/optionparser.rb +0 -2
  518. package/lib/ruby/3.4.11/optparse/ac.rb +0 -70
  519. package/lib/ruby/3.4.11/optparse/date.rb +0 -18
  520. package/lib/ruby/3.4.11/optparse/kwargs.rb +0 -27
  521. package/lib/ruby/3.4.11/optparse/optparse.gemspec +0 -31
  522. package/lib/ruby/3.4.11/optparse/shellwords.rb +0 -7
  523. package/lib/ruby/3.4.11/optparse/time.rb +0 -11
  524. package/lib/ruby/3.4.11/optparse/uri.rb +0 -7
  525. package/lib/ruby/3.4.11/optparse/version.rb +0 -80
  526. package/lib/ruby/3.4.11/optparse.rb +0 -2429
  527. package/lib/ruby/3.4.11/ostruct.gemspec +0 -24
  528. package/lib/ruby/3.4.11/ostruct.rb +0 -489
  529. package/lib/ruby/3.4.11/pp.gemspec +0 -35
  530. package/lib/ruby/3.4.11/pp.rb +0 -699
  531. package/lib/ruby/3.4.11/prettyprint.gemspec +0 -29
  532. package/lib/ruby/3.4.11/prettyprint.rb +0 -558
  533. package/lib/ruby/3.4.11/prism/compiler.rb +0 -801
  534. package/lib/ruby/3.4.11/prism/desugar_compiler.rb +0 -392
  535. package/lib/ruby/3.4.11/prism/dispatcher.rb +0 -2210
  536. package/lib/ruby/3.4.11/prism/dsl.rb +0 -1003
  537. package/lib/ruby/3.4.11/prism/ffi.rb +0 -570
  538. package/lib/ruby/3.4.11/prism/inspect_visitor.rb +0 -2392
  539. package/lib/ruby/3.4.11/prism/lex_compat.rb +0 -928
  540. package/lib/ruby/3.4.11/prism/mutation_compiler.rb +0 -772
  541. package/lib/ruby/3.4.11/prism/node.rb +0 -18816
  542. package/lib/ruby/3.4.11/prism/node_ext.rb +0 -511
  543. package/lib/ruby/3.4.11/prism/pack.rb +0 -230
  544. package/lib/ruby/3.4.11/prism/parse_result/comments.rb +0 -188
  545. package/lib/ruby/3.4.11/prism/parse_result/errors.rb +0 -66
  546. package/lib/ruby/3.4.11/prism/parse_result/newlines.rb +0 -155
  547. package/lib/ruby/3.4.11/prism/parse_result.rb +0 -911
  548. package/lib/ruby/3.4.11/prism/pattern.rb +0 -269
  549. package/lib/ruby/3.4.11/prism/polyfill/append_as_bytes.rb +0 -15
  550. package/lib/ruby/3.4.11/prism/polyfill/byteindex.rb +0 -13
  551. package/lib/ruby/3.4.11/prism/polyfill/scan_byte.rb +0 -14
  552. package/lib/ruby/3.4.11/prism/polyfill/unpack1.rb +0 -14
  553. package/lib/ruby/3.4.11/prism/polyfill/warn.rb +0 -36
  554. package/lib/ruby/3.4.11/prism/prism.gemspec +0 -174
  555. package/lib/ruby/3.4.11/prism/reflection.rb +0 -416
  556. package/lib/ruby/3.4.11/prism/relocation.rb +0 -505
  557. package/lib/ruby/3.4.11/prism/serialize.rb +0 -2400
  558. package/lib/ruby/3.4.11/prism/string_query.rb +0 -31
  559. package/lib/ruby/3.4.11/prism/translation/parser/builder.rb +0 -62
  560. package/lib/ruby/3.4.11/prism/translation/parser/compiler.rb +0 -2234
  561. package/lib/ruby/3.4.11/prism/translation/parser/lexer.rb +0 -820
  562. package/lib/ruby/3.4.11/prism/translation/parser.rb +0 -374
  563. package/lib/ruby/3.4.11/prism/translation/parser33.rb +0 -13
  564. package/lib/ruby/3.4.11/prism/translation/parser34.rb +0 -13
  565. package/lib/ruby/3.4.11/prism/translation/parser35.rb +0 -13
  566. package/lib/ruby/3.4.11/prism/translation/parser_current.rb +0 -24
  567. package/lib/ruby/3.4.11/prism/translation/ripper/sexp.rb +0 -126
  568. package/lib/ruby/3.4.11/prism/translation/ripper/shim.rb +0 -5
  569. package/lib/ruby/3.4.11/prism/translation/ripper.rb +0 -3474
  570. package/lib/ruby/3.4.11/prism/translation/ruby_parser.rb +0 -1929
  571. package/lib/ruby/3.4.11/prism/translation.rb +0 -16
  572. package/lib/ruby/3.4.11/prism/visitor.rb +0 -813
  573. package/lib/ruby/3.4.11/prism.rb +0 -91
  574. package/lib/ruby/3.4.11/pstore.gemspec +0 -32
  575. package/lib/ruby/3.4.11/pstore.rb +0 -736
  576. package/lib/ruby/3.4.11/random/formatter.rb +0 -372
  577. package/lib/ruby/3.4.11/rdoc/.document +0 -2
  578. package/lib/ruby/3.4.11/rdoc/code_object/alias.rb +0 -104
  579. package/lib/ruby/3.4.11/rdoc/code_object/anon_class.rb +0 -10
  580. package/lib/ruby/3.4.11/rdoc/code_object/any_method.rb +0 -374
  581. package/lib/ruby/3.4.11/rdoc/code_object/attr.rb +0 -172
  582. package/lib/ruby/3.4.11/rdoc/code_object/class_module.rb +0 -888
  583. package/lib/ruby/3.4.11/rdoc/code_object/constant.rb +0 -186
  584. package/lib/ruby/3.4.11/rdoc/code_object/context/section.rb +0 -175
  585. package/lib/ruby/3.4.11/rdoc/code_object/context.rb +0 -1222
  586. package/lib/ruby/3.4.11/rdoc/code_object/extend.rb +0 -9
  587. package/lib/ruby/3.4.11/rdoc/code_object/ghost_method.rb +0 -6
  588. package/lib/ruby/3.4.11/rdoc/code_object/include.rb +0 -9
  589. package/lib/ruby/3.4.11/rdoc/code_object/meta_method.rb +0 -6
  590. package/lib/ruby/3.4.11/rdoc/code_object/method_attr.rb +0 -410
  591. package/lib/ruby/3.4.11/rdoc/code_object/mixin.rb +0 -120
  592. package/lib/ruby/3.4.11/rdoc/code_object/normal_class.rb +0 -92
  593. package/lib/ruby/3.4.11/rdoc/code_object/normal_module.rb +0 -73
  594. package/lib/ruby/3.4.11/rdoc/code_object/require.rb +0 -51
  595. package/lib/ruby/3.4.11/rdoc/code_object/single_class.rb +0 -30
  596. package/lib/ruby/3.4.11/rdoc/code_object/top_level.rb +0 -273
  597. package/lib/ruby/3.4.11/rdoc/code_object.rb +0 -395
  598. package/lib/ruby/3.4.11/rdoc/code_objects.rb +0 -5
  599. package/lib/ruby/3.4.11/rdoc/comment.rb +0 -236
  600. package/lib/ruby/3.4.11/rdoc/cross_reference.rb +0 -228
  601. package/lib/ruby/3.4.11/rdoc/encoding.rb +0 -120
  602. package/lib/ruby/3.4.11/rdoc/erb_partial.rb +0 -18
  603. package/lib/ruby/3.4.11/rdoc/erbio.rb +0 -37
  604. package/lib/ruby/3.4.11/rdoc/generator/darkfish.rb +0 -812
  605. package/lib/ruby/3.4.11/rdoc/generator/json_index.rb +0 -284
  606. package/lib/ruby/3.4.11/rdoc/generator/markup.rb +0 -171
  607. package/lib/ruby/3.4.11/rdoc/generator/pot/message_extractor.rb +0 -68
  608. package/lib/ruby/3.4.11/rdoc/generator/pot/po.rb +0 -84
  609. package/lib/ruby/3.4.11/rdoc/generator/pot/po_entry.rb +0 -141
  610. package/lib/ruby/3.4.11/rdoc/generator/pot.rb +0 -94
  611. package/lib/ruby/3.4.11/rdoc/generator/ri.rb +0 -30
  612. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/.document +0 -0
  613. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_footer.rhtml +0 -5
  614. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_head.rhtml +0 -48
  615. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_classes.rhtml +0 -5
  616. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +0 -15
  617. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +0 -15
  618. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +0 -15
  619. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_methods.rhtml +0 -21
  620. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_navigation.rhtml +0 -11
  621. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +0 -32
  622. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_parent.rhtml +0 -6
  623. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_search.rhtml +0 -14
  624. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +0 -11
  625. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +0 -39
  626. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_toggle.rhtml +0 -3
  627. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/class.rhtml +0 -221
  628. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/css/fonts.css +0 -167
  629. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/css/rdoc.css +0 -683
  630. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/fonts/Lato-Light.ttf +0 -0
  631. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/fonts/Lato-LightItalic.ttf +0 -0
  632. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/fonts/Lato-Regular.ttf +0 -0
  633. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/fonts/Lato-RegularItalic.ttf +0 -0
  634. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/fonts/SourceCodePro-Bold.ttf +0 -0
  635. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/fonts/SourceCodePro-Regular.ttf +0 -0
  636. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/add.png +0 -0
  637. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/arrow_up.png +0 -0
  638. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/brick.png +0 -0
  639. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/brick_link.png +0 -0
  640. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/bug.png +0 -0
  641. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/bullet_black.png +0 -0
  642. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/bullet_toggle_minus.png +0 -0
  643. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/bullet_toggle_plus.png +0 -0
  644. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/date.png +0 -0
  645. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/delete.png +0 -0
  646. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/find.png +0 -0
  647. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/loadingAnimation.gif +0 -0
  648. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/macFFBgHack.png +0 -0
  649. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/package.png +0 -0
  650. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/page_green.png +0 -0
  651. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/page_white_text.png +0 -0
  652. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/page_white_width.png +0 -0
  653. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/plugin.png +0 -0
  654. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/ruby.png +0 -0
  655. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/tag_blue.png +0 -0
  656. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/tag_green.png +0 -0
  657. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/transparent.png +0 -0
  658. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/wrench.png +0 -0
  659. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/wrench_orange.png +0 -0
  660. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/zoom.png +0 -0
  661. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/index.rhtml +0 -23
  662. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/js/darkfish.js +0 -120
  663. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/js/search.js +0 -110
  664. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/page.rhtml +0 -18
  665. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/servlet_not_found.rhtml +0 -20
  666. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/servlet_root.rhtml +0 -65
  667. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/table_of_contents.rhtml +0 -70
  668. package/lib/ruby/3.4.11/rdoc/generator/template/json_index/.document +0 -1
  669. package/lib/ruby/3.4.11/rdoc/generator/template/json_index/js/navigation.js +0 -105
  670. package/lib/ruby/3.4.11/rdoc/generator/template/json_index/js/searcher.js +0 -229
  671. package/lib/ruby/3.4.11/rdoc/generator.rb +0 -51
  672. package/lib/ruby/3.4.11/rdoc/i18n/locale.rb +0 -102
  673. package/lib/ruby/3.4.11/rdoc/i18n/text.rb +0 -126
  674. package/lib/ruby/3.4.11/rdoc/i18n.rb +0 -10
  675. package/lib/ruby/3.4.11/rdoc/known_classes.rb +0 -74
  676. package/lib/ruby/3.4.11/rdoc/markdown/.document +0 -1
  677. package/lib/ruby/3.4.11/rdoc/markdown/entities.rb +0 -2131
  678. package/lib/ruby/3.4.11/rdoc/markdown/literals.rb +0 -454
  679. package/lib/ruby/3.4.11/rdoc/markdown.rb +0 -16806
  680. package/lib/ruby/3.4.11/rdoc/markup/attr_changer.rb +0 -22
  681. package/lib/ruby/3.4.11/rdoc/markup/attr_span.rb +0 -35
  682. package/lib/ruby/3.4.11/rdoc/markup/attribute_manager.rb +0 -405
  683. package/lib/ruby/3.4.11/rdoc/markup/attributes.rb +0 -70
  684. package/lib/ruby/3.4.11/rdoc/markup/blank_line.rb +0 -27
  685. package/lib/ruby/3.4.11/rdoc/markup/block_quote.rb +0 -14
  686. package/lib/ruby/3.4.11/rdoc/markup/document.rb +0 -164
  687. package/lib/ruby/3.4.11/rdoc/markup/formatter.rb +0 -272
  688. package/lib/ruby/3.4.11/rdoc/markup/hard_break.rb +0 -31
  689. package/lib/ruby/3.4.11/rdoc/markup/heading.rb +0 -84
  690. package/lib/ruby/3.4.11/rdoc/markup/include.rb +0 -42
  691. package/lib/ruby/3.4.11/rdoc/markup/indented_paragraph.rb +0 -47
  692. package/lib/ruby/3.4.11/rdoc/markup/list.rb +0 -101
  693. package/lib/ruby/3.4.11/rdoc/markup/list_item.rb +0 -99
  694. package/lib/ruby/3.4.11/rdoc/markup/paragraph.rb +0 -28
  695. package/lib/ruby/3.4.11/rdoc/markup/parser.rb +0 -585
  696. package/lib/ruby/3.4.11/rdoc/markup/pre_process.rb +0 -318
  697. package/lib/ruby/3.4.11/rdoc/markup/raw.rb +0 -69
  698. package/lib/ruby/3.4.11/rdoc/markup/regexp_handling.rb +0 -40
  699. package/lib/ruby/3.4.11/rdoc/markup/rule.rb +0 -20
  700. package/lib/ruby/3.4.11/rdoc/markup/table.rb +0 -56
  701. package/lib/ruby/3.4.11/rdoc/markup/to_ansi.rb +0 -93
  702. package/lib/ruby/3.4.11/rdoc/markup/to_bs.rb +0 -102
  703. package/lib/ruby/3.4.11/rdoc/markup/to_html.rb +0 -462
  704. package/lib/ruby/3.4.11/rdoc/markup/to_html_crossref.rb +0 -226
  705. package/lib/ruby/3.4.11/rdoc/markup/to_html_snippet.rb +0 -287
  706. package/lib/ruby/3.4.11/rdoc/markup/to_joined_paragraph.rb +0 -46
  707. package/lib/ruby/3.4.11/rdoc/markup/to_label.rb +0 -74
  708. package/lib/ruby/3.4.11/rdoc/markup/to_markdown.rb +0 -191
  709. package/lib/ruby/3.4.11/rdoc/markup/to_rdoc.rb +0 -353
  710. package/lib/ruby/3.4.11/rdoc/markup/to_table_of_contents.rb +0 -88
  711. package/lib/ruby/3.4.11/rdoc/markup/to_test.rb +0 -69
  712. package/lib/ruby/3.4.11/rdoc/markup/to_tt_only.rb +0 -120
  713. package/lib/ruby/3.4.11/rdoc/markup/verbatim.rb +0 -83
  714. package/lib/ruby/3.4.11/rdoc/markup.rb +0 -240
  715. package/lib/ruby/3.4.11/rdoc/options.rb +0 -1416
  716. package/lib/ruby/3.4.11/rdoc/parser/c.rb +0 -1257
  717. package/lib/ruby/3.4.11/rdoc/parser/changelog.rb +0 -350
  718. package/lib/ruby/3.4.11/rdoc/parser/markdown.rb +0 -22
  719. package/lib/ruby/3.4.11/rdoc/parser/prism_ruby.rb +0 -1092
  720. package/lib/ruby/3.4.11/rdoc/parser/rd.rb +0 -22
  721. package/lib/ruby/3.4.11/rdoc/parser/ripper_state_lex.rb +0 -302
  722. package/lib/ruby/3.4.11/rdoc/parser/ruby.rb +0 -2378
  723. package/lib/ruby/3.4.11/rdoc/parser/ruby_tools.rb +0 -165
  724. package/lib/ruby/3.4.11/rdoc/parser/simple.rb +0 -61
  725. package/lib/ruby/3.4.11/rdoc/parser/text.rb +0 -11
  726. package/lib/ruby/3.4.11/rdoc/parser.rb +0 -297
  727. package/lib/ruby/3.4.11/rdoc/rd/.document +0 -1
  728. package/lib/ruby/3.4.11/rdoc/rd/block_parser.rb +0 -1706
  729. package/lib/ruby/3.4.11/rdoc/rd/inline.rb +0 -71
  730. package/lib/ruby/3.4.11/rdoc/rd/inline_parser.rb +0 -1854
  731. package/lib/ruby/3.4.11/rdoc/rd.rb +0 -99
  732. package/lib/ruby/3.4.11/rdoc/rdoc.gemspec +0 -68
  733. package/lib/ruby/3.4.11/rdoc/rdoc.rb +0 -551
  734. package/lib/ruby/3.4.11/rdoc/ri/driver.rb +0 -1566
  735. package/lib/ruby/3.4.11/rdoc/ri/formatter.rb +0 -6
  736. package/lib/ruby/3.4.11/rdoc/ri/paths.rb +0 -171
  737. package/lib/ruby/3.4.11/rdoc/ri/store.rb +0 -6
  738. package/lib/ruby/3.4.11/rdoc/ri/task.rb +0 -71
  739. package/lib/ruby/3.4.11/rdoc/ri.rb +0 -20
  740. package/lib/ruby/3.4.11/rdoc/rubygems_hook.rb +0 -327
  741. package/lib/ruby/3.4.11/rdoc/servlet.rb +0 -452
  742. package/lib/ruby/3.4.11/rdoc/stats/normal.rb +0 -58
  743. package/lib/ruby/3.4.11/rdoc/stats/quiet.rb +0 -59
  744. package/lib/ruby/3.4.11/rdoc/stats/verbose.rb +0 -44
  745. package/lib/ruby/3.4.11/rdoc/stats.rb +0 -461
  746. package/lib/ruby/3.4.11/rdoc/store.rb +0 -997
  747. package/lib/ruby/3.4.11/rdoc/task.rb +0 -354
  748. package/lib/ruby/3.4.11/rdoc/text.rb +0 -322
  749. package/lib/ruby/3.4.11/rdoc/token_stream.rb +0 -118
  750. package/lib/ruby/3.4.11/rdoc/tom_doc.rb +0 -257
  751. package/lib/ruby/3.4.11/rdoc/version.rb +0 -10
  752. package/lib/ruby/3.4.11/rdoc.rb +0 -211
  753. package/lib/ruby/3.4.11/readline.gemspec +0 -33
  754. package/lib/ruby/3.4.11/readline.rb +0 -7
  755. package/lib/ruby/3.4.11/reline/config.rb +0 -373
  756. package/lib/ruby/3.4.11/reline/face.rb +0 -199
  757. package/lib/ruby/3.4.11/reline/history.rb +0 -76
  758. package/lib/ruby/3.4.11/reline/io/ansi.rb +0 -325
  759. package/lib/ruby/3.4.11/reline/io/dumb.rb +0 -120
  760. package/lib/ruby/3.4.11/reline/io/windows.rb +0 -530
  761. package/lib/ruby/3.4.11/reline/io.rb +0 -55
  762. package/lib/ruby/3.4.11/reline/key_actor/base.rb +0 -37
  763. package/lib/ruby/3.4.11/reline/key_actor/composite.rb +0 -17
  764. package/lib/ruby/3.4.11/reline/key_actor/emacs.rb +0 -517
  765. package/lib/ruby/3.4.11/reline/key_actor/vi_command.rb +0 -518
  766. package/lib/ruby/3.4.11/reline/key_actor/vi_insert.rb +0 -517
  767. package/lib/ruby/3.4.11/reline/key_actor.rb +0 -8
  768. package/lib/ruby/3.4.11/reline/key_stroke.rb +0 -119
  769. package/lib/ruby/3.4.11/reline/kill_ring.rb +0 -125
  770. package/lib/ruby/3.4.11/reline/line_editor.rb +0 -2382
  771. package/lib/ruby/3.4.11/reline/reline.gemspec +0 -30
  772. package/lib/ruby/3.4.11/reline/unicode/east_asian_width.rb +0 -1267
  773. package/lib/ruby/3.4.11/reline/unicode.rb +0 -415
  774. package/lib/ruby/3.4.11/reline/version.rb +0 -3
  775. package/lib/ruby/3.4.11/reline.rb +0 -519
  776. package/lib/ruby/3.4.11/resolv.gemspec +0 -30
  777. package/lib/ruby/3.4.11/resolv.rb +0 -3587
  778. package/lib/ruby/3.4.11/ruby2_keywords.gemspec +0 -23
  779. package/lib/ruby/3.4.11/ruby_vm/rjit/.document +0 -1
  780. package/lib/ruby/3.4.11/ruby_vm/rjit/assembler.rb +0 -1160
  781. package/lib/ruby/3.4.11/ruby_vm/rjit/block.rb +0 -11
  782. package/lib/ruby/3.4.11/ruby_vm/rjit/branch_stub.rb +0 -24
  783. package/lib/ruby/3.4.11/ruby_vm/rjit/c_pointer.rb +0 -394
  784. package/lib/ruby/3.4.11/ruby_vm/rjit/c_type.rb +0 -99
  785. package/lib/ruby/3.4.11/ruby_vm/rjit/code_block.rb +0 -91
  786. package/lib/ruby/3.4.11/ruby_vm/rjit/compiler.rb +0 -518
  787. package/lib/ruby/3.4.11/ruby_vm/rjit/context.rb +0 -377
  788. package/lib/ruby/3.4.11/ruby_vm/rjit/entry_stub.rb +0 -7
  789. package/lib/ruby/3.4.11/ruby_vm/rjit/exit_compiler.rb +0 -164
  790. package/lib/ruby/3.4.11/ruby_vm/rjit/hooks.rb +0 -36
  791. package/lib/ruby/3.4.11/ruby_vm/rjit/insn_compiler.rb +0 -6046
  792. package/lib/ruby/3.4.11/ruby_vm/rjit/instruction.rb +0 -1326
  793. package/lib/ruby/3.4.11/ruby_vm/rjit/invariants.rb +0 -155
  794. package/lib/ruby/3.4.11/ruby_vm/rjit/jit_state.rb +0 -65
  795. package/lib/ruby/3.4.11/ruby_vm/rjit/stats.rb +0 -191
  796. package/lib/ruby/3.4.11/ruby_vm/rjit/type.rb +0 -221
  797. package/lib/ruby/3.4.11/rubygems/available_set.rb +0 -165
  798. package/lib/ruby/3.4.11/rubygems/basic_specification.rb +0 -383
  799. package/lib/ruby/3.4.11/rubygems/bundler_version_finder.rb +0 -77
  800. package/lib/ruby/3.4.11/rubygems/ci_detector.rb +0 -75
  801. package/lib/ruby/3.4.11/rubygems/command.rb +0 -664
  802. package/lib/ruby/3.4.11/rubygems/command_manager.rb +0 -255
  803. package/lib/ruby/3.4.11/rubygems/commands/build_command.rb +0 -127
  804. package/lib/ruby/3.4.11/rubygems/commands/cert_command.rb +0 -325
  805. package/lib/ruby/3.4.11/rubygems/commands/check_command.rb +0 -97
  806. package/lib/ruby/3.4.11/rubygems/commands/cleanup_command.rb +0 -178
  807. package/lib/ruby/3.4.11/rubygems/commands/contents_command.rb +0 -196
  808. package/lib/ruby/3.4.11/rubygems/commands/dependency_command.rb +0 -206
  809. package/lib/ruby/3.4.11/rubygems/commands/environment_command.rb +0 -181
  810. package/lib/ruby/3.4.11/rubygems/commands/exec_command.rb +0 -256
  811. package/lib/ruby/3.4.11/rubygems/commands/fetch_command.rb +0 -109
  812. package/lib/ruby/3.4.11/rubygems/commands/generate_index_command.rb +0 -51
  813. package/lib/ruby/3.4.11/rubygems/commands/help_command.rb +0 -375
  814. package/lib/ruby/3.4.11/rubygems/commands/info_command.rb +0 -38
  815. package/lib/ruby/3.4.11/rubygems/commands/install_command.rb +0 -269
  816. package/lib/ruby/3.4.11/rubygems/commands/list_command.rb +0 -42
  817. package/lib/ruby/3.4.11/rubygems/commands/lock_command.rb +0 -109
  818. package/lib/ruby/3.4.11/rubygems/commands/mirror_command.rb +0 -26
  819. package/lib/ruby/3.4.11/rubygems/commands/open_command.rb +0 -83
  820. package/lib/ruby/3.4.11/rubygems/commands/outdated_command.rb +0 -33
  821. package/lib/ruby/3.4.11/rubygems/commands/owner_command.rb +0 -124
  822. package/lib/ruby/3.4.11/rubygems/commands/pristine_command.rb +0 -217
  823. package/lib/ruby/3.4.11/rubygems/commands/push_command.rb +0 -135
  824. package/lib/ruby/3.4.11/rubygems/commands/query_command.rb +0 -43
  825. package/lib/ruby/3.4.11/rubygems/commands/rdoc_command.rb +0 -90
  826. package/lib/ruby/3.4.11/rubygems/commands/rebuild_command.rb +0 -262
  827. package/lib/ruby/3.4.11/rubygems/commands/search_command.rb +0 -41
  828. package/lib/ruby/3.4.11/rubygems/commands/server_command.rb +0 -26
  829. package/lib/ruby/3.4.11/rubygems/commands/setup_command.rb +0 -663
  830. package/lib/ruby/3.4.11/rubygems/commands/signin_command.rb +0 -34
  831. package/lib/ruby/3.4.11/rubygems/commands/signout_command.rb +0 -32
  832. package/lib/ruby/3.4.11/rubygems/commands/sources_command.rb +0 -227
  833. package/lib/ruby/3.4.11/rubygems/commands/specification_command.rb +0 -156
  834. package/lib/ruby/3.4.11/rubygems/commands/stale_command.rb +0 -40
  835. package/lib/ruby/3.4.11/rubygems/commands/uninstall_command.rb +0 -204
  836. package/lib/ruby/3.4.11/rubygems/commands/unpack_command.rb +0 -168
  837. package/lib/ruby/3.4.11/rubygems/commands/update_command.rb +0 -326
  838. package/lib/ruby/3.4.11/rubygems/commands/which_command.rb +0 -88
  839. package/lib/ruby/3.4.11/rubygems/commands/yank_command.rb +0 -99
  840. package/lib/ruby/3.4.11/rubygems/compatibility.rb +0 -41
  841. package/lib/ruby/3.4.11/rubygems/config_file.rb +0 -618
  842. package/lib/ruby/3.4.11/rubygems/core_ext/kernel_gem.rb +0 -68
  843. package/lib/ruby/3.4.11/rubygems/core_ext/kernel_require.rb +0 -149
  844. package/lib/ruby/3.4.11/rubygems/core_ext/kernel_warn.rb +0 -45
  845. package/lib/ruby/3.4.11/rubygems/core_ext/tcpsocket_init.rb +0 -54
  846. package/lib/ruby/3.4.11/rubygems/defaults.rb +0 -308
  847. package/lib/ruby/3.4.11/rubygems/dependency.rb +0 -348
  848. package/lib/ruby/3.4.11/rubygems/dependency_installer.rb +0 -335
  849. package/lib/ruby/3.4.11/rubygems/dependency_list.rb +0 -243
  850. package/lib/ruby/3.4.11/rubygems/deprecate.rb +0 -169
  851. package/lib/ruby/3.4.11/rubygems/doctor.rb +0 -132
  852. package/lib/ruby/3.4.11/rubygems/errors.rb +0 -177
  853. package/lib/ruby/3.4.11/rubygems/exceptions.rb +0 -293
  854. package/lib/ruby/3.4.11/rubygems/ext/build_error.rb +0 -9
  855. package/lib/ruby/3.4.11/rubygems/ext/builder.rb +0 -260
  856. package/lib/ruby/3.4.11/rubygems/ext/cargo_builder/link_flag_converter.rb +0 -27
  857. package/lib/ruby/3.4.11/rubygems/ext/cargo_builder.rb +0 -346
  858. package/lib/ruby/3.4.11/rubygems/ext/cmake_builder.rb +0 -21
  859. package/lib/ruby/3.4.11/rubygems/ext/configure_builder.rb +0 -26
  860. package/lib/ruby/3.4.11/rubygems/ext/ext_conf_builder.rb +0 -77
  861. package/lib/ruby/3.4.11/rubygems/ext/rake_builder.rb +0 -37
  862. package/lib/ruby/3.4.11/rubygems/ext.rb +0 -20
  863. package/lib/ruby/3.4.11/rubygems/gem_runner.rb +0 -89
  864. package/lib/ruby/3.4.11/rubygems/gemcutter_utilities/webauthn_listener/response.rb +0 -163
  865. package/lib/ruby/3.4.11/rubygems/gemcutter_utilities/webauthn_listener.rb +0 -105
  866. package/lib/ruby/3.4.11/rubygems/gemcutter_utilities/webauthn_poller.rb +0 -80
  867. package/lib/ruby/3.4.11/rubygems/gemcutter_utilities.rb +0 -397
  868. package/lib/ruby/3.4.11/rubygems/gemspec_helpers.rb +0 -19
  869. package/lib/ruby/3.4.11/rubygems/install_default_message.rb +0 -13
  870. package/lib/ruby/3.4.11/rubygems/install_message.rb +0 -13
  871. package/lib/ruby/3.4.11/rubygems/install_update_options.rb +0 -204
  872. package/lib/ruby/3.4.11/rubygems/installer.rb +0 -1031
  873. package/lib/ruby/3.4.11/rubygems/installer_uninstaller_utils.rb +0 -27
  874. package/lib/ruby/3.4.11/rubygems/local_remote_options.rb +0 -146
  875. package/lib/ruby/3.4.11/rubygems/name_tuple.rb +0 -119
  876. package/lib/ruby/3.4.11/rubygems/openssl.rb +0 -7
  877. package/lib/ruby/3.4.11/rubygems/package/digest_io.rb +0 -63
  878. package/lib/ruby/3.4.11/rubygems/package/file_source.rb +0 -32
  879. package/lib/ruby/3.4.11/rubygems/package/io_source.rb +0 -48
  880. package/lib/ruby/3.4.11/rubygems/package/old.rb +0 -169
  881. package/lib/ruby/3.4.11/rubygems/package/source.rb +0 -4
  882. package/lib/ruby/3.4.11/rubygems/package/tar_header.rb +0 -277
  883. package/lib/ruby/3.4.11/rubygems/package/tar_reader/entry.rb +0 -244
  884. package/lib/ruby/3.4.11/rubygems/package/tar_reader.rb +0 -101
  885. package/lib/ruby/3.4.11/rubygems/package/tar_writer.rb +0 -332
  886. package/lib/ruby/3.4.11/rubygems/package.rb +0 -742
  887. package/lib/ruby/3.4.11/rubygems/package_task.rb +0 -123
  888. package/lib/ruby/3.4.11/rubygems/path_support.rb +0 -85
  889. package/lib/ruby/3.4.11/rubygems/platform.rb +0 -269
  890. package/lib/ruby/3.4.11/rubygems/psych_tree.rb +0 -37
  891. package/lib/ruby/3.4.11/rubygems/query_utils.rb +0 -349
  892. package/lib/ruby/3.4.11/rubygems/rdoc.rb +0 -26
  893. package/lib/ruby/3.4.11/rubygems/remote_fetcher.rb +0 -341
  894. package/lib/ruby/3.4.11/rubygems/request/connection_pools.rb +0 -95
  895. package/lib/ruby/3.4.11/rubygems/request/http_pool.rb +0 -47
  896. package/lib/ruby/3.4.11/rubygems/request/https_pool.rb +0 -10
  897. package/lib/ruby/3.4.11/rubygems/request.rb +0 -298
  898. package/lib/ruby/3.4.11/rubygems/request_set/gem_dependency_api.rb +0 -841
  899. package/lib/ruby/3.4.11/rubygems/request_set/lockfile/parser.rb +0 -344
  900. package/lib/ruby/3.4.11/rubygems/request_set/lockfile/tokenizer.rb +0 -122
  901. package/lib/ruby/3.4.11/rubygems/request_set/lockfile.rb +0 -235
  902. package/lib/ruby/3.4.11/rubygems/request_set.rb +0 -468
  903. package/lib/ruby/3.4.11/rubygems/requirement.rb +0 -298
  904. package/lib/ruby/3.4.11/rubygems/resolver/activation_request.rb +0 -159
  905. package/lib/ruby/3.4.11/rubygems/resolver/api_set/gem_parser.rb +0 -21
  906. package/lib/ruby/3.4.11/rubygems/resolver/api_set.rb +0 -139
  907. package/lib/ruby/3.4.11/rubygems/resolver/api_specification.rb +0 -105
  908. package/lib/ruby/3.4.11/rubygems/resolver/best_set.rb +0 -49
  909. package/lib/ruby/3.4.11/rubygems/resolver/composed_set.rb +0 -65
  910. package/lib/ruby/3.4.11/rubygems/resolver/conflict.rb +0 -146
  911. package/lib/ruby/3.4.11/rubygems/resolver/current_set.rb +0 -12
  912. package/lib/ruby/3.4.11/rubygems/resolver/dependency_request.rb +0 -119
  913. package/lib/ruby/3.4.11/rubygems/resolver/git_set.rb +0 -120
  914. package/lib/ruby/3.4.11/rubygems/resolver/git_specification.rb +0 -57
  915. package/lib/ruby/3.4.11/rubygems/resolver/index_set.rb +0 -79
  916. package/lib/ruby/3.4.11/rubygems/resolver/index_specification.rb +0 -101
  917. package/lib/ruby/3.4.11/rubygems/resolver/installed_specification.rb +0 -57
  918. package/lib/ruby/3.4.11/rubygems/resolver/installer_set.rb +0 -271
  919. package/lib/ruby/3.4.11/rubygems/resolver/local_specification.rb +0 -40
  920. package/lib/ruby/3.4.11/rubygems/resolver/lock_set.rb +0 -81
  921. package/lib/ruby/3.4.11/rubygems/resolver/lock_specification.rb +0 -86
  922. package/lib/ruby/3.4.11/rubygems/resolver/requirement_list.rb +0 -82
  923. package/lib/ruby/3.4.11/rubygems/resolver/set.rb +0 -55
  924. package/lib/ruby/3.4.11/rubygems/resolver/source_set.rb +0 -47
  925. package/lib/ruby/3.4.11/rubygems/resolver/spec_specification.rb +0 -76
  926. package/lib/ruby/3.4.11/rubygems/resolver/specification.rb +0 -126
  927. package/lib/ruby/3.4.11/rubygems/resolver/stats.rb +0 -46
  928. package/lib/ruby/3.4.11/rubygems/resolver/vendor_set.rb +0 -86
  929. package/lib/ruby/3.4.11/rubygems/resolver/vendor_specification.rb +0 -23
  930. package/lib/ruby/3.4.11/rubygems/resolver.rb +0 -341
  931. package/lib/ruby/3.4.11/rubygems/s3_uri_signer.rb +0 -177
  932. package/lib/ruby/3.4.11/rubygems/safe_marshal/elements.rb +0 -146
  933. package/lib/ruby/3.4.11/rubygems/safe_marshal/reader.rb +0 -325
  934. package/lib/ruby/3.4.11/rubygems/safe_marshal/visitors/stream_printer.rb +0 -31
  935. package/lib/ruby/3.4.11/rubygems/safe_marshal/visitors/to_ruby.rb +0 -428
  936. package/lib/ruby/3.4.11/rubygems/safe_marshal/visitors/visitor.rb +0 -74
  937. package/lib/ruby/3.4.11/rubygems/safe_marshal.rb +0 -74
  938. package/lib/ruby/3.4.11/rubygems/safe_yaml.rb +0 -45
  939. package/lib/ruby/3.4.11/rubygems/security/policies.rb +0 -114
  940. package/lib/ruby/3.4.11/rubygems/security/policy.rb +0 -288
  941. package/lib/ruby/3.4.11/rubygems/security/signer.rb +0 -212
  942. package/lib/ruby/3.4.11/rubygems/security/trust_dir.rb +0 -117
  943. package/lib/ruby/3.4.11/rubygems/security.rb +0 -615
  944. package/lib/ruby/3.4.11/rubygems/security_option.rb +0 -43
  945. package/lib/ruby/3.4.11/rubygems/source/git.rb +0 -244
  946. package/lib/ruby/3.4.11/rubygems/source/installed.rb +0 -39
  947. package/lib/ruby/3.4.11/rubygems/source/local.rb +0 -131
  948. package/lib/ruby/3.4.11/rubygems/source/lock.rb +0 -49
  949. package/lib/ruby/3.4.11/rubygems/source/specific_file.rb +0 -73
  950. package/lib/ruby/3.4.11/rubygems/source/vendor.rb +0 -24
  951. package/lib/ruby/3.4.11/rubygems/source.rb +0 -247
  952. package/lib/ruby/3.4.11/rubygems/source_list.rb +0 -146
  953. package/lib/ruby/3.4.11/rubygems/spec_fetcher.rb +0 -290
  954. package/lib/ruby/3.4.11/rubygems/specification.rb +0 -2666
  955. package/lib/ruby/3.4.11/rubygems/specification_policy.rb +0 -558
  956. package/lib/ruby/3.4.11/rubygems/specification_record.rb +0 -212
  957. package/lib/ruby/3.4.11/rubygems/ssl_certs/.document +0 -1
  958. package/lib/ruby/3.4.11/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA.pem +0 -21
  959. package/lib/ruby/3.4.11/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem +0 -21
  960. package/lib/ruby/3.4.11/rubygems/stub_specification.rb +0 -235
  961. package/lib/ruby/3.4.11/rubygems/target_rbconfig.rb +0 -50
  962. package/lib/ruby/3.4.11/rubygems/text.rb +0 -85
  963. package/lib/ruby/3.4.11/rubygems/uninstaller.rb +0 -429
  964. package/lib/ruby/3.4.11/rubygems/unknown_command_spell_checker.rb +0 -21
  965. package/lib/ruby/3.4.11/rubygems/update_suggestion.rb +0 -56
  966. package/lib/ruby/3.4.11/rubygems/uri.rb +0 -126
  967. package/lib/ruby/3.4.11/rubygems/uri_formatter.rb +0 -47
  968. package/lib/ruby/3.4.11/rubygems/user_interaction.rb +0 -650
  969. package/lib/ruby/3.4.11/rubygems/util/licenses.rb +0 -834
  970. package/lib/ruby/3.4.11/rubygems/util/list.rb +0 -40
  971. package/lib/ruby/3.4.11/rubygems/util.rb +0 -118
  972. package/lib/ruby/3.4.11/rubygems/validator.rb +0 -144
  973. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/.document +0 -1
  974. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +0 -57
  975. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +0 -88
  976. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/action.rb +0 -36
  977. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +0 -66
  978. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +0 -62
  979. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +0 -63
  980. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +0 -61
  981. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +0 -126
  982. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +0 -46
  983. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +0 -36
  984. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +0 -164
  985. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph.rb +0 -255
  986. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/errors.rb +0 -149
  987. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/gem_metadata.rb +0 -6
  988. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +0 -112
  989. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/modules/ui.rb +0 -67
  990. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/resolution.rb +0 -839
  991. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/resolver.rb +0 -46
  992. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/state.rb +0 -58
  993. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo.rb +0 -11
  994. package/lib/ruby/3.4.11/rubygems/vendor/net-http/.document +0 -1
  995. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/exceptions.rb +0 -34
  996. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/generic_request.rb +0 -414
  997. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/header.rb +0 -981
  998. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/proxy_delta.rb +0 -17
  999. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/request.rb +0 -88
  1000. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/requests.rb +0 -430
  1001. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/response.rb +0 -738
  1002. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/responses.rb +0 -1174
  1003. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/status.rb +0 -84
  1004. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http.rb +0 -2580
  1005. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/https.rb +0 -23
  1006. package/lib/ruby/3.4.11/rubygems/vendor/net-protocol/.document +0 -1
  1007. package/lib/ruby/3.4.11/rubygems/vendor/net-protocol/lib/net/protocol.rb +0 -544
  1008. package/lib/ruby/3.4.11/rubygems/vendor/optparse/.document +0 -1
  1009. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optionparser.rb +0 -2
  1010. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/ac.rb +0 -70
  1011. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/date.rb +0 -18
  1012. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/kwargs.rb +0 -27
  1013. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/shellwords.rb +0 -7
  1014. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/time.rb +0 -11
  1015. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/uri.rb +0 -7
  1016. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/version.rb +0 -80
  1017. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse.rb +0 -2426
  1018. package/lib/ruby/3.4.11/rubygems/vendor/resolv/.document +0 -1
  1019. package/lib/ruby/3.4.11/rubygems/vendor/resolv/lib/resolv.rb +0 -3455
  1020. package/lib/ruby/3.4.11/rubygems/vendor/securerandom/.document +0 -1
  1021. package/lib/ruby/3.4.11/rubygems/vendor/securerandom/lib/securerandom.rb +0 -102
  1022. package/lib/ruby/3.4.11/rubygems/vendor/timeout/.document +0 -1
  1023. package/lib/ruby/3.4.11/rubygems/vendor/timeout/lib/timeout.rb +0 -198
  1024. package/lib/ruby/3.4.11/rubygems/vendor/tsort/.document +0 -1
  1025. package/lib/ruby/3.4.11/rubygems/vendor/tsort/lib/tsort.rb +0 -455
  1026. package/lib/ruby/3.4.11/rubygems/vendor/uri/.document +0 -1
  1027. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/common.rb +0 -880
  1028. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/file.rb +0 -100
  1029. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/ftp.rb +0 -267
  1030. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/generic.rb +0 -1592
  1031. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/http.rb +0 -125
  1032. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/https.rb +0 -23
  1033. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/ldap.rb +0 -261
  1034. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/ldaps.rb +0 -22
  1035. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/mailto.rb +0 -293
  1036. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/rfc2396_parser.rb +0 -546
  1037. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/rfc3986_parser.rb +0 -206
  1038. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/version.rb +0 -6
  1039. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/ws.rb +0 -83
  1040. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/wss.rb +0 -23
  1041. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri.rb +0 -104
  1042. package/lib/ruby/3.4.11/rubygems/vendored_molinillo.rb +0 -3
  1043. package/lib/ruby/3.4.11/rubygems/vendored_net_http.rb +0 -5
  1044. package/lib/ruby/3.4.11/rubygems/vendored_optparse.rb +0 -3
  1045. package/lib/ruby/3.4.11/rubygems/vendored_securerandom.rb +0 -3
  1046. package/lib/ruby/3.4.11/rubygems/vendored_timeout.rb +0 -5
  1047. package/lib/ruby/3.4.11/rubygems/vendored_tsort.rb +0 -3
  1048. package/lib/ruby/3.4.11/rubygems/version.rb +0 -441
  1049. package/lib/ruby/3.4.11/rubygems/version_option.rb +0 -80
  1050. package/lib/ruby/3.4.11/rubygems/yaml_serializer.rb +0 -98
  1051. package/lib/ruby/3.4.11/rubygems.rb +0 -1417
  1052. package/lib/ruby/3.4.11/securerandom.gemspec +0 -34
  1053. package/lib/ruby/3.4.11/securerandom.rb +0 -102
  1054. package/lib/ruby/3.4.11/set/set.gemspec +0 -30
  1055. package/lib/ruby/3.4.11/set/sorted_set.rb +0 -6
  1056. package/lib/ruby/3.4.11/set.rb +0 -855
  1057. package/lib/ruby/3.4.11/shellwords.gemspec +0 -31
  1058. package/lib/ruby/3.4.11/shellwords.rb +0 -254
  1059. package/lib/ruby/3.4.11/singleton.gemspec +0 -30
  1060. package/lib/ruby/3.4.11/singleton.rb +0 -239
  1061. package/lib/ruby/3.4.11/syntax_suggest/api.rb +0 -233
  1062. package/lib/ruby/3.4.11/syntax_suggest/around_block_scan.rb +0 -232
  1063. package/lib/ruby/3.4.11/syntax_suggest/block_expand.rb +0 -165
  1064. package/lib/ruby/3.4.11/syntax_suggest/capture/before_after_keyword_ends.rb +0 -85
  1065. package/lib/ruby/3.4.11/syntax_suggest/capture/falling_indent_lines.rb +0 -71
  1066. package/lib/ruby/3.4.11/syntax_suggest/capture_code_context.rb +0 -245
  1067. package/lib/ruby/3.4.11/syntax_suggest/clean_document.rb +0 -306
  1068. package/lib/ruby/3.4.11/syntax_suggest/cli.rb +0 -130
  1069. package/lib/ruby/3.4.11/syntax_suggest/code_block.rb +0 -100
  1070. package/lib/ruby/3.4.11/syntax_suggest/code_frontier.rb +0 -178
  1071. package/lib/ruby/3.4.11/syntax_suggest/code_line.rb +0 -243
  1072. package/lib/ruby/3.4.11/syntax_suggest/code_search.rb +0 -139
  1073. package/lib/ruby/3.4.11/syntax_suggest/core_ext.rb +0 -96
  1074. package/lib/ruby/3.4.11/syntax_suggest/display_code_with_line_numbers.rb +0 -70
  1075. package/lib/ruby/3.4.11/syntax_suggest/display_invalid_blocks.rb +0 -83
  1076. package/lib/ruby/3.4.11/syntax_suggest/explain_syntax.rb +0 -117
  1077. package/lib/ruby/3.4.11/syntax_suggest/left_right_lex_count.rb +0 -168
  1078. package/lib/ruby/3.4.11/syntax_suggest/lex_all.rb +0 -74
  1079. package/lib/ruby/3.4.11/syntax_suggest/lex_value.rb +0 -70
  1080. package/lib/ruby/3.4.11/syntax_suggest/mini_stringio.rb +0 -30
  1081. package/lib/ruby/3.4.11/syntax_suggest/parse_blocks_from_indent_line.rb +0 -60
  1082. package/lib/ruby/3.4.11/syntax_suggest/pathname_from_message.rb +0 -59
  1083. package/lib/ruby/3.4.11/syntax_suggest/priority_engulf_queue.rb +0 -63
  1084. package/lib/ruby/3.4.11/syntax_suggest/priority_queue.rb +0 -105
  1085. package/lib/ruby/3.4.11/syntax_suggest/ripper_errors.rb +0 -39
  1086. package/lib/ruby/3.4.11/syntax_suggest/scan_history.rb +0 -134
  1087. package/lib/ruby/3.4.11/syntax_suggest/syntax_suggest.gemspec +0 -32
  1088. package/lib/ruby/3.4.11/syntax_suggest/unvisited_lines.rb +0 -36
  1089. package/lib/ruby/3.4.11/syntax_suggest/version.rb +0 -5
  1090. package/lib/ruby/3.4.11/syntax_suggest.rb +0 -3
  1091. package/lib/ruby/3.4.11/tempfile.gemspec +0 -33
  1092. package/lib/ruby/3.4.11/tempfile.rb +0 -640
  1093. package/lib/ruby/3.4.11/time.gemspec +0 -35
  1094. package/lib/ruby/3.4.11/time.rb +0 -731
  1095. package/lib/ruby/3.4.11/timeout.gemspec +0 -33
  1096. package/lib/ruby/3.4.11/timeout.rb +0 -200
  1097. package/lib/ruby/3.4.11/tmpdir.gemspec +0 -30
  1098. package/lib/ruby/3.4.11/tmpdir.rb +0 -189
  1099. package/lib/ruby/3.4.11/tsort.gemspec +0 -29
  1100. package/lib/ruby/3.4.11/tsort.rb +0 -455
  1101. package/lib/ruby/3.4.11/un.gemspec +0 -31
  1102. package/lib/ruby/3.4.11/un.rb +0 -441
  1103. package/lib/ruby/3.4.11/unicode_normalize/normalize.rb +0 -181
  1104. package/lib/ruby/3.4.11/unicode_normalize/tables.rb +0 -9259
  1105. package/lib/ruby/3.4.11/uri/common.rb +0 -880
  1106. package/lib/ruby/3.4.11/uri/file.rb +0 -100
  1107. package/lib/ruby/3.4.11/uri/ftp.rb +0 -267
  1108. package/lib/ruby/3.4.11/uri/generic.rb +0 -1592
  1109. package/lib/ruby/3.4.11/uri/http.rb +0 -125
  1110. package/lib/ruby/3.4.11/uri/https.rb +0 -23
  1111. package/lib/ruby/3.4.11/uri/ldap.rb +0 -261
  1112. package/lib/ruby/3.4.11/uri/ldaps.rb +0 -22
  1113. package/lib/ruby/3.4.11/uri/mailto.rb +0 -293
  1114. package/lib/ruby/3.4.11/uri/rfc2396_parser.rb +0 -546
  1115. package/lib/ruby/3.4.11/uri/rfc3986_parser.rb +0 -206
  1116. package/lib/ruby/3.4.11/uri/uri.gemspec +0 -42
  1117. package/lib/ruby/3.4.11/uri/version.rb +0 -6
  1118. package/lib/ruby/3.4.11/uri/ws.rb +0 -83
  1119. package/lib/ruby/3.4.11/uri/wss.rb +0 -23
  1120. package/lib/ruby/3.4.11/uri.rb +0 -104
  1121. package/lib/ruby/3.4.11/weakref.gemspec +0 -34
  1122. package/lib/ruby/3.4.11/weakref.rb +0 -58
  1123. package/lib/ruby/3.4.11/yaml/dbm.rb +0 -295
  1124. package/lib/ruby/3.4.11/yaml/store.rb +0 -98
  1125. package/lib/ruby/3.4.11/yaml/yaml.gemspec +0 -30
  1126. package/lib/ruby/3.4.11/yaml.rb +0 -70
@@ -1,2580 +0,0 @@
1
- # frozen_string_literal: true
2
- #
3
- # = net/http.rb
4
- #
5
- # Copyright (c) 1999-2007 Yukihiro Matsumoto
6
- # Copyright (c) 1999-2007 Minero Aoki
7
- # Copyright (c) 2001 GOTOU Yuuzou
8
- #
9
- # Written and maintained by Minero Aoki <aamine@loveruby.net>.
10
- # HTTPS support added by GOTOU Yuuzou <gotoyuzo@notwork.org>.
11
- #
12
- # This file is derived from "http-access.rb".
13
- #
14
- # Documented by Minero Aoki; converted to RDoc by William Webber.
15
- #
16
- # This program is free software. You can re-distribute and/or
17
- # modify this program under the same terms of ruby itself ---
18
- # Ruby Distribution License or GNU General Public License.
19
- #
20
- # See Gem::Net::HTTP for an overview and examples.
21
- #
22
-
23
- require_relative '../../../net-protocol/lib/net/protocol'
24
- require_relative '../../../uri/lib/uri'
25
- require_relative '../../../resolv/lib/resolv'
26
- autoload :OpenSSL, 'openssl'
27
-
28
- module Gem::Net #:nodoc:
29
-
30
- # :stopdoc:
31
- class HTTPBadResponse < StandardError; end
32
- class HTTPHeaderSyntaxError < StandardError; end
33
- # :startdoc:
34
-
35
- # \Class \Gem::Net::HTTP provides a rich library that implements the client
36
- # in a client-server model that uses the \HTTP request-response protocol.
37
- # For information about \HTTP, see:
38
- #
39
- # - {Hypertext Transfer Protocol}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol].
40
- # - {Technical overview}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Technical_overview].
41
- #
42
- # == About the Examples
43
- #
44
- # :include: doc/net-http/examples.rdoc
45
- #
46
- # == Strategies
47
- #
48
- # - If you will make only a few GET requests,
49
- # consider using {OpenURI}[rdoc-ref:OpenURI].
50
- # - If you will make only a few requests of all kinds,
51
- # consider using the various singleton convenience methods in this class.
52
- # Each of the following methods automatically starts and finishes
53
- # a {session}[rdoc-ref:Gem::Net::HTTP@Sessions] that sends a single request:
54
- #
55
- # # Return string response body.
56
- # Gem::Net::HTTP.get(hostname, path)
57
- # Gem::Net::HTTP.get(uri)
58
- #
59
- # # Write string response body to $stdout.
60
- # Gem::Net::HTTP.get_print(hostname, path)
61
- # Gem::Net::HTTP.get_print(uri)
62
- #
63
- # # Return response as Gem::Net::HTTPResponse object.
64
- # Gem::Net::HTTP.get_response(hostname, path)
65
- # Gem::Net::HTTP.get_response(uri)
66
- # data = '{"title": "foo", "body": "bar", "userId": 1}'
67
- # Gem::Net::HTTP.post(uri, data)
68
- # params = {title: 'foo', body: 'bar', userId: 1}
69
- # Gem::Net::HTTP.post_form(uri, params)
70
- # data = '{"title": "foo", "body": "bar", "userId": 1}'
71
- # Gem::Net::HTTP.put(uri, data)
72
- #
73
- # - If performance is important, consider using sessions, which lower request overhead.
74
- # This {session}[rdoc-ref:Gem::Net::HTTP@Sessions] has multiple requests for
75
- # {HTTP methods}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods]
76
- # and {WebDAV methods}[https://en.wikipedia.org/wiki/WebDAV#Implementation]:
77
- #
78
- # Gem::Net::HTTP.start(hostname) do |http|
79
- # # Session started automatically before block execution.
80
- # http.get(path)
81
- # http.head(path)
82
- # body = 'Some text'
83
- # http.post(path, body) # Can also have a block.
84
- # http.put(path, body)
85
- # http.delete(path)
86
- # http.options(path)
87
- # http.trace(path)
88
- # http.patch(path, body) # Can also have a block.
89
- # http.copy(path)
90
- # http.lock(path, body)
91
- # http.mkcol(path, body)
92
- # http.move(path)
93
- # http.propfind(path, body)
94
- # http.proppatch(path, body)
95
- # http.unlock(path, body)
96
- # # Session finished automatically at block exit.
97
- # end
98
- #
99
- # The methods cited above are convenience methods that, via their few arguments,
100
- # allow minimal control over the requests.
101
- # For greater control, consider using {request objects}[rdoc-ref:Gem::Net::HTTPRequest].
102
- #
103
- # == URIs
104
- #
105
- # On the internet, a URI
106
- # ({Universal Resource Identifier}[https://en.wikipedia.org/wiki/Uniform_Resource_Identifier])
107
- # is a string that identifies a particular resource.
108
- # It consists of some or all of: scheme, hostname, path, query, and fragment;
109
- # see {URI syntax}[https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#Syntax].
110
- #
111
- # A Ruby {Gem::URI::Generic}[rdoc-ref:Gem::URI::Generic] object
112
- # represents an internet URI.
113
- # It provides, among others, methods
114
- # +scheme+, +hostname+, +path+, +query+, and +fragment+.
115
- #
116
- # === Schemes
117
- #
118
- # An internet \Gem::URI has
119
- # a {scheme}[https://en.wikipedia.org/wiki/List_of_URI_schemes].
120
- #
121
- # The two schemes supported in \Gem::Net::HTTP are <tt>'https'</tt> and <tt>'http'</tt>:
122
- #
123
- # uri.scheme # => "https"
124
- # Gem::URI('http://example.com').scheme # => "http"
125
- #
126
- # === Hostnames
127
- #
128
- # A hostname identifies a server (host) to which requests may be sent:
129
- #
130
- # hostname = uri.hostname # => "jsonplaceholder.typicode.com"
131
- # Gem::Net::HTTP.start(hostname) do |http|
132
- # # Some HTTP stuff.
133
- # end
134
- #
135
- # === Paths
136
- #
137
- # A host-specific path identifies a resource on the host:
138
- #
139
- # _uri = uri.dup
140
- # _uri.path = '/todos/1'
141
- # hostname = _uri.hostname
142
- # path = _uri.path
143
- # Gem::Net::HTTP.get(hostname, path)
144
- #
145
- # === Queries
146
- #
147
- # A host-specific query adds name/value pairs to the URI:
148
- #
149
- # _uri = uri.dup
150
- # params = {userId: 1, completed: false}
151
- # _uri.query = Gem::URI.encode_www_form(params)
152
- # _uri # => #<Gem::URI::HTTPS https://jsonplaceholder.typicode.com?userId=1&completed=false>
153
- # Gem::Net::HTTP.get(_uri)
154
- #
155
- # === Fragments
156
- #
157
- # A {URI fragment}[https://en.wikipedia.org/wiki/URI_fragment] has no effect
158
- # in \Gem::Net::HTTP;
159
- # the same data is returned, regardless of whether a fragment is included.
160
- #
161
- # == Request Headers
162
- #
163
- # Request headers may be used to pass additional information to the host,
164
- # similar to arguments passed in a method call;
165
- # each header is a name/value pair.
166
- #
167
- # Each of the \Gem::Net::HTTP methods that sends a request to the host
168
- # has optional argument +headers+,
169
- # where the headers are expressed as a hash of field-name/value pairs:
170
- #
171
- # headers = {Accept: 'application/json', Connection: 'Keep-Alive'}
172
- # Gem::Net::HTTP.get(uri, headers)
173
- #
174
- # See lists of both standard request fields and common request fields at
175
- # {Request Fields}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Request_fields].
176
- # A host may also accept other custom fields.
177
- #
178
- # == \HTTP Sessions
179
- #
180
- # A _session_ is a connection between a server (host) and a client that:
181
- #
182
- # - Is begun by instance method Gem::Net::HTTP#start.
183
- # - May contain any number of requests.
184
- # - Is ended by instance method Gem::Net::HTTP#finish.
185
- #
186
- # See example sessions at {Strategies}[rdoc-ref:Gem::Net::HTTP@Strategies].
187
- #
188
- # === Session Using \Gem::Net::HTTP.start
189
- #
190
- # If you have many requests to make to a single host (and port),
191
- # consider using singleton method Gem::Net::HTTP.start with a block;
192
- # the method handles the session automatically by:
193
- #
194
- # - Calling #start before block execution.
195
- # - Executing the block.
196
- # - Calling #finish after block execution.
197
- #
198
- # In the block, you can use these instance methods,
199
- # each of which that sends a single request:
200
- #
201
- # - {HTTP methods}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods]:
202
- #
203
- # - #get, #request_get: GET.
204
- # - #head, #request_head: HEAD.
205
- # - #post, #request_post: POST.
206
- # - #delete: DELETE.
207
- # - #options: OPTIONS.
208
- # - #trace: TRACE.
209
- # - #patch: PATCH.
210
- #
211
- # - {WebDAV methods}[https://en.wikipedia.org/wiki/WebDAV#Implementation]:
212
- #
213
- # - #copy: COPY.
214
- # - #lock: LOCK.
215
- # - #mkcol: MKCOL.
216
- # - #move: MOVE.
217
- # - #propfind: PROPFIND.
218
- # - #proppatch: PROPPATCH.
219
- # - #unlock: UNLOCK.
220
- #
221
- # === Session Using \Gem::Net::HTTP.start and \Gem::Net::HTTP.finish
222
- #
223
- # You can manage a session manually using methods #start and #finish:
224
- #
225
- # http = Gem::Net::HTTP.new(hostname)
226
- # http.start
227
- # http.get('/todos/1')
228
- # http.get('/todos/2')
229
- # http.delete('/posts/1')
230
- # http.finish # Needed to free resources.
231
- #
232
- # === Single-Request Session
233
- #
234
- # Certain convenience methods automatically handle a session by:
235
- #
236
- # - Creating an \HTTP object
237
- # - Starting a session.
238
- # - Sending a single request.
239
- # - Finishing the session.
240
- # - Destroying the object.
241
- #
242
- # Such methods that send GET requests:
243
- #
244
- # - ::get: Returns the string response body.
245
- # - ::get_print: Writes the string response body to $stdout.
246
- # - ::get_response: Returns a Gem::Net::HTTPResponse object.
247
- #
248
- # Such methods that send POST requests:
249
- #
250
- # - ::post: Posts data to the host.
251
- # - ::post_form: Posts form data to the host.
252
- #
253
- # == \HTTP Requests and Responses
254
- #
255
- # Many of the methods above are convenience methods,
256
- # each of which sends a request and returns a string
257
- # without directly using \Gem::Net::HTTPRequest and \Gem::Net::HTTPResponse objects.
258
- #
259
- # You can, however, directly create a request object, send the request,
260
- # and retrieve the response object; see:
261
- #
262
- # - Gem::Net::HTTPRequest.
263
- # - Gem::Net::HTTPResponse.
264
- #
265
- # == Following Redirection
266
- #
267
- # Each returned response is an instance of a subclass of Gem::Net::HTTPResponse.
268
- # See the {response class hierarchy}[rdoc-ref:Gem::Net::HTTPResponse@Response+Subclasses].
269
- #
270
- # In particular, class Gem::Net::HTTPRedirection is the parent
271
- # of all redirection classes.
272
- # This allows you to craft a case statement to handle redirections properly:
273
- #
274
- # def fetch(uri, limit = 10)
275
- # # You should choose a better exception.
276
- # raise ArgumentError, 'Too many HTTP redirects' if limit == 0
277
- #
278
- # res = Gem::Net::HTTP.get_response(Gem::URI(uri))
279
- # case res
280
- # when Gem::Net::HTTPSuccess # Any success class.
281
- # res
282
- # when Gem::Net::HTTPRedirection # Any redirection class.
283
- # location = res['Location']
284
- # warn "Redirected to #{location}"
285
- # fetch(location, limit - 1)
286
- # else # Any other class.
287
- # res.value
288
- # end
289
- # end
290
- #
291
- # fetch(uri)
292
- #
293
- # == Basic Authentication
294
- #
295
- # Basic authentication is performed according to
296
- # {RFC2617}[http://www.ietf.org/rfc/rfc2617.txt]:
297
- #
298
- # req = Gem::Net::HTTP::Get.new(uri)
299
- # req.basic_auth('user', 'pass')
300
- # res = Gem::Net::HTTP.start(hostname) do |http|
301
- # http.request(req)
302
- # end
303
- #
304
- # == Streaming Response Bodies
305
- #
306
- # By default \Gem::Net::HTTP reads an entire response into memory. If you are
307
- # handling large files or wish to implement a progress bar you can instead
308
- # stream the body directly to an IO.
309
- #
310
- # Gem::Net::HTTP.start(hostname) do |http|
311
- # req = Gem::Net::HTTP::Get.new(uri)
312
- # http.request(req) do |res|
313
- # open('t.tmp', 'w') do |f|
314
- # res.read_body do |chunk|
315
- # f.write chunk
316
- # end
317
- # end
318
- # end
319
- # end
320
- #
321
- # == HTTPS
322
- #
323
- # HTTPS is enabled for an \HTTP connection by Gem::Net::HTTP#use_ssl=:
324
- #
325
- # Gem::Net::HTTP.start(hostname, :use_ssl => true) do |http|
326
- # req = Gem::Net::HTTP::Get.new(uri)
327
- # res = http.request(req)
328
- # end
329
- #
330
- # Or if you simply want to make a GET request, you may pass in a URI
331
- # object that has an \HTTPS URL. \Gem::Net::HTTP automatically turns on TLS
332
- # verification if the URI object has a 'https' :URI scheme:
333
- #
334
- # uri # => #<Gem::URI::HTTPS https://jsonplaceholder.typicode.com/>
335
- # Gem::Net::HTTP.get(uri)
336
- #
337
- # == Proxy Server
338
- #
339
- # An \HTTP object can have
340
- # a {proxy server}[https://en.wikipedia.org/wiki/Proxy_server].
341
- #
342
- # You can create an \HTTP object with a proxy server
343
- # using method Gem::Net::HTTP.new or method Gem::Net::HTTP.start.
344
- #
345
- # The proxy may be defined either by argument +p_addr+
346
- # or by environment variable <tt>'http_proxy'</tt>.
347
- #
348
- # === Proxy Using Argument +p_addr+ as a \String
349
- #
350
- # When argument +p_addr+ is a string hostname,
351
- # the returned +http+ has the given host as its proxy:
352
- #
353
- # http = Gem::Net::HTTP.new(hostname, nil, 'proxy.example')
354
- # http.proxy? # => true
355
- # http.proxy_from_env? # => false
356
- # http.proxy_address # => "proxy.example"
357
- # # These use default values.
358
- # http.proxy_port # => 80
359
- # http.proxy_user # => nil
360
- # http.proxy_pass # => nil
361
- #
362
- # The port, username, and password for the proxy may also be given:
363
- #
364
- # http = Gem::Net::HTTP.new(hostname, nil, 'proxy.example', 8000, 'pname', 'ppass')
365
- # # => #<Gem::Net::HTTP jsonplaceholder.typicode.com:80 open=false>
366
- # http.proxy? # => true
367
- # http.proxy_from_env? # => false
368
- # http.proxy_address # => "proxy.example"
369
- # http.proxy_port # => 8000
370
- # http.proxy_user # => "pname"
371
- # http.proxy_pass # => "ppass"
372
- #
373
- # === Proxy Using '<tt>ENV['http_proxy']</tt>'
374
- #
375
- # When environment variable <tt>'http_proxy'</tt>
376
- # is set to a \Gem::URI string,
377
- # the returned +http+ will have the server at that URI as its proxy;
378
- # note that the \Gem::URI string must have a protocol
379
- # such as <tt>'http'</tt> or <tt>'https'</tt>:
380
- #
381
- # ENV['http_proxy'] = 'http://example.com'
382
- # http = Gem::Net::HTTP.new(hostname)
383
- # http.proxy? # => true
384
- # http.proxy_from_env? # => true
385
- # http.proxy_address # => "example.com"
386
- # # These use default values.
387
- # http.proxy_port # => 80
388
- # http.proxy_user # => nil
389
- # http.proxy_pass # => nil
390
- #
391
- # The \Gem::URI string may include proxy username, password, and port number:
392
- #
393
- # ENV['http_proxy'] = 'http://pname:ppass@example.com:8000'
394
- # http = Gem::Net::HTTP.new(hostname)
395
- # http.proxy? # => true
396
- # http.proxy_from_env? # => true
397
- # http.proxy_address # => "example.com"
398
- # http.proxy_port # => 8000
399
- # http.proxy_user # => "pname"
400
- # http.proxy_pass # => "ppass"
401
- #
402
- # === Filtering Proxies
403
- #
404
- # With method Gem::Net::HTTP.new (but not Gem::Net::HTTP.start),
405
- # you can use argument +p_no_proxy+ to filter proxies:
406
- #
407
- # - Reject a certain address:
408
- #
409
- # http = Gem::Net::HTTP.new('example.com', nil, 'proxy.example', 8000, 'pname', 'ppass', 'proxy.example')
410
- # http.proxy_address # => nil
411
- #
412
- # - Reject certain domains or subdomains:
413
- #
414
- # http = Gem::Net::HTTP.new('example.com', nil, 'my.proxy.example', 8000, 'pname', 'ppass', 'proxy.example')
415
- # http.proxy_address # => nil
416
- #
417
- # - Reject certain addresses and port combinations:
418
- #
419
- # http = Gem::Net::HTTP.new('example.com', nil, 'proxy.example', 8000, 'pname', 'ppass', 'proxy.example:1234')
420
- # http.proxy_address # => "proxy.example"
421
- #
422
- # http = Gem::Net::HTTP.new('example.com', nil, 'proxy.example', 8000, 'pname', 'ppass', 'proxy.example:8000')
423
- # http.proxy_address # => nil
424
- #
425
- # - Reject a list of the types above delimited using a comma:
426
- #
427
- # http = Gem::Net::HTTP.new('example.com', nil, 'proxy.example', 8000, 'pname', 'ppass', 'my.proxy,proxy.example:8000')
428
- # http.proxy_address # => nil
429
- #
430
- # http = Gem::Net::HTTP.new('example.com', nil, 'my.proxy', 8000, 'pname', 'ppass', 'my.proxy,proxy.example:8000')
431
- # http.proxy_address # => nil
432
- #
433
- # == Compression and Decompression
434
- #
435
- # \Gem::Net::HTTP does not compress the body of a request before sending.
436
- #
437
- # By default, \Gem::Net::HTTP adds header <tt>'Accept-Encoding'</tt>
438
- # to a new {request object}[rdoc-ref:Gem::Net::HTTPRequest]:
439
- #
440
- # Gem::Net::HTTP::Get.new(uri)['Accept-Encoding']
441
- # # => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
442
- #
443
- # This requests the server to zip-encode the response body if there is one;
444
- # the server is not required to do so.
445
- #
446
- # \Gem::Net::HTTP does not automatically decompress a response body
447
- # if the response has header <tt>'Content-Range'</tt>.
448
- #
449
- # Otherwise decompression (or not) depends on the value of header
450
- # {Content-Encoding}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-encoding-response-header]:
451
- #
452
- # - <tt>'deflate'</tt>, <tt>'gzip'</tt>, or <tt>'x-gzip'</tt>:
453
- # decompresses the body and deletes the header.
454
- # - <tt>'none'</tt> or <tt>'identity'</tt>:
455
- # does not decompress the body, but deletes the header.
456
- # - Any other value:
457
- # leaves the body and header unchanged.
458
- #
459
- # == What's Here
460
- #
461
- # First, what's elsewhere. Class Gem::Net::HTTP:
462
- #
463
- # - Inherits from {class Object}[rdoc-ref:Object@What-27s+Here].
464
- #
465
- # This is a categorized summary of methods and attributes.
466
- #
467
- # === \Gem::Net::HTTP Objects
468
- #
469
- # - {::new}[rdoc-ref:Gem::Net::HTTP.new]:
470
- # Creates a new instance.
471
- # - {#inspect}[rdoc-ref:Gem::Net::HTTP#inspect]:
472
- # Returns a string representation of +self+.
473
- #
474
- # === Sessions
475
- #
476
- # - {::start}[rdoc-ref:Gem::Net::HTTP.start]:
477
- # Begins a new session in a new \Gem::Net::HTTP object.
478
- # - {#started?}[rdoc-ref:Gem::Net::HTTP#started?]
479
- # (aliased as {#active?}[rdoc-ref:Gem::Net::HTTP#active?]):
480
- # Returns whether in a session.
481
- # - {#finish}[rdoc-ref:Gem::Net::HTTP#finish]:
482
- # Ends an active session.
483
- # - {#start}[rdoc-ref:Gem::Net::HTTP#start]:
484
- # Begins a new session in an existing \Gem::Net::HTTP object (+self+).
485
- #
486
- # === Connections
487
- #
488
- # - {:continue_timeout}[rdoc-ref:Gem::Net::HTTP#continue_timeout]:
489
- # Returns the continue timeout.
490
- # - {#continue_timeout=}[rdoc-ref:Gem::Net::HTTP#continue_timeout=]:
491
- # Sets the continue timeout seconds.
492
- # - {:keep_alive_timeout}[rdoc-ref:Gem::Net::HTTP#keep_alive_timeout]:
493
- # Returns the keep-alive timeout.
494
- # - {:keep_alive_timeout=}[rdoc-ref:Gem::Net::HTTP#keep_alive_timeout=]:
495
- # Sets the keep-alive timeout.
496
- # - {:max_retries}[rdoc-ref:Gem::Net::HTTP#max_retries]:
497
- # Returns the maximum retries.
498
- # - {#max_retries=}[rdoc-ref:Gem::Net::HTTP#max_retries=]:
499
- # Sets the maximum retries.
500
- # - {:open_timeout}[rdoc-ref:Gem::Net::HTTP#open_timeout]:
501
- # Returns the open timeout.
502
- # - {:open_timeout=}[rdoc-ref:Gem::Net::HTTP#open_timeout=]:
503
- # Sets the open timeout.
504
- # - {:read_timeout}[rdoc-ref:Gem::Net::HTTP#read_timeout]:
505
- # Returns the open timeout.
506
- # - {:read_timeout=}[rdoc-ref:Gem::Net::HTTP#read_timeout=]:
507
- # Sets the read timeout.
508
- # - {:ssl_timeout}[rdoc-ref:Gem::Net::HTTP#ssl_timeout]:
509
- # Returns the ssl timeout.
510
- # - {:ssl_timeout=}[rdoc-ref:Gem::Net::HTTP#ssl_timeout=]:
511
- # Sets the ssl timeout.
512
- # - {:write_timeout}[rdoc-ref:Gem::Net::HTTP#write_timeout]:
513
- # Returns the write timeout.
514
- # - {write_timeout=}[rdoc-ref:Gem::Net::HTTP#write_timeout=]:
515
- # Sets the write timeout.
516
- #
517
- # === Requests
518
- #
519
- # - {::get}[rdoc-ref:Gem::Net::HTTP.get]:
520
- # Sends a GET request and returns the string response body.
521
- # - {::get_print}[rdoc-ref:Gem::Net::HTTP.get_print]:
522
- # Sends a GET request and write the string response body to $stdout.
523
- # - {::get_response}[rdoc-ref:Gem::Net::HTTP.get_response]:
524
- # Sends a GET request and returns a response object.
525
- # - {::post_form}[rdoc-ref:Gem::Net::HTTP.post_form]:
526
- # Sends a POST request with form data and returns a response object.
527
- # - {::post}[rdoc-ref:Gem::Net::HTTP.post]:
528
- # Sends a POST request with data and returns a response object.
529
- # - {::put}[rdoc-ref:Gem::Net::HTTP.put]:
530
- # Sends a PUT request with data and returns a response object.
531
- # - {#copy}[rdoc-ref:Gem::Net::HTTP#copy]:
532
- # Sends a COPY request and returns a response object.
533
- # - {#delete}[rdoc-ref:Gem::Net::HTTP#delete]:
534
- # Sends a DELETE request and returns a response object.
535
- # - {#get}[rdoc-ref:Gem::Net::HTTP#get]:
536
- # Sends a GET request and returns a response object.
537
- # - {#head}[rdoc-ref:Gem::Net::HTTP#head]:
538
- # Sends a HEAD request and returns a response object.
539
- # - {#lock}[rdoc-ref:Gem::Net::HTTP#lock]:
540
- # Sends a LOCK request and returns a response object.
541
- # - {#mkcol}[rdoc-ref:Gem::Net::HTTP#mkcol]:
542
- # Sends a MKCOL request and returns a response object.
543
- # - {#move}[rdoc-ref:Gem::Net::HTTP#move]:
544
- # Sends a MOVE request and returns a response object.
545
- # - {#options}[rdoc-ref:Gem::Net::HTTP#options]:
546
- # Sends a OPTIONS request and returns a response object.
547
- # - {#patch}[rdoc-ref:Gem::Net::HTTP#patch]:
548
- # Sends a PATCH request and returns a response object.
549
- # - {#post}[rdoc-ref:Gem::Net::HTTP#post]:
550
- # Sends a POST request and returns a response object.
551
- # - {#propfind}[rdoc-ref:Gem::Net::HTTP#propfind]:
552
- # Sends a PROPFIND request and returns a response object.
553
- # - {#proppatch}[rdoc-ref:Gem::Net::HTTP#proppatch]:
554
- # Sends a PROPPATCH request and returns a response object.
555
- # - {#put}[rdoc-ref:Gem::Net::HTTP#put]:
556
- # Sends a PUT request and returns a response object.
557
- # - {#request}[rdoc-ref:Gem::Net::HTTP#request]:
558
- # Sends a request and returns a response object.
559
- # - {#request_get}[rdoc-ref:Gem::Net::HTTP#request_get]
560
- # (aliased as {#get2}[rdoc-ref:Gem::Net::HTTP#get2]):
561
- # Sends a GET request and forms a response object;
562
- # if a block given, calls the block with the object,
563
- # otherwise returns the object.
564
- # - {#request_head}[rdoc-ref:Gem::Net::HTTP#request_head]
565
- # (aliased as {#head2}[rdoc-ref:Gem::Net::HTTP#head2]):
566
- # Sends a HEAD request and forms a response object;
567
- # if a block given, calls the block with the object,
568
- # otherwise returns the object.
569
- # - {#request_post}[rdoc-ref:Gem::Net::HTTP#request_post]
570
- # (aliased as {#post2}[rdoc-ref:Gem::Net::HTTP#post2]):
571
- # Sends a POST request and forms a response object;
572
- # if a block given, calls the block with the object,
573
- # otherwise returns the object.
574
- # - {#send_request}[rdoc-ref:Gem::Net::HTTP#send_request]:
575
- # Sends a request and returns a response object.
576
- # - {#trace}[rdoc-ref:Gem::Net::HTTP#trace]:
577
- # Sends a TRACE request and returns a response object.
578
- # - {#unlock}[rdoc-ref:Gem::Net::HTTP#unlock]:
579
- # Sends an UNLOCK request and returns a response object.
580
- #
581
- # === Responses
582
- #
583
- # - {:close_on_empty_response}[rdoc-ref:Gem::Net::HTTP#close_on_empty_response]:
584
- # Returns whether to close connection on empty response.
585
- # - {:close_on_empty_response=}[rdoc-ref:Gem::Net::HTTP#close_on_empty_response=]:
586
- # Sets whether to close connection on empty response.
587
- # - {:ignore_eof}[rdoc-ref:Gem::Net::HTTP#ignore_eof]:
588
- # Returns whether to ignore end-of-file when reading a response body
589
- # with <tt>Content-Length</tt> headers.
590
- # - {:ignore_eof=}[rdoc-ref:Gem::Net::HTTP#ignore_eof=]:
591
- # Sets whether to ignore end-of-file when reading a response body
592
- # with <tt>Content-Length</tt> headers.
593
- # - {:response_body_encoding}[rdoc-ref:Gem::Net::HTTP#response_body_encoding]:
594
- # Returns the encoding to use for the response body.
595
- # - {#response_body_encoding=}[rdoc-ref:Gem::Net::HTTP#response_body_encoding=]:
596
- # Sets the response body encoding.
597
- #
598
- # === Proxies
599
- #
600
- # - {:proxy_address}[rdoc-ref:Gem::Net::HTTP#proxy_address]:
601
- # Returns the proxy address.
602
- # - {:proxy_address=}[rdoc-ref:Gem::Net::HTTP#proxy_address=]:
603
- # Sets the proxy address.
604
- # - {::proxy_class?}[rdoc-ref:Gem::Net::HTTP.proxy_class?]:
605
- # Returns whether +self+ is a proxy class.
606
- # - {#proxy?}[rdoc-ref:Gem::Net::HTTP#proxy?]:
607
- # Returns whether +self+ has a proxy.
608
- # - {#proxy_address}[rdoc-ref:Gem::Net::HTTP#proxy_address]
609
- # (aliased as {#proxyaddr}[rdoc-ref:Gem::Net::HTTP#proxyaddr]):
610
- # Returns the proxy address.
611
- # - {#proxy_from_env?}[rdoc-ref:Gem::Net::HTTP#proxy_from_env?]:
612
- # Returns whether the proxy is taken from an environment variable.
613
- # - {:proxy_from_env=}[rdoc-ref:Gem::Net::HTTP#proxy_from_env=]:
614
- # Sets whether the proxy is to be taken from an environment variable.
615
- # - {:proxy_pass}[rdoc-ref:Gem::Net::HTTP#proxy_pass]:
616
- # Returns the proxy password.
617
- # - {:proxy_pass=}[rdoc-ref:Gem::Net::HTTP#proxy_pass=]:
618
- # Sets the proxy password.
619
- # - {:proxy_port}[rdoc-ref:Gem::Net::HTTP#proxy_port]:
620
- # Returns the proxy port.
621
- # - {:proxy_port=}[rdoc-ref:Gem::Net::HTTP#proxy_port=]:
622
- # Sets the proxy port.
623
- # - {#proxy_user}[rdoc-ref:Gem::Net::HTTP#proxy_user]:
624
- # Returns the proxy user name.
625
- # - {:proxy_user=}[rdoc-ref:Gem::Net::HTTP#proxy_user=]:
626
- # Sets the proxy user.
627
- #
628
- # === Security
629
- #
630
- # - {:ca_file}[rdoc-ref:Gem::Net::HTTP#ca_file]:
631
- # Returns the path to a CA certification file.
632
- # - {:ca_file=}[rdoc-ref:Gem::Net::HTTP#ca_file=]:
633
- # Sets the path to a CA certification file.
634
- # - {:ca_path}[rdoc-ref:Gem::Net::HTTP#ca_path]:
635
- # Returns the path of to CA directory containing certification files.
636
- # - {:ca_path=}[rdoc-ref:Gem::Net::HTTP#ca_path=]:
637
- # Sets the path of to CA directory containing certification files.
638
- # - {:cert}[rdoc-ref:Gem::Net::HTTP#cert]:
639
- # Returns the OpenSSL::X509::Certificate object to be used for client certification.
640
- # - {:cert=}[rdoc-ref:Gem::Net::HTTP#cert=]:
641
- # Sets the OpenSSL::X509::Certificate object to be used for client certification.
642
- # - {:cert_store}[rdoc-ref:Gem::Net::HTTP#cert_store]:
643
- # Returns the X509::Store to be used for verifying peer certificate.
644
- # - {:cert_store=}[rdoc-ref:Gem::Net::HTTP#cert_store=]:
645
- # Sets the X509::Store to be used for verifying peer certificate.
646
- # - {:ciphers}[rdoc-ref:Gem::Net::HTTP#ciphers]:
647
- # Returns the available SSL ciphers.
648
- # - {:ciphers=}[rdoc-ref:Gem::Net::HTTP#ciphers=]:
649
- # Sets the available SSL ciphers.
650
- # - {:extra_chain_cert}[rdoc-ref:Gem::Net::HTTP#extra_chain_cert]:
651
- # Returns the extra X509 certificates to be added to the certificate chain.
652
- # - {:extra_chain_cert=}[rdoc-ref:Gem::Net::HTTP#extra_chain_cert=]:
653
- # Sets the extra X509 certificates to be added to the certificate chain.
654
- # - {:key}[rdoc-ref:Gem::Net::HTTP#key]:
655
- # Returns the OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object.
656
- # - {:key=}[rdoc-ref:Gem::Net::HTTP#key=]:
657
- # Sets the OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object.
658
- # - {:max_version}[rdoc-ref:Gem::Net::HTTP#max_version]:
659
- # Returns the maximum SSL version.
660
- # - {:max_version=}[rdoc-ref:Gem::Net::HTTP#max_version=]:
661
- # Sets the maximum SSL version.
662
- # - {:min_version}[rdoc-ref:Gem::Net::HTTP#min_version]:
663
- # Returns the minimum SSL version.
664
- # - {:min_version=}[rdoc-ref:Gem::Net::HTTP#min_version=]:
665
- # Sets the minimum SSL version.
666
- # - {#peer_cert}[rdoc-ref:Gem::Net::HTTP#peer_cert]:
667
- # Returns the X509 certificate chain for the session's socket peer.
668
- # - {:ssl_version}[rdoc-ref:Gem::Net::HTTP#ssl_version]:
669
- # Returns the SSL version.
670
- # - {:ssl_version=}[rdoc-ref:Gem::Net::HTTP#ssl_version=]:
671
- # Sets the SSL version.
672
- # - {#use_ssl=}[rdoc-ref:Gem::Net::HTTP#use_ssl=]:
673
- # Sets whether a new session is to use Transport Layer Security.
674
- # - {#use_ssl?}[rdoc-ref:Gem::Net::HTTP#use_ssl?]:
675
- # Returns whether +self+ uses SSL.
676
- # - {:verify_callback}[rdoc-ref:Gem::Net::HTTP#verify_callback]:
677
- # Returns the callback for the server certification verification.
678
- # - {:verify_callback=}[rdoc-ref:Gem::Net::HTTP#verify_callback=]:
679
- # Sets the callback for the server certification verification.
680
- # - {:verify_depth}[rdoc-ref:Gem::Net::HTTP#verify_depth]:
681
- # Returns the maximum depth for the certificate chain verification.
682
- # - {:verify_depth=}[rdoc-ref:Gem::Net::HTTP#verify_depth=]:
683
- # Sets the maximum depth for the certificate chain verification.
684
- # - {:verify_hostname}[rdoc-ref:Gem::Net::HTTP#verify_hostname]:
685
- # Returns the flags for server the certification verification at the beginning of the SSL/TLS session.
686
- # - {:verify_hostname=}[rdoc-ref:Gem::Net::HTTP#verify_hostname=]:
687
- # Sets he flags for server the certification verification at the beginning of the SSL/TLS session.
688
- # - {:verify_mode}[rdoc-ref:Gem::Net::HTTP#verify_mode]:
689
- # Returns the flags for server the certification verification at the beginning of the SSL/TLS session.
690
- # - {:verify_mode=}[rdoc-ref:Gem::Net::HTTP#verify_mode=]:
691
- # Sets the flags for server the certification verification at the beginning of the SSL/TLS session.
692
- #
693
- # === Addresses and Ports
694
- #
695
- # - {:address}[rdoc-ref:Gem::Net::HTTP#address]:
696
- # Returns the string host name or host IP.
697
- # - {::default_port}[rdoc-ref:Gem::Net::HTTP.default_port]:
698
- # Returns integer 80, the default port to use for HTTP requests.
699
- # - {::http_default_port}[rdoc-ref:Gem::Net::HTTP.http_default_port]:
700
- # Returns integer 80, the default port to use for HTTP requests.
701
- # - {::https_default_port}[rdoc-ref:Gem::Net::HTTP.https_default_port]:
702
- # Returns integer 443, the default port to use for HTTPS requests.
703
- # - {#ipaddr}[rdoc-ref:Gem::Net::HTTP#ipaddr]:
704
- # Returns the IP address for the connection.
705
- # - {#ipaddr=}[rdoc-ref:Gem::Net::HTTP#ipaddr=]:
706
- # Sets the IP address for the connection.
707
- # - {:local_host}[rdoc-ref:Gem::Net::HTTP#local_host]:
708
- # Returns the string local host used to establish the connection.
709
- # - {:local_host=}[rdoc-ref:Gem::Net::HTTP#local_host=]:
710
- # Sets the string local host used to establish the connection.
711
- # - {:local_port}[rdoc-ref:Gem::Net::HTTP#local_port]:
712
- # Returns the integer local port used to establish the connection.
713
- # - {:local_port=}[rdoc-ref:Gem::Net::HTTP#local_port=]:
714
- # Sets the integer local port used to establish the connection.
715
- # - {:port}[rdoc-ref:Gem::Net::HTTP#port]:
716
- # Returns the integer port number.
717
- #
718
- # === \HTTP Version
719
- #
720
- # - {::version_1_2?}[rdoc-ref:Gem::Net::HTTP.version_1_2?]
721
- # (aliased as {::is_version_1_2?}[rdoc-ref:Gem::Net::HTTP.is_version_1_2?]
722
- # and {::version_1_2}[rdoc-ref:Gem::Net::HTTP.version_1_2]):
723
- # Returns true; retained for compatibility.
724
- #
725
- # === Debugging
726
- #
727
- # - {#set_debug_output}[rdoc-ref:Gem::Net::HTTP#set_debug_output]:
728
- # Sets the output stream for debugging.
729
- #
730
- class HTTP < Protocol
731
-
732
- # :stopdoc:
733
- VERSION = "0.6.0"
734
- HTTPVersion = '1.1'
735
- begin
736
- require 'zlib'
737
- HAVE_ZLIB=true
738
- rescue LoadError
739
- HAVE_ZLIB=false
740
- end
741
- # :startdoc:
742
-
743
- # Returns +true+; retained for compatibility.
744
- def HTTP.version_1_2
745
- true
746
- end
747
-
748
- # Returns +true+; retained for compatibility.
749
- def HTTP.version_1_2?
750
- true
751
- end
752
-
753
- # Returns +false+; retained for compatibility.
754
- def HTTP.version_1_1? #:nodoc:
755
- false
756
- end
757
-
758
- class << HTTP
759
- alias is_version_1_1? version_1_1? #:nodoc:
760
- alias is_version_1_2? version_1_2? #:nodoc:
761
- end
762
-
763
- # :call-seq:
764
- # Gem::Net::HTTP.get_print(hostname, path, port = 80) -> nil
765
- # Gem::Net::HTTP:get_print(uri, headers = {}, port = uri.port) -> nil
766
- #
767
- # Like Gem::Net::HTTP.get, but writes the returned body to $stdout;
768
- # returns +nil+.
769
- def HTTP.get_print(uri_or_host, path_or_headers = nil, port = nil)
770
- get_response(uri_or_host, path_or_headers, port) {|res|
771
- res.read_body do |chunk|
772
- $stdout.print chunk
773
- end
774
- }
775
- nil
776
- end
777
-
778
- # :call-seq:
779
- # Gem::Net::HTTP.get(hostname, path, port = 80) -> body
780
- # Gem::Net::HTTP:get(uri, headers = {}, port = uri.port) -> body
781
- #
782
- # Sends a GET request and returns the \HTTP response body as a string.
783
- #
784
- # With string arguments +hostname+ and +path+:
785
- #
786
- # hostname = 'jsonplaceholder.typicode.com'
787
- # path = '/todos/1'
788
- # puts Gem::Net::HTTP.get(hostname, path)
789
- #
790
- # Output:
791
- #
792
- # {
793
- # "userId": 1,
794
- # "id": 1,
795
- # "title": "delectus aut autem",
796
- # "completed": false
797
- # }
798
- #
799
- # With URI object +uri+ and optional hash argument +headers+:
800
- #
801
- # uri = Gem::URI('https://jsonplaceholder.typicode.com/todos/1')
802
- # headers = {'Content-type' => 'application/json; charset=UTF-8'}
803
- # Gem::Net::HTTP.get(uri, headers)
804
- #
805
- # Related:
806
- #
807
- # - Gem::Net::HTTP::Get: request class for \HTTP method +GET+.
808
- # - Gem::Net::HTTP#get: convenience method for \HTTP method +GET+.
809
- #
810
- def HTTP.get(uri_or_host, path_or_headers = nil, port = nil)
811
- get_response(uri_or_host, path_or_headers, port).body
812
- end
813
-
814
- # :call-seq:
815
- # Gem::Net::HTTP.get_response(hostname, path, port = 80) -> http_response
816
- # Gem::Net::HTTP:get_response(uri, headers = {}, port = uri.port) -> http_response
817
- #
818
- # Like Gem::Net::HTTP.get, but returns a Gem::Net::HTTPResponse object
819
- # instead of the body string.
820
- def HTTP.get_response(uri_or_host, path_or_headers = nil, port = nil, &block)
821
- if path_or_headers && !path_or_headers.is_a?(Hash)
822
- host = uri_or_host
823
- path = path_or_headers
824
- new(host, port || HTTP.default_port).start {|http|
825
- return http.request_get(path, &block)
826
- }
827
- else
828
- uri = uri_or_host
829
- headers = path_or_headers
830
- start(uri.hostname, uri.port,
831
- :use_ssl => uri.scheme == 'https') {|http|
832
- return http.request_get(uri, headers, &block)
833
- }
834
- end
835
- end
836
-
837
- # Posts data to a host; returns a Gem::Net::HTTPResponse object.
838
- #
839
- # Argument +url+ must be a URL;
840
- # argument +data+ must be a string:
841
- #
842
- # _uri = uri.dup
843
- # _uri.path = '/posts'
844
- # data = '{"title": "foo", "body": "bar", "userId": 1}'
845
- # headers = {'content-type': 'application/json'}
846
- # res = Gem::Net::HTTP.post(_uri, data, headers) # => #<Gem::Net::HTTPCreated 201 Created readbody=true>
847
- # puts res.body
848
- #
849
- # Output:
850
- #
851
- # {
852
- # "title": "foo",
853
- # "body": "bar",
854
- # "userId": 1,
855
- # "id": 101
856
- # }
857
- #
858
- # Related:
859
- #
860
- # - Gem::Net::HTTP::Post: request class for \HTTP method +POST+.
861
- # - Gem::Net::HTTP#post: convenience method for \HTTP method +POST+.
862
- #
863
- def HTTP.post(url, data, header = nil)
864
- start(url.hostname, url.port,
865
- :use_ssl => url.scheme == 'https' ) {|http|
866
- http.post(url, data, header)
867
- }
868
- end
869
-
870
- # Posts data to a host; returns a Gem::Net::HTTPResponse object.
871
- #
872
- # Argument +url+ must be a URI;
873
- # argument +data+ must be a hash:
874
- #
875
- # _uri = uri.dup
876
- # _uri.path = '/posts'
877
- # data = {title: 'foo', body: 'bar', userId: 1}
878
- # res = Gem::Net::HTTP.post_form(_uri, data) # => #<Gem::Net::HTTPCreated 201 Created readbody=true>
879
- # puts res.body
880
- #
881
- # Output:
882
- #
883
- # {
884
- # "title": "foo",
885
- # "body": "bar",
886
- # "userId": "1",
887
- # "id": 101
888
- # }
889
- #
890
- def HTTP.post_form(url, params)
891
- req = Post.new(url)
892
- req.form_data = params
893
- req.basic_auth url.user, url.password if url.user
894
- start(url.hostname, url.port,
895
- :use_ssl => url.scheme == 'https' ) {|http|
896
- http.request(req)
897
- }
898
- end
899
-
900
- # Sends a PUT request to the server; returns a Gem::Net::HTTPResponse object.
901
- #
902
- # Argument +url+ must be a URL;
903
- # argument +data+ must be a string:
904
- #
905
- # _uri = uri.dup
906
- # _uri.path = '/posts'
907
- # data = '{"title": "foo", "body": "bar", "userId": 1}'
908
- # headers = {'content-type': 'application/json'}
909
- # res = Gem::Net::HTTP.put(_uri, data, headers) # => #<Gem::Net::HTTPCreated 201 Created readbody=true>
910
- # puts res.body
911
- #
912
- # Output:
913
- #
914
- # {
915
- # "title": "foo",
916
- # "body": "bar",
917
- # "userId": 1,
918
- # "id": 101
919
- # }
920
- #
921
- # Related:
922
- #
923
- # - Gem::Net::HTTP::Put: request class for \HTTP method +PUT+.
924
- # - Gem::Net::HTTP#put: convenience method for \HTTP method +PUT+.
925
- #
926
- def HTTP.put(url, data, header = nil)
927
- start(url.hostname, url.port,
928
- :use_ssl => url.scheme == 'https' ) {|http|
929
- http.put(url, data, header)
930
- }
931
- end
932
-
933
- #
934
- # \HTTP session management
935
- #
936
-
937
- # Returns integer +80+, the default port to use for \HTTP requests:
938
- #
939
- # Gem::Net::HTTP.default_port # => 80
940
- #
941
- def HTTP.default_port
942
- http_default_port()
943
- end
944
-
945
- # Returns integer +80+, the default port to use for \HTTP requests:
946
- #
947
- # Gem::Net::HTTP.http_default_port # => 80
948
- #
949
- def HTTP.http_default_port
950
- 80
951
- end
952
-
953
- # Returns integer +443+, the default port to use for HTTPS requests:
954
- #
955
- # Gem::Net::HTTP.https_default_port # => 443
956
- #
957
- def HTTP.https_default_port
958
- 443
959
- end
960
-
961
- def HTTP.socket_type #:nodoc: obsolete
962
- BufferedIO
963
- end
964
-
965
- # :call-seq:
966
- # HTTP.start(address, port = nil, p_addr = :ENV, p_port = nil, p_user = nil, p_pass = nil, opts) -> http
967
- # HTTP.start(address, port = nil, p_addr = :ENV, p_port = nil, p_user = nil, p_pass = nil, opts) {|http| ... } -> object
968
- #
969
- # Creates a new \Gem::Net::HTTP object, +http+, via \Gem::Net::HTTP.new:
970
- #
971
- # - For arguments +address+ and +port+, see Gem::Net::HTTP.new.
972
- # - For proxy-defining arguments +p_addr+ through +p_pass+,
973
- # see {Proxy Server}[rdoc-ref:Gem::Net::HTTP@Proxy+Server].
974
- # - For argument +opts+, see below.
975
- #
976
- # With no block given:
977
- #
978
- # - Calls <tt>http.start</tt> with no block (see #start),
979
- # which opens a TCP connection and \HTTP session.
980
- # - Returns +http+.
981
- # - The caller should call #finish to close the session:
982
- #
983
- # http = Gem::Net::HTTP.start(hostname)
984
- # http.started? # => true
985
- # http.finish
986
- # http.started? # => false
987
- #
988
- # With a block given:
989
- #
990
- # - Calls <tt>http.start</tt> with the block (see #start), which:
991
- #
992
- # - Opens a TCP connection and \HTTP session.
993
- # - Calls the block,
994
- # which may make any number of requests to the host.
995
- # - Closes the \HTTP session and TCP connection on block exit.
996
- # - Returns the block's value +object+.
997
- #
998
- # - Returns +object+.
999
- #
1000
- # Example:
1001
- #
1002
- # hostname = 'jsonplaceholder.typicode.com'
1003
- # Gem::Net::HTTP.start(hostname) do |http|
1004
- # puts http.get('/todos/1').body
1005
- # puts http.get('/todos/2').body
1006
- # end
1007
- #
1008
- # Output:
1009
- #
1010
- # {
1011
- # "userId": 1,
1012
- # "id": 1,
1013
- # "title": "delectus aut autem",
1014
- # "completed": false
1015
- # }
1016
- # {
1017
- # "userId": 1,
1018
- # "id": 2,
1019
- # "title": "quis ut nam facilis et officia qui",
1020
- # "completed": false
1021
- # }
1022
- #
1023
- # If the last argument given is a hash, it is the +opts+ hash,
1024
- # where each key is a method or accessor to be called,
1025
- # and its value is the value to be set.
1026
- #
1027
- # The keys may include:
1028
- #
1029
- # - #ca_file
1030
- # - #ca_path
1031
- # - #cert
1032
- # - #cert_store
1033
- # - #ciphers
1034
- # - #close_on_empty_response
1035
- # - +ipaddr+ (calls #ipaddr=)
1036
- # - #keep_alive_timeout
1037
- # - #key
1038
- # - #open_timeout
1039
- # - #read_timeout
1040
- # - #ssl_timeout
1041
- # - #ssl_version
1042
- # - +use_ssl+ (calls #use_ssl=)
1043
- # - #verify_callback
1044
- # - #verify_depth
1045
- # - #verify_mode
1046
- # - #write_timeout
1047
- #
1048
- # Note: If +port+ is +nil+ and <tt>opts[:use_ssl]</tt> is a truthy value,
1049
- # the value passed to +new+ is Gem::Net::HTTP.https_default_port, not +port+.
1050
- #
1051
- def HTTP.start(address, *arg, &block) # :yield: +http+
1052
- arg.pop if opt = Hash.try_convert(arg[-1])
1053
- port, p_addr, p_port, p_user, p_pass = *arg
1054
- p_addr = :ENV if arg.size < 2
1055
- port = https_default_port if !port && opt && opt[:use_ssl]
1056
- http = new(address, port, p_addr, p_port, p_user, p_pass)
1057
- http.ipaddr = opt[:ipaddr] if opt && opt[:ipaddr]
1058
-
1059
- if opt
1060
- if opt[:use_ssl]
1061
- opt = {verify_mode: OpenSSL::SSL::VERIFY_PEER}.update(opt)
1062
- end
1063
- http.methods.grep(/\A(\w+)=\z/) do |meth|
1064
- key = $1.to_sym
1065
- opt.key?(key) or next
1066
- http.__send__(meth, opt[key])
1067
- end
1068
- end
1069
-
1070
- http.start(&block)
1071
- end
1072
-
1073
- class << HTTP
1074
- alias newobj new # :nodoc:
1075
- end
1076
-
1077
- # Returns a new \Gem::Net::HTTP object +http+
1078
- # (but does not open a TCP connection or \HTTP session).
1079
- #
1080
- # With only string argument +address+ given
1081
- # (and <tt>ENV['http_proxy']</tt> undefined or +nil+),
1082
- # the returned +http+:
1083
- #
1084
- # - Has the given address.
1085
- # - Has the default port number, Gem::Net::HTTP.default_port (80).
1086
- # - Has no proxy.
1087
- #
1088
- # Example:
1089
- #
1090
- # http = Gem::Net::HTTP.new(hostname)
1091
- # # => #<Gem::Net::HTTP jsonplaceholder.typicode.com:80 open=false>
1092
- # http.address # => "jsonplaceholder.typicode.com"
1093
- # http.port # => 80
1094
- # http.proxy? # => false
1095
- #
1096
- # With integer argument +port+ also given,
1097
- # the returned +http+ has the given port:
1098
- #
1099
- # http = Gem::Net::HTTP.new(hostname, 8000)
1100
- # # => #<Gem::Net::HTTP jsonplaceholder.typicode.com:8000 open=false>
1101
- # http.port # => 8000
1102
- #
1103
- # For proxy-defining arguments +p_addr+ through +p_no_proxy+,
1104
- # see {Proxy Server}[rdoc-ref:Gem::Net::HTTP@Proxy+Server].
1105
- #
1106
- def HTTP.new(address, port = nil, p_addr = :ENV, p_port = nil, p_user = nil, p_pass = nil, p_no_proxy = nil, p_use_ssl = nil)
1107
- http = super address, port
1108
-
1109
- if proxy_class? then # from Gem::Net::HTTP::Proxy()
1110
- http.proxy_from_env = @proxy_from_env
1111
- http.proxy_address = @proxy_address
1112
- http.proxy_port = @proxy_port
1113
- http.proxy_user = @proxy_user
1114
- http.proxy_pass = @proxy_pass
1115
- http.proxy_use_ssl = @proxy_use_ssl
1116
- elsif p_addr == :ENV then
1117
- http.proxy_from_env = true
1118
- else
1119
- if p_addr && p_no_proxy && !Gem::URI::Generic.use_proxy?(address, address, port, p_no_proxy)
1120
- p_addr = nil
1121
- p_port = nil
1122
- end
1123
- http.proxy_address = p_addr
1124
- http.proxy_port = p_port || default_port
1125
- http.proxy_user = p_user
1126
- http.proxy_pass = p_pass
1127
- http.proxy_use_ssl = p_use_ssl
1128
- end
1129
-
1130
- http
1131
- end
1132
-
1133
- class << HTTP
1134
- # Allows to set the default configuration that will be used
1135
- # when creating a new connection.
1136
- #
1137
- # Example:
1138
- #
1139
- # Gem::Net::HTTP.default_configuration = {
1140
- # read_timeout: 1,
1141
- # write_timeout: 1
1142
- # }
1143
- # http = Gem::Net::HTTP.new(hostname)
1144
- # http.open_timeout # => 60
1145
- # http.read_timeout # => 1
1146
- # http.write_timeout # => 1
1147
- #
1148
- attr_accessor :default_configuration
1149
- end
1150
-
1151
- # Creates a new \Gem::Net::HTTP object for the specified server address,
1152
- # without opening the TCP connection or initializing the \HTTP session.
1153
- # The +address+ should be a DNS hostname or IP address.
1154
- def initialize(address, port = nil) # :nodoc:
1155
- defaults = {
1156
- keep_alive_timeout: 2,
1157
- close_on_empty_response: false,
1158
- open_timeout: 60,
1159
- read_timeout: 60,
1160
- write_timeout: 60,
1161
- continue_timeout: nil,
1162
- max_retries: 1,
1163
- debug_output: nil,
1164
- response_body_encoding: false,
1165
- ignore_eof: true
1166
- }
1167
- options = defaults.merge(self.class.default_configuration || {})
1168
-
1169
- @address = address
1170
- @port = (port || HTTP.default_port)
1171
- @ipaddr = nil
1172
- @local_host = nil
1173
- @local_port = nil
1174
- @curr_http_version = HTTPVersion
1175
- @keep_alive_timeout = options[:keep_alive_timeout]
1176
- @last_communicated = nil
1177
- @close_on_empty_response = options[:close_on_empty_response]
1178
- @socket = nil
1179
- @started = false
1180
- @open_timeout = options[:open_timeout]
1181
- @read_timeout = options[:read_timeout]
1182
- @write_timeout = options[:write_timeout]
1183
- @continue_timeout = options[:continue_timeout]
1184
- @max_retries = options[:max_retries]
1185
- @debug_output = options[:debug_output]
1186
- @response_body_encoding = options[:response_body_encoding]
1187
- @ignore_eof = options[:ignore_eof]
1188
-
1189
- @proxy_from_env = false
1190
- @proxy_uri = nil
1191
- @proxy_address = nil
1192
- @proxy_port = nil
1193
- @proxy_user = nil
1194
- @proxy_pass = nil
1195
- @proxy_use_ssl = nil
1196
-
1197
- @use_ssl = false
1198
- @ssl_context = nil
1199
- @ssl_session = nil
1200
- @sspi_enabled = false
1201
- SSL_IVNAMES.each do |ivname|
1202
- instance_variable_set ivname, nil
1203
- end
1204
- end
1205
-
1206
- # Returns a string representation of +self+:
1207
- #
1208
- # Gem::Net::HTTP.new(hostname).inspect
1209
- # # => "#<Gem::Net::HTTP jsonplaceholder.typicode.com:80 open=false>"
1210
- #
1211
- def inspect
1212
- "#<#{self.class} #{@address}:#{@port} open=#{started?}>"
1213
- end
1214
-
1215
- # *WARNING* This method opens a serious security hole.
1216
- # Never use this method in production code.
1217
- #
1218
- # Sets the output stream for debugging:
1219
- #
1220
- # http = Gem::Net::HTTP.new(hostname)
1221
- # File.open('t.tmp', 'w') do |file|
1222
- # http.set_debug_output(file)
1223
- # http.start
1224
- # http.get('/nosuch/1')
1225
- # http.finish
1226
- # end
1227
- # puts File.read('t.tmp')
1228
- #
1229
- # Output:
1230
- #
1231
- # opening connection to jsonplaceholder.typicode.com:80...
1232
- # opened
1233
- # <- "GET /nosuch/1 HTTP/1.1\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: */*\r\nUser-Agent: Ruby\r\nHost: jsonplaceholder.typicode.com\r\n\r\n"
1234
- # -> "HTTP/1.1 404 Not Found\r\n"
1235
- # -> "Date: Mon, 12 Dec 2022 21:14:11 GMT\r\n"
1236
- # -> "Content-Type: application/json; charset=utf-8\r\n"
1237
- # -> "Content-Length: 2\r\n"
1238
- # -> "Connection: keep-alive\r\n"
1239
- # -> "X-Powered-By: Express\r\n"
1240
- # -> "X-Ratelimit-Limit: 1000\r\n"
1241
- # -> "X-Ratelimit-Remaining: 999\r\n"
1242
- # -> "X-Ratelimit-Reset: 1670879660\r\n"
1243
- # -> "Vary: Origin, Accept-Encoding\r\n"
1244
- # -> "Access-Control-Allow-Credentials: true\r\n"
1245
- # -> "Cache-Control: max-age=43200\r\n"
1246
- # -> "Pragma: no-cache\r\n"
1247
- # -> "Expires: -1\r\n"
1248
- # -> "X-Content-Type-Options: nosniff\r\n"
1249
- # -> "Etag: W/\"2-vyGp6PvFo4RvsFtPoIWeCReyIC8\"\r\n"
1250
- # -> "Via: 1.1 vegur\r\n"
1251
- # -> "CF-Cache-Status: MISS\r\n"
1252
- # -> "Server-Timing: cf-q-config;dur=1.3000000762986e-05\r\n"
1253
- # -> "Report-To: {\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=yOr40jo%2BwS1KHzhTlVpl54beJ5Wx2FcG4gGV0XVrh3X9OlR5q4drUn2dkt5DGO4GDcE%2BVXT7CNgJvGs%2BZleIyMu8CLieFiDIvOviOY3EhHg94m0ZNZgrEdpKD0S85S507l1vsEwEHkoTm%2Ff19SiO\"}],\"group\":\"cf-nel\",\"max_age\":604800}\r\n"
1254
- # -> "NEL: {\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}\r\n"
1255
- # -> "Server: cloudflare\r\n"
1256
- # -> "CF-RAY: 778977dc484ce591-DFW\r\n"
1257
- # -> "alt-svc: h3=\":443\"; ma=86400, h3-29=\":443\"; ma=86400\r\n"
1258
- # -> "\r\n"
1259
- # reading 2 bytes...
1260
- # -> "{}"
1261
- # read 2 bytes
1262
- # Conn keep-alive
1263
- #
1264
- def set_debug_output(output)
1265
- warn 'Gem::Net::HTTP#set_debug_output called after HTTP started', uplevel: 1 if started?
1266
- @debug_output = output
1267
- end
1268
-
1269
- # Returns the string host name or host IP given as argument +address+ in ::new.
1270
- attr_reader :address
1271
-
1272
- # Returns the integer port number given as argument +port+ in ::new.
1273
- attr_reader :port
1274
-
1275
- # Sets or returns the string local host used to establish the connection;
1276
- # initially +nil+.
1277
- attr_accessor :local_host
1278
-
1279
- # Sets or returns the integer local port used to establish the connection;
1280
- # initially +nil+.
1281
- attr_accessor :local_port
1282
-
1283
- # Returns the encoding to use for the response body;
1284
- # see #response_body_encoding=.
1285
- attr_reader :response_body_encoding
1286
-
1287
- # Sets the encoding to be used for the response body;
1288
- # returns the encoding.
1289
- #
1290
- # The given +value+ may be:
1291
- #
1292
- # - An Encoding object.
1293
- # - The name of an encoding.
1294
- # - An alias for an encoding name.
1295
- #
1296
- # See {Encoding}[rdoc-ref:Encoding].
1297
- #
1298
- # Examples:
1299
- #
1300
- # http = Gem::Net::HTTP.new(hostname)
1301
- # http.response_body_encoding = Encoding::US_ASCII # => #<Encoding:US-ASCII>
1302
- # http.response_body_encoding = 'US-ASCII' # => "US-ASCII"
1303
- # http.response_body_encoding = 'ASCII' # => "ASCII"
1304
- #
1305
- def response_body_encoding=(value)
1306
- value = Encoding.find(value) if value.is_a?(String)
1307
- @response_body_encoding = value
1308
- end
1309
-
1310
- # Sets whether to determine the proxy from environment variable
1311
- # '<tt>ENV['http_proxy']</tt>';
1312
- # see {Proxy Using ENV['http_proxy']}[rdoc-ref:Gem::Net::HTTP@Proxy+Using+-27ENV-5B-27http_proxy-27-5D-27].
1313
- attr_writer :proxy_from_env
1314
-
1315
- # Sets the proxy address;
1316
- # see {Proxy Server}[rdoc-ref:Gem::Net::HTTP@Proxy+Server].
1317
- attr_writer :proxy_address
1318
-
1319
- # Sets the proxy port;
1320
- # see {Proxy Server}[rdoc-ref:Gem::Net::HTTP@Proxy+Server].
1321
- attr_writer :proxy_port
1322
-
1323
- # Sets the proxy user;
1324
- # see {Proxy Server}[rdoc-ref:Gem::Net::HTTP@Proxy+Server].
1325
- attr_writer :proxy_user
1326
-
1327
- # Sets the proxy password;
1328
- # see {Proxy Server}[rdoc-ref:Gem::Net::HTTP@Proxy+Server].
1329
- attr_writer :proxy_pass
1330
- attr_writer :proxy_use_ssl
1331
-
1332
- # Returns the IP address for the connection.
1333
- #
1334
- # If the session has not been started,
1335
- # returns the value set by #ipaddr=,
1336
- # or +nil+ if it has not been set:
1337
- #
1338
- # http = Gem::Net::HTTP.new(hostname)
1339
- # http.ipaddr # => nil
1340
- # http.ipaddr = '172.67.155.76'
1341
- # http.ipaddr # => "172.67.155.76"
1342
- #
1343
- # If the session has been started,
1344
- # returns the IP address from the socket:
1345
- #
1346
- # http = Gem::Net::HTTP.new(hostname)
1347
- # http.start
1348
- # http.ipaddr # => "172.67.155.76"
1349
- # http.finish
1350
- #
1351
- def ipaddr
1352
- started? ? @socket.io.peeraddr[3] : @ipaddr
1353
- end
1354
-
1355
- # Sets the IP address for the connection:
1356
- #
1357
- # http = Gem::Net::HTTP.new(hostname)
1358
- # http.ipaddr # => nil
1359
- # http.ipaddr = '172.67.155.76'
1360
- # http.ipaddr # => "172.67.155.76"
1361
- #
1362
- # The IP address may not be set if the session has been started.
1363
- def ipaddr=(addr)
1364
- raise IOError, "ipaddr value changed, but session already started" if started?
1365
- @ipaddr = addr
1366
- end
1367
-
1368
- # Sets or returns the numeric (\Integer or \Float) number of seconds
1369
- # to wait for a connection to open;
1370
- # initially 60.
1371
- # If the connection is not made in the given interval,
1372
- # an exception is raised.
1373
- attr_accessor :open_timeout
1374
-
1375
- # Returns the numeric (\Integer or \Float) number of seconds
1376
- # to wait for one block to be read (via one read(2) call);
1377
- # see #read_timeout=.
1378
- attr_reader :read_timeout
1379
-
1380
- # Returns the numeric (\Integer or \Float) number of seconds
1381
- # to wait for one block to be written (via one write(2) call);
1382
- # see #write_timeout=.
1383
- attr_reader :write_timeout
1384
-
1385
- # Sets the maximum number of times to retry an idempotent request in case of
1386
- # \Gem::Net::ReadTimeout, IOError, EOFError, Errno::ECONNRESET,
1387
- # Errno::ECONNABORTED, Errno::EPIPE, OpenSSL::SSL::SSLError,
1388
- # Gem::Timeout::Error.
1389
- # The initial value is 1.
1390
- #
1391
- # Argument +retries+ must be a non-negative numeric value:
1392
- #
1393
- # http = Gem::Net::HTTP.new(hostname)
1394
- # http.max_retries = 2 # => 2
1395
- # http.max_retries # => 2
1396
- #
1397
- def max_retries=(retries)
1398
- retries = retries.to_int
1399
- if retries < 0
1400
- raise ArgumentError, 'max_retries should be non-negative integer number'
1401
- end
1402
- @max_retries = retries
1403
- end
1404
-
1405
- # Returns the maximum number of times to retry an idempotent request;
1406
- # see #max_retries=.
1407
- attr_reader :max_retries
1408
-
1409
- # Sets the read timeout, in seconds, for +self+ to integer +sec+;
1410
- # the initial value is 60.
1411
- #
1412
- # Argument +sec+ must be a non-negative numeric value:
1413
- #
1414
- # http = Gem::Net::HTTP.new(hostname)
1415
- # http.read_timeout # => 60
1416
- # http.get('/todos/1') # => #<Gem::Net::HTTPOK 200 OK readbody=true>
1417
- # http.read_timeout = 0
1418
- # http.get('/todos/1') # Raises Gem::Net::ReadTimeout.
1419
- #
1420
- def read_timeout=(sec)
1421
- @socket.read_timeout = sec if @socket
1422
- @read_timeout = sec
1423
- end
1424
-
1425
- # Sets the write timeout, in seconds, for +self+ to integer +sec+;
1426
- # the initial value is 60.
1427
- #
1428
- # Argument +sec+ must be a non-negative numeric value:
1429
- #
1430
- # _uri = uri.dup
1431
- # _uri.path = '/posts'
1432
- # body = 'bar' * 200000
1433
- # data = <<EOF
1434
- # {"title": "foo", "body": "#{body}", "userId": "1"}
1435
- # EOF
1436
- # headers = {'content-type': 'application/json'}
1437
- # http = Gem::Net::HTTP.new(hostname)
1438
- # http.write_timeout # => 60
1439
- # http.post(_uri.path, data, headers)
1440
- # # => #<Gem::Net::HTTPCreated 201 Created readbody=true>
1441
- # http.write_timeout = 0
1442
- # http.post(_uri.path, data, headers) # Raises Gem::Net::WriteTimeout.
1443
- #
1444
- def write_timeout=(sec)
1445
- @socket.write_timeout = sec if @socket
1446
- @write_timeout = sec
1447
- end
1448
-
1449
- # Returns the continue timeout value;
1450
- # see continue_timeout=.
1451
- attr_reader :continue_timeout
1452
-
1453
- # Sets the continue timeout value,
1454
- # which is the number of seconds to wait for an expected 100 Continue response.
1455
- # If the \HTTP object does not receive a response in this many seconds
1456
- # it sends the request body.
1457
- def continue_timeout=(sec)
1458
- @socket.continue_timeout = sec if @socket
1459
- @continue_timeout = sec
1460
- end
1461
-
1462
- # Sets or returns the numeric (\Integer or \Float) number of seconds
1463
- # to keep the connection open after a request is sent;
1464
- # initially 2.
1465
- # If a new request is made during the given interval,
1466
- # the still-open connection is used;
1467
- # otherwise the connection will have been closed
1468
- # and a new connection is opened.
1469
- attr_accessor :keep_alive_timeout
1470
-
1471
- # Sets or returns whether to ignore end-of-file when reading a response body
1472
- # with <tt>Content-Length</tt> headers;
1473
- # initially +true+.
1474
- attr_accessor :ignore_eof
1475
-
1476
- # Returns +true+ if the \HTTP session has been started:
1477
- #
1478
- # http = Gem::Net::HTTP.new(hostname)
1479
- # http.started? # => false
1480
- # http.start
1481
- # http.started? # => true
1482
- # http.finish # => nil
1483
- # http.started? # => false
1484
- #
1485
- # Gem::Net::HTTP.start(hostname) do |http|
1486
- # http.started?
1487
- # end # => true
1488
- # http.started? # => false
1489
- #
1490
- def started?
1491
- @started
1492
- end
1493
-
1494
- alias active? started? #:nodoc: obsolete
1495
-
1496
- # Sets or returns whether to close the connection when the response is empty;
1497
- # initially +false+.
1498
- attr_accessor :close_on_empty_response
1499
-
1500
- # Returns +true+ if +self+ uses SSL, +false+ otherwise.
1501
- # See Gem::Net::HTTP#use_ssl=.
1502
- def use_ssl?
1503
- @use_ssl
1504
- end
1505
-
1506
- # Sets whether a new session is to use
1507
- # {Transport Layer Security}[https://en.wikipedia.org/wiki/Transport_Layer_Security]:
1508
- #
1509
- # Raises IOError if attempting to change during a session.
1510
- #
1511
- # Raises OpenSSL::SSL::SSLError if the port is not an HTTPS port.
1512
- def use_ssl=(flag)
1513
- flag = flag ? true : false
1514
- if started? and @use_ssl != flag
1515
- raise IOError, "use_ssl value changed, but session already started"
1516
- end
1517
- @use_ssl = flag
1518
- end
1519
-
1520
- SSL_ATTRIBUTES = [
1521
- :ca_file,
1522
- :ca_path,
1523
- :cert,
1524
- :cert_store,
1525
- :ciphers,
1526
- :extra_chain_cert,
1527
- :key,
1528
- :ssl_timeout,
1529
- :ssl_version,
1530
- :min_version,
1531
- :max_version,
1532
- :verify_callback,
1533
- :verify_depth,
1534
- :verify_mode,
1535
- :verify_hostname,
1536
- ] # :nodoc:
1537
-
1538
- SSL_IVNAMES = SSL_ATTRIBUTES.map { |a| "@#{a}".to_sym } # :nodoc:
1539
-
1540
- # Sets or returns the path to a CA certification file in PEM format.
1541
- attr_accessor :ca_file
1542
-
1543
- # Sets or returns the path of to CA directory
1544
- # containing certification files in PEM format.
1545
- attr_accessor :ca_path
1546
-
1547
- # Sets or returns the OpenSSL::X509::Certificate object
1548
- # to be used for client certification.
1549
- attr_accessor :cert
1550
-
1551
- # Sets or returns the X509::Store to be used for verifying peer certificate.
1552
- attr_accessor :cert_store
1553
-
1554
- # Sets or returns the available SSL ciphers.
1555
- # See {OpenSSL::SSL::SSLContext#ciphers=}[rdoc-ref:OpenSSL::SSL::SSLContext#ciphers-3D].
1556
- attr_accessor :ciphers
1557
-
1558
- # Sets or returns the extra X509 certificates to be added to the certificate chain.
1559
- # See {OpenSSL::SSL::SSLContext#add_certificate}[rdoc-ref:OpenSSL::SSL::SSLContext#add_certificate].
1560
- attr_accessor :extra_chain_cert
1561
-
1562
- # Sets or returns the OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object.
1563
- attr_accessor :key
1564
-
1565
- # Sets or returns the SSL timeout seconds.
1566
- attr_accessor :ssl_timeout
1567
-
1568
- # Sets or returns the SSL version.
1569
- # See {OpenSSL::SSL::SSLContext#ssl_version=}[rdoc-ref:OpenSSL::SSL::SSLContext#ssl_version-3D].
1570
- attr_accessor :ssl_version
1571
-
1572
- # Sets or returns the minimum SSL version.
1573
- # See {OpenSSL::SSL::SSLContext#min_version=}[rdoc-ref:OpenSSL::SSL::SSLContext#min_version-3D].
1574
- attr_accessor :min_version
1575
-
1576
- # Sets or returns the maximum SSL version.
1577
- # See {OpenSSL::SSL::SSLContext#max_version=}[rdoc-ref:OpenSSL::SSL::SSLContext#max_version-3D].
1578
- attr_accessor :max_version
1579
-
1580
- # Sets or returns the callback for the server certification verification.
1581
- attr_accessor :verify_callback
1582
-
1583
- # Sets or returns the maximum depth for the certificate chain verification.
1584
- attr_accessor :verify_depth
1585
-
1586
- # Sets or returns the flags for server the certification verification
1587
- # at the beginning of the SSL/TLS session.
1588
- # OpenSSL::SSL::VERIFY_NONE or OpenSSL::SSL::VERIFY_PEER are acceptable.
1589
- attr_accessor :verify_mode
1590
-
1591
- # Sets or returns whether to verify that the server certificate is valid
1592
- # for the hostname.
1593
- # See {OpenSSL::SSL::SSLContext#verify_hostname=}[rdoc-ref:OpenSSL::SSL::SSLContext#attribute-i-verify_mode].
1594
- attr_accessor :verify_hostname
1595
-
1596
- # Returns the X509 certificate chain (an array of strings)
1597
- # for the session's socket peer,
1598
- # or +nil+ if none.
1599
- def peer_cert
1600
- if not use_ssl? or not @socket
1601
- return nil
1602
- end
1603
- @socket.io.peer_cert
1604
- end
1605
-
1606
- # Starts an \HTTP session.
1607
- #
1608
- # Without a block, returns +self+:
1609
- #
1610
- # http = Gem::Net::HTTP.new(hostname)
1611
- # # => #<Gem::Net::HTTP jsonplaceholder.typicode.com:80 open=false>
1612
- # http.start
1613
- # # => #<Gem::Net::HTTP jsonplaceholder.typicode.com:80 open=true>
1614
- # http.started? # => true
1615
- # http.finish
1616
- #
1617
- # With a block, calls the block with +self+,
1618
- # finishes the session when the block exits,
1619
- # and returns the block's value:
1620
- #
1621
- # http.start do |http|
1622
- # http
1623
- # end
1624
- # # => #<Gem::Net::HTTP jsonplaceholder.typicode.com:80 open=false>
1625
- # http.started? # => false
1626
- #
1627
- def start # :yield: http
1628
- raise IOError, 'HTTP session already opened' if @started
1629
- if block_given?
1630
- begin
1631
- do_start
1632
- return yield(self)
1633
- ensure
1634
- do_finish
1635
- end
1636
- end
1637
- do_start
1638
- self
1639
- end
1640
-
1641
- def do_start
1642
- connect
1643
- @started = true
1644
- end
1645
- private :do_start
1646
-
1647
- def connect
1648
- if use_ssl?
1649
- # reference early to load OpenSSL before connecting,
1650
- # as OpenSSL may take time to load.
1651
- @ssl_context = OpenSSL::SSL::SSLContext.new
1652
- end
1653
-
1654
- if proxy? then
1655
- conn_addr = proxy_address
1656
- conn_port = proxy_port
1657
- else
1658
- conn_addr = conn_address
1659
- conn_port = port
1660
- end
1661
-
1662
- debug "opening connection to #{conn_addr}:#{conn_port}..."
1663
- s = Gem::Timeout.timeout(@open_timeout, Gem::Net::OpenTimeout) {
1664
- begin
1665
- TCPSocket.open(conn_addr, conn_port, @local_host, @local_port)
1666
- rescue => e
1667
- raise e, "Failed to open TCP connection to " +
1668
- "#{conn_addr}:#{conn_port} (#{e.message})"
1669
- end
1670
- }
1671
- s.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1)
1672
- debug "opened"
1673
- if use_ssl?
1674
- if proxy?
1675
- if @proxy_use_ssl
1676
- proxy_sock = OpenSSL::SSL::SSLSocket.new(s)
1677
- ssl_socket_connect(proxy_sock, @open_timeout)
1678
- else
1679
- proxy_sock = s
1680
- end
1681
- proxy_sock = BufferedIO.new(proxy_sock, read_timeout: @read_timeout,
1682
- write_timeout: @write_timeout,
1683
- continue_timeout: @continue_timeout,
1684
- debug_output: @debug_output)
1685
- buf = +"CONNECT #{conn_address}:#{@port} HTTP/#{HTTPVersion}\r\n" \
1686
- "Host: #{@address}:#{@port}\r\n"
1687
- if proxy_user
1688
- credential = ["#{proxy_user}:#{proxy_pass}"].pack('m0')
1689
- buf << "Proxy-Authorization: Basic #{credential}\r\n"
1690
- end
1691
- buf << "\r\n"
1692
- proxy_sock.write(buf)
1693
- HTTPResponse.read_new(proxy_sock).value
1694
- # assuming nothing left in buffers after successful CONNECT response
1695
- end
1696
-
1697
- ssl_parameters = Hash.new
1698
- iv_list = instance_variables
1699
- SSL_IVNAMES.each_with_index do |ivname, i|
1700
- if iv_list.include?(ivname)
1701
- value = instance_variable_get(ivname)
1702
- unless value.nil?
1703
- ssl_parameters[SSL_ATTRIBUTES[i]] = value
1704
- end
1705
- end
1706
- end
1707
- @ssl_context.set_params(ssl_parameters)
1708
- unless @ssl_context.session_cache_mode.nil? # a dummy method on JRuby
1709
- @ssl_context.session_cache_mode =
1710
- OpenSSL::SSL::SSLContext::SESSION_CACHE_CLIENT |
1711
- OpenSSL::SSL::SSLContext::SESSION_CACHE_NO_INTERNAL_STORE
1712
- end
1713
- if @ssl_context.respond_to?(:session_new_cb) # not implemented under JRuby
1714
- @ssl_context.session_new_cb = proc {|sock, sess| @ssl_session = sess }
1715
- end
1716
-
1717
- # Still do the post_connection_check below even if connecting
1718
- # to IP address
1719
- verify_hostname = @ssl_context.verify_hostname
1720
-
1721
- # Server Name Indication (SNI) RFC 3546/6066
1722
- case @address
1723
- when Gem::Resolv::IPv4::Regex, Gem::Resolv::IPv6::Regex
1724
- # don't set SNI, as IP addresses in SNI is not valid
1725
- # per RFC 6066, section 3.
1726
-
1727
- # Avoid openssl warning
1728
- @ssl_context.verify_hostname = false
1729
- else
1730
- ssl_host_address = @address
1731
- end
1732
-
1733
- debug "starting SSL for #{conn_addr}:#{conn_port}..."
1734
- s = OpenSSL::SSL::SSLSocket.new(s, @ssl_context)
1735
- s.sync_close = true
1736
- s.hostname = ssl_host_address if s.respond_to?(:hostname=) && ssl_host_address
1737
-
1738
- if @ssl_session and
1739
- Process.clock_gettime(Process::CLOCK_REALTIME) < @ssl_session.time.to_f + @ssl_session.timeout
1740
- s.session = @ssl_session
1741
- end
1742
- ssl_socket_connect(s, @open_timeout)
1743
- if (@ssl_context.verify_mode != OpenSSL::SSL::VERIFY_NONE) && verify_hostname
1744
- s.post_connection_check(@address)
1745
- end
1746
- debug "SSL established, protocol: #{s.ssl_version}, cipher: #{s.cipher[0]}"
1747
- end
1748
- @socket = BufferedIO.new(s, read_timeout: @read_timeout,
1749
- write_timeout: @write_timeout,
1750
- continue_timeout: @continue_timeout,
1751
- debug_output: @debug_output)
1752
- @last_communicated = nil
1753
- on_connect
1754
- rescue => exception
1755
- if s
1756
- debug "Conn close because of connect error #{exception}"
1757
- s.close
1758
- end
1759
- raise
1760
- end
1761
- private :connect
1762
-
1763
- def on_connect
1764
- end
1765
- private :on_connect
1766
-
1767
- # Finishes the \HTTP session:
1768
- #
1769
- # http = Gem::Net::HTTP.new(hostname)
1770
- # http.start
1771
- # http.started? # => true
1772
- # http.finish # => nil
1773
- # http.started? # => false
1774
- #
1775
- # Raises IOError if not in a session.
1776
- def finish
1777
- raise IOError, 'HTTP session not yet started' unless started?
1778
- do_finish
1779
- end
1780
-
1781
- def do_finish
1782
- @started = false
1783
- @socket.close if @socket
1784
- @socket = nil
1785
- end
1786
- private :do_finish
1787
-
1788
- #
1789
- # proxy
1790
- #
1791
-
1792
- public
1793
-
1794
- # no proxy
1795
- @is_proxy_class = false
1796
- @proxy_from_env = false
1797
- @proxy_addr = nil
1798
- @proxy_port = nil
1799
- @proxy_user = nil
1800
- @proxy_pass = nil
1801
- @proxy_use_ssl = nil
1802
-
1803
- # Creates an \HTTP proxy class which behaves like \Gem::Net::HTTP, but
1804
- # performs all access via the specified proxy.
1805
- #
1806
- # This class is obsolete. You may pass these same parameters directly to
1807
- # \Gem::Net::HTTP.new. See Gem::Net::HTTP.new for details of the arguments.
1808
- def HTTP.Proxy(p_addr = :ENV, p_port = nil, p_user = nil, p_pass = nil, p_use_ssl = nil) #:nodoc:
1809
- return self unless p_addr
1810
-
1811
- Class.new(self) {
1812
- @is_proxy_class = true
1813
-
1814
- if p_addr == :ENV then
1815
- @proxy_from_env = true
1816
- @proxy_address = nil
1817
- @proxy_port = nil
1818
- else
1819
- @proxy_from_env = false
1820
- @proxy_address = p_addr
1821
- @proxy_port = p_port || default_port
1822
- end
1823
-
1824
- @proxy_user = p_user
1825
- @proxy_pass = p_pass
1826
- @proxy_use_ssl = p_use_ssl
1827
- }
1828
- end
1829
-
1830
- class << HTTP
1831
- # Returns true if self is a class which was created by HTTP::Proxy.
1832
- def proxy_class?
1833
- defined?(@is_proxy_class) ? @is_proxy_class : false
1834
- end
1835
-
1836
- # Returns the address of the proxy host, or +nil+ if none;
1837
- # see Gem::Net::HTTP@Proxy+Server.
1838
- attr_reader :proxy_address
1839
-
1840
- # Returns the port number of the proxy host, or +nil+ if none;
1841
- # see Gem::Net::HTTP@Proxy+Server.
1842
- attr_reader :proxy_port
1843
-
1844
- # Returns the user name for accessing the proxy, or +nil+ if none;
1845
- # see Gem::Net::HTTP@Proxy+Server.
1846
- attr_reader :proxy_user
1847
-
1848
- # Returns the password for accessing the proxy, or +nil+ if none;
1849
- # see Gem::Net::HTTP@Proxy+Server.
1850
- attr_reader :proxy_pass
1851
-
1852
- # Use SSL when talking to the proxy. If Gem::Net::HTTP does not use a proxy, nil.
1853
- attr_reader :proxy_use_ssl
1854
- end
1855
-
1856
- # Returns +true+ if a proxy server is defined, +false+ otherwise;
1857
- # see {Proxy Server}[rdoc-ref:Gem::Net::HTTP@Proxy+Server].
1858
- def proxy?
1859
- !!(@proxy_from_env ? proxy_uri : @proxy_address)
1860
- end
1861
-
1862
- # Returns +true+ if the proxy server is defined in the environment,
1863
- # +false+ otherwise;
1864
- # see {Proxy Server}[rdoc-ref:Gem::Net::HTTP@Proxy+Server].
1865
- def proxy_from_env?
1866
- @proxy_from_env
1867
- end
1868
-
1869
- # The proxy URI determined from the environment for this connection.
1870
- def proxy_uri # :nodoc:
1871
- return if @proxy_uri == false
1872
- @proxy_uri ||= Gem::URI::HTTP.new(
1873
- "http", nil, address, port, nil, nil, nil, nil, nil
1874
- ).find_proxy || false
1875
- @proxy_uri || nil
1876
- end
1877
-
1878
- # Returns the address of the proxy server, if defined, +nil+ otherwise;
1879
- # see {Proxy Server}[rdoc-ref:Gem::Net::HTTP@Proxy+Server].
1880
- def proxy_address
1881
- if @proxy_from_env then
1882
- proxy_uri&.hostname
1883
- else
1884
- @proxy_address
1885
- end
1886
- end
1887
-
1888
- # Returns the port number of the proxy server, if defined, +nil+ otherwise;
1889
- # see {Proxy Server}[rdoc-ref:Gem::Net::HTTP@Proxy+Server].
1890
- def proxy_port
1891
- if @proxy_from_env then
1892
- proxy_uri&.port
1893
- else
1894
- @proxy_port
1895
- end
1896
- end
1897
-
1898
- # Returns the user name of the proxy server, if defined, +nil+ otherwise;
1899
- # see {Proxy Server}[rdoc-ref:Gem::Net::HTTP@Proxy+Server].
1900
- def proxy_user
1901
- if @proxy_from_env
1902
- user = proxy_uri&.user
1903
- unescape(user) if user
1904
- else
1905
- @proxy_user
1906
- end
1907
- end
1908
-
1909
- # Returns the password of the proxy server, if defined, +nil+ otherwise;
1910
- # see {Proxy Server}[rdoc-ref:Gem::Net::HTTP@Proxy+Server].
1911
- def proxy_pass
1912
- if @proxy_from_env
1913
- pass = proxy_uri&.password
1914
- unescape(pass) if pass
1915
- else
1916
- @proxy_pass
1917
- end
1918
- end
1919
-
1920
- alias proxyaddr proxy_address #:nodoc: obsolete
1921
- alias proxyport proxy_port #:nodoc: obsolete
1922
-
1923
- private
1924
-
1925
- def unescape(value)
1926
- require 'cgi/util'
1927
- CGI.unescape(value)
1928
- end
1929
-
1930
- # without proxy, obsolete
1931
-
1932
- def conn_address # :nodoc:
1933
- @ipaddr || address()
1934
- end
1935
-
1936
- def conn_port # :nodoc:
1937
- port()
1938
- end
1939
-
1940
- def edit_path(path)
1941
- if proxy?
1942
- if path.start_with?("ftp://") || use_ssl?
1943
- path
1944
- else
1945
- "http://#{addr_port}#{path}"
1946
- end
1947
- else
1948
- path
1949
- end
1950
- end
1951
-
1952
- #
1953
- # HTTP operations
1954
- #
1955
-
1956
- public
1957
-
1958
- # :call-seq:
1959
- # get(path, initheader = nil) {|res| ... }
1960
- #
1961
- # Sends a GET request to the server;
1962
- # returns an instance of a subclass of Gem::Net::HTTPResponse.
1963
- #
1964
- # The request is based on the Gem::Net::HTTP::Get object
1965
- # created from string +path+ and initial headers hash +initheader+.
1966
- #
1967
- # With a block given, calls the block with the response body:
1968
- #
1969
- # http = Gem::Net::HTTP.new(hostname)
1970
- # http.get('/todos/1') do |res|
1971
- # p res
1972
- # end # => #<Gem::Net::HTTPOK 200 OK readbody=true>
1973
- #
1974
- # Output:
1975
- #
1976
- # "{\n \"userId\": 1,\n \"id\": 1,\n \"title\": \"delectus aut autem\",\n \"completed\": false\n}"
1977
- #
1978
- # With no block given, simply returns the response object:
1979
- #
1980
- # http.get('/') # => #<Gem::Net::HTTPOK 200 OK readbody=true>
1981
- #
1982
- # Related:
1983
- #
1984
- # - Gem::Net::HTTP::Get: request class for \HTTP method GET.
1985
- # - Gem::Net::HTTP.get: sends GET request, returns response body.
1986
- #
1987
- def get(path, initheader = nil, dest = nil, &block) # :yield: +body_segment+
1988
- res = nil
1989
-
1990
- request(Get.new(path, initheader)) {|r|
1991
- r.read_body dest, &block
1992
- res = r
1993
- }
1994
- res
1995
- end
1996
-
1997
- # Sends a HEAD request to the server;
1998
- # returns an instance of a subclass of Gem::Net::HTTPResponse.
1999
- #
2000
- # The request is based on the Gem::Net::HTTP::Head object
2001
- # created from string +path+ and initial headers hash +initheader+:
2002
- #
2003
- # res = http.head('/todos/1') # => #<Gem::Net::HTTPOK 200 OK readbody=true>
2004
- # res.body # => nil
2005
- # res.to_hash.take(3)
2006
- # # =>
2007
- # [["date", ["Wed, 15 Feb 2023 15:25:42 GMT"]],
2008
- # ["content-type", ["application/json; charset=utf-8"]],
2009
- # ["connection", ["close"]]]
2010
- #
2011
- def head(path, initheader = nil)
2012
- request(Head.new(path, initheader))
2013
- end
2014
-
2015
- # :call-seq:
2016
- # post(path, data, initheader = nil) {|res| ... }
2017
- #
2018
- # Sends a POST request to the server;
2019
- # returns an instance of a subclass of Gem::Net::HTTPResponse.
2020
- #
2021
- # The request is based on the Gem::Net::HTTP::Post object
2022
- # created from string +path+, string +data+, and initial headers hash +initheader+.
2023
- #
2024
- # With a block given, calls the block with the response body:
2025
- #
2026
- # data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
2027
- # http = Gem::Net::HTTP.new(hostname)
2028
- # http.post('/todos', data) do |res|
2029
- # p res
2030
- # end # => #<Gem::Net::HTTPCreated 201 Created readbody=true>
2031
- #
2032
- # Output:
2033
- #
2034
- # "{\n \"{\\\"userId\\\": 1, \\\"id\\\": 1, \\\"title\\\": \\\"delectus aut autem\\\", \\\"completed\\\": false}\": \"\",\n \"id\": 201\n}"
2035
- #
2036
- # With no block given, simply returns the response object:
2037
- #
2038
- # http.post('/todos', data) # => #<Gem::Net::HTTPCreated 201 Created readbody=true>
2039
- #
2040
- # Related:
2041
- #
2042
- # - Gem::Net::HTTP::Post: request class for \HTTP method POST.
2043
- # - Gem::Net::HTTP.post: sends POST request, returns response body.
2044
- #
2045
- def post(path, data, initheader = nil, dest = nil, &block) # :yield: +body_segment+
2046
- send_entity(path, data, initheader, dest, Post, &block)
2047
- end
2048
-
2049
- # :call-seq:
2050
- # patch(path, data, initheader = nil) {|res| ... }
2051
- #
2052
- # Sends a PATCH request to the server;
2053
- # returns an instance of a subclass of Gem::Net::HTTPResponse.
2054
- #
2055
- # The request is based on the Gem::Net::HTTP::Patch object
2056
- # created from string +path+, string +data+, and initial headers hash +initheader+.
2057
- #
2058
- # With a block given, calls the block with the response body:
2059
- #
2060
- # data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
2061
- # http = Gem::Net::HTTP.new(hostname)
2062
- # http.patch('/todos/1', data) do |res|
2063
- # p res
2064
- # end # => #<Gem::Net::HTTPOK 200 OK readbody=true>
2065
- #
2066
- # Output:
2067
- #
2068
- # "{\n \"userId\": 1,\n \"id\": 1,\n \"title\": \"delectus aut autem\",\n \"completed\": false,\n \"{\\\"userId\\\": 1, \\\"id\\\": 1, \\\"title\\\": \\\"delectus aut autem\\\", \\\"completed\\\": false}\": \"\"\n}"
2069
- #
2070
- # With no block given, simply returns the response object:
2071
- #
2072
- # http.patch('/todos/1', data) # => #<Gem::Net::HTTPCreated 201 Created readbody=true>
2073
- #
2074
- def patch(path, data, initheader = nil, dest = nil, &block) # :yield: +body_segment+
2075
- send_entity(path, data, initheader, dest, Patch, &block)
2076
- end
2077
-
2078
- # Sends a PUT request to the server;
2079
- # returns an instance of a subclass of Gem::Net::HTTPResponse.
2080
- #
2081
- # The request is based on the Gem::Net::HTTP::Put object
2082
- # created from string +path+, string +data+, and initial headers hash +initheader+.
2083
- #
2084
- # data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
2085
- # http = Gem::Net::HTTP.new(hostname)
2086
- # http.put('/todos/1', data) # => #<Gem::Net::HTTPOK 200 OK readbody=true>
2087
- #
2088
- # Related:
2089
- #
2090
- # - Gem::Net::HTTP::Put: request class for \HTTP method PUT.
2091
- # - Gem::Net::HTTP.put: sends PUT request, returns response body.
2092
- #
2093
- def put(path, data, initheader = nil)
2094
- request(Put.new(path, initheader), data)
2095
- end
2096
-
2097
- # Sends a PROPPATCH request to the server;
2098
- # returns an instance of a subclass of Gem::Net::HTTPResponse.
2099
- #
2100
- # The request is based on the Gem::Net::HTTP::Proppatch object
2101
- # created from string +path+, string +body+, and initial headers hash +initheader+.
2102
- #
2103
- # data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
2104
- # http = Gem::Net::HTTP.new(hostname)
2105
- # http.proppatch('/todos/1', data)
2106
- #
2107
- def proppatch(path, body, initheader = nil)
2108
- request(Proppatch.new(path, initheader), body)
2109
- end
2110
-
2111
- # Sends a LOCK request to the server;
2112
- # returns an instance of a subclass of Gem::Net::HTTPResponse.
2113
- #
2114
- # The request is based on the Gem::Net::HTTP::Lock object
2115
- # created from string +path+, string +body+, and initial headers hash +initheader+.
2116
- #
2117
- # data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
2118
- # http = Gem::Net::HTTP.new(hostname)
2119
- # http.lock('/todos/1', data)
2120
- #
2121
- def lock(path, body, initheader = nil)
2122
- request(Lock.new(path, initheader), body)
2123
- end
2124
-
2125
- # Sends an UNLOCK request to the server;
2126
- # returns an instance of a subclass of Gem::Net::HTTPResponse.
2127
- #
2128
- # The request is based on the Gem::Net::HTTP::Unlock object
2129
- # created from string +path+, string +body+, and initial headers hash +initheader+.
2130
- #
2131
- # data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
2132
- # http = Gem::Net::HTTP.new(hostname)
2133
- # http.unlock('/todos/1', data)
2134
- #
2135
- def unlock(path, body, initheader = nil)
2136
- request(Unlock.new(path, initheader), body)
2137
- end
2138
-
2139
- # Sends an Options request to the server;
2140
- # returns an instance of a subclass of Gem::Net::HTTPResponse.
2141
- #
2142
- # The request is based on the Gem::Net::HTTP::Options object
2143
- # created from string +path+ and initial headers hash +initheader+.
2144
- #
2145
- # http = Gem::Net::HTTP.new(hostname)
2146
- # http.options('/')
2147
- #
2148
- def options(path, initheader = nil)
2149
- request(Options.new(path, initheader))
2150
- end
2151
-
2152
- # Sends a PROPFIND request to the server;
2153
- # returns an instance of a subclass of Gem::Net::HTTPResponse.
2154
- #
2155
- # The request is based on the Gem::Net::HTTP::Propfind object
2156
- # created from string +path+, string +body+, and initial headers hash +initheader+.
2157
- #
2158
- # data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
2159
- # http = Gem::Net::HTTP.new(hostname)
2160
- # http.propfind('/todos/1', data)
2161
- #
2162
- def propfind(path, body = nil, initheader = {'Depth' => '0'})
2163
- request(Propfind.new(path, initheader), body)
2164
- end
2165
-
2166
- # Sends a DELETE request to the server;
2167
- # returns an instance of a subclass of Gem::Net::HTTPResponse.
2168
- #
2169
- # The request is based on the Gem::Net::HTTP::Delete object
2170
- # created from string +path+ and initial headers hash +initheader+.
2171
- #
2172
- # http = Gem::Net::HTTP.new(hostname)
2173
- # http.delete('/todos/1')
2174
- #
2175
- def delete(path, initheader = {'Depth' => 'Infinity'})
2176
- request(Delete.new(path, initheader))
2177
- end
2178
-
2179
- # Sends a MOVE request to the server;
2180
- # returns an instance of a subclass of Gem::Net::HTTPResponse.
2181
- #
2182
- # The request is based on the Gem::Net::HTTP::Move object
2183
- # created from string +path+ and initial headers hash +initheader+.
2184
- #
2185
- # http = Gem::Net::HTTP.new(hostname)
2186
- # http.move('/todos/1')
2187
- #
2188
- def move(path, initheader = nil)
2189
- request(Move.new(path, initheader))
2190
- end
2191
-
2192
- # Sends a COPY request to the server;
2193
- # returns an instance of a subclass of Gem::Net::HTTPResponse.
2194
- #
2195
- # The request is based on the Gem::Net::HTTP::Copy object
2196
- # created from string +path+ and initial headers hash +initheader+.
2197
- #
2198
- # http = Gem::Net::HTTP.new(hostname)
2199
- # http.copy('/todos/1')
2200
- #
2201
- def copy(path, initheader = nil)
2202
- request(Copy.new(path, initheader))
2203
- end
2204
-
2205
- # Sends a MKCOL request to the server;
2206
- # returns an instance of a subclass of Gem::Net::HTTPResponse.
2207
- #
2208
- # The request is based on the Gem::Net::HTTP::Mkcol object
2209
- # created from string +path+, string +body+, and initial headers hash +initheader+.
2210
- #
2211
- # data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
2212
- # http.mkcol('/todos/1', data)
2213
- # http = Gem::Net::HTTP.new(hostname)
2214
- #
2215
- def mkcol(path, body = nil, initheader = nil)
2216
- request(Mkcol.new(path, initheader), body)
2217
- end
2218
-
2219
- # Sends a TRACE request to the server;
2220
- # returns an instance of a subclass of Gem::Net::HTTPResponse.
2221
- #
2222
- # The request is based on the Gem::Net::HTTP::Trace object
2223
- # created from string +path+ and initial headers hash +initheader+.
2224
- #
2225
- # http = Gem::Net::HTTP.new(hostname)
2226
- # http.trace('/todos/1')
2227
- #
2228
- def trace(path, initheader = nil)
2229
- request(Trace.new(path, initheader))
2230
- end
2231
-
2232
- # Sends a GET request to the server;
2233
- # forms the response into a Gem::Net::HTTPResponse object.
2234
- #
2235
- # The request is based on the Gem::Net::HTTP::Get object
2236
- # created from string +path+ and initial headers hash +initheader+.
2237
- #
2238
- # With no block given, returns the response object:
2239
- #
2240
- # http = Gem::Net::HTTP.new(hostname)
2241
- # http.request_get('/todos') # => #<Gem::Net::HTTPOK 200 OK readbody=true>
2242
- #
2243
- # With a block given, calls the block with the response object
2244
- # and returns the response object:
2245
- #
2246
- # http.request_get('/todos') do |res|
2247
- # p res
2248
- # end # => #<Gem::Net::HTTPOK 200 OK readbody=true>
2249
- #
2250
- # Output:
2251
- #
2252
- # #<Gem::Net::HTTPOK 200 OK readbody=false>
2253
- #
2254
- def request_get(path, initheader = nil, &block) # :yield: +response+
2255
- request(Get.new(path, initheader), &block)
2256
- end
2257
-
2258
- # Sends a HEAD request to the server;
2259
- # returns an instance of a subclass of Gem::Net::HTTPResponse.
2260
- #
2261
- # The request is based on the Gem::Net::HTTP::Head object
2262
- # created from string +path+ and initial headers hash +initheader+.
2263
- #
2264
- # http = Gem::Net::HTTP.new(hostname)
2265
- # http.head('/todos/1') # => #<Gem::Net::HTTPOK 200 OK readbody=true>
2266
- #
2267
- def request_head(path, initheader = nil, &block)
2268
- request(Head.new(path, initheader), &block)
2269
- end
2270
-
2271
- # Sends a POST request to the server;
2272
- # forms the response into a Gem::Net::HTTPResponse object.
2273
- #
2274
- # The request is based on the Gem::Net::HTTP::Post object
2275
- # created from string +path+, string +data+, and initial headers hash +initheader+.
2276
- #
2277
- # With no block given, returns the response object:
2278
- #
2279
- # http = Gem::Net::HTTP.new(hostname)
2280
- # http.post('/todos', 'xyzzy')
2281
- # # => #<Gem::Net::HTTPCreated 201 Created readbody=true>
2282
- #
2283
- # With a block given, calls the block with the response body
2284
- # and returns the response object:
2285
- #
2286
- # http.post('/todos', 'xyzzy') do |res|
2287
- # p res
2288
- # end # => #<Gem::Net::HTTPCreated 201 Created readbody=true>
2289
- #
2290
- # Output:
2291
- #
2292
- # "{\n \"xyzzy\": \"\",\n \"id\": 201\n}"
2293
- #
2294
- def request_post(path, data, initheader = nil, &block) # :yield: +response+
2295
- request Post.new(path, initheader), data, &block
2296
- end
2297
-
2298
- # Sends a PUT request to the server;
2299
- # returns an instance of a subclass of Gem::Net::HTTPResponse.
2300
- #
2301
- # The request is based on the Gem::Net::HTTP::Put object
2302
- # created from string +path+, string +data+, and initial headers hash +initheader+.
2303
- #
2304
- # http = Gem::Net::HTTP.new(hostname)
2305
- # http.put('/todos/1', 'xyzzy')
2306
- # # => #<Gem::Net::HTTPOK 200 OK readbody=true>
2307
- #
2308
- def request_put(path, data, initheader = nil, &block) #:nodoc:
2309
- request Put.new(path, initheader), data, &block
2310
- end
2311
-
2312
- alias get2 request_get #:nodoc: obsolete
2313
- alias head2 request_head #:nodoc: obsolete
2314
- alias post2 request_post #:nodoc: obsolete
2315
- alias put2 request_put #:nodoc: obsolete
2316
-
2317
- # Sends an \HTTP request to the server;
2318
- # returns an instance of a subclass of Gem::Net::HTTPResponse.
2319
- #
2320
- # The request is based on the Gem::Net::HTTPRequest object
2321
- # created from string +path+, string +data+, and initial headers hash +header+.
2322
- # That object is an instance of the
2323
- # {subclass of Gem::Net::HTTPRequest}[rdoc-ref:Gem::Net::HTTPRequest@Request+Subclasses],
2324
- # that corresponds to the given uppercase string +name+,
2325
- # which must be
2326
- # an {HTTP request method}[https://en.wikipedia.org/wiki/HTTP#Request_methods]
2327
- # or a {WebDAV request method}[https://en.wikipedia.org/wiki/WebDAV#Implementation].
2328
- #
2329
- # Examples:
2330
- #
2331
- # http = Gem::Net::HTTP.new(hostname)
2332
- # http.send_request('GET', '/todos/1')
2333
- # # => #<Gem::Net::HTTPOK 200 OK readbody=true>
2334
- # http.send_request('POST', '/todos', 'xyzzy')
2335
- # # => #<Gem::Net::HTTPCreated 201 Created readbody=true>
2336
- #
2337
- def send_request(name, path, data = nil, header = nil)
2338
- has_response_body = name != 'HEAD'
2339
- r = HTTPGenericRequest.new(name,(data ? true : false),has_response_body,path,header)
2340
- request r, data
2341
- end
2342
-
2343
- # Sends the given request +req+ to the server;
2344
- # forms the response into a Gem::Net::HTTPResponse object.
2345
- #
2346
- # The given +req+ must be an instance of a
2347
- # {subclass of Gem::Net::HTTPRequest}[rdoc-ref:Gem::Net::HTTPRequest@Request+Subclasses].
2348
- # Argument +body+ should be given only if needed for the request.
2349
- #
2350
- # With no block given, returns the response object:
2351
- #
2352
- # http = Gem::Net::HTTP.new(hostname)
2353
- #
2354
- # req = Gem::Net::HTTP::Get.new('/todos/1')
2355
- # http.request(req)
2356
- # # => #<Gem::Net::HTTPOK 200 OK readbody=true>
2357
- #
2358
- # req = Gem::Net::HTTP::Post.new('/todos')
2359
- # http.request(req, 'xyzzy')
2360
- # # => #<Gem::Net::HTTPCreated 201 Created readbody=true>
2361
- #
2362
- # With a block given, calls the block with the response and returns the response:
2363
- #
2364
- # req = Gem::Net::HTTP::Get.new('/todos/1')
2365
- # http.request(req) do |res|
2366
- # p res
2367
- # end # => #<Gem::Net::HTTPOK 200 OK readbody=true>
2368
- #
2369
- # Output:
2370
- #
2371
- # #<Gem::Net::HTTPOK 200 OK readbody=false>
2372
- #
2373
- def request(req, body = nil, &block) # :yield: +response+
2374
- unless started?
2375
- start {
2376
- req['connection'] ||= 'close'
2377
- return request(req, body, &block)
2378
- }
2379
- end
2380
- if proxy_user()
2381
- req.proxy_basic_auth proxy_user(), proxy_pass() unless use_ssl?
2382
- end
2383
- req.set_body_internal body
2384
- res = transport_request(req, &block)
2385
- if sspi_auth?(res)
2386
- sspi_auth(req)
2387
- res = transport_request(req, &block)
2388
- end
2389
- res
2390
- end
2391
-
2392
- private
2393
-
2394
- # Executes a request which uses a representation
2395
- # and returns its body.
2396
- def send_entity(path, data, initheader, dest, type, &block)
2397
- res = nil
2398
- request(type.new(path, initheader), data) {|r|
2399
- r.read_body dest, &block
2400
- res = r
2401
- }
2402
- res
2403
- end
2404
-
2405
- IDEMPOTENT_METHODS_ = %w/GET HEAD PUT DELETE OPTIONS TRACE/ # :nodoc:
2406
-
2407
- def transport_request(req)
2408
- count = 0
2409
- begin
2410
- begin_transport req
2411
- res = catch(:response) {
2412
- begin
2413
- req.exec @socket, @curr_http_version, edit_path(req.path)
2414
- rescue Errno::EPIPE
2415
- # Failure when writing full request, but we can probably
2416
- # still read the received response.
2417
- end
2418
-
2419
- begin
2420
- res = HTTPResponse.read_new(@socket)
2421
- res.decode_content = req.decode_content
2422
- res.body_encoding = @response_body_encoding
2423
- res.ignore_eof = @ignore_eof
2424
- end while res.kind_of?(HTTPInformation)
2425
-
2426
- res.uri = req.uri
2427
-
2428
- res
2429
- }
2430
- res.reading_body(@socket, req.response_body_permitted?) {
2431
- if block_given?
2432
- count = max_retries # Don't restart in the middle of a download
2433
- yield res
2434
- end
2435
- }
2436
- rescue Gem::Net::OpenTimeout
2437
- raise
2438
- rescue Gem::Net::ReadTimeout, IOError, EOFError,
2439
- Errno::ECONNRESET, Errno::ECONNABORTED, Errno::EPIPE, Errno::ETIMEDOUT,
2440
- # avoid a dependency on OpenSSL
2441
- defined?(OpenSSL::SSL) ? OpenSSL::SSL::SSLError : IOError,
2442
- Gem::Timeout::Error => exception
2443
- if count < max_retries && IDEMPOTENT_METHODS_.include?(req.method)
2444
- count += 1
2445
- @socket.close if @socket
2446
- debug "Conn close because of error #{exception}, and retry"
2447
- retry
2448
- end
2449
- debug "Conn close because of error #{exception}"
2450
- @socket.close if @socket
2451
- raise
2452
- end
2453
-
2454
- end_transport req, res
2455
- res
2456
- rescue => exception
2457
- debug "Conn close because of error #{exception}"
2458
- @socket.close if @socket
2459
- raise exception
2460
- end
2461
-
2462
- def begin_transport(req)
2463
- if @socket.closed?
2464
- connect
2465
- elsif @last_communicated
2466
- if @last_communicated + @keep_alive_timeout < Process.clock_gettime(Process::CLOCK_MONOTONIC)
2467
- debug 'Conn close because of keep_alive_timeout'
2468
- @socket.close
2469
- connect
2470
- elsif @socket.io.to_io.wait_readable(0) && @socket.eof?
2471
- debug "Conn close because of EOF"
2472
- @socket.close
2473
- connect
2474
- end
2475
- end
2476
-
2477
- if not req.response_body_permitted? and @close_on_empty_response
2478
- req['connection'] ||= 'close'
2479
- end
2480
-
2481
- req.update_uri address, port, use_ssl?
2482
- req['host'] ||= addr_port()
2483
- end
2484
-
2485
- def end_transport(req, res)
2486
- @curr_http_version = res.http_version
2487
- @last_communicated = nil
2488
- if @socket.closed?
2489
- debug 'Conn socket closed'
2490
- elsif not res.body and @close_on_empty_response
2491
- debug 'Conn close'
2492
- @socket.close
2493
- elsif keep_alive?(req, res)
2494
- debug 'Conn keep-alive'
2495
- @last_communicated = Process.clock_gettime(Process::CLOCK_MONOTONIC)
2496
- else
2497
- debug 'Conn close'
2498
- @socket.close
2499
- end
2500
- end
2501
-
2502
- def keep_alive?(req, res)
2503
- return false if req.connection_close?
2504
- if @curr_http_version <= '1.0'
2505
- res.connection_keep_alive?
2506
- else # HTTP/1.1 or later
2507
- not res.connection_close?
2508
- end
2509
- end
2510
-
2511
- def sspi_auth?(res)
2512
- return false unless @sspi_enabled
2513
- if res.kind_of?(HTTPProxyAuthenticationRequired) and
2514
- proxy? and res["Proxy-Authenticate"].include?("Negotiate")
2515
- begin
2516
- require 'win32/sspi'
2517
- true
2518
- rescue LoadError
2519
- false
2520
- end
2521
- else
2522
- false
2523
- end
2524
- end
2525
-
2526
- def sspi_auth(req)
2527
- n = Win32::SSPI::NegotiateAuth.new
2528
- req["Proxy-Authorization"] = "Negotiate #{n.get_initial_token}"
2529
- # Some versions of ISA will close the connection if this isn't present.
2530
- req["Connection"] = "Keep-Alive"
2531
- req["Proxy-Connection"] = "Keep-Alive"
2532
- res = transport_request(req)
2533
- authphrase = res["Proxy-Authenticate"] or return res
2534
- req["Proxy-Authorization"] = "Negotiate #{n.complete_authentication(authphrase)}"
2535
- rescue => err
2536
- raise HTTPAuthenticationError.new('HTTP authentication failed', err)
2537
- end
2538
-
2539
- #
2540
- # utils
2541
- #
2542
-
2543
- private
2544
-
2545
- def addr_port
2546
- addr = address
2547
- addr = "[#{addr}]" if addr.include?(":")
2548
- default_port = use_ssl? ? HTTP.https_default_port : HTTP.http_default_port
2549
- default_port == port ? addr : "#{addr}:#{port}"
2550
- end
2551
-
2552
- # Adds a message to debugging output
2553
- def debug(msg)
2554
- return unless @debug_output
2555
- @debug_output << msg
2556
- @debug_output << "\n"
2557
- end
2558
-
2559
- alias_method :D, :debug
2560
- end
2561
-
2562
- # for backward compatibility until Ruby 3.5
2563
- # https://bugs.ruby-lang.org/issues/20900
2564
- # https://github.com/bblimke/webmock/pull/1081
2565
- HTTPSession = HTTP
2566
- deprecate_constant :HTTPSession
2567
- end
2568
-
2569
- require_relative 'http/exceptions'
2570
-
2571
- require_relative 'http/header'
2572
-
2573
- require_relative 'http/generic_request'
2574
- require_relative 'http/request'
2575
- require_relative 'http/requests'
2576
-
2577
- require_relative 'http/response'
2578
- require_relative 'http/responses'
2579
-
2580
- require_relative 'http/proxy_delta'