bundler 2.4.21 → 2.5.0

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 (183) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +74 -0
  3. data/README.md +1 -2
  4. data/bundler.gemspec +4 -2
  5. data/exe/bundle +1 -10
  6. data/lib/bundler/build_metadata.rb +3 -3
  7. data/lib/bundler/capistrano.rb +1 -1
  8. data/lib/bundler/checksum.rb +245 -0
  9. data/lib/bundler/ci_detector.rb +75 -0
  10. data/lib/bundler/cli/add.rb +3 -3
  11. data/lib/bundler/cli/binstubs.rb +4 -4
  12. data/lib/bundler/cli/cache.rb +1 -1
  13. data/lib/bundler/cli/check.rb +1 -1
  14. data/lib/bundler/cli/common.rb +9 -1
  15. data/lib/bundler/cli/config.rb +8 -7
  16. data/lib/bundler/cli/console.rb +3 -2
  17. data/lib/bundler/cli/doctor.rb +2 -2
  18. data/lib/bundler/cli/exec.rb +1 -1
  19. data/lib/bundler/cli/gem.rb +31 -23
  20. data/lib/bundler/cli/info.rb +2 -13
  21. data/lib/bundler/cli/install.rb +5 -4
  22. data/lib/bundler/cli/issue.rb +1 -1
  23. data/lib/bundler/cli/lock.rb +4 -4
  24. data/lib/bundler/cli/open.rb +1 -1
  25. data/lib/bundler/cli/outdated.rb +6 -6
  26. data/lib/bundler/cli/plugin.rb +7 -14
  27. data/lib/bundler/cli/pristine.rb +38 -30
  28. data/lib/bundler/cli/show.rb +2 -2
  29. data/lib/bundler/cli/update.rb +5 -5
  30. data/lib/bundler/cli.rb +215 -263
  31. data/lib/bundler/compact_index_client/cache.rb +29 -9
  32. data/lib/bundler/compact_index_client/cache_file.rb +153 -0
  33. data/lib/bundler/compact_index_client/gem_parser.rb +7 -3
  34. data/lib/bundler/compact_index_client/updater.rb +79 -81
  35. data/lib/bundler/compact_index_client.rb +14 -7
  36. data/lib/bundler/constants.rb +1 -1
  37. data/lib/bundler/current_ruby.rb +5 -21
  38. data/lib/bundler/definition.rb +43 -16
  39. data/lib/bundler/dependency.rb +16 -12
  40. data/lib/bundler/digest.rb +2 -2
  41. data/lib/bundler/dsl.rb +43 -25
  42. data/lib/bundler/endpoint_specification.rb +6 -2
  43. data/lib/bundler/env.rb +1 -3
  44. data/lib/bundler/errors.rb +58 -0
  45. data/lib/bundler/fetcher/base.rb +3 -1
  46. data/lib/bundler/fetcher/compact_index.rb +4 -4
  47. data/lib/bundler/fetcher/downloader.rb +13 -11
  48. data/lib/bundler/fetcher/gem_remote_fetcher.rb +16 -0
  49. data/lib/bundler/fetcher/index.rb +1 -1
  50. data/lib/bundler/fetcher.rb +28 -25
  51. data/lib/bundler/friendly_errors.rb +5 -5
  52. data/lib/bundler/gem_helper.rb +1 -1
  53. data/lib/bundler/gem_helpers.rb +12 -2
  54. data/lib/bundler/graph.rb +9 -9
  55. data/lib/bundler/index.rb +1 -2
  56. data/lib/bundler/injector.rb +1 -1
  57. data/lib/bundler/inline.rb +3 -3
  58. data/lib/bundler/installer/gem_installer.rb +10 -10
  59. data/lib/bundler/installer/parallel_installer.rb +16 -8
  60. data/lib/bundler/installer/standalone.rb +2 -3
  61. data/lib/bundler/installer.rb +9 -9
  62. data/lib/bundler/lazy_specification.rb +28 -17
  63. data/lib/bundler/lockfile_generator.rb +9 -0
  64. data/lib/bundler/lockfile_parser.rb +81 -10
  65. data/lib/bundler/man/bundle-add.1 +3 -26
  66. data/lib/bundler/man/bundle-binstubs.1 +4 -16
  67. data/lib/bundler/man/bundle-cache.1 +3 -24
  68. data/lib/bundler/man/bundle-check.1 +3 -12
  69. data/lib/bundler/man/bundle-clean.1 +3 -10
  70. data/lib/bundler/man/bundle-config.1 +20 -211
  71. data/lib/bundler/man/bundle-config.1.ronn +6 -0
  72. data/lib/bundler/man/bundle-console.1 +4 -22
  73. data/lib/bundler/man/bundle-doctor.1 +4 -18
  74. data/lib/bundler/man/bundle-exec.1 +12 -73
  75. data/lib/bundler/man/bundle-gem.1 +13 -49
  76. data/lib/bundler/man/bundle-help.1 +3 -7
  77. data/lib/bundler/man/bundle-info.1 +3 -9
  78. data/lib/bundler/man/bundle-init.1 +3 -12
  79. data/lib/bundler/man/bundle-inject.1 +6 -19
  80. data/lib/bundler/man/bundle-install.1 +27 -125
  81. data/lib/bundler/man/bundle-install.1.ronn +1 -0
  82. data/lib/bundler/man/bundle-list.1 +4 -19
  83. data/lib/bundler/man/bundle-lock.1 +5 -29
  84. data/lib/bundler/man/bundle-open.1 +7 -27
  85. data/lib/bundler/man/bundle-outdated.1 +3 -55
  86. data/lib/bundler/man/bundle-outdated.1.ronn +1 -0
  87. data/lib/bundler/man/bundle-platform.1 +5 -27
  88. data/lib/bundler/man/bundle-plugin.1 +3 -29
  89. data/lib/bundler/man/bundle-pristine.1 +5 -16
  90. data/lib/bundler/man/bundle-remove.1 +4 -14
  91. data/lib/bundler/man/bundle-show.1 +3 -10
  92. data/lib/bundler/man/bundle-update.1 +18 -137
  93. data/lib/bundler/man/bundle-version.1 +3 -16
  94. data/lib/bundler/man/bundle-viz.1 +4 -16
  95. data/lib/bundler/man/bundle.1 +5 -44
  96. data/lib/bundler/man/gemfile.5 +24 -301
  97. data/lib/bundler/man/gemfile.5.ronn +4 -0
  98. data/lib/bundler/match_metadata.rb +4 -0
  99. data/lib/bundler/match_platform.rb +1 -1
  100. data/lib/bundler/plugin/api/source.rb +3 -2
  101. data/lib/bundler/plugin/index.rb +8 -0
  102. data/lib/bundler/plugin/installer.rb +1 -1
  103. data/lib/bundler/plugin.rb +12 -5
  104. data/lib/bundler/resolver/base.rb +1 -1
  105. data/lib/bundler/resolver/incompatibility.rb +1 -1
  106. data/lib/bundler/resolver/spec_group.rb +1 -4
  107. data/lib/bundler/resolver.rb +16 -16
  108. data/lib/bundler/ruby_dsl.rb +20 -12
  109. data/lib/bundler/ruby_version.rb +1 -1
  110. data/lib/bundler/rubygems_ext.rb +27 -54
  111. data/lib/bundler/rubygems_gem_installer.rb +23 -58
  112. data/lib/bundler/rubygems_integration.rb +25 -94
  113. data/lib/bundler/runtime.rb +2 -2
  114. data/lib/bundler/self_manager.rb +23 -7
  115. data/lib/bundler/settings.rb +27 -7
  116. data/lib/bundler/setup.rb +4 -1
  117. data/lib/bundler/shared_helpers.rb +35 -13
  118. data/lib/bundler/source/git/git_proxy.rb +22 -14
  119. data/lib/bundler/source/git.rb +4 -3
  120. data/lib/bundler/source/metadata.rb +16 -16
  121. data/lib/bundler/source/path.rb +7 -6
  122. data/lib/bundler/source/rubygems.rb +21 -14
  123. data/lib/bundler/source.rb +2 -0
  124. data/lib/bundler/spec_set.rb +43 -12
  125. data/lib/bundler/stub_specification.rb +1 -0
  126. data/lib/bundler/templates/Executable.bundler +1 -1
  127. data/lib/bundler/templates/newgem/README.md.tt +3 -3
  128. data/lib/bundler/templates/newgem/Rakefile.tt +2 -6
  129. data/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +1 -1
  130. data/lib/bundler/templates/newgem/newgem.gemspec.tt +1 -1
  131. data/lib/bundler/templates/newgem/standard.yml.tt +1 -1
  132. data/lib/bundler/ui/shell.rb +2 -2
  133. data/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
  134. data/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +53 -6
  135. data/lib/bundler/vendor/fileutils/lib/fileutils.rb +8 -20
  136. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb +4 -3
  137. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb +23 -11
  138. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +1 -1
  139. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +36 -36
  140. data/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +3 -2
  141. data/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +1 -1
  142. data/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +1 -1
  143. data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +8 -10
  144. data/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +15 -4
  145. data/lib/bundler/vendor/thor/lib/thor/actions.rb +15 -15
  146. data/lib/bundler/vendor/thor/lib/thor/base.rb +140 -14
  147. data/lib/bundler/vendor/thor/lib/thor/command.rb +13 -4
  148. data/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +4 -0
  149. data/lib/bundler/vendor/thor/lib/thor/error.rb +16 -25
  150. data/lib/bundler/vendor/thor/lib/thor/group.rb +1 -1
  151. data/lib/bundler/vendor/thor/lib/thor/invocation.rb +1 -1
  152. data/lib/bundler/vendor/thor/lib/thor/nested_context.rb +2 -2
  153. data/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +20 -1
  154. data/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +33 -17
  155. data/lib/bundler/vendor/thor/lib/thor/parser/option.rb +27 -8
  156. data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +44 -6
  157. data/lib/bundler/vendor/thor/lib/thor/rake_compat.rb +2 -2
  158. data/lib/bundler/vendor/thor/lib/thor/runner.rb +40 -30
  159. data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +26 -150
  160. data/lib/bundler/vendor/thor/lib/thor/shell/color.rb +4 -46
  161. data/lib/bundler/vendor/thor/lib/thor/shell/column_printer.rb +29 -0
  162. data/lib/bundler/vendor/thor/lib/thor/shell/html.rb +3 -45
  163. data/lib/bundler/vendor/thor/lib/thor/shell/lcs_diff.rb +49 -0
  164. data/lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb +134 -0
  165. data/lib/bundler/vendor/thor/lib/thor/shell/terminal.rb +42 -0
  166. data/lib/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb +38 -0
  167. data/lib/bundler/vendor/thor/lib/thor/shell.rb +1 -1
  168. data/lib/bundler/vendor/thor/lib/thor/util.rb +8 -7
  169. data/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
  170. data/lib/bundler/vendor/thor/lib/thor.rb +155 -8
  171. data/lib/bundler/vendor/tsort/lib/tsort.rb +3 -0
  172. data/lib/bundler/vendor/uri/lib/uri/common.rb +256 -132
  173. data/lib/bundler/vendor/uri/lib/uri/generic.rb +1 -0
  174. data/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +95 -31
  175. data/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
  176. data/lib/bundler/vendored_net_http.rb +8 -0
  177. data/lib/bundler/vendored_persistent.rb +0 -4
  178. data/lib/bundler/vendored_timeout.rb +8 -0
  179. data/lib/bundler/version.rb +1 -1
  180. data/lib/bundler/vlad.rb +1 -1
  181. data/lib/bundler/yaml_serializer.rb +9 -4
  182. data/lib/bundler.rb +38 -35
  183. metadata +16 -5
@@ -1,9 +1,73 @@
1
- # frozen_string_literal: false
1
+ # frozen_string_literal: true
2
2
  module Bundler::URI
3
3
  class RFC3986_Parser # :nodoc:
4
4
  # Bundler::URI defined in RFC3986
5
- RFC3986_URI = /\A(?<Bundler::URI>(?<scheme>[A-Za-z][+\-.0-9A-Za-z]*+):(?<hier-part>\/\/(?<authority>(?:(?<userinfo>(?:%\h\h|[!$&-.0-;=A-Z_a-z~])*+)@)?(?<host>(?<IP-literal>\[(?:(?<IPv6address>(?:\h{1,4}:){6}(?<ls32>\h{1,4}:\h{1,4}|(?<IPv4address>(?<dec-octet>[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]|\d)\.\g<dec-octet>\.\g<dec-octet>\.\g<dec-octet>))|::(?:\h{1,4}:){5}\g<ls32>|\h{1,4}?::(?:\h{1,4}:){4}\g<ls32>|(?:(?:\h{1,4}:)?\h{1,4})?::(?:\h{1,4}:){3}\g<ls32>|(?:(?:\h{1,4}:){,2}\h{1,4})?::(?:\h{1,4}:){2}\g<ls32>|(?:(?:\h{1,4}:){,3}\h{1,4})?::\h{1,4}:\g<ls32>|(?:(?:\h{1,4}:){,4}\h{1,4})?::\g<ls32>|(?:(?:\h{1,4}:){,5}\h{1,4})?::\h{1,4}|(?:(?:\h{1,4}:){,6}\h{1,4})?::)|(?<IPvFuture>v\h++\.[!$&-.0-;=A-Z_a-z~]++))\])|\g<IPv4address>|(?<reg-name>(?:%\h\h|[!$&-.0-9;=A-Z_a-z~])*+))(?::(?<port>\d*+))?)(?<path-abempty>(?:\/(?<segment>(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*+))*+)|(?<path-absolute>\/(?:(?<segment-nz>(?:%\h\h|[!$&-.0-;=@-Z_a-z~])++)(?:\/\g<segment>)*+)?)|(?<path-rootless>\g<segment-nz>(?:\/\g<segment>)*+)|(?<path-empty>))(?:\?(?<query>[^#]*+))?(?:\#(?<fragment>(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*+))?)\z/
6
- RFC3986_relative_ref = /\A(?<relative-ref>(?<relative-part>\/\/(?<authority>(?:(?<userinfo>(?:%\h\h|[!$&-.0-;=A-Z_a-z~])*+)@)?(?<host>(?<IP-literal>\[(?:(?<IPv6address>(?:\h{1,4}:){6}(?<ls32>\h{1,4}:\h{1,4}|(?<IPv4address>(?<dec-octet>[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]|\d)\.\g<dec-octet>\.\g<dec-octet>\.\g<dec-octet>))|::(?:\h{1,4}:){5}\g<ls32>|\h{1,4}?::(?:\h{1,4}:){4}\g<ls32>|(?:(?:\h{1,4}:){,1}\h{1,4})?::(?:\h{1,4}:){3}\g<ls32>|(?:(?:\h{1,4}:){,2}\h{1,4})?::(?:\h{1,4}:){2}\g<ls32>|(?:(?:\h{1,4}:){,3}\h{1,4})?::\h{1,4}:\g<ls32>|(?:(?:\h{1,4}:){,4}\h{1,4})?::\g<ls32>|(?:(?:\h{1,4}:){,5}\h{1,4})?::\h{1,4}|(?:(?:\h{1,4}:){,6}\h{1,4})?::)|(?<IPvFuture>v\h++\.[!$&-.0-;=A-Z_a-z~]++))\])|\g<IPv4address>|(?<reg-name>(?:%\h\h|[!$&-.0-9;=A-Z_a-z~])++))?(?::(?<port>\d*+))?)(?<path-abempty>(?:\/(?<segment>(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*+))*+)|(?<path-absolute>\/(?:(?<segment-nz>(?:%\h\h|[!$&-.0-;=@-Z_a-z~])++)(?:\/\g<segment>)*+)?)|(?<path-noscheme>(?<segment-nz-nc>(?:%\h\h|[!$&-.0-9;=@-Z_a-z~])++)(?:\/\g<segment>)*+)|(?<path-empty>))(?:\?(?<query>[^#]*+))?(?:\#(?<fragment>(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*+))?)\z/
5
+ HOST = %r[
6
+ (?<IP-literal>\[(?:
7
+ (?<IPv6address>
8
+ (?:\h{1,4}:){6}
9
+ (?<ls32>\h{1,4}:\h{1,4}
10
+ | (?<IPv4address>(?<dec-octet>[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]|\d)
11
+ \.\g<dec-octet>\.\g<dec-octet>\.\g<dec-octet>)
12
+ )
13
+ | ::(?:\h{1,4}:){5}\g<ls32>
14
+ | \h{1,4}?::(?:\h{1,4}:){4}\g<ls32>
15
+ | (?:(?:\h{1,4}:)?\h{1,4})?::(?:\h{1,4}:){3}\g<ls32>
16
+ | (?:(?:\h{1,4}:){,2}\h{1,4})?::(?:\h{1,4}:){2}\g<ls32>
17
+ | (?:(?:\h{1,4}:){,3}\h{1,4})?::\h{1,4}:\g<ls32>
18
+ | (?:(?:\h{1,4}:){,4}\h{1,4})?::\g<ls32>
19
+ | (?:(?:\h{1,4}:){,5}\h{1,4})?::\h{1,4}
20
+ | (?:(?:\h{1,4}:){,6}\h{1,4})?::
21
+ )
22
+ | (?<IPvFuture>v\h++\.[!$&-.0-9:;=A-Z_a-z~]++)
23
+ )\])
24
+ | \g<IPv4address>
25
+ | (?<reg-name>(?:%\h\h|[!$&-.0-9;=A-Z_a-z~])*+)
26
+ ]x
27
+
28
+ USERINFO = /(?:%\h\h|[!$&-.0-9:;=A-Z_a-z~])*+/
29
+
30
+ SCHEME = %r[[A-Za-z][+\-.0-9A-Za-z]*+].source
31
+ SEG = %r[(?:%\h\h|[!$&-.0-9:;=@A-Z_a-z~/])].source
32
+ SEG_NC = %r[(?:%\h\h|[!$&-.0-9;=@A-Z_a-z~])].source
33
+ FRAGMENT = %r[(?:%\h\h|[!$&-.0-9:;=@A-Z_a-z~/?])*+].source
34
+
35
+ RFC3986_URI = %r[\A
36
+ (?<seg>#{SEG}){0}
37
+ (?<Bundler::URI>
38
+ (?<scheme>#{SCHEME}):
39
+ (?<hier-part>//
40
+ (?<authority>
41
+ (?:(?<userinfo>#{USERINFO.source})@)?
42
+ (?<host>#{HOST.source.delete(" \n")})
43
+ (?::(?<port>\d*+))?
44
+ )
45
+ (?<path-abempty>(?:/\g<seg>*+)?)
46
+ | (?<path-absolute>/((?!/)\g<seg>++)?)
47
+ | (?<path-rootless>(?!/)\g<seg>++)
48
+ | (?<path-empty>)
49
+ )
50
+ (?:\?(?<query>[^\#]*+))?
51
+ (?:\#(?<fragment>#{FRAGMENT}))?
52
+ )\z]x
53
+
54
+ RFC3986_relative_ref = %r[\A
55
+ (?<seg>#{SEG}){0}
56
+ (?<relative-ref>
57
+ (?<relative-part>//
58
+ (?<authority>
59
+ (?:(?<userinfo>#{USERINFO.source})@)?
60
+ (?<host>#{HOST.source.delete(" \n")}(?<!/))?
61
+ (?::(?<port>\d*+))?
62
+ )
63
+ (?<path-abempty>(?:/\g<seg>*+)?)
64
+ | (?<path-absolute>/\g<seg>*+)
65
+ | (?<path-noscheme>#{SEG_NC}++(?:/\g<seg>*+)?)
66
+ | (?<path-empty>)
67
+ )
68
+ (?:\?(?<query>[^#]*+))?
69
+ (?:\#(?<fragment>#{FRAGMENT}))?
70
+ )\z]x
7
71
  attr_reader :regexp
8
72
 
9
73
  def initialize
@@ -19,9 +83,9 @@ module Bundler::URI
19
83
  uri.ascii_only? or
20
84
  raise InvalidURIError, "Bundler::URI must be ascii only #{uri.dump}"
21
85
  if m = RFC3986_URI.match(uri)
22
- query = m["query".freeze]
23
- scheme = m["scheme".freeze]
24
- opaque = m["path-rootless".freeze]
86
+ query = m["query"]
87
+ scheme = m["scheme"]
88
+ opaque = m["path-rootless"]
25
89
  if opaque
26
90
  opaque << "?#{query}" if query
27
91
  [ scheme,
@@ -32,35 +96,35 @@ module Bundler::URI
32
96
  nil, # path
33
97
  opaque,
34
98
  nil, # query
35
- m["fragment".freeze]
99
+ m["fragment"]
36
100
  ]
37
101
  else # normal
38
102
  [ scheme,
39
- m["userinfo".freeze],
40
- m["host".freeze],
41
- m["port".freeze],
103
+ m["userinfo"],
104
+ m["host"],
105
+ m["port"],
42
106
  nil, # registry
43
- (m["path-abempty".freeze] ||
44
- m["path-absolute".freeze] ||
45
- m["path-empty".freeze]),
107
+ (m["path-abempty"] ||
108
+ m["path-absolute"] ||
109
+ m["path-empty"]),
46
110
  nil, # opaque
47
111
  query,
48
- m["fragment".freeze]
112
+ m["fragment"]
49
113
  ]
50
114
  end
51
115
  elsif m = RFC3986_relative_ref.match(uri)
52
116
  [ nil, # scheme
53
- m["userinfo".freeze],
54
- m["host".freeze],
55
- m["port".freeze],
117
+ m["userinfo"],
118
+ m["host"],
119
+ m["port"],
56
120
  nil, # registry,
57
- (m["path-abempty".freeze] ||
58
- m["path-absolute".freeze] ||
59
- m["path-noscheme".freeze] ||
60
- m["path-empty".freeze]),
121
+ (m["path-abempty"] ||
122
+ m["path-absolute"] ||
123
+ m["path-noscheme"] ||
124
+ m["path-empty"]),
61
125
  nil, # opaque
62
- m["query".freeze],
63
- m["fragment".freeze]
126
+ m["query"],
127
+ m["fragment"]
64
128
  ]
65
129
  else
66
130
  raise InvalidURIError, "bad Bundler::URI(is not Bundler::URI?): #{uri.inspect}"
@@ -92,14 +156,14 @@ module Bundler::URI
92
156
 
93
157
  def default_regexp # :nodoc:
94
158
  {
95
- SCHEME: /\A[A-Za-z][A-Za-z0-9+\-.]*\z/,
96
- USERINFO: /\A(?:%\h\h|[!$&-.0-;=A-Z_a-z~])*\z/,
97
- HOST: /\A(?:(?<IP-literal>\[(?:(?<IPv6address>(?:\h{1,4}:){6}(?<ls32>\h{1,4}:\h{1,4}|(?<IPv4address>(?<dec-octet>[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]|\d)\.\g<dec-octet>\.\g<dec-octet>\.\g<dec-octet>))|::(?:\h{1,4}:){5}\g<ls32>|\h{,4}::(?:\h{1,4}:){4}\g<ls32>|(?:(?:\h{1,4}:)?\h{1,4})?::(?:\h{1,4}:){3}\g<ls32>|(?:(?:\h{1,4}:){,2}\h{1,4})?::(?:\h{1,4}:){2}\g<ls32>|(?:(?:\h{1,4}:){,3}\h{1,4})?::\h{1,4}:\g<ls32>|(?:(?:\h{1,4}:){,4}\h{1,4})?::\g<ls32>|(?:(?:\h{1,4}:){,5}\h{1,4})?::\h{1,4}|(?:(?:\h{1,4}:){,6}\h{1,4})?::)|(?<IPvFuture>v\h+\.[!$&-.0-;=A-Z_a-z~]+))\])|\g<IPv4address>|(?<reg-name>(?:%\h\h|[!$&-.0-9;=A-Z_a-z~])*))\z/,
98
- ABS_PATH: /\A\/(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*(?:\/(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*)*\z/,
99
- REL_PATH: /\A(?:%\h\h|[!$&-.0-;=@-Z_a-z~])+(?:\/(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*)*\z/,
100
- QUERY: /\A(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*\z/,
101
- FRAGMENT: /\A(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*\z/,
102
- OPAQUE: /\A(?:[^\/].*)?\z/,
159
+ SCHEME: %r[\A#{SCHEME}\z]o,
160
+ USERINFO: %r[\A#{USERINFO}\z]o,
161
+ HOST: %r[\A#{HOST}\z]o,
162
+ ABS_PATH: %r[\A/#{SEG}*+\z]o,
163
+ REL_PATH: %r[\A(?!/)#{SEG}++\z]o,
164
+ QUERY: %r[\A(?:%\h\h|[!$&-.0-9:;=@A-Z_a-z~/?])*+\z],
165
+ FRAGMENT: %r[\A#{FRAGMENT}\z]o,
166
+ OPAQUE: %r[\A(?:[^/].*)?\z],
103
167
  PORT: /\A[\x09\x0a\x0c\x0d ]*+\d*[\x09\x0a\x0c\x0d ]*\z/,
104
168
  }
105
169
  end
@@ -1,6 +1,6 @@
1
1
  module Bundler::URI
2
2
  # :stopdoc:
3
- VERSION_CODE = '001202'.freeze
3
+ VERSION_CODE = '001300'.freeze
4
4
  VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze
5
5
  # :startdoc:
6
6
  end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ begin
4
+ require "rubygems/net/http"
5
+ rescue LoadError
6
+ require "net/http"
7
+ Gem::Net = Net
8
+ end
@@ -9,7 +9,3 @@ module Bundler
9
9
  end
10
10
  end
11
11
  require_relative "vendor/net-http-persistent/lib/net/http/persistent"
12
-
13
- module Bundler
14
- PersistentHTTP = Persistent::Net::HTTP::Persistent
15
- end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ begin
4
+ require "rubygems/timeout"
5
+ rescue LoadError
6
+ require "timeout"
7
+ Gem::Timeout = Timeout
8
+ end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "2.4.21".freeze
4
+ VERSION = "2.5.0".freeze
5
5
 
6
6
  def self.bundler_major_version
7
7
  @bundler_major_version ||= VERSION.split(".").first.to_i
data/lib/bundler/vlad.rb CHANGED
@@ -13,5 +13,5 @@ require_relative "deployment"
13
13
  include Rake::DSL if defined? Rake::DSL
14
14
 
15
15
  namespace :vlad do
16
- Bundler::Deployment.define_task(Rake::RemoteTask, :remote_task, :roles => :app)
16
+ Bundler::Deployment.define_task(Rake::RemoteTask, :remote_task, roles: :app)
17
17
  end
@@ -17,7 +17,11 @@ module Bundler
17
17
  if v.is_a?(Hash)
18
18
  yaml << dump_hash(v).gsub(/^(?!$)/, " ") # indent all non-empty lines
19
19
  elsif v.is_a?(Array) # Expected to be array of strings
20
- yaml << "\n- " << v.map {|s| s.to_s.gsub(/\s+/, " ").inspect }.join("\n- ") << "\n"
20
+ if v.empty?
21
+ yaml << " []\n"
22
+ else
23
+ yaml << "\n- " << v.map {|s| s.to_s.gsub(/\s+/, " ").inspect }.join("\n- ") << "\n"
24
+ end
21
25
  else
22
26
  yaml << " " << v.to_s.gsub(/\s+/, " ").inspect << "\n"
23
27
  end
@@ -32,7 +36,7 @@ module Bundler
32
36
  (.*) # value
33
37
  \1 # matching closing quote
34
38
  $
35
- /xo.freeze
39
+ /xo
36
40
 
37
41
  HASH_REGEX = /
38
42
  ^
@@ -44,14 +48,14 @@ module Bundler
44
48
  (.*) # value
45
49
  \3 # matching closing quote
46
50
  $
47
- /xo.freeze
51
+ /xo
48
52
 
49
53
  def load(str)
50
54
  res = {}
51
55
  stack = [res]
52
56
  last_hash = nil
53
57
  last_empty_key = nil
54
- str.split(/\r?\n/).each do |line|
58
+ str.split(/\r?\n/) do |line|
55
59
  if match = HASH_REGEX.match(line)
56
60
  indent, key, quote, val = match.captures
57
61
  convert_to_backward_compatible_key!(key)
@@ -63,6 +67,7 @@ module Bundler
63
67
  last_empty_key = key
64
68
  last_hash = stack[depth]
65
69
  else
70
+ val = [] if val == "[]" # empty array
66
71
  stack[depth][key] = val
67
72
  end
68
73
  elsif match = ARRAY_REGEX.match(line)
data/lib/bundler.rb CHANGED
@@ -17,7 +17,7 @@ require_relative "bundler/build_metadata"
17
17
  # Bundler provides a consistent environment for Ruby projects by
18
18
  # tracking and installing the exact gems and versions that are needed.
19
19
  #
20
- # Since Ruby 2.6, Bundler is a part of Ruby's standard library.
20
+ # Bundler is a part of Ruby's standard library.
21
21
  #
22
22
  # Bundler is used by creating _gemfiles_ listing all the project dependencies
23
23
  # and (optionally) their versions and then using
@@ -39,6 +39,8 @@ module Bundler
39
39
  environment_preserver.replace_with_backup
40
40
  SUDO_MUTEX = Thread::Mutex.new
41
41
 
42
+ autoload :Checksum, File.expand_path("bundler/checksum", __dir__)
43
+ autoload :CIDetector, File.expand_path("bundler/ci_detector", __dir__)
42
44
  autoload :Definition, File.expand_path("bundler/definition", __dir__)
43
45
  autoload :Dependency, File.expand_path("bundler/dependency", __dir__)
44
46
  autoload :Deprecate, File.expand_path("bundler/deprecate", __dir__)
@@ -192,7 +194,7 @@ module Bundler
192
194
  end
193
195
 
194
196
  def environment
195
- SharedHelpers.major_deprecation 2, "Bundler.environment has been removed in favor of Bundler.load", :print_caller_location => true
197
+ SharedHelpers.major_deprecation 2, "Bundler.environment has been removed in favor of Bundler.load", print_caller_location: true
196
198
  load
197
199
  end
198
200
 
@@ -330,14 +332,6 @@ module Bundler
330
332
 
331
333
  def rm_rf(path)
332
334
  FileUtils.remove_entry_secure(path) if path && File.exist?(path)
333
- rescue ArgumentError
334
- message = <<EOF
335
- It is a security vulnerability to allow your home directory to be world-writable, and bundler cannot continue.
336
- You should probably consider fixing this issue by running `chmod o-w ~` on *nix.
337
- Please refer to https://ruby-doc.org/stdlib-3.1.2/libdoc/fileutils/rdoc/FileUtils.html#method-c-remove_entry_secure for details.
338
- EOF
339
- File.world_writable?(path) ? Bundler.ui.warn(message) : raise
340
- raise PathError, "Please fix the world-writable issue with your #{path} directory"
341
335
  end
342
336
 
343
337
  def settings
@@ -353,13 +347,13 @@ EOF
353
347
 
354
348
  # @deprecated Use `unbundled_env` instead
355
349
  def clean_env
356
- Bundler::SharedHelpers.major_deprecation(
357
- 2,
350
+ message =
358
351
  "`Bundler.clean_env` has been deprecated in favor of `Bundler.unbundled_env`. " \
359
- "If you instead want the environment before bundler was originally loaded, use `Bundler.original_env`",
360
- :print_caller_location => true
361
- )
362
-
352
+ "If you instead want the environment before bundler was originally loaded, use `Bundler.original_env`"
353
+ removed_message =
354
+ "`Bundler.clean_env` has been removed in favor of `Bundler.unbundled_env`. " \
355
+ "If you instead want the environment before bundler was originally loaded, use `Bundler.original_env`"
356
+ Bundler::SharedHelpers.major_deprecation(2, message, removed_message: removed_message, print_caller_location: true)
363
357
  unbundled_env
364
358
  end
365
359
 
@@ -396,13 +390,13 @@ EOF
396
390
 
397
391
  # @deprecated Use `with_unbundled_env` instead
398
392
  def with_clean_env
399
- Bundler::SharedHelpers.major_deprecation(
400
- 2,
393
+ message =
401
394
  "`Bundler.with_clean_env` has been deprecated in favor of `Bundler.with_unbundled_env`. " \
402
- "If you instead want the environment before bundler was originally loaded, use `Bundler.with_original_env`",
403
- :print_caller_location => true
404
- )
405
-
395
+ "If you instead want the environment before bundler was originally loaded, use `Bundler.with_original_env`"
396
+ removed_message =
397
+ "`Bundler.with_clean_env` has been removed in favor of `Bundler.with_unbundled_env`. " \
398
+ "If you instead want the environment before bundler was originally loaded, use `Bundler.with_original_env`"
399
+ Bundler::SharedHelpers.major_deprecation(2, message, removed_message: removed_message, print_caller_location: true)
406
400
  with_env(unbundled_env) { yield }
407
401
  end
408
402
 
@@ -418,13 +412,13 @@ EOF
418
412
 
419
413
  # @deprecated Use `unbundled_system` instead
420
414
  def clean_system(*args)
421
- Bundler::SharedHelpers.major_deprecation(
422
- 2,
415
+ message =
423
416
  "`Bundler.clean_system` has been deprecated in favor of `Bundler.unbundled_system`. " \
424
- "If you instead want to run the command in the environment before bundler was originally loaded, use `Bundler.original_system`",
425
- :print_caller_location => true
426
- )
427
-
417
+ "If you instead want to run the command in the environment before bundler was originally loaded, use `Bundler.original_system`"
418
+ removed_message =
419
+ "`Bundler.clean_system` has been removed in favor of `Bundler.unbundled_system`. " \
420
+ "If you instead want to run the command in the environment before bundler was originally loaded, use `Bundler.original_system`"
421
+ Bundler::SharedHelpers.major_deprecation(2, message, removed_message: removed_message, print_caller_location: true)
428
422
  with_env(unbundled_env) { Kernel.system(*args) }
429
423
  end
430
424
 
@@ -440,13 +434,13 @@ EOF
440
434
 
441
435
  # @deprecated Use `unbundled_exec` instead
442
436
  def clean_exec(*args)
443
- Bundler::SharedHelpers.major_deprecation(
444
- 2,
437
+ message =
445
438
  "`Bundler.clean_exec` has been deprecated in favor of `Bundler.unbundled_exec`. " \
446
- "If you instead want to exec to a command in the environment before bundler was originally loaded, use `Bundler.original_exec`",
447
- :print_caller_location => true
448
- )
449
-
439
+ "If you instead want to exec to a command in the environment before bundler was originally loaded, use `Bundler.original_exec`"
440
+ removed_message =
441
+ "`Bundler.clean_exec` has been removed in favor of `Bundler.unbundled_exec`. " \
442
+ "If you instead want to exec to a command in the environment before bundler was originally loaded, use `Bundler.original_exec`"
443
+ Bundler::SharedHelpers.major_deprecation(2, message, removed_message: removed_message, print_caller_location: true)
450
444
  with_env(unbundled_env) { Kernel.exec(*args) }
451
445
  end
452
446
 
@@ -515,7 +509,16 @@ EOF
515
509
  end
516
510
 
517
511
  def safe_load_marshal(data)
518
- load_marshal(data, :marshal_proc => SafeMarshal.proc)
512
+ if Gem.respond_to?(:load_safe_marshal)
513
+ Gem.load_safe_marshal
514
+ begin
515
+ Gem::SafeMarshal.safe_load(data)
516
+ rescue Gem::SafeMarshal::Reader::Error, Gem::SafeMarshal::Visitors::ToRuby::Error => e
517
+ raise MarshalError, "#{e.class}: #{e.message}"
518
+ end
519
+ else
520
+ load_marshal(data, marshal_proc: SafeMarshal.proc)
521
+ end
519
522
  end
520
523
 
521
524
  def load_gemspec(file, validate = false)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.21
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Arko
@@ -22,7 +22,7 @@ authors:
22
22
  autorequire:
23
23
  bindir: exe
24
24
  cert_chain: []
25
- date: 2023-10-17 00:00:00.000000000 Z
25
+ date: 2023-12-15 00:00:00.000000000 Z
26
26
  dependencies: []
27
27
  description: Bundler manages an application's dependencies through its entire life,
28
28
  across many machines, systematically and repeatably
@@ -44,6 +44,8 @@ files:
44
44
  - lib/bundler/.document
45
45
  - lib/bundler/build_metadata.rb
46
46
  - lib/bundler/capistrano.rb
47
+ - lib/bundler/checksum.rb
48
+ - lib/bundler/ci_detector.rb
47
49
  - lib/bundler/cli.rb
48
50
  - lib/bundler/cli/add.rb
49
51
  - lib/bundler/cli/binstubs.rb
@@ -75,6 +77,7 @@ files:
75
77
  - lib/bundler/cli/viz.rb
76
78
  - lib/bundler/compact_index_client.rb
77
79
  - lib/bundler/compact_index_client/cache.rb
80
+ - lib/bundler/compact_index_client/cache_file.rb
78
81
  - lib/bundler/compact_index_client/gem_parser.rb
79
82
  - lib/bundler/compact_index_client/updater.rb
80
83
  - lib/bundler/constants.rb
@@ -95,6 +98,7 @@ files:
95
98
  - lib/bundler/fetcher/compact_index.rb
96
99
  - lib/bundler/fetcher/dependency.rb
97
100
  - lib/bundler/fetcher/downloader.rb
101
+ - lib/bundler/fetcher/gem_remote_fetcher.rb
98
102
  - lib/bundler/fetcher/index.rb
99
103
  - lib/bundler/force_platform.rb
100
104
  - lib/bundler/friendly_errors.rb
@@ -327,7 +331,12 @@ files:
327
331
  - lib/bundler/vendor/thor/lib/thor/shell.rb
328
332
  - lib/bundler/vendor/thor/lib/thor/shell/basic.rb
329
333
  - lib/bundler/vendor/thor/lib/thor/shell/color.rb
334
+ - lib/bundler/vendor/thor/lib/thor/shell/column_printer.rb
330
335
  - lib/bundler/vendor/thor/lib/thor/shell/html.rb
336
+ - lib/bundler/vendor/thor/lib/thor/shell/lcs_diff.rb
337
+ - lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb
338
+ - lib/bundler/vendor/thor/lib/thor/shell/terminal.rb
339
+ - lib/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb
331
340
  - lib/bundler/vendor/thor/lib/thor/util.rb
332
341
  - lib/bundler/vendor/thor/lib/thor/version.rb
333
342
  - lib/bundler/vendor/tsort/LICENSE.txt
@@ -349,9 +358,11 @@ files:
349
358
  - lib/bundler/vendor/uri/lib/uri/ws.rb
350
359
  - lib/bundler/vendor/uri/lib/uri/wss.rb
351
360
  - lib/bundler/vendored_fileutils.rb
361
+ - lib/bundler/vendored_net_http.rb
352
362
  - lib/bundler/vendored_persistent.rb
353
363
  - lib/bundler/vendored_pub_grub.rb
354
364
  - lib/bundler/vendored_thor.rb
365
+ - lib/bundler/vendored_timeout.rb
355
366
  - lib/bundler/vendored_tsort.rb
356
367
  - lib/bundler/vendored_uri.rb
357
368
  - lib/bundler/version.rb
@@ -374,14 +385,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
374
385
  requirements:
375
386
  - - ">="
376
387
  - !ruby/object:Gem::Version
377
- version: 2.6.0
388
+ version: 3.0.0
378
389
  required_rubygems_version: !ruby/object:Gem::Requirement
379
390
  requirements:
380
391
  - - ">="
381
392
  - !ruby/object:Gem::Version
382
- version: 3.0.1
393
+ version: 3.2.3
383
394
  requirements: []
384
- rubygems_version: 3.4.21
395
+ rubygems_version: 3.5.0
385
396
  signing_key:
386
397
  specification_version: 4
387
398
  summary: The best way to manage your application's dependencies