bundler 2.4.22 → 2.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +113 -0
- data/bundler.gemspec +4 -2
- data/exe/bundle +1 -10
- data/lib/bundler/build_metadata.rb +3 -3
- data/lib/bundler/capistrano.rb +1 -1
- data/lib/bundler/checksum.rb +254 -0
- data/lib/bundler/ci_detector.rb +75 -0
- data/lib/bundler/cli/add.rb +3 -3
- data/lib/bundler/cli/binstubs.rb +4 -4
- data/lib/bundler/cli/cache.rb +1 -1
- data/lib/bundler/cli/check.rb +1 -1
- data/lib/bundler/cli/common.rb +9 -1
- data/lib/bundler/cli/config.rb +8 -7
- data/lib/bundler/cli/console.rb +3 -2
- data/lib/bundler/cli/doctor.rb +2 -2
- data/lib/bundler/cli/exec.rb +1 -1
- data/lib/bundler/cli/gem.rb +29 -24
- data/lib/bundler/cli/info.rb +2 -13
- data/lib/bundler/cli/install.rb +5 -4
- data/lib/bundler/cli/issue.rb +1 -1
- data/lib/bundler/cli/lock.rb +9 -8
- data/lib/bundler/cli/open.rb +1 -1
- data/lib/bundler/cli/outdated.rb +6 -6
- data/lib/bundler/cli/plugin.rb +7 -14
- data/lib/bundler/cli/pristine.rb +38 -30
- data/lib/bundler/cli/show.rb +2 -2
- data/lib/bundler/cli/update.rb +5 -5
- data/lib/bundler/cli.rb +215 -263
- data/lib/bundler/compact_index_client/cache.rb +29 -9
- data/lib/bundler/compact_index_client/cache_file.rb +153 -0
- data/lib/bundler/compact_index_client/gem_parser.rb +7 -3
- data/lib/bundler/compact_index_client/updater.rb +79 -81
- data/lib/bundler/compact_index_client.rb +14 -7
- data/lib/bundler/constants.rb +1 -1
- data/lib/bundler/current_ruby.rb +5 -21
- data/lib/bundler/definition.rb +111 -48
- data/lib/bundler/dependency.rb +20 -12
- data/lib/bundler/digest.rb +2 -2
- data/lib/bundler/dsl.rb +52 -31
- data/lib/bundler/endpoint_specification.rb +5 -1
- data/lib/bundler/env.rb +1 -3
- data/lib/bundler/environment_preserver.rb +3 -3
- data/lib/bundler/errors.rb +43 -0
- data/lib/bundler/fetcher/base.rb +3 -1
- data/lib/bundler/fetcher/compact_index.rb +4 -4
- data/lib/bundler/fetcher/downloader.rb +14 -12
- data/lib/bundler/fetcher/gem_remote_fetcher.rb +16 -0
- data/lib/bundler/fetcher/index.rb +1 -1
- data/lib/bundler/fetcher.rb +30 -27
- data/lib/bundler/friendly_errors.rb +5 -5
- data/lib/bundler/gem_helper.rb +1 -1
- data/lib/bundler/gem_helpers.rb +5 -2
- data/lib/bundler/graph.rb +9 -9
- data/lib/bundler/index.rb +1 -2
- data/lib/bundler/injector.rb +2 -2
- data/lib/bundler/inline.rb +3 -3
- data/lib/bundler/installer/gem_installer.rb +5 -5
- data/lib/bundler/installer/parallel_installer.rb +16 -8
- data/lib/bundler/installer/standalone.rb +2 -3
- data/lib/bundler/installer.rb +11 -11
- data/lib/bundler/lazy_specification.rb +26 -17
- data/lib/bundler/lockfile_generator.rb +9 -0
- data/lib/bundler/lockfile_parser.rb +81 -10
- data/lib/bundler/man/bundle-add.1 +3 -26
- data/lib/bundler/man/bundle-binstubs.1 +4 -16
- data/lib/bundler/man/bundle-cache.1 +3 -24
- data/lib/bundler/man/bundle-check.1 +3 -12
- data/lib/bundler/man/bundle-clean.1 +3 -10
- data/lib/bundler/man/bundle-config.1 +22 -213
- data/lib/bundler/man/bundle-config.1.ronn +8 -2
- data/lib/bundler/man/bundle-console.1 +4 -22
- data/lib/bundler/man/bundle-doctor.1 +4 -18
- data/lib/bundler/man/bundle-exec.1 +12 -73
- data/lib/bundler/man/bundle-gem.1 +13 -49
- data/lib/bundler/man/bundle-help.1 +3 -7
- data/lib/bundler/man/bundle-info.1 +3 -9
- data/lib/bundler/man/bundle-init.1 +3 -12
- data/lib/bundler/man/bundle-inject.1 +6 -19
- data/lib/bundler/man/bundle-install.1 +27 -125
- data/lib/bundler/man/bundle-install.1.ronn +1 -0
- data/lib/bundler/man/bundle-list.1 +4 -19
- data/lib/bundler/man/bundle-lock.1 +5 -29
- data/lib/bundler/man/bundle-open.1 +7 -27
- data/lib/bundler/man/bundle-outdated.1 +3 -55
- data/lib/bundler/man/bundle-outdated.1.ronn +1 -0
- data/lib/bundler/man/bundle-platform.1 +5 -27
- data/lib/bundler/man/bundle-plugin.1 +3 -29
- data/lib/bundler/man/bundle-pristine.1 +5 -16
- data/lib/bundler/man/bundle-remove.1 +4 -14
- data/lib/bundler/man/bundle-show.1 +3 -10
- data/lib/bundler/man/bundle-update.1 +18 -137
- data/lib/bundler/man/bundle-version.1 +3 -16
- data/lib/bundler/man/bundle-viz.1 +4 -16
- data/lib/bundler/man/bundle.1 +5 -44
- data/lib/bundler/man/gemfile.5 +24 -301
- data/lib/bundler/man/gemfile.5.ronn +4 -0
- data/lib/bundler/match_metadata.rb +4 -0
- data/lib/bundler/match_platform.rb +1 -1
- data/lib/bundler/mirror.rb +3 -3
- data/lib/bundler/plugin/api/source.rb +5 -4
- data/lib/bundler/plugin/installer.rb +1 -1
- data/lib/bundler/plugin.rb +3 -3
- data/lib/bundler/remote_specification.rb +4 -0
- data/lib/bundler/resolver/base.rb +1 -1
- data/lib/bundler/resolver/incompatibility.rb +1 -1
- data/lib/bundler/resolver/spec_group.rb +1 -4
- data/lib/bundler/resolver.rb +16 -16
- data/lib/bundler/ruby_dsl.rb +20 -12
- data/lib/bundler/ruby_version.rb +1 -1
- data/lib/bundler/rubygems_ext.rb +24 -50
- data/lib/bundler/rubygems_gem_installer.rb +6 -56
- data/lib/bundler/rubygems_integration.rb +25 -94
- data/lib/bundler/runtime.rb +3 -3
- data/lib/bundler/self_manager.rb +24 -8
- data/lib/bundler/settings.rb +31 -11
- data/lib/bundler/setup.rb +4 -1
- data/lib/bundler/shared_helpers.rb +35 -13
- data/lib/bundler/source/git/git_proxy.rb +16 -16
- data/lib/bundler/source/git.rb +5 -4
- data/lib/bundler/source/metadata.rb +15 -15
- data/lib/bundler/source/path.rb +7 -6
- data/lib/bundler/source/rubygems/remote.rb +1 -1
- data/lib/bundler/source/rubygems.rb +23 -16
- data/lib/bundler/source.rb +2 -0
- data/lib/bundler/spec_set.rb +99 -22
- data/lib/bundler/stub_specification.rb +1 -0
- data/lib/bundler/templates/Executable.bundler +1 -1
- data/lib/bundler/templates/newgem/README.md.tt +3 -3
- data/lib/bundler/templates/newgem/Rakefile.tt +2 -6
- data/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +1 -1
- data/lib/bundler/templates/newgem/standard.yml.tt +1 -1
- data/lib/bundler/ui/shell.rb +1 -1
- data/lib/bundler/uri_credentials_filter.rb +2 -2
- data/lib/bundler/vendor/connection_pool/.document +1 -0
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
- data/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +53 -6
- data/lib/bundler/vendor/fileutils/.document +1 -0
- data/lib/bundler/vendor/fileutils/lib/fileutils.rb +8 -20
- data/lib/bundler/vendor/net-http-persistent/.document +1 -0
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb +3 -3
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb +2 -2
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +1 -1
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +56 -56
- data/lib/bundler/vendor/pub_grub/.document +1 -0
- data/lib/bundler/vendor/thor/.document +1 -0
- data/lib/bundler/vendor/thor/lib/thor/shell/color.rb +0 -3
- data/lib/bundler/vendor/thor/lib/thor/shell/html.rb +0 -3
- data/lib/bundler/vendor/tsort/.document +1 -0
- data/lib/bundler/vendor/tsort/lib/tsort.rb +3 -0
- data/lib/bundler/vendor/uri/.document +1 -0
- data/lib/bundler/vendor/uri/lib/uri/common.rb +256 -132
- data/lib/bundler/vendor/uri/lib/uri/generic.rb +1 -0
- data/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +95 -31
- data/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
- data/lib/bundler/vendored_net_http.rb +8 -0
- data/lib/bundler/vendored_persistent.rb +0 -4
- data/lib/bundler/vendored_timeout.rb +8 -0
- data/lib/bundler/vendored_uri.rb +18 -1
- data/lib/bundler/version.rb +1 -1
- data/lib/bundler/vlad.rb +1 -1
- data/lib/bundler/yaml_serializer.rb +15 -3
- data/lib/bundler.rb +44 -34
- metadata +18 -6
- data/lib/bundler/vendor/thor/lib/thor/shell/lcs_diff.rb +0 -49
@@ -1,9 +1,73 @@
|
|
1
|
-
# frozen_string_literal:
|
1
|
+
# frozen_string_literal: true
|
2
2
|
module Bundler::URI
|
3
3
|
class RFC3986_Parser # :nodoc:
|
4
4
|
# Bundler::URI defined in RFC3986
|
5
|
-
|
6
|
-
|
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"
|
23
|
-
scheme = m["scheme"
|
24
|
-
opaque = m["path-rootless"
|
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"
|
99
|
+
m["fragment"]
|
36
100
|
]
|
37
101
|
else # normal
|
38
102
|
[ scheme,
|
39
|
-
m["userinfo"
|
40
|
-
m["host"
|
41
|
-
m["port"
|
103
|
+
m["userinfo"],
|
104
|
+
m["host"],
|
105
|
+
m["port"],
|
42
106
|
nil, # registry
|
43
|
-
(m["path-abempty"
|
44
|
-
m["path-absolute"
|
45
|
-
m["path-empty"
|
107
|
+
(m["path-abempty"] ||
|
108
|
+
m["path-absolute"] ||
|
109
|
+
m["path-empty"]),
|
46
110
|
nil, # opaque
|
47
111
|
query,
|
48
|
-
m["fragment"
|
112
|
+
m["fragment"]
|
49
113
|
]
|
50
114
|
end
|
51
115
|
elsif m = RFC3986_relative_ref.match(uri)
|
52
116
|
[ nil, # scheme
|
53
|
-
m["userinfo"
|
54
|
-
m["host"
|
55
|
-
m["port"
|
117
|
+
m["userinfo"],
|
118
|
+
m["host"],
|
119
|
+
m["port"],
|
56
120
|
nil, # registry,
|
57
|
-
(m["path-abempty"
|
58
|
-
m["path-absolute"
|
59
|
-
m["path-noscheme"
|
60
|
-
m["path-empty"
|
121
|
+
(m["path-abempty"] ||
|
122
|
+
m["path-absolute"] ||
|
123
|
+
m["path-noscheme"] ||
|
124
|
+
m["path-empty"]),
|
61
125
|
nil, # opaque
|
62
|
-
m["query"
|
63
|
-
m["fragment"
|
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:
|
96
|
-
USERINFO:
|
97
|
-
HOST:
|
98
|
-
ABS_PATH:
|
99
|
-
REL_PATH:
|
100
|
-
QUERY:
|
101
|
-
FRAGMENT:
|
102
|
-
OPAQUE:
|
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
|
data/lib/bundler/vendored_uri.rb
CHANGED
@@ -1,4 +1,21 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Bundler; end
|
4
|
-
|
4
|
+
|
5
|
+
# Use RubyGems vendored copy when available. Otherwise fallback to Bundler
|
6
|
+
# vendored copy. The vendored copy in Bundler can be removed once support for
|
7
|
+
# RubyGems 3.5 is dropped.
|
8
|
+
|
9
|
+
begin
|
10
|
+
require "rubygems/vendor/uri/lib/uri"
|
11
|
+
rescue LoadError
|
12
|
+
require_relative "vendor/uri/lib/uri"
|
13
|
+
Gem::URI = Bundler::URI
|
14
|
+
|
15
|
+
module Gem
|
16
|
+
def URI(uri) # rubocop:disable Naming/MethodName
|
17
|
+
Bundler::URI(uri)
|
18
|
+
end
|
19
|
+
module_function :URI
|
20
|
+
end
|
21
|
+
end
|
data/lib/bundler/version.rb
CHANGED
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, :
|
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
|
39
|
+
/xo
|
40
40
|
|
41
41
|
HASH_REGEX = /
|
42
42
|
^
|
@@ -48,16 +48,18 @@ module Bundler
|
|
48
48
|
(.*) # value
|
49
49
|
\3 # matching closing quote
|
50
50
|
$
|
51
|
-
/xo
|
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/)
|
58
|
+
str.split(/\r?\n/) do |line|
|
59
59
|
if match = HASH_REGEX.match(line)
|
60
60
|
indent, key, quote, val = match.captures
|
61
|
+
val = strip_comment(val)
|
62
|
+
|
61
63
|
convert_to_backward_compatible_key!(key)
|
62
64
|
depth = indent.size / 2
|
63
65
|
if quote.empty? && val.empty?
|
@@ -72,6 +74,8 @@ module Bundler
|
|
72
74
|
end
|
73
75
|
elsif match = ARRAY_REGEX.match(line)
|
74
76
|
_, val = match.captures
|
77
|
+
val = strip_comment(val)
|
78
|
+
|
75
79
|
last_hash[last_empty_key] = [] unless last_hash[last_empty_key].is_a?(Array)
|
76
80
|
|
77
81
|
last_hash[last_empty_key].push(val)
|
@@ -80,6 +84,14 @@ module Bundler
|
|
80
84
|
res
|
81
85
|
end
|
82
86
|
|
87
|
+
def strip_comment(val)
|
88
|
+
if val.include?("#") && !val.start_with?("#")
|
89
|
+
val.split("#", 2).first.strip
|
90
|
+
else
|
91
|
+
val
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
83
95
|
# for settings' keys
|
84
96
|
def convert_to_backward_compatible_key!(key)
|
85
97
|
key << "/" if /https?:/i.match?(key) && !%r{/\Z}.match?(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
|
-
#
|
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__)
|
@@ -98,9 +100,7 @@ module Bundler
|
|
98
100
|
end
|
99
101
|
|
100
102
|
def create_bundle_path
|
101
|
-
|
102
|
-
mkdir_p(p)
|
103
|
-
end unless bundle_path.exist?
|
103
|
+
mkdir_p(bundle_path) unless bundle_path.exist?
|
104
104
|
|
105
105
|
@bundle_path = bundle_path.realpath
|
106
106
|
rescue Errno::EEXIST
|
@@ -117,7 +117,7 @@ module Bundler
|
|
117
117
|
@bin_path ||= begin
|
118
118
|
path = settings[:bin] || "bin"
|
119
119
|
path = Pathname.new(path).expand_path(root).expand_path
|
120
|
-
|
120
|
+
mkdir_p(path)
|
121
121
|
path
|
122
122
|
end
|
123
123
|
end
|
@@ -192,7 +192,7 @@ module Bundler
|
|
192
192
|
end
|
193
193
|
|
194
194
|
def environment
|
195
|
-
SharedHelpers.major_deprecation 2, "Bundler.environment has been removed in favor of Bundler.load", :
|
195
|
+
SharedHelpers.major_deprecation 2, "Bundler.environment has been removed in favor of Bundler.load", print_caller_location: true
|
196
196
|
load
|
197
197
|
end
|
198
198
|
|
@@ -200,12 +200,13 @@ module Bundler
|
|
200
200
|
#
|
201
201
|
# @param unlock [Hash, Boolean, nil] Gems that have been requested
|
202
202
|
# to be updated or true if all gems should be updated
|
203
|
+
# @param lockfile [Pathname] Path to Gemfile.lock
|
203
204
|
# @return [Bundler::Definition]
|
204
|
-
def definition(unlock = nil)
|
205
|
+
def definition(unlock = nil, lockfile = default_lockfile)
|
205
206
|
@definition = nil if unlock
|
206
207
|
@definition ||= begin
|
207
208
|
configure
|
208
|
-
Definition.build(default_gemfile,
|
209
|
+
Definition.build(default_gemfile, lockfile, unlock)
|
209
210
|
end
|
210
211
|
end
|
211
212
|
|
@@ -345,13 +346,13 @@ module Bundler
|
|
345
346
|
|
346
347
|
# @deprecated Use `unbundled_env` instead
|
347
348
|
def clean_env
|
348
|
-
|
349
|
-
2,
|
349
|
+
message =
|
350
350
|
"`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
|
-
|
353
|
-
|
354
|
-
|
351
|
+
"If you instead want the environment before bundler was originally loaded, use `Bundler.original_env`"
|
352
|
+
removed_message =
|
353
|
+
"`Bundler.clean_env` has been removed in favor of `Bundler.unbundled_env`. " \
|
354
|
+
"If you instead want the environment before bundler was originally loaded, use `Bundler.original_env`"
|
355
|
+
Bundler::SharedHelpers.major_deprecation(2, message, removed_message: removed_message, print_caller_location: true)
|
355
356
|
unbundled_env
|
356
357
|
end
|
357
358
|
|
@@ -388,13 +389,13 @@ module Bundler
|
|
388
389
|
|
389
390
|
# @deprecated Use `with_unbundled_env` instead
|
390
391
|
def with_clean_env
|
391
|
-
|
392
|
-
2,
|
392
|
+
message =
|
393
393
|
"`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
|
-
|
396
|
-
|
397
|
-
|
394
|
+
"If you instead want the environment before bundler was originally loaded, use `Bundler.with_original_env`"
|
395
|
+
removed_message =
|
396
|
+
"`Bundler.with_clean_env` has been removed in favor of `Bundler.with_unbundled_env`. " \
|
397
|
+
"If you instead want the environment before bundler was originally loaded, use `Bundler.with_original_env`"
|
398
|
+
Bundler::SharedHelpers.major_deprecation(2, message, removed_message: removed_message, print_caller_location: true)
|
398
399
|
with_env(unbundled_env) { yield }
|
399
400
|
end
|
400
401
|
|
@@ -410,13 +411,13 @@ module Bundler
|
|
410
411
|
|
411
412
|
# @deprecated Use `unbundled_system` instead
|
412
413
|
def clean_system(*args)
|
413
|
-
|
414
|
-
2,
|
414
|
+
message =
|
415
415
|
"`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
|
-
|
418
|
-
|
419
|
-
|
416
|
+
"If you instead want to run the command in the environment before bundler was originally loaded, use `Bundler.original_system`"
|
417
|
+
removed_message =
|
418
|
+
"`Bundler.clean_system` has been removed in favor of `Bundler.unbundled_system`. " \
|
419
|
+
"If you instead want to run the command in the environment before bundler was originally loaded, use `Bundler.original_system`"
|
420
|
+
Bundler::SharedHelpers.major_deprecation(2, message, removed_message: removed_message, print_caller_location: true)
|
420
421
|
with_env(unbundled_env) { Kernel.system(*args) }
|
421
422
|
end
|
422
423
|
|
@@ -432,13 +433,13 @@ module Bundler
|
|
432
433
|
|
433
434
|
# @deprecated Use `unbundled_exec` instead
|
434
435
|
def clean_exec(*args)
|
435
|
-
|
436
|
-
2,
|
436
|
+
message =
|
437
437
|
"`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
|
-
|
440
|
-
|
441
|
-
|
438
|
+
"If you instead want to exec to a command in the environment before bundler was originally loaded, use `Bundler.original_exec`"
|
439
|
+
removed_message =
|
440
|
+
"`Bundler.clean_exec` has been removed in favor of `Bundler.unbundled_exec`. " \
|
441
|
+
"If you instead want to exec to a command in the environment before bundler was originally loaded, use `Bundler.original_exec`"
|
442
|
+
Bundler::SharedHelpers.major_deprecation(2, message, removed_message: removed_message, print_caller_location: true)
|
442
443
|
with_env(unbundled_env) { Kernel.exec(*args) }
|
443
444
|
end
|
444
445
|
|
@@ -481,7 +482,7 @@ module Bundler
|
|
481
482
|
configured_bundle_path.use_system_gems?
|
482
483
|
end
|
483
484
|
|
484
|
-
def mkdir_p(path
|
485
|
+
def mkdir_p(path)
|
485
486
|
SharedHelpers.filesystem_access(path, :write) do |p|
|
486
487
|
FileUtils.mkdir_p(p)
|
487
488
|
end
|
@@ -507,7 +508,16 @@ module Bundler
|
|
507
508
|
end
|
508
509
|
|
509
510
|
def safe_load_marshal(data)
|
510
|
-
|
511
|
+
if Gem.respond_to?(:load_safe_marshal)
|
512
|
+
Gem.load_safe_marshal
|
513
|
+
begin
|
514
|
+
Gem::SafeMarshal.safe_load(data)
|
515
|
+
rescue Gem::SafeMarshal::Reader::Error, Gem::SafeMarshal::Visitors::ToRuby::Error => e
|
516
|
+
raise MarshalError, "#{e.class}: #{e.message}"
|
517
|
+
end
|
518
|
+
else
|
519
|
+
load_marshal(data, marshal_proc: SafeMarshal.proc)
|
520
|
+
end
|
511
521
|
end
|
512
522
|
|
513
523
|
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
|
+
version: 2.5.6
|
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:
|
25
|
+
date: 2024-02-06 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
|
@@ -269,18 +273,22 @@ files:
|
|
269
273
|
- lib/bundler/uri_credentials_filter.rb
|
270
274
|
- lib/bundler/uri_normalizer.rb
|
271
275
|
- lib/bundler/vendor/.document
|
276
|
+
- lib/bundler/vendor/connection_pool/.document
|
272
277
|
- lib/bundler/vendor/connection_pool/LICENSE
|
273
278
|
- lib/bundler/vendor/connection_pool/lib/connection_pool.rb
|
274
279
|
- lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb
|
275
280
|
- lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb
|
276
281
|
- lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb
|
282
|
+
- lib/bundler/vendor/fileutils/.document
|
277
283
|
- lib/bundler/vendor/fileutils/LICENSE.txt
|
278
284
|
- lib/bundler/vendor/fileutils/lib/fileutils.rb
|
285
|
+
- lib/bundler/vendor/net-http-persistent/.document
|
279
286
|
- lib/bundler/vendor/net-http-persistent/README.rdoc
|
280
287
|
- lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb
|
281
288
|
- lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
|
282
289
|
- lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb
|
283
290
|
- lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb
|
291
|
+
- lib/bundler/vendor/pub_grub/.document
|
284
292
|
- lib/bundler/vendor/pub_grub/LICENSE.txt
|
285
293
|
- lib/bundler/vendor/pub_grub/lib/pub_grub.rb
|
286
294
|
- lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb
|
@@ -298,6 +306,7 @@ files:
|
|
298
306
|
- lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb
|
299
307
|
- lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb
|
300
308
|
- lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb
|
309
|
+
- lib/bundler/vendor/thor/.document
|
301
310
|
- lib/bundler/vendor/thor/LICENSE.md
|
302
311
|
- lib/bundler/vendor/thor/lib/thor.rb
|
303
312
|
- lib/bundler/vendor/thor/lib/thor/actions.rb
|
@@ -329,14 +338,15 @@ files:
|
|
329
338
|
- lib/bundler/vendor/thor/lib/thor/shell/color.rb
|
330
339
|
- lib/bundler/vendor/thor/lib/thor/shell/column_printer.rb
|
331
340
|
- lib/bundler/vendor/thor/lib/thor/shell/html.rb
|
332
|
-
- lib/bundler/vendor/thor/lib/thor/shell/lcs_diff.rb
|
333
341
|
- lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb
|
334
342
|
- lib/bundler/vendor/thor/lib/thor/shell/terminal.rb
|
335
343
|
- lib/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb
|
336
344
|
- lib/bundler/vendor/thor/lib/thor/util.rb
|
337
345
|
- lib/bundler/vendor/thor/lib/thor/version.rb
|
346
|
+
- lib/bundler/vendor/tsort/.document
|
338
347
|
- lib/bundler/vendor/tsort/LICENSE.txt
|
339
348
|
- lib/bundler/vendor/tsort/lib/tsort.rb
|
349
|
+
- lib/bundler/vendor/uri/.document
|
340
350
|
- lib/bundler/vendor/uri/LICENSE.txt
|
341
351
|
- lib/bundler/vendor/uri/lib/uri.rb
|
342
352
|
- lib/bundler/vendor/uri/lib/uri/common.rb
|
@@ -354,9 +364,11 @@ files:
|
|
354
364
|
- lib/bundler/vendor/uri/lib/uri/ws.rb
|
355
365
|
- lib/bundler/vendor/uri/lib/uri/wss.rb
|
356
366
|
- lib/bundler/vendored_fileutils.rb
|
367
|
+
- lib/bundler/vendored_net_http.rb
|
357
368
|
- lib/bundler/vendored_persistent.rb
|
358
369
|
- lib/bundler/vendored_pub_grub.rb
|
359
370
|
- lib/bundler/vendored_thor.rb
|
371
|
+
- lib/bundler/vendored_timeout.rb
|
360
372
|
- lib/bundler/vendored_tsort.rb
|
361
373
|
- lib/bundler/vendored_uri.rb
|
362
374
|
- lib/bundler/version.rb
|
@@ -379,14 +391,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
379
391
|
requirements:
|
380
392
|
- - ">="
|
381
393
|
- !ruby/object:Gem::Version
|
382
|
-
version:
|
394
|
+
version: 3.0.0
|
383
395
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
384
396
|
requirements:
|
385
397
|
- - ">="
|
386
398
|
- !ruby/object:Gem::Version
|
387
|
-
version: 3.
|
399
|
+
version: 3.2.3
|
388
400
|
requirements: []
|
389
|
-
rubygems_version: 3.
|
401
|
+
rubygems_version: 3.5.6
|
390
402
|
signing_key:
|
391
403
|
specification_version: 4
|
392
404
|
summary: The best way to manage your application's dependencies
|
@@ -1,49 +0,0 @@
|
|
1
|
-
module LCSDiff
|
2
|
-
protected
|
3
|
-
|
4
|
-
# Overwrite show_diff to show diff with colors if Diff::LCS is
|
5
|
-
# available.
|
6
|
-
def show_diff(destination, content) #:nodoc:
|
7
|
-
if diff_lcs_loaded? && ENV["THOR_DIFF"].nil? && ENV["RAILS_DIFF"].nil?
|
8
|
-
actual = File.binread(destination).to_s.split("\n")
|
9
|
-
content = content.to_s.split("\n")
|
10
|
-
|
11
|
-
Diff::LCS.sdiff(actual, content).each do |diff|
|
12
|
-
output_diff_line(diff)
|
13
|
-
end
|
14
|
-
else
|
15
|
-
super
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
private
|
20
|
-
|
21
|
-
def output_diff_line(diff) #:nodoc:
|
22
|
-
case diff.action
|
23
|
-
when "-"
|
24
|
-
say "- #{diff.old_element.chomp}", :red, true
|
25
|
-
when "+"
|
26
|
-
say "+ #{diff.new_element.chomp}", :green, true
|
27
|
-
when "!"
|
28
|
-
say "- #{diff.old_element.chomp}", :red, true
|
29
|
-
say "+ #{diff.new_element.chomp}", :green, true
|
30
|
-
else
|
31
|
-
say " #{diff.old_element.chomp}", nil, true
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
# Check if Diff::LCS is loaded. If it is, use it to create pretty output
|
36
|
-
# for diff.
|
37
|
-
def diff_lcs_loaded? #:nodoc:
|
38
|
-
return true if defined?(Diff::LCS)
|
39
|
-
return @diff_lcs_loaded unless @diff_lcs_loaded.nil?
|
40
|
-
|
41
|
-
@diff_lcs_loaded = begin
|
42
|
-
require "diff/lcs"
|
43
|
-
true
|
44
|
-
rescue LoadError
|
45
|
-
false
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
end
|