bundler 2.2.29 → 2.5.16

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 (330) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1129 -4
  3. data/README.md +4 -8
  4. data/bundler.gemspec +11 -11
  5. data/exe/bundle +5 -26
  6. data/exe/bundler +1 -1
  7. data/lib/bundler/.document +1 -0
  8. data/lib/bundler/build_metadata.rb +4 -4
  9. data/lib/bundler/capistrano.rb +1 -1
  10. data/lib/bundler/checksum.rb +254 -0
  11. data/lib/bundler/ci_detector.rb +75 -0
  12. data/lib/bundler/cli/add.rb +4 -4
  13. data/lib/bundler/cli/binstubs.rb +10 -6
  14. data/lib/bundler/cli/cache.rb +1 -1
  15. data/lib/bundler/cli/check.rb +3 -3
  16. data/lib/bundler/cli/common.rb +13 -3
  17. data/lib/bundler/cli/config.rb +18 -8
  18. data/lib/bundler/cli/console.rb +5 -4
  19. data/lib/bundler/cli/doctor.rb +12 -5
  20. data/lib/bundler/cli/exec.rb +1 -1
  21. data/lib/bundler/cli/fund.rb +1 -1
  22. data/lib/bundler/cli/gem.rb +141 -48
  23. data/lib/bundler/cli/info.rb +27 -17
  24. data/lib/bundler/cli/init.rb +6 -2
  25. data/lib/bundler/cli/install.rb +22 -39
  26. data/lib/bundler/cli/issue.rb +5 -4
  27. data/lib/bundler/cli/lock.rb +36 -29
  28. data/lib/bundler/cli/open.rb +9 -9
  29. data/lib/bundler/cli/outdated.rb +19 -12
  30. data/lib/bundler/cli/platform.rb +8 -6
  31. data/lib/bundler/cli/plugin.rb +9 -15
  32. data/lib/bundler/cli/pristine.rb +38 -30
  33. data/lib/bundler/cli/show.rb +3 -3
  34. data/lib/bundler/cli/update.rb +12 -7
  35. data/lib/bundler/cli/viz.rb +1 -1
  36. data/lib/bundler/cli.rb +266 -285
  37. data/lib/bundler/compact_index_client/cache.rb +53 -67
  38. data/lib/bundler/compact_index_client/cache_file.rb +153 -0
  39. data/lib/bundler/compact_index_client/gem_parser.rb +7 -3
  40. data/lib/bundler/compact_index_client/parser.rb +84 -0
  41. data/lib/bundler/compact_index_client/updater.rb +83 -76
  42. data/lib/bundler/compact_index_client.rb +59 -87
  43. data/lib/bundler/constants.rb +9 -2
  44. data/lib/bundler/current_ruby.rb +12 -16
  45. data/lib/bundler/definition.rb +509 -319
  46. data/lib/bundler/dependency.rb +33 -71
  47. data/lib/bundler/digest.rb +71 -0
  48. data/lib/bundler/dsl.rb +88 -69
  49. data/lib/bundler/endpoint_specification.rb +32 -15
  50. data/lib/bundler/env.rb +5 -7
  51. data/lib/bundler/environment_preserver.rb +8 -22
  52. data/lib/bundler/errors.rb +101 -13
  53. data/lib/bundler/feature_flag.rb +0 -2
  54. data/lib/bundler/fetcher/base.rb +11 -11
  55. data/lib/bundler/fetcher/compact_index.rb +32 -52
  56. data/lib/bundler/fetcher/dependency.rb +3 -7
  57. data/lib/bundler/fetcher/downloader.rb +17 -16
  58. data/lib/bundler/fetcher/gem_remote_fetcher.rb +16 -0
  59. data/lib/bundler/fetcher/index.rb +2 -29
  60. data/lib/bundler/fetcher.rb +87 -79
  61. data/lib/bundler/force_platform.rb +18 -0
  62. data/lib/bundler/friendly_errors.rb +29 -40
  63. data/lib/bundler/gem_helper.rb +11 -23
  64. data/lib/bundler/gem_helpers.rb +30 -6
  65. data/lib/bundler/gem_version_promoter.rb +68 -109
  66. data/lib/bundler/graph.rb +9 -9
  67. data/lib/bundler/index.rb +71 -79
  68. data/lib/bundler/injector.rb +23 -11
  69. data/lib/bundler/inline.rb +11 -23
  70. data/lib/bundler/installer/gem_installer.rb +18 -11
  71. data/lib/bundler/installer/parallel_installer.rb +17 -65
  72. data/lib/bundler/installer/standalone.rb +56 -15
  73. data/lib/bundler/installer.rb +35 -61
  74. data/lib/bundler/lazy_specification.rb +92 -61
  75. data/lib/bundler/lockfile_generator.rb +12 -3
  76. data/lib/bundler/lockfile_parser.rb +137 -70
  77. data/lib/bundler/man/bundle-add.1 +19 -26
  78. data/lib/bundler/man/bundle-add.1.ronn +16 -4
  79. data/lib/bundler/man/bundle-binstubs.1 +4 -16
  80. data/lib/bundler/man/bundle-cache.1 +9 -24
  81. data/lib/bundler/man/bundle-cache.1.ronn +9 -2
  82. data/lib/bundler/man/bundle-check.1 +5 -12
  83. data/lib/bundler/man/bundle-check.1.ronn +3 -0
  84. data/lib/bundler/man/bundle-clean.1 +4 -11
  85. data/lib/bundler/man/bundle-clean.1.ronn +1 -1
  86. data/lib/bundler/man/bundle-config.1 +47 -224
  87. data/lib/bundler/man/bundle-config.1.ronn +40 -28
  88. data/lib/bundler/man/bundle-console.1 +35 -0
  89. data/lib/bundler/man/bundle-console.1.ronn +44 -0
  90. data/lib/bundler/man/bundle-doctor.1 +4 -18
  91. data/lib/bundler/man/bundle-exec.1 +16 -77
  92. data/lib/bundler/man/bundle-exec.1.ronn +8 -9
  93. data/lib/bundler/man/bundle-gem.1 +45 -72
  94. data/lib/bundler/man/bundle-gem.1.ronn +32 -5
  95. data/lib/bundler/man/bundle-help.1 +9 -0
  96. data/lib/bundler/man/bundle-help.1.ronn +12 -0
  97. data/lib/bundler/man/bundle-info.1 +5 -11
  98. data/lib/bundler/man/bundle-info.1.ronn +3 -3
  99. data/lib/bundler/man/bundle-init.1 +6 -11
  100. data/lib/bundler/man/bundle-init.1.ronn +2 -0
  101. data/lib/bundler/man/bundle-inject.1 +8 -18
  102. data/lib/bundler/man/bundle-inject.1.ronn +3 -1
  103. data/lib/bundler/man/bundle-install.1 +32 -155
  104. data/lib/bundler/man/bundle-install.1.ronn +11 -33
  105. data/lib/bundler/man/bundle-list.1 +4 -19
  106. data/lib/bundler/man/bundle-lock.1 +5 -29
  107. data/lib/bundler/man/bundle-open.1 +18 -18
  108. data/lib/bundler/man/bundle-open.1.ronn +9 -1
  109. data/lib/bundler/man/bundle-outdated.1 +17 -72
  110. data/lib/bundler/man/bundle-outdated.1.ronn +13 -18
  111. data/lib/bundler/man/bundle-platform.1 +16 -28
  112. data/lib/bundler/man/bundle-platform.1.ronn +14 -7
  113. data/lib/bundler/man/bundle-plugin.1 +58 -0
  114. data/lib/bundler/man/bundle-plugin.1.ronn +63 -0
  115. data/lib/bundler/man/bundle-pristine.1 +5 -16
  116. data/lib/bundler/man/bundle-remove.1 +4 -14
  117. data/lib/bundler/man/bundle-show.1 +3 -10
  118. data/lib/bundler/man/bundle-update.1 +19 -138
  119. data/lib/bundler/man/bundle-update.1.ronn +2 -1
  120. data/lib/bundler/man/bundle-version.1 +22 -0
  121. data/lib/bundler/man/bundle-version.1.ronn +24 -0
  122. data/lib/bundler/man/bundle-viz.1 +6 -15
  123. data/lib/bundler/man/bundle-viz.1.ronn +2 -0
  124. data/lib/bundler/man/bundle.1 +17 -51
  125. data/lib/bundler/man/bundle.1.ronn +12 -7
  126. data/lib/bundler/man/gemfile.5 +130 -346
  127. data/lib/bundler/man/gemfile.5.ronn +121 -86
  128. data/lib/bundler/man/index.txt +4 -0
  129. data/lib/bundler/match_metadata.rb +17 -0
  130. data/lib/bundler/match_platform.rb +1 -2
  131. data/lib/bundler/match_remote_metadata.rb +29 -0
  132. data/lib/bundler/mirror.rb +8 -10
  133. data/lib/bundler/plugin/api/source.rb +9 -13
  134. data/lib/bundler/plugin/index.rb +13 -5
  135. data/lib/bundler/plugin/installer/git.rb +0 -4
  136. data/lib/bundler/plugin/installer/path.rb +18 -0
  137. data/lib/bundler/plugin/installer/rubygems.rb +0 -8
  138. data/lib/bundler/plugin/installer.rb +42 -19
  139. data/lib/bundler/plugin/source_list.rb +4 -4
  140. data/lib/bundler/plugin.rb +16 -7
  141. data/lib/bundler/process_lock.rb +1 -1
  142. data/lib/bundler/remote_specification.rb +11 -5
  143. data/lib/bundler/resolver/base.rb +111 -0
  144. data/lib/bundler/resolver/candidate.rb +82 -0
  145. data/lib/bundler/resolver/incompatibility.rb +15 -0
  146. data/lib/bundler/resolver/package.rb +81 -0
  147. data/lib/bundler/resolver/root.rb +25 -0
  148. data/lib/bundler/resolver/spec_group.rb +53 -66
  149. data/lib/bundler/resolver.rb +419 -307
  150. data/lib/bundler/retry.rb +1 -1
  151. data/lib/bundler/ruby_dsl.rb +42 -7
  152. data/lib/bundler/ruby_version.rb +16 -22
  153. data/lib/bundler/rubygems_ext.rb +250 -64
  154. data/lib/bundler/rubygems_gem_installer.rb +90 -64
  155. data/lib/bundler/rubygems_integration.rb +81 -190
  156. data/lib/bundler/runtime.rb +8 -13
  157. data/lib/bundler/safe_marshal.rb +31 -0
  158. data/lib/bundler/self_manager.rb +206 -0
  159. data/lib/bundler/settings.rb +139 -57
  160. data/lib/bundler/setup.rb +13 -1
  161. data/lib/bundler/shared_helpers.rb +67 -36
  162. data/lib/bundler/source/git/git_proxy.rb +285 -82
  163. data/lib/bundler/source/git.rb +81 -41
  164. data/lib/bundler/source/metadata.rb +17 -16
  165. data/lib/bundler/source/path/installer.rb +1 -22
  166. data/lib/bundler/source/path.rb +13 -25
  167. data/lib/bundler/source/rubygems/remote.rb +1 -1
  168. data/lib/bundler/source/rubygems.rb +164 -234
  169. data/lib/bundler/source/rubygems_aggregate.rb +1 -1
  170. data/lib/bundler/source.rb +7 -6
  171. data/lib/bundler/source_list.rb +40 -32
  172. data/lib/bundler/source_map.rb +15 -2
  173. data/lib/bundler/spec_set.rb +156 -46
  174. data/lib/bundler/stub_specification.rb +18 -5
  175. data/lib/bundler/templates/Executable +3 -5
  176. data/lib/bundler/templates/Executable.bundler +7 -12
  177. data/lib/bundler/templates/Executable.standalone +4 -4
  178. data/lib/bundler/templates/Gemfile +0 -2
  179. data/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +77 -29
  180. data/lib/bundler/templates/newgem/Cargo.toml.tt +7 -0
  181. data/lib/bundler/templates/newgem/Gemfile.tt +8 -2
  182. data/lib/bundler/templates/newgem/README.md.tt +7 -11
  183. data/lib/bundler/templates/newgem/Rakefile.tt +28 -4
  184. data/lib/bundler/templates/newgem/bin/console.tt +0 -4
  185. data/lib/bundler/templates/newgem/circleci/config.yml.tt +12 -0
  186. data/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +15 -0
  187. data/lib/bundler/templates/newgem/ext/newgem/extconf-c.rb.tt +10 -0
  188. data/lib/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt +6 -0
  189. data/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt +1 -1
  190. data/lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt +12 -0
  191. data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +13 -3
  192. data/lib/bundler/templates/newgem/gitignore.tt +3 -0
  193. data/lib/bundler/templates/newgem/gitlab-ci.yml.tt +13 -4
  194. data/lib/bundler/templates/newgem/newgem.gemspec.tt +25 -17
  195. data/lib/bundler/templates/newgem/rubocop.yml.tt +0 -5
  196. data/lib/bundler/templates/newgem/sig/newgem.rbs.tt +8 -0
  197. data/lib/bundler/templates/newgem/standard.yml.tt +3 -0
  198. data/lib/bundler/templates/newgem/test/minitest/{newgem_test.rb.tt → test_newgem.rb.tt} +1 -1
  199. data/lib/bundler/ui/rg_proxy.rb +1 -1
  200. data/lib/bundler/ui/shell.rb +38 -15
  201. data/lib/bundler/ui/silent.rb +21 -5
  202. data/lib/bundler/uri_credentials_filter.rb +2 -2
  203. data/lib/bundler/uri_normalizer.rb +23 -0
  204. data/lib/bundler/vendor/.document +1 -0
  205. data/lib/bundler/vendor/connection_pool/.document +1 -0
  206. data/lib/bundler/vendor/connection_pool/LICENSE +20 -0
  207. data/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +19 -21
  208. data/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
  209. data/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +56 -0
  210. data/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +92 -78
  211. data/lib/bundler/vendor/fileutils/.document +1 -0
  212. data/lib/bundler/vendor/fileutils/LICENSE.txt +22 -0
  213. data/lib/bundler/vendor/fileutils/lib/fileutils.rb +1340 -410
  214. data/lib/bundler/vendor/net-http-persistent/.document +1 -0
  215. data/lib/bundler/vendor/net-http-persistent/README.rdoc +82 -0
  216. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb +4 -3
  217. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb +23 -11
  218. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +1 -1
  219. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +57 -57
  220. data/lib/bundler/vendor/pub_grub/.document +1 -0
  221. data/lib/bundler/vendor/pub_grub/LICENSE.txt +21 -0
  222. data/lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb +20 -0
  223. data/lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb +189 -0
  224. data/lib/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb +182 -0
  225. data/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb +150 -0
  226. data/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb +43 -0
  227. data/lib/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb +121 -0
  228. data/lib/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb +45 -0
  229. data/lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb +19 -0
  230. data/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb +61 -0
  231. data/lib/bundler/vendor/pub_grub/lib/pub_grub/term.rb +105 -0
  232. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version.rb +3 -0
  233. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb +129 -0
  234. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +411 -0
  235. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +248 -0
  236. data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb +178 -0
  237. data/lib/bundler/vendor/pub_grub/lib/pub_grub.rb +31 -0
  238. data/lib/bundler/vendor/thor/.document +1 -0
  239. data/lib/bundler/vendor/thor/LICENSE.md +20 -0
  240. data/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +3 -2
  241. data/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +1 -1
  242. data/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +1 -1
  243. data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +12 -14
  244. data/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +16 -6
  245. data/lib/bundler/vendor/thor/lib/thor/actions.rb +21 -17
  246. data/lib/bundler/vendor/thor/lib/thor/base.rb +140 -14
  247. data/lib/bundler/vendor/thor/lib/thor/command.rb +13 -4
  248. data/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +10 -0
  249. data/lib/bundler/vendor/thor/lib/thor/error.rb +16 -20
  250. data/lib/bundler/vendor/thor/lib/thor/group.rb +1 -1
  251. data/lib/bundler/vendor/thor/lib/thor/invocation.rb +1 -1
  252. data/lib/bundler/vendor/thor/lib/thor/nested_context.rb +2 -2
  253. data/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +20 -1
  254. data/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +33 -17
  255. data/lib/bundler/vendor/thor/lib/thor/parser/option.rb +27 -8
  256. data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +63 -7
  257. data/lib/bundler/vendor/thor/lib/thor/rake_compat.rb +2 -2
  258. data/lib/bundler/vendor/thor/lib/thor/runner.rb +40 -30
  259. data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +48 -154
  260. data/lib/bundler/vendor/thor/lib/thor/shell/color.rb +1 -46
  261. data/lib/bundler/vendor/thor/lib/thor/shell/column_printer.rb +29 -0
  262. data/lib/bundler/vendor/thor/lib/thor/shell/html.rb +0 -45
  263. data/lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb +134 -0
  264. data/lib/bundler/vendor/thor/lib/thor/shell/terminal.rb +42 -0
  265. data/lib/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb +38 -0
  266. data/lib/bundler/vendor/thor/lib/thor/shell.rb +2 -2
  267. data/lib/bundler/vendor/thor/lib/thor/util.rb +9 -8
  268. data/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
  269. data/lib/bundler/vendor/thor/lib/thor.rb +155 -8
  270. data/lib/bundler/vendor/tsort/.document +1 -0
  271. data/lib/bundler/vendor/tsort/LICENSE.txt +22 -0
  272. data/lib/bundler/vendor/tsort/lib/tsort.rb +455 -0
  273. data/lib/bundler/vendor/uri/.document +1 -0
  274. data/lib/bundler/vendor/uri/LICENSE.txt +22 -0
  275. data/lib/bundler/vendor/uri/lib/uri/common.rb +316 -207
  276. data/lib/bundler/vendor/uri/lib/uri/file.rb +7 -1
  277. data/lib/bundler/vendor/uri/lib/uri/ftp.rb +2 -2
  278. data/lib/bundler/vendor/uri/lib/uri/generic.rb +33 -13
  279. data/lib/bundler/vendor/uri/lib/uri/http.rb +40 -3
  280. data/lib/bundler/vendor/uri/lib/uri/https.rb +2 -2
  281. data/lib/bundler/vendor/uri/lib/uri/ldap.rb +2 -2
  282. data/lib/bundler/vendor/uri/lib/uri/ldaps.rb +2 -1
  283. data/lib/bundler/vendor/uri/lib/uri/mailto.rb +2 -3
  284. data/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +16 -23
  285. data/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +105 -47
  286. data/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
  287. data/lib/bundler/vendor/uri/lib/uri/ws.rb +83 -0
  288. data/lib/bundler/vendor/uri/lib/uri/wss.rb +23 -0
  289. data/lib/bundler/vendor/uri/lib/uri.rb +3 -3
  290. data/lib/bundler/vendored_net_http.rb +23 -0
  291. data/lib/bundler/vendored_persistent.rb +0 -36
  292. data/lib/bundler/{vendored_molinillo.rb → vendored_pub_grub.rb} +1 -1
  293. data/lib/bundler/vendored_timeout.rb +12 -0
  294. data/lib/bundler/{vendored_tmpdir.rb → vendored_tsort.rb} +1 -1
  295. data/lib/bundler/vendored_uri.rb +18 -1
  296. data/lib/bundler/version.rb +5 -1
  297. data/lib/bundler/vlad.rb +1 -1
  298. data/lib/bundler/worker.rb +7 -9
  299. data/lib/bundler/yaml_serializer.rb +21 -12
  300. data/lib/bundler.rb +114 -121
  301. metadata +87 -41
  302. data/lib/bundler/dep_proxy.rb +0 -55
  303. data/lib/bundler/gemdeps.rb +0 -29
  304. data/lib/bundler/psyched_yaml.rb +0 -22
  305. data/lib/bundler/templates/gems.rb +0 -8
  306. data/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt +0 -5
  307. data/lib/bundler/templates/newgem/travis.yml.tt +0 -6
  308. data/lib/bundler/vendor/connection_pool/lib/connection_pool/monotonic_time.rb +0 -66
  309. data/lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +0 -57
  310. data/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +0 -88
  311. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb +0 -36
  312. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +0 -66
  313. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +0 -62
  314. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +0 -63
  315. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +0 -61
  316. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +0 -126
  317. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +0 -46
  318. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +0 -36
  319. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +0 -164
  320. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +0 -255
  321. data/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +0 -143
  322. data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +0 -6
  323. data/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +0 -112
  324. data/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +0 -67
  325. data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +0 -839
  326. data/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +0 -46
  327. data/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +0 -58
  328. data/lib/bundler/vendor/molinillo/lib/molinillo.rb +0 -11
  329. data/lib/bundler/vendor/tmpdir/lib/tmpdir.rb +0 -154
  330. data/lib/bundler/version_ranges.rb +0 -122
@@ -0,0 +1 @@
1
+ # Vendored files do not need to be documented
@@ -0,0 +1,82 @@
1
+ = net-http-persistent
2
+
3
+ home :: https://github.com/drbrain/net-http-persistent
4
+ rdoc :: https://rdoc.info/gems/net-http-persistent
5
+
6
+ == DESCRIPTION:
7
+
8
+ Manages persistent connections using Net::HTTP including a thread pool for
9
+ connecting to multiple hosts.
10
+
11
+ Using persistent HTTP connections can dramatically increase the speed of HTTP.
12
+ Creating a new HTTP connection for every request involves an extra TCP
13
+ round-trip and causes TCP congestion avoidance negotiation to start over.
14
+
15
+ Net::HTTP supports persistent connections with some API methods but does not
16
+ make setting up a single persistent connection or managing multiple
17
+ connections easy. Net::HTTP::Persistent wraps Net::HTTP and allows you to
18
+ focus on how to make HTTP requests.
19
+
20
+ == FEATURES/PROBLEMS:
21
+
22
+ * Supports TLS with secure defaults
23
+ * Thread-safe
24
+ * Pure ruby
25
+
26
+ == SYNOPSIS
27
+
28
+ The following example will make two requests to the same server. The
29
+ connection is kept alive between requests:
30
+
31
+ require 'net/http/persistent'
32
+
33
+ uri = URI 'http://example.com/awesome/web/service'
34
+
35
+ http = Net::HTTP::Persistent.new name: 'my_app_name'
36
+
37
+ # perform a GET
38
+ response = http.request uri
39
+
40
+ # create a POST
41
+ post_uri = uri + 'create'
42
+ post = Net::HTTP::Post.new post_uri.path
43
+ post.set_form_data 'some' => 'cool data'
44
+
45
+ # perform the POST, the URI is always required
46
+ response = http.request post_uri, post
47
+
48
+ # if you are done making http requests, or won't make requests for several
49
+ # minutes
50
+ http.shutdown
51
+
52
+ Please see the documentation on Net::HTTP::Persistent for more information,
53
+ including SSL connection verification, header handling and tunable options.
54
+
55
+ == INSTALL:
56
+
57
+ gem install net-http-persistent
58
+
59
+ == LICENSE:
60
+
61
+ (The MIT License)
62
+
63
+ Copyright (c) Eric Hodel, Aaron Patterson
64
+
65
+ Permission is hereby granted, free of charge, to any person obtaining
66
+ a copy of this software and associated documentation files (the
67
+ 'Software'), to deal in the Software without restriction, including
68
+ without limitation the rights to use, copy, modify, merge, publish,
69
+ distribute, sublicense, and/or sell copies of the Software, and to
70
+ permit persons to whom the Software is furnished to do so, subject to
71
+ the following conditions:
72
+
73
+ The above copyright notice and this permission notice shall be
74
+ included in all copies or substantial portions of the Software.
75
+
76
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
77
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
78
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
79
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
80
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
81
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
82
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,8 +1,8 @@
1
1
  ##
2
- # A Net::HTTP connection wrapper that holds extra information for managing the
2
+ # A Gem::Net::HTTP connection wrapper that holds extra information for managing the
3
3
  # connection's lifetime.
4
4
 
5
- class Bundler::Persistent::Net::HTTP::Persistent::Connection # :nodoc:
5
+ class Gem::Net::HTTP::Persistent::Connection # :nodoc:
6
6
 
7
7
  attr_accessor :http
8
8
 
@@ -25,9 +25,10 @@ class Bundler::Persistent::Net::HTTP::Persistent::Connection # :nodoc:
25
25
  ensure
26
26
  reset
27
27
  end
28
+ alias_method :close, :finish
28
29
 
29
30
  def reset
30
- @last_use = Bundler::Persistent::Net::HTTP::Persistent::EPOCH
31
+ @last_use = Gem::Net::HTTP::Persistent::EPOCH
31
32
  @requests = 0
32
33
  end
33
34
 
@@ -1,4 +1,4 @@
1
- class Bundler::Persistent::Net::HTTP::Persistent::Pool < Bundler::ConnectionPool # :nodoc:
1
+ class Gem::Net::HTTP::Persistent::Pool < Bundler::ConnectionPool # :nodoc:
2
2
 
3
3
  attr_reader :available # :nodoc:
4
4
  attr_reader :key # :nodoc:
@@ -6,25 +6,37 @@ class Bundler::Persistent::Net::HTTP::Persistent::Pool < Bundler::ConnectionPool
6
6
  def initialize(options = {}, &block)
7
7
  super
8
8
 
9
- @available = Bundler::Persistent::Net::HTTP::Persistent::TimedStackMulti.new(@size, &block)
9
+ @available = Gem::Net::HTTP::Persistent::TimedStackMulti.new(@size, &block)
10
10
  @key = "current-#{@available.object_id}"
11
11
  end
12
12
 
13
13
  def checkin net_http_args
14
- stack = Thread.current[@key][net_http_args] ||= []
14
+ if net_http_args.is_a?(Hash) && net_http_args.size == 1 && net_http_args[:force]
15
+ # Bundler::ConnectionPool 2.4+ calls `checkin(force: true)` after fork.
16
+ # When this happens, we should remove all connections from Thread.current
17
+ if stacks = Thread.current[@key]
18
+ stacks.each do |http_args, connections|
19
+ connections.each do |conn|
20
+ @available.push conn, connection_args: http_args
21
+ end
22
+ connections.clear
23
+ end
24
+ end
25
+ else
26
+ stack = Thread.current[@key][net_http_args] ||= []
15
27
 
16
- raise Bundler::ConnectionPool::Error, 'no connections are checked out' if
17
- stack.empty?
28
+ raise Bundler::ConnectionPool::Error, 'no connections are checked out' if
29
+ stack.empty?
18
30
 
19
- conn = stack.pop
31
+ conn = stack.pop
20
32
 
21
- if stack.empty?
22
- @available.push conn, connection_args: net_http_args
33
+ if stack.empty?
34
+ @available.push conn, connection_args: net_http_args
23
35
 
24
- Thread.current[@key].delete(net_http_args)
25
- Thread.current[@key] = nil if Thread.current[@key].empty?
36
+ Thread.current[@key].delete(net_http_args)
37
+ Thread.current[@key] = nil if Thread.current[@key].empty?
38
+ end
26
39
  end
27
-
28
40
  nil
29
41
  end
30
42
 
@@ -1,4 +1,4 @@
1
- class Bundler::Persistent::Net::HTTP::Persistent::TimedStackMulti < Bundler::ConnectionPool::TimedStack # :nodoc:
1
+ class Gem::Net::HTTP::Persistent::TimedStackMulti < Bundler::ConnectionPool::TimedStack # :nodoc:
2
2
 
3
3
  ##
4
4
  # Returns a new hash that has arrays for keys
@@ -1,14 +1,14 @@
1
- require 'net/http'
2
- require_relative '../../../../uri/lib/uri'
1
+ require_relative '../../../../../vendored_net_http'
2
+ require_relative '../../../../../vendored_uri'
3
3
  require 'cgi' # for escaping
4
4
  require_relative '../../../../connection_pool/lib/connection_pool'
5
5
 
6
6
  autoload :OpenSSL, 'openssl'
7
7
 
8
8
  ##
9
- # Persistent connections for Net::HTTP
9
+ # Persistent connections for Gem::Net::HTTP
10
10
  #
11
- # Bundler::Persistent::Net::HTTP::Persistent maintains persistent connections across all the
11
+ # Gem::Net::HTTP::Persistent maintains persistent connections across all the
12
12
  # servers you wish to talk to. For each host:port you communicate with a
13
13
  # single persistent connection is created.
14
14
  #
@@ -22,34 +22,34 @@ autoload :OpenSSL, 'openssl'
22
22
  #
23
23
  # require 'bundler/vendor/net-http-persistent/lib/net/http/persistent'
24
24
  #
25
- # uri = Bundler::URI 'http://example.com/awesome/web/service'
25
+ # uri = Gem::URI 'http://example.com/awesome/web/service'
26
26
  #
27
- # http = Bundler::Persistent::Net::HTTP::Persistent.new
27
+ # http = Gem::Net::HTTP::Persistent.new
28
28
  #
29
29
  # # perform a GET
30
30
  # response = http.request uri
31
31
  #
32
32
  # # or
33
33
  #
34
- # get = Net::HTTP::Get.new uri.request_uri
34
+ # get = Gem::Net::HTTP::Get.new uri.request_uri
35
35
  # response = http.request get
36
36
  #
37
37
  # # create a POST
38
38
  # post_uri = uri + 'create'
39
- # post = Net::HTTP::Post.new post_uri.path
39
+ # post = Gem::Net::HTTP::Post.new post_uri.path
40
40
  # post.set_form_data 'some' => 'cool data'
41
41
  #
42
- # # perform the POST, the Bundler::URI is always required
42
+ # # perform the POST, the Gem::URI is always required
43
43
  # response http.request post_uri, post
44
44
  #
45
45
  # Note that for GET, HEAD and other requests that do not have a body you want
46
- # to use Bundler::URI#request_uri not Bundler::URI#path. The request_uri contains the query
46
+ # to use Gem::URI#request_uri not Gem::URI#path. The request_uri contains the query
47
47
  # params which are sent in the body for other requests.
48
48
  #
49
49
  # == TLS/SSL
50
50
  #
51
51
  # TLS connections are automatically created depending upon the scheme of the
52
- # Bundler::URI. TLS connections are automatically verified against the default
52
+ # Gem::URI. TLS connections are automatically verified against the default
53
53
  # certificate store for your computer. You can override this by changing
54
54
  # verify_mode or by specifying an alternate cert_store.
55
55
  #
@@ -72,7 +72,7 @@ autoload :OpenSSL, 'openssl'
72
72
  # == Proxies
73
73
  #
74
74
  # A proxy can be set through #proxy= or at initialization time by providing a
75
- # second argument to ::new. The proxy may be the Bundler::URI of the proxy server or
75
+ # second argument to ::new. The proxy may be the Gem::URI of the proxy server or
76
76
  # <code>:ENV</code> which will consult environment variables.
77
77
  #
78
78
  # See #proxy= and #proxy_from_env for details.
@@ -92,7 +92,7 @@ autoload :OpenSSL, 'openssl'
92
92
  #
93
93
  # === Segregation
94
94
  #
95
- # Each Bundler::Persistent::Net::HTTP::Persistent instance has its own pool of connections. There
95
+ # Each Gem::Net::HTTP::Persistent instance has its own pool of connections. There
96
96
  # is no sharing with other instances (as was true in earlier versions).
97
97
  #
98
98
  # === Idle Timeout
@@ -131,7 +131,7 @@ autoload :OpenSSL, 'openssl'
131
131
  #
132
132
  # === Connection Termination
133
133
  #
134
- # If you are done using the Bundler::Persistent::Net::HTTP::Persistent instance you may shut down
134
+ # If you are done using the Gem::Net::HTTP::Persistent instance you may shut down
135
135
  # all the connections in the current thread with #shutdown. This is not
136
136
  # recommended for normal use, it should only be used when it will be several
137
137
  # minutes before you make another HTTP request.
@@ -141,7 +141,7 @@ autoload :OpenSSL, 'openssl'
141
141
  # Ruby will automatically garbage collect and shutdown your HTTP connections
142
142
  # when the thread terminates.
143
143
 
144
- class Bundler::Persistent::Net::HTTP::Persistent
144
+ class Gem::Net::HTTP::Persistent
145
145
 
146
146
  ##
147
147
  # The beginning of Time
@@ -172,12 +172,12 @@ class Bundler::Persistent::Net::HTTP::Persistent
172
172
  end
173
173
 
174
174
  ##
175
- # The version of Bundler::Persistent::Net::HTTP::Persistent you are using
175
+ # The version of Gem::Net::HTTP::Persistent you are using
176
176
 
177
- VERSION = '4.0.0'
177
+ VERSION = '4.0.2'
178
178
 
179
179
  ##
180
- # Error class for errors raised by Bundler::Persistent::Net::HTTP::Persistent. Various
180
+ # Error class for errors raised by Gem::Net::HTTP::Persistent. Various
181
181
  # SystemCallErrors are re-raised with a human-readable message under this
182
182
  # class.
183
183
 
@@ -197,10 +197,10 @@ class Bundler::Persistent::Net::HTTP::Persistent
197
197
  # NOTE: This may not work on ruby > 1.9.
198
198
 
199
199
  def self.detect_idle_timeout uri, max = 10
200
- uri = Bundler::URI uri unless Bundler::URI::Generic === uri
200
+ uri = Gem::URI uri unless Gem::URI::Generic === uri
201
201
  uri += '/'
202
202
 
203
- req = Net::HTTP::Head.new uri.request_uri
203
+ req = Gem::Net::HTTP::Head.new uri.request_uri
204
204
 
205
205
  http = new 'net-http-persistent detect_idle_timeout'
206
206
 
@@ -214,7 +214,7 @@ class Bundler::Persistent::Net::HTTP::Persistent
214
214
 
215
215
  $stderr.puts "HEAD #{uri} => #{response.code}" if $DEBUG
216
216
 
217
- unless Net::HTTPOK === response then
217
+ unless Gem::Net::HTTPOK === response then
218
218
  raise Error, "bad response code #{response.code} detecting idle timeout"
219
219
  end
220
220
 
@@ -238,7 +238,7 @@ class Bundler::Persistent::Net::HTTP::Persistent
238
238
  attr_reader :certificate
239
239
 
240
240
  ##
241
- # For Net::HTTP parity
241
+ # For Gem::Net::HTTP parity
242
242
 
243
243
  alias cert certificate
244
244
 
@@ -266,7 +266,7 @@ class Bundler::Persistent::Net::HTTP::Persistent
266
266
  attr_reader :ciphers
267
267
 
268
268
  ##
269
- # Sends debug_output to this IO via Net::HTTP#set_debug_output.
269
+ # Sends debug_output to this IO via Gem::Net::HTTP#set_debug_output.
270
270
  #
271
271
  # Never use this method in production code, it causes a serious security
272
272
  # hole.
@@ -279,7 +279,7 @@ class Bundler::Persistent::Net::HTTP::Persistent
279
279
  attr_reader :generation # :nodoc:
280
280
 
281
281
  ##
282
- # Headers that are added to every request using Net::HTTP#add_field
282
+ # Headers that are added to every request using Gem::Net::HTTP#add_field
283
283
 
284
284
  attr_reader :headers
285
285
 
@@ -304,7 +304,7 @@ class Bundler::Persistent::Net::HTTP::Persistent
304
304
  ##
305
305
  # Number of retries to perform if a request fails.
306
306
  #
307
- # See also #max_retries=, Net::HTTP#max_retries=.
307
+ # See also #max_retries=, Gem::Net::HTTP#max_retries=.
308
308
 
309
309
  attr_reader :max_retries
310
310
 
@@ -325,12 +325,12 @@ class Bundler::Persistent::Net::HTTP::Persistent
325
325
  attr_reader :name
326
326
 
327
327
  ##
328
- # Seconds to wait until a connection is opened. See Net::HTTP#open_timeout
328
+ # Seconds to wait until a connection is opened. See Gem::Net::HTTP#open_timeout
329
329
 
330
330
  attr_accessor :open_timeout
331
331
 
332
332
  ##
333
- # Headers that are added to every request using Net::HTTP#[]=
333
+ # Headers that are added to every request using Gem::Net::HTTP#[]=
334
334
 
335
335
  attr_reader :override_headers
336
336
 
@@ -340,7 +340,7 @@ class Bundler::Persistent::Net::HTTP::Persistent
340
340
  attr_reader :private_key
341
341
 
342
342
  ##
343
- # For Net::HTTP parity
343
+ # For Gem::Net::HTTP parity
344
344
 
345
345
  alias key private_key
346
346
 
@@ -360,12 +360,12 @@ class Bundler::Persistent::Net::HTTP::Persistent
360
360
  attr_reader :pool # :nodoc:
361
361
 
362
362
  ##
363
- # Seconds to wait until reading one block. See Net::HTTP#read_timeout
363
+ # Seconds to wait until reading one block. See Gem::Net::HTTP#read_timeout
364
364
 
365
365
  attr_accessor :read_timeout
366
366
 
367
367
  ##
368
- # Seconds to wait until writing one block. See Net::HTTP#write_timeout
368
+ # Seconds to wait until writing one block. See Gem::Net::HTTP#write_timeout
369
369
 
370
370
  attr_accessor :write_timeout
371
371
 
@@ -450,18 +450,18 @@ class Bundler::Persistent::Net::HTTP::Persistent
450
450
  attr_reader :verify_mode
451
451
 
452
452
  ##
453
- # Creates a new Bundler::Persistent::Net::HTTP::Persistent.
453
+ # Creates a new Gem::Net::HTTP::Persistent.
454
454
  #
455
455
  # Set a +name+ for fun. Your library name should be good enough, but this
456
456
  # otherwise has no purpose.
457
457
  #
458
- # +proxy+ may be set to a Bundler::URI::HTTP or :ENV to pick up proxy options from
458
+ # +proxy+ may be set to a Gem::URI::HTTP or :ENV to pick up proxy options from
459
459
  # the environment. See proxy_from_env for details.
460
460
  #
461
- # In order to use a Bundler::URI for the proxy you may need to do some extra work
462
- # beyond Bundler::URI parsing if the proxy requires a password:
461
+ # In order to use a Gem::URI for the proxy you may need to do some extra work
462
+ # beyond Gem::URI parsing if the proxy requires a password:
463
463
  #
464
- # proxy = Bundler::URI 'http://proxy.example'
464
+ # proxy = Gem::URI 'http://proxy.example'
465
465
  # proxy.user = 'AzureDiamond'
466
466
  # proxy.password = 'hunter2'
467
467
  #
@@ -492,8 +492,8 @@ class Bundler::Persistent::Net::HTTP::Persistent
492
492
  @socket_options << [Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1] if
493
493
  Socket.const_defined? :TCP_NODELAY
494
494
 
495
- @pool = Bundler::Persistent::Net::HTTP::Persistent::Pool.new size: pool_size do |http_args|
496
- Bundler::Persistent::Net::HTTP::Persistent::Connection.new Net::HTTP, http_args, @ssl_generation
495
+ @pool = Gem::Net::HTTP::Persistent::Pool.new size: pool_size do |http_args|
496
+ Gem::Net::HTTP::Persistent::Connection.new Gem::Net::HTTP, http_args, @ssl_generation
497
497
  end
498
498
 
499
499
  @certificate = nil
@@ -510,7 +510,7 @@ class Bundler::Persistent::Net::HTTP::Persistent
510
510
  @verify_mode = nil
511
511
  @cert_store = nil
512
512
 
513
- @generation = 0 # incremented when proxy Bundler::URI changes
513
+ @generation = 0 # incremented when proxy Gem::URI changes
514
514
 
515
515
  if HAVE_OPENSSL then
516
516
  @verify_mode = OpenSSL::SSL::VERIFY_PEER
@@ -529,7 +529,7 @@ class Bundler::Persistent::Net::HTTP::Persistent
529
529
  reconnect_ssl
530
530
  end
531
531
 
532
- # For Net::HTTP parity
532
+ # For Gem::Net::HTTP parity
533
533
  alias cert= certificate=
534
534
 
535
535
  ##
@@ -648,7 +648,7 @@ class Bundler::Persistent::Net::HTTP::Persistent
648
648
  end
649
649
 
650
650
  ##
651
- # Starts the Net::HTTP +connection+
651
+ # Starts the Gem::Net::HTTP +connection+
652
652
 
653
653
  def start http
654
654
  http.set_debug_output @debug_output if @debug_output
@@ -666,7 +666,7 @@ class Bundler::Persistent::Net::HTTP::Persistent
666
666
  end
667
667
 
668
668
  ##
669
- # Finishes the Net::HTTP +connection+
669
+ # Finishes the Gem::Net::HTTP +connection+
670
670
 
671
671
  def finish connection
672
672
  connection.finish
@@ -716,16 +716,16 @@ class Bundler::Persistent::Net::HTTP::Persistent
716
716
  reconnect_ssl
717
717
  end
718
718
 
719
- # For Net::HTTP parity
719
+ # For Gem::Net::HTTP parity
720
720
  alias key= private_key=
721
721
 
722
722
  ##
723
- # Sets the proxy server. The +proxy+ may be the Bundler::URI of the proxy server,
723
+ # Sets the proxy server. The +proxy+ may be the Gem::URI of the proxy server,
724
724
  # the symbol +:ENV+ which will read the proxy from the environment or nil to
725
725
  # disable use of a proxy. See #proxy_from_env for details on setting the
726
726
  # proxy from the environment.
727
727
  #
728
- # If the proxy Bundler::URI is set after requests have been made, the next request
728
+ # If the proxy Gem::URI is set after requests have been made, the next request
729
729
  # will shut-down and re-open all connections.
730
730
  #
731
731
  # The +no_proxy+ query parameter can be used to specify hosts which shouldn't
@@ -736,9 +736,9 @@ class Bundler::Persistent::Net::HTTP::Persistent
736
736
  def proxy= proxy
737
737
  @proxy_uri = case proxy
738
738
  when :ENV then proxy_from_env
739
- when Bundler::URI::HTTP then proxy
739
+ when Gem::URI::HTTP then proxy
740
740
  when nil then # ignore
741
- else raise ArgumentError, 'proxy must be :ENV or a Bundler::URI::HTTP'
741
+ else raise ArgumentError, 'proxy must be :ENV or a Gem::URI::HTTP'
742
742
  end
743
743
 
744
744
  @no_proxy.clear
@@ -763,13 +763,13 @@ class Bundler::Persistent::Net::HTTP::Persistent
763
763
  end
764
764
 
765
765
  ##
766
- # Creates a Bundler::URI for an HTTP proxy server from ENV variables.
766
+ # Creates a Gem::URI for an HTTP proxy server from ENV variables.
767
767
  #
768
768
  # If +HTTP_PROXY+ is set a proxy will be returned.
769
769
  #
770
- # If +HTTP_PROXY_USER+ or +HTTP_PROXY_PASS+ are set the Bundler::URI is given the
770
+ # If +HTTP_PROXY_USER+ or +HTTP_PROXY_PASS+ are set the Gem::URI is given the
771
771
  # indicated user and password unless HTTP_PROXY contains either of these in
772
- # the Bundler::URI.
772
+ # the Gem::URI.
773
773
  #
774
774
  # The +NO_PROXY+ ENV variable can be used to specify hosts which shouldn't
775
775
  # be reached via proxy; if set it should be a comma separated list of
@@ -785,7 +785,7 @@ class Bundler::Persistent::Net::HTTP::Persistent
785
785
 
786
786
  return nil if env_proxy.nil? or env_proxy.empty?
787
787
 
788
- uri = Bundler::URI normalize_uri env_proxy
788
+ uri = Gem::URI normalize_uri env_proxy
789
789
 
790
790
  env_no_proxy = ENV['no_proxy'] || ENV['NO_PROXY']
791
791
 
@@ -835,7 +835,7 @@ class Bundler::Persistent::Net::HTTP::Persistent
835
835
  end
836
836
 
837
837
  ##
838
- # Finishes then restarts the Net::HTTP +connection+
838
+ # Finishes then restarts the Gem::Net::HTTP +connection+
839
839
 
840
840
  def reset connection
841
841
  http = connection.http
@@ -854,16 +854,16 @@ class Bundler::Persistent::Net::HTTP::Persistent
854
854
  end
855
855
 
856
856
  ##
857
- # Makes a request on +uri+. If +req+ is nil a Net::HTTP::Get is performed
857
+ # Makes a request on +uri+. If +req+ is nil a Gem::Net::HTTP::Get is performed
858
858
  # against +uri+.
859
859
  #
860
- # If a block is passed #request behaves like Net::HTTP#request (the body of
860
+ # If a block is passed #request behaves like Gem::Net::HTTP#request (the body of
861
861
  # the response will not have been read).
862
862
  #
863
- # +req+ must be a Net::HTTPGenericRequest subclass (see Net::HTTP for a list).
863
+ # +req+ must be a Gem::Net::HTTPGenericRequest subclass (see Gem::Net::HTTP for a list).
864
864
 
865
865
  def request uri, req = nil, &block
866
- uri = Bundler::URI uri
866
+ uri = Gem::URI uri
867
867
  req = request_setup req || uri
868
868
  response = nil
869
869
 
@@ -896,14 +896,14 @@ class Bundler::Persistent::Net::HTTP::Persistent
896
896
  end
897
897
 
898
898
  ##
899
- # Creates a GET request if +req_or_uri+ is a Bundler::URI and adds headers to the
899
+ # Creates a GET request if +req_or_uri+ is a Gem::URI and adds headers to the
900
900
  # request.
901
901
  #
902
902
  # Returns the request.
903
903
 
904
904
  def request_setup req_or_uri # :nodoc:
905
905
  req = if req_or_uri.respond_to? 'request_uri' then
906
- Net::HTTP::Get.new req_or_uri.request_uri
906
+ Gem::Net::HTTP::Get.new req_or_uri.request_uri
907
907
  else
908
908
  req_or_uri
909
909
  end
@@ -0,0 +1 @@
1
+ # Vendored files do not need to be documented
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 John Hawthorn
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,20 @@
1
+ module Bundler::PubGrub
2
+ class Assignment
3
+ attr_reader :term, :cause, :decision_level, :index
4
+ def initialize(term, cause, decision_level, index)
5
+ @term = term
6
+ @cause = cause
7
+ @decision_level = decision_level
8
+ @index = index
9
+ end
10
+
11
+ def self.decision(package, version, decision_level, index)
12
+ term = Term.new(VersionConstraint.exact(package, version), true)
13
+ new(term, :decision, decision_level, index)
14
+ end
15
+
16
+ def decision?
17
+ cause == :decision
18
+ end
19
+ end
20
+ end