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

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