bundler 2.4.22 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +53 -0
  3. data/bundler.gemspec +4 -2
  4. data/exe/bundle +1 -10
  5. data/lib/bundler/build_metadata.rb +3 -3
  6. data/lib/bundler/capistrano.rb +1 -1
  7. data/lib/bundler/checksum.rb +245 -0
  8. data/lib/bundler/ci_detector.rb +75 -0
  9. data/lib/bundler/cli/add.rb +3 -3
  10. data/lib/bundler/cli/binstubs.rb +4 -4
  11. data/lib/bundler/cli/cache.rb +1 -1
  12. data/lib/bundler/cli/check.rb +1 -1
  13. data/lib/bundler/cli/common.rb +9 -1
  14. data/lib/bundler/cli/config.rb +8 -7
  15. data/lib/bundler/cli/console.rb +3 -2
  16. data/lib/bundler/cli/doctor.rb +2 -2
  17. data/lib/bundler/cli/exec.rb +1 -1
  18. data/lib/bundler/cli/gem.rb +28 -23
  19. data/lib/bundler/cli/info.rb +2 -13
  20. data/lib/bundler/cli/install.rb +5 -4
  21. data/lib/bundler/cli/issue.rb +1 -1
  22. data/lib/bundler/cli/lock.rb +4 -4
  23. data/lib/bundler/cli/open.rb +1 -1
  24. data/lib/bundler/cli/outdated.rb +6 -6
  25. data/lib/bundler/cli/plugin.rb +7 -14
  26. data/lib/bundler/cli/pristine.rb +38 -30
  27. data/lib/bundler/cli/show.rb +2 -2
  28. data/lib/bundler/cli/update.rb +5 -5
  29. data/lib/bundler/cli.rb +215 -263
  30. data/lib/bundler/compact_index_client/cache.rb +29 -9
  31. data/lib/bundler/compact_index_client/cache_file.rb +153 -0
  32. data/lib/bundler/compact_index_client/gem_parser.rb +7 -3
  33. data/lib/bundler/compact_index_client/updater.rb +79 -81
  34. data/lib/bundler/compact_index_client.rb +14 -7
  35. data/lib/bundler/constants.rb +1 -1
  36. data/lib/bundler/current_ruby.rb +5 -21
  37. data/lib/bundler/definition.rb +42 -15
  38. data/lib/bundler/dependency.rb +16 -12
  39. data/lib/bundler/digest.rb +2 -2
  40. data/lib/bundler/dsl.rb +43 -25
  41. data/lib/bundler/endpoint_specification.rb +5 -1
  42. data/lib/bundler/env.rb +1 -3
  43. data/lib/bundler/errors.rb +43 -0
  44. data/lib/bundler/fetcher/base.rb +3 -1
  45. data/lib/bundler/fetcher/compact_index.rb +4 -4
  46. data/lib/bundler/fetcher/downloader.rb +13 -11
  47. data/lib/bundler/fetcher/gem_remote_fetcher.rb +16 -0
  48. data/lib/bundler/fetcher/index.rb +1 -1
  49. data/lib/bundler/fetcher.rb +28 -25
  50. data/lib/bundler/friendly_errors.rb +5 -5
  51. data/lib/bundler/gem_helper.rb +1 -1
  52. data/lib/bundler/gem_helpers.rb +5 -2
  53. data/lib/bundler/graph.rb +9 -9
  54. data/lib/bundler/index.rb +1 -2
  55. data/lib/bundler/injector.rb +1 -1
  56. data/lib/bundler/inline.rb +3 -3
  57. data/lib/bundler/installer/gem_installer.rb +5 -5
  58. data/lib/bundler/installer/parallel_installer.rb +16 -8
  59. data/lib/bundler/installer/standalone.rb +2 -3
  60. data/lib/bundler/installer.rb +9 -9
  61. data/lib/bundler/lazy_specification.rb +24 -17
  62. data/lib/bundler/lockfile_generator.rb +9 -0
  63. data/lib/bundler/lockfile_parser.rb +81 -10
  64. data/lib/bundler/man/bundle-add.1 +3 -26
  65. data/lib/bundler/man/bundle-binstubs.1 +4 -16
  66. data/lib/bundler/man/bundle-cache.1 +3 -24
  67. data/lib/bundler/man/bundle-check.1 +3 -12
  68. data/lib/bundler/man/bundle-clean.1 +3 -10
  69. data/lib/bundler/man/bundle-config.1 +20 -211
  70. data/lib/bundler/man/bundle-config.1.ronn +6 -0
  71. data/lib/bundler/man/bundle-console.1 +4 -22
  72. data/lib/bundler/man/bundle-doctor.1 +4 -18
  73. data/lib/bundler/man/bundle-exec.1 +12 -73
  74. data/lib/bundler/man/bundle-gem.1 +13 -49
  75. data/lib/bundler/man/bundle-help.1 +3 -7
  76. data/lib/bundler/man/bundle-info.1 +3 -9
  77. data/lib/bundler/man/bundle-init.1 +3 -12
  78. data/lib/bundler/man/bundle-inject.1 +6 -19
  79. data/lib/bundler/man/bundle-install.1 +27 -125
  80. data/lib/bundler/man/bundle-install.1.ronn +1 -0
  81. data/lib/bundler/man/bundle-list.1 +4 -19
  82. data/lib/bundler/man/bundle-lock.1 +5 -29
  83. data/lib/bundler/man/bundle-open.1 +7 -27
  84. data/lib/bundler/man/bundle-outdated.1 +3 -55
  85. data/lib/bundler/man/bundle-outdated.1.ronn +1 -0
  86. data/lib/bundler/man/bundle-platform.1 +5 -27
  87. data/lib/bundler/man/bundle-plugin.1 +3 -29
  88. data/lib/bundler/man/bundle-pristine.1 +5 -16
  89. data/lib/bundler/man/bundle-remove.1 +4 -14
  90. data/lib/bundler/man/bundle-show.1 +3 -10
  91. data/lib/bundler/man/bundle-update.1 +18 -137
  92. data/lib/bundler/man/bundle-version.1 +3 -16
  93. data/lib/bundler/man/bundle-viz.1 +4 -16
  94. data/lib/bundler/man/bundle.1 +5 -44
  95. data/lib/bundler/man/gemfile.5 +24 -301
  96. data/lib/bundler/man/gemfile.5.ronn +4 -0
  97. data/lib/bundler/match_metadata.rb +4 -0
  98. data/lib/bundler/match_platform.rb +1 -1
  99. data/lib/bundler/plugin/api/source.rb +3 -2
  100. data/lib/bundler/plugin/installer.rb +1 -1
  101. data/lib/bundler/plugin.rb +3 -3
  102. data/lib/bundler/resolver/base.rb +1 -1
  103. data/lib/bundler/resolver/incompatibility.rb +1 -1
  104. data/lib/bundler/resolver/spec_group.rb +1 -4
  105. data/lib/bundler/resolver.rb +16 -16
  106. data/lib/bundler/ruby_dsl.rb +20 -12
  107. data/lib/bundler/ruby_version.rb +1 -1
  108. data/lib/bundler/rubygems_ext.rb +24 -50
  109. data/lib/bundler/rubygems_gem_installer.rb +6 -56
  110. data/lib/bundler/rubygems_integration.rb +25 -94
  111. data/lib/bundler/runtime.rb +2 -2
  112. data/lib/bundler/self_manager.rb +23 -7
  113. data/lib/bundler/settings.rb +27 -7
  114. data/lib/bundler/setup.rb +4 -1
  115. data/lib/bundler/shared_helpers.rb +35 -13
  116. data/lib/bundler/source/git/git_proxy.rb +15 -15
  117. data/lib/bundler/source/git.rb +4 -3
  118. data/lib/bundler/source/metadata.rb +15 -15
  119. data/lib/bundler/source/path.rb +7 -6
  120. data/lib/bundler/source/rubygems.rb +21 -14
  121. data/lib/bundler/source.rb +2 -0
  122. data/lib/bundler/spec_set.rb +38 -10
  123. data/lib/bundler/stub_specification.rb +1 -0
  124. data/lib/bundler/templates/Executable.bundler +1 -1
  125. data/lib/bundler/templates/newgem/README.md.tt +3 -3
  126. data/lib/bundler/templates/newgem/Rakefile.tt +2 -6
  127. data/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +1 -1
  128. data/lib/bundler/templates/newgem/standard.yml.tt +1 -1
  129. data/lib/bundler/ui/shell.rb +1 -1
  130. data/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
  131. data/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +53 -6
  132. data/lib/bundler/vendor/fileutils/lib/fileutils.rb +8 -20
  133. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb +3 -3
  134. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb +2 -2
  135. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +1 -1
  136. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +35 -35
  137. data/lib/bundler/vendor/tsort/lib/tsort.rb +3 -0
  138. data/lib/bundler/vendor/uri/lib/uri/common.rb +256 -132
  139. data/lib/bundler/vendor/uri/lib/uri/generic.rb +1 -0
  140. data/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +95 -31
  141. data/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
  142. data/lib/bundler/vendored_net_http.rb +8 -0
  143. data/lib/bundler/vendored_persistent.rb +0 -4
  144. data/lib/bundler/vendored_timeout.rb +8 -0
  145. data/lib/bundler/version.rb +1 -1
  146. data/lib/bundler/vlad.rb +1 -1
  147. data/lib/bundler/yaml_serializer.rb +3 -3
  148. data/lib/bundler.rb +38 -27
  149. metadata +11 -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.22".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
@@ -36,7 +36,7 @@ module Bundler
36
36
  (.*) # value
37
37
  \1 # matching closing quote
38
38
  $
39
- /xo.freeze
39
+ /xo
40
40
 
41
41
  HASH_REGEX = /
42
42
  ^
@@ -48,14 +48,14 @@ module Bundler
48
48
  (.*) # value
49
49
  \3 # matching closing quote
50
50
  $
51
- /xo.freeze
51
+ /xo
52
52
 
53
53
  def load(str)
54
54
  res = {}
55
55
  stack = [res]
56
56
  last_hash = nil
57
57
  last_empty_key = nil
58
- str.split(/\r?\n/).each do |line|
58
+ str.split(/\r?\n/) do |line|
59
59
  if match = HASH_REGEX.match(line)
60
60
  indent, key, quote, val = match.captures
61
61
  convert_to_backward_compatible_key!(key)
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
 
@@ -345,13 +347,13 @@ module Bundler
345
347
 
346
348
  # @deprecated Use `unbundled_env` instead
347
349
  def clean_env
348
- Bundler::SharedHelpers.major_deprecation(
349
- 2,
350
+ message =
350
351
  "`Bundler.clean_env` has been deprecated in favor of `Bundler.unbundled_env`. " \
351
- "If you instead want the environment before bundler was originally loaded, use `Bundler.original_env`",
352
- :print_caller_location => true
353
- )
354
-
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)
355
357
  unbundled_env
356
358
  end
357
359
 
@@ -388,13 +390,13 @@ module Bundler
388
390
 
389
391
  # @deprecated Use `with_unbundled_env` instead
390
392
  def with_clean_env
391
- Bundler::SharedHelpers.major_deprecation(
392
- 2,
393
+ message =
393
394
  "`Bundler.with_clean_env` has been deprecated in favor of `Bundler.with_unbundled_env`. " \
394
- "If you instead want the environment before bundler was originally loaded, use `Bundler.with_original_env`",
395
- :print_caller_location => true
396
- )
397
-
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)
398
400
  with_env(unbundled_env) { yield }
399
401
  end
400
402
 
@@ -410,13 +412,13 @@ module Bundler
410
412
 
411
413
  # @deprecated Use `unbundled_system` instead
412
414
  def clean_system(*args)
413
- Bundler::SharedHelpers.major_deprecation(
414
- 2,
415
+ message =
415
416
  "`Bundler.clean_system` has been deprecated in favor of `Bundler.unbundled_system`. " \
416
- "If you instead want to run the command in the environment before bundler was originally loaded, use `Bundler.original_system`",
417
- :print_caller_location => true
418
- )
419
-
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)
420
422
  with_env(unbundled_env) { Kernel.system(*args) }
421
423
  end
422
424
 
@@ -432,13 +434,13 @@ module Bundler
432
434
 
433
435
  # @deprecated Use `unbundled_exec` instead
434
436
  def clean_exec(*args)
435
- Bundler::SharedHelpers.major_deprecation(
436
- 2,
437
+ message =
437
438
  "`Bundler.clean_exec` has been deprecated in favor of `Bundler.unbundled_exec`. " \
438
- "If you instead want to exec to a command in the environment before bundler was originally loaded, use `Bundler.original_exec`",
439
- :print_caller_location => true
440
- )
441
-
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)
442
444
  with_env(unbundled_env) { Kernel.exec(*args) }
443
445
  end
444
446
 
@@ -507,7 +509,16 @@ module Bundler
507
509
  end
508
510
 
509
511
  def safe_load_marshal(data)
510
- 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
511
522
  end
512
523
 
513
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.22
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-11-09 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
@@ -354,9 +358,11 @@ files:
354
358
  - lib/bundler/vendor/uri/lib/uri/ws.rb
355
359
  - lib/bundler/vendor/uri/lib/uri/wss.rb
356
360
  - lib/bundler/vendored_fileutils.rb
361
+ - lib/bundler/vendored_net_http.rb
357
362
  - lib/bundler/vendored_persistent.rb
358
363
  - lib/bundler/vendored_pub_grub.rb
359
364
  - lib/bundler/vendored_thor.rb
365
+ - lib/bundler/vendored_timeout.rb
360
366
  - lib/bundler/vendored_tsort.rb
361
367
  - lib/bundler/vendored_uri.rb
362
368
  - lib/bundler/version.rb
@@ -379,14 +385,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
379
385
  requirements:
380
386
  - - ">="
381
387
  - !ruby/object:Gem::Version
382
- version: 2.6.0
388
+ version: 3.0.0
383
389
  required_rubygems_version: !ruby/object:Gem::Requirement
384
390
  requirements:
385
391
  - - ">="
386
392
  - !ruby/object:Gem::Version
387
- version: 3.0.1
393
+ version: 3.2.3
388
394
  requirements: []
389
- rubygems_version: 3.4.22
395
+ rubygems_version: 3.5.0
390
396
  signing_key:
391
397
  specification_version: 4
392
398
  summary: The best way to manage your application's dependencies