bundler 2.2.11 → 2.3.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 +414 -5
- data/README.md +1 -1
- data/bundler.gemspec +2 -3
- data/exe/bundle +7 -8
- data/lib/bundler/.document +1 -0
- data/lib/bundler/build_metadata.rb +2 -2
- data/lib/bundler/cli/cache.rb +1 -1
- data/lib/bundler/cli/check.rb +4 -2
- data/lib/bundler/cli/common.rb +15 -2
- data/lib/bundler/cli/doctor.rb +24 -5
- data/lib/bundler/cli/exec.rb +1 -6
- data/lib/bundler/cli/gem.rb +130 -26
- data/lib/bundler/cli/info.rb +16 -4
- data/lib/bundler/cli/install.rb +12 -27
- data/lib/bundler/cli/issue.rb +4 -3
- data/lib/bundler/cli/list.rb +7 -1
- data/lib/bundler/cli/lock.rb +5 -1
- data/lib/bundler/cli/open.rb +1 -2
- data/lib/bundler/cli/outdated.rb +10 -11
- data/lib/bundler/cli/platform.rb +1 -1
- data/lib/bundler/cli/remove.rb +1 -2
- data/lib/bundler/cli/update.rb +17 -8
- data/lib/bundler/cli.rb +41 -55
- data/lib/bundler/compact_index_client/cache.rb +0 -9
- data/lib/bundler/compact_index_client/updater.rb +10 -11
- data/lib/bundler/compact_index_client.rb +2 -8
- data/lib/bundler/current_ruby.rb +5 -4
- data/lib/bundler/definition.rb +147 -290
- data/lib/bundler/dependency.rb +5 -7
- data/lib/bundler/digest.rb +71 -0
- data/lib/bundler/dsl.rb +67 -66
- data/lib/bundler/endpoint_specification.rb +21 -11
- data/lib/bundler/env.rb +1 -1
- data/lib/bundler/environment_preserver.rb +4 -1
- data/lib/bundler/errors.rb +19 -3
- data/lib/bundler/feature_flag.rb +0 -4
- data/lib/bundler/fetcher/compact_index.rb +10 -15
- data/lib/bundler/fetcher/downloader.rb +9 -6
- data/lib/bundler/fetcher/index.rb +0 -27
- data/lib/bundler/fetcher.rb +10 -16
- data/lib/bundler/friendly_errors.rb +5 -32
- data/lib/bundler/gem_helper.rb +21 -16
- data/lib/bundler/index.rb +2 -7
- data/lib/bundler/injector.rb +12 -3
- data/lib/bundler/inline.rb +2 -1
- data/lib/bundler/installer/gem_installer.rb +4 -22
- data/lib/bundler/installer/parallel_installer.rb +36 -15
- data/lib/bundler/installer/standalone.rb +14 -9
- data/lib/bundler/installer.rb +8 -17
- data/lib/bundler/lazy_specification.rb +23 -2
- data/lib/bundler/lockfile_generator.rb +1 -1
- data/lib/bundler/lockfile_parser.rb +16 -45
- data/lib/bundler/man/bundle-add.1 +10 -2
- data/lib/bundler/man/bundle-add.1.ronn +7 -1
- data/lib/bundler/man/bundle-binstubs.1 +1 -1
- data/lib/bundler/man/bundle-cache.1 +1 -1
- data/lib/bundler/man/bundle-check.1 +1 -1
- data/lib/bundler/man/bundle-clean.1 +1 -1
- data/lib/bundler/man/bundle-config.1 +23 -15
- data/lib/bundler/man/bundle-config.1.ronn +24 -17
- data/lib/bundler/man/bundle-doctor.1 +1 -1
- data/lib/bundler/man/bundle-exec.1 +1 -1
- data/lib/bundler/man/bundle-gem.1 +14 -1
- data/lib/bundler/man/bundle-gem.1.ronn +16 -0
- data/lib/bundler/man/bundle-info.1 +1 -1
- data/lib/bundler/man/bundle-init.1 +1 -1
- data/lib/bundler/man/bundle-inject.1 +1 -1
- data/lib/bundler/man/bundle-install.1 +2 -2
- data/lib/bundler/man/bundle-install.1.ronn +2 -2
- data/lib/bundler/man/bundle-list.1 +1 -1
- data/lib/bundler/man/bundle-lock.1 +1 -1
- data/lib/bundler/man/bundle-open.1 +1 -1
- data/lib/bundler/man/bundle-outdated.1 +1 -1
- data/lib/bundler/man/bundle-platform.1 +1 -1
- data/lib/bundler/man/bundle-pristine.1 +1 -1
- data/lib/bundler/man/bundle-remove.1 +1 -1
- data/lib/bundler/man/bundle-show.1 +1 -1
- data/lib/bundler/man/bundle-update.1 +5 -5
- data/lib/bundler/man/bundle-update.1.ronn +5 -4
- data/lib/bundler/man/bundle-viz.1 +1 -1
- data/lib/bundler/man/bundle.1 +1 -1
- data/lib/bundler/man/gemfile.5 +28 -2
- data/lib/bundler/man/gemfile.5.ronn +9 -1
- data/lib/bundler/plugin/api/source.rb +22 -0
- data/lib/bundler/plugin/index.rb +4 -1
- data/lib/bundler/plugin/installer.rb +10 -10
- data/lib/bundler/plugin/source_list.rb +4 -0
- data/lib/bundler/plugin.rb +28 -8
- data/lib/bundler/process_lock.rb +1 -1
- data/lib/bundler/psyched_yaml.rb +1 -13
- data/lib/bundler/remote_specification.rb +7 -0
- data/lib/bundler/resolver/spec_group.rb +1 -25
- data/lib/bundler/resolver.rb +55 -147
- data/lib/bundler/retry.rb +1 -1
- data/lib/bundler/ruby_version.rb +1 -1
- data/lib/bundler/rubygems_ext.rb +30 -8
- data/lib/bundler/rubygems_gem_installer.rb +68 -1
- data/lib/bundler/rubygems_integration.rb +43 -60
- data/lib/bundler/runtime.rb +18 -11
- data/lib/bundler/self_manager.rb +168 -0
- data/lib/bundler/settings.rb +96 -20
- data/lib/bundler/setup.rb +2 -2
- data/lib/bundler/shared_helpers.rb +4 -19
- data/lib/bundler/source/git/git_proxy.rb +8 -6
- data/lib/bundler/source/git.rb +22 -4
- data/lib/bundler/source/metadata.rb +1 -5
- data/lib/bundler/source/path/installer.rb +1 -1
- data/lib/bundler/source/path.rb +3 -1
- data/lib/bundler/source/rubygems.rb +111 -106
- data/lib/bundler/source/rubygems_aggregate.rb +68 -0
- data/lib/bundler/source.rb +21 -0
- data/lib/bundler/source_list.rb +100 -60
- data/lib/bundler/source_map.rb +58 -0
- data/lib/bundler/spec_set.rb +17 -31
- data/lib/bundler/stub_specification.rb +8 -0
- data/lib/bundler/templates/Executable.bundler +7 -7
- data/lib/bundler/templates/Gemfile +0 -2
- data/lib/bundler/templates/gems.rb +0 -3
- data/lib/bundler/templates/newgem/Gemfile.tt +5 -2
- data/lib/bundler/templates/newgem/README.md.tt +5 -3
- data/lib/bundler/templates/newgem/Rakefile.tt +15 -2
- data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +15 -6
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +18 -16
- data/lib/bundler/templates/newgem/sig/newgem.rbs.tt +8 -0
- data/lib/bundler/templates/newgem/standard.yml.tt +3 -0
- data/lib/bundler/templates/newgem/test/minitest/{newgem_test.rb.tt → test_newgem.rb.tt} +1 -1
- data/lib/bundler/ui/shell.rb +1 -1
- data/lib/bundler/vendor/.document +1 -0
- data/lib/bundler/vendor/connection_pool/LICENSE +20 -0
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +19 -21
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +57 -0
- data/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +39 -74
- data/lib/bundler/vendor/fileutils/LICENSE.txt +22 -0
- data/lib/bundler/vendor/molinillo/LICENSE +9 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +2 -2
- data/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +1 -1
- data/lib/bundler/vendor/net-http-persistent/README.rdoc +82 -0
- data/lib/bundler/vendor/thor/LICENSE.md +20 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +5 -5
- data/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +1 -2
- data/lib/bundler/vendor/thor/lib/thor/actions.rb +6 -2
- data/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +6 -0
- data/lib/bundler/vendor/thor/lib/thor/error.rb +9 -4
- data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +19 -1
- data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +22 -4
- data/lib/bundler/vendor/thor/lib/thor/shell.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/util.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
- data/lib/bundler/vendor/tmpdir/lib/tmpdir.rb +1 -1
- data/lib/bundler/vendor/tsort/LICENSE.txt +22 -0
- data/lib/bundler/vendor/tsort/lib/tsort.rb +453 -0
- data/lib/bundler/vendor/uri/LICENSE.txt +22 -0
- data/lib/bundler/vendor/uri/lib/uri/common.rb +17 -80
- data/lib/bundler/vendor/uri/lib/uri/ftp.rb +0 -1
- data/lib/bundler/vendor/uri/lib/uri/generic.rb +5 -6
- data/lib/bundler/vendor/uri/lib/uri/http.rb +0 -1
- data/lib/bundler/vendor/uri/lib/uri/https.rb +0 -1
- data/lib/bundler/vendor/uri/lib/uri/ldap.rb +1 -1
- data/lib/bundler/vendor/uri/lib/uri/mailto.rb +0 -1
- data/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +1 -14
- data/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +1 -12
- data/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
- data/lib/bundler/vendor/uri/lib/uri/ws.rb +84 -0
- data/lib/bundler/vendor/uri/lib/uri/wss.rb +22 -0
- data/lib/bundler/vendor/uri/lib/uri.rb +0 -1
- data/lib/bundler/vendored_tsort.rb +4 -0
- data/lib/bundler/version.rb +1 -1
- data/lib/bundler/worker.rb +19 -4
- data/lib/bundler.rb +28 -31
- metadata +27 -9
- data/lib/bundler/gemdeps.rb +0 -29
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/monotonic_time.rb +0 -66
@@ -7,7 +7,6 @@
|
|
7
7
|
# License::
|
8
8
|
# Bundler::URI::LDAP is copyrighted free software by Takaaki Tateishi and Akira Yamada.
|
9
9
|
# You can redistribute it and/or modify it under the same term as Ruby.
|
10
|
-
# Revision:: $Id$
|
11
10
|
#
|
12
11
|
# See Bundler::URI for general documentation
|
13
12
|
#
|
@@ -119,6 +118,7 @@ module Bundler::URI
|
|
119
118
|
|
120
119
|
# Private method to cleanup +dn+ from using the +path+ component attribute.
|
121
120
|
def parse_dn
|
121
|
+
raise InvalidURIError, 'bad LDAP URL' unless @path
|
122
122
|
@dn = @path[1..-1]
|
123
123
|
end
|
124
124
|
private :parse_dn
|
@@ -3,7 +3,6 @@
|
|
3
3
|
# = uri/common.rb
|
4
4
|
#
|
5
5
|
# Author:: Akira Yamada <akira@ruby-lang.org>
|
6
|
-
# Revision:: $Id$
|
7
6
|
# License::
|
8
7
|
# You can redistribute it and/or modify it under the same term as Ruby.
|
9
8
|
#
|
@@ -208,21 +207,9 @@ module Bundler::URI
|
|
208
207
|
# #=> #<Bundler::URI::LDAP ldap://ldap.example.com/dc=example?user=john>
|
209
208
|
#
|
210
209
|
def parse(uri)
|
211
|
-
|
212
|
-
registry, path, opaque, query, fragment = self.split(uri)
|
213
|
-
|
214
|
-
if scheme && Bundler::URI.scheme_list.include?(scheme.upcase)
|
215
|
-
Bundler::URI.scheme_list[scheme.upcase].new(scheme, userinfo, host, port,
|
216
|
-
registry, path, opaque, query,
|
217
|
-
fragment, self)
|
218
|
-
else
|
219
|
-
Generic.new(scheme, userinfo, host, port,
|
220
|
-
registry, path, opaque, query,
|
221
|
-
fragment, self)
|
222
|
-
end
|
210
|
+
Bundler::URI.for(*self.split(uri), self)
|
223
211
|
end
|
224
212
|
|
225
|
-
|
226
213
|
#
|
227
214
|
# == Args
|
228
215
|
#
|
@@ -69,18 +69,7 @@ module Bundler::URI
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def parse(uri) # :nodoc:
|
72
|
-
|
73
|
-
registry, path, opaque, query, fragment = self.split(uri)
|
74
|
-
scheme_list = Bundler::URI.scheme_list
|
75
|
-
if scheme && scheme_list.include?(uc = scheme.upcase)
|
76
|
-
scheme_list[uc].new(scheme, userinfo, host, port,
|
77
|
-
registry, path, opaque, query,
|
78
|
-
fragment, self)
|
79
|
-
else
|
80
|
-
Generic.new(scheme, userinfo, host, port,
|
81
|
-
registry, path, opaque, query,
|
82
|
-
fragment, self)
|
83
|
-
end
|
72
|
+
Bundler::URI.for(*self.split(uri), self)
|
84
73
|
end
|
85
74
|
|
86
75
|
|
@@ -0,0 +1,84 @@
|
|
1
|
+
# frozen_string_literal: false
|
2
|
+
# = uri/ws.rb
|
3
|
+
#
|
4
|
+
# Author:: Matt Muller <mamuller@amazon.com>
|
5
|
+
# License:: You can redistribute it and/or modify it under the same term as Ruby.
|
6
|
+
#
|
7
|
+
# See Bundler::URI for general documentation
|
8
|
+
#
|
9
|
+
|
10
|
+
require_relative 'generic'
|
11
|
+
|
12
|
+
module Bundler::URI
|
13
|
+
|
14
|
+
#
|
15
|
+
# The syntax of WS URIs is defined in RFC6455 section 3.
|
16
|
+
#
|
17
|
+
# Note that the Ruby Bundler::URI library allows WS URLs containing usernames and
|
18
|
+
# passwords. This is not legal as per the RFC, but used to be
|
19
|
+
# supported in Internet Explorer 5 and 6, before the MS04-004 security
|
20
|
+
# update. See <URL:http://support.microsoft.com/kb/834489>.
|
21
|
+
#
|
22
|
+
class WS < Generic
|
23
|
+
# A Default port of 80 for Bundler::URI::WS.
|
24
|
+
DEFAULT_PORT = 80
|
25
|
+
|
26
|
+
# An Array of the available components for Bundler::URI::WS.
|
27
|
+
COMPONENT = %i[
|
28
|
+
scheme
|
29
|
+
userinfo host port
|
30
|
+
path
|
31
|
+
query
|
32
|
+
].freeze
|
33
|
+
|
34
|
+
#
|
35
|
+
# == Description
|
36
|
+
#
|
37
|
+
# Creates a new Bundler::URI::WS object from components, with syntax checking.
|
38
|
+
#
|
39
|
+
# The components accepted are userinfo, host, port, path, and query.
|
40
|
+
#
|
41
|
+
# The components should be provided either as an Array, or as a Hash
|
42
|
+
# with keys formed by preceding the component names with a colon.
|
43
|
+
#
|
44
|
+
# If an Array is used, the components must be passed in the
|
45
|
+
# order <code>[userinfo, host, port, path, query]</code>.
|
46
|
+
#
|
47
|
+
# Example:
|
48
|
+
#
|
49
|
+
# uri = Bundler::URI::WS.build(host: 'www.example.com', path: '/foo/bar')
|
50
|
+
#
|
51
|
+
# uri = Bundler::URI::WS.build([nil, "www.example.com", nil, "/path", "query"])
|
52
|
+
#
|
53
|
+
# Currently, if passed userinfo components this method generates
|
54
|
+
# invalid WS URIs as per RFC 1738.
|
55
|
+
#
|
56
|
+
def self.build(args)
|
57
|
+
tmp = Util.make_components_hash(self, args)
|
58
|
+
super(tmp)
|
59
|
+
end
|
60
|
+
|
61
|
+
#
|
62
|
+
# == Description
|
63
|
+
#
|
64
|
+
# Returns the full path for a WS Bundler::URI, as required by Net::HTTP::Get.
|
65
|
+
#
|
66
|
+
# If the Bundler::URI contains a query, the full path is Bundler::URI#path + '?' + Bundler::URI#query.
|
67
|
+
# Otherwise, the path is simply Bundler::URI#path.
|
68
|
+
#
|
69
|
+
# Example:
|
70
|
+
#
|
71
|
+
# uri = Bundler::URI::WS.build(path: '/foo/bar', query: 'test=true')
|
72
|
+
# uri.request_uri # => "/foo/bar?test=true"
|
73
|
+
#
|
74
|
+
def request_uri
|
75
|
+
return unless @path
|
76
|
+
|
77
|
+
url = @query ? "#@path?#@query" : @path.dup
|
78
|
+
url.start_with?(?/.freeze) ? url : ?/ + url
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
@@schemes['WS'] = WS
|
83
|
+
|
84
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: false
|
2
|
+
# = uri/wss.rb
|
3
|
+
#
|
4
|
+
# Author:: Matt Muller <mamuller@amazon.com>
|
5
|
+
# License:: You can redistribute it and/or modify it under the same term as Ruby.
|
6
|
+
#
|
7
|
+
# See Bundler::URI for general documentation
|
8
|
+
#
|
9
|
+
|
10
|
+
require_relative 'ws'
|
11
|
+
|
12
|
+
module Bundler::URI
|
13
|
+
|
14
|
+
# The default port for WSS URIs is 443, and the scheme is 'wss:' rather
|
15
|
+
# than 'ws:'. Other than that, WSS URIs are identical to WS URIs;
|
16
|
+
# see Bundler::URI::WS.
|
17
|
+
class WSS < WS
|
18
|
+
# A Default port of 443 for Bundler::URI::WSS
|
19
|
+
DEFAULT_PORT = 443
|
20
|
+
end
|
21
|
+
@@schemes['WSS'] = WSS
|
22
|
+
end
|
data/lib/bundler/version.rb
CHANGED
data/lib/bundler/worker.rb
CHANGED
@@ -21,12 +21,12 @@ module Bundler
|
|
21
21
|
# @param func [Proc] job to run in inside the worker pool
|
22
22
|
def initialize(size, name, func)
|
23
23
|
@name = name
|
24
|
-
@request_queue = Queue.new
|
25
|
-
@response_queue = Queue.new
|
24
|
+
@request_queue = Thread::Queue.new
|
25
|
+
@response_queue = Thread::Queue.new
|
26
26
|
@func = func
|
27
27
|
@size = size
|
28
28
|
@threads = nil
|
29
|
-
|
29
|
+
@previous_interrupt_handler = nil
|
30
30
|
end
|
31
31
|
|
32
32
|
# Enqueue a request to be executed in the worker pool
|
@@ -68,13 +68,16 @@ module Bundler
|
|
68
68
|
# so as worker threads after retrieving it, shut themselves down
|
69
69
|
def stop_threads
|
70
70
|
return unless @threads
|
71
|
+
|
71
72
|
@threads.each { @request_queue.enq POISON }
|
72
73
|
@threads.each(&:join)
|
74
|
+
|
75
|
+
remove_interrupt_handler
|
76
|
+
|
73
77
|
@threads = nil
|
74
78
|
end
|
75
79
|
|
76
80
|
def abort_threads
|
77
|
-
return unless @threads
|
78
81
|
Bundler.ui.debug("\n#{caller.join("\n")}")
|
79
82
|
@threads.each(&:exit)
|
80
83
|
exit 1
|
@@ -94,11 +97,23 @@ module Bundler
|
|
94
97
|
end
|
95
98
|
end.compact
|
96
99
|
|
100
|
+
add_interrupt_handler unless @threads.empty?
|
101
|
+
|
97
102
|
return if creation_errors.empty?
|
98
103
|
|
99
104
|
message = "Failed to create threads for the #{name} worker: #{creation_errors.map(&:to_s).uniq.join(", ")}"
|
100
105
|
raise ThreadCreationError, message if @threads.empty?
|
101
106
|
Bundler.ui.info message
|
102
107
|
end
|
108
|
+
|
109
|
+
def add_interrupt_handler
|
110
|
+
@previous_interrupt_handler = trap("INT") { abort_threads }
|
111
|
+
end
|
112
|
+
|
113
|
+
def remove_interrupt_handler
|
114
|
+
return unless @previous_interrupt_handler
|
115
|
+
|
116
|
+
trap "INT", @previous_interrupt_handler
|
117
|
+
end
|
103
118
|
end
|
104
119
|
end
|
data/lib/bundler.rb
CHANGED
@@ -37,12 +37,13 @@ module Bundler
|
|
37
37
|
environment_preserver = EnvironmentPreserver.from_env
|
38
38
|
ORIGINAL_ENV = environment_preserver.restore
|
39
39
|
environment_preserver.replace_with_backup
|
40
|
-
SUDO_MUTEX = Mutex.new
|
40
|
+
SUDO_MUTEX = Thread::Mutex.new
|
41
41
|
|
42
42
|
autoload :Definition, File.expand_path("bundler/definition", __dir__)
|
43
43
|
autoload :Dependency, File.expand_path("bundler/dependency", __dir__)
|
44
44
|
autoload :DepProxy, File.expand_path("bundler/dep_proxy", __dir__)
|
45
45
|
autoload :Deprecate, File.expand_path("bundler/deprecate", __dir__)
|
46
|
+
autoload :Digest, File.expand_path("bundler/digest", __dir__)
|
46
47
|
autoload :Dsl, File.expand_path("bundler/dsl", __dir__)
|
47
48
|
autoload :EndpointSpecification, File.expand_path("bundler/endpoint_specification", __dir__)
|
48
49
|
autoload :Env, File.expand_path("bundler/env", __dir__)
|
@@ -65,10 +66,12 @@ module Bundler
|
|
65
66
|
autoload :RubyDsl, File.expand_path("bundler/ruby_dsl", __dir__)
|
66
67
|
autoload :RubyVersion, File.expand_path("bundler/ruby_version", __dir__)
|
67
68
|
autoload :Runtime, File.expand_path("bundler/runtime", __dir__)
|
69
|
+
autoload :SelfManager, File.expand_path("bundler/self_manager", __dir__)
|
68
70
|
autoload :Settings, File.expand_path("bundler/settings", __dir__)
|
69
71
|
autoload :SharedHelpers, File.expand_path("bundler/shared_helpers", __dir__)
|
70
72
|
autoload :Source, File.expand_path("bundler/source", __dir__)
|
71
73
|
autoload :SourceList, File.expand_path("bundler/source_list", __dir__)
|
74
|
+
autoload :SourceMap, File.expand_path("bundler/source_map", __dir__)
|
72
75
|
autoload :SpecSet, File.expand_path("bundler/spec_set", __dir__)
|
73
76
|
autoload :StubSpecification, File.expand_path("bundler/stub_specification", __dir__)
|
74
77
|
autoload :UI, File.expand_path("bundler/ui", __dir__)
|
@@ -197,7 +200,7 @@ module Bundler
|
|
197
200
|
|
198
201
|
def frozen_bundle?
|
199
202
|
frozen = settings[:deployment]
|
200
|
-
frozen ||= settings[:frozen]
|
203
|
+
frozen ||= settings[:frozen]
|
201
204
|
frozen
|
202
205
|
end
|
203
206
|
|
@@ -235,8 +238,9 @@ module Bundler
|
|
235
238
|
end
|
236
239
|
|
237
240
|
if warning
|
238
|
-
|
239
|
-
|
241
|
+
Bundler.ui.warn "#{warning}\n"
|
242
|
+
user_home = tmp_home_path
|
243
|
+
Bundler.ui.warn "Bundler will use `#{user_home}' as your home directory temporarily.\n"
|
240
244
|
user_home
|
241
245
|
else
|
242
246
|
Pathname.new(home)
|
@@ -634,15 +638,26 @@ EOF
|
|
634
638
|
@rubygems = nil
|
635
639
|
end
|
636
640
|
|
641
|
+
def configure_gem_home_and_path(path = bundle_path)
|
642
|
+
configure_gem_path
|
643
|
+
configure_gem_home(path)
|
644
|
+
Bundler.rubygems.clear_paths
|
645
|
+
end
|
646
|
+
|
647
|
+
def self_manager
|
648
|
+
@self_manager ||= begin
|
649
|
+
require_relative "bundler/self_manager"
|
650
|
+
Bundler::SelfManager.new
|
651
|
+
end
|
652
|
+
end
|
653
|
+
|
637
654
|
private
|
638
655
|
|
639
656
|
def eval_yaml_gemspec(path, contents)
|
640
657
|
require_relative "bundler/psyched_yaml"
|
641
658
|
|
642
|
-
# If the YAML is invalid, Syck raises an ArgumentError, and Psych
|
643
|
-
# raises a Psych::SyntaxError. See psyched_yaml.rb for more info.
|
644
659
|
Gem::Specification.from_yaml(contents)
|
645
|
-
rescue
|
660
|
+
rescue ::Psych::SyntaxError, ArgumentError, Gem::EndOfYAMLException, Gem::Exception
|
646
661
|
eval_gemspec(path, contents)
|
647
662
|
end
|
648
663
|
|
@@ -651,47 +666,29 @@ EOF
|
|
651
666
|
rescue ScriptError, StandardError => e
|
652
667
|
msg = "There was an error while loading `#{path.basename}`: #{e.message}"
|
653
668
|
|
654
|
-
if e.is_a?(LoadError)
|
655
|
-
msg += "\nDoes it try to require a relative path? That's been removed in Ruby 1.9"
|
656
|
-
end
|
657
|
-
|
658
669
|
raise GemspecError, Dsl::DSLError.new(msg, path, e.backtrace, contents)
|
659
670
|
end
|
660
671
|
|
661
|
-
def
|
662
|
-
|
663
|
-
configure_gem_home
|
664
|
-
bundle_path
|
665
|
-
end
|
666
|
-
|
667
|
-
def configure_gem_path(env = ENV)
|
668
|
-
blank_home = env["GEM_HOME"].nil? || env["GEM_HOME"].empty?
|
669
|
-
if !use_system_gems?
|
672
|
+
def configure_gem_path
|
673
|
+
unless use_system_gems?
|
670
674
|
# this needs to be empty string to cause
|
671
675
|
# PathSupport.split_gem_path to only load up the
|
672
676
|
# Bundler --path setting as the GEM_PATH.
|
673
|
-
|
674
|
-
elsif blank_home
|
675
|
-
possibles = [Bundler.rubygems.gem_dir, Bundler.rubygems.gem_path]
|
676
|
-
paths = possibles.flatten.compact.uniq.reject(&:empty?)
|
677
|
-
env["GEM_PATH"] = paths.join(File::PATH_SEPARATOR)
|
677
|
+
Bundler::SharedHelpers.set_env "GEM_PATH", ""
|
678
678
|
end
|
679
679
|
end
|
680
680
|
|
681
|
-
def configure_gem_home
|
682
|
-
Bundler::SharedHelpers.set_env "GEM_HOME",
|
683
|
-
Bundler.rubygems.clear_paths
|
681
|
+
def configure_gem_home(path)
|
682
|
+
Bundler::SharedHelpers.set_env "GEM_HOME", path.to_s
|
684
683
|
end
|
685
684
|
|
686
|
-
def tmp_home_path
|
685
|
+
def tmp_home_path
|
687
686
|
Kernel.send(:require, "tmpdir")
|
688
687
|
SharedHelpers.filesystem_access(Dir.tmpdir) do
|
689
688
|
path = Bundler.tmp
|
690
689
|
at_exit { Bundler.rm_rf(path) }
|
691
690
|
path
|
692
691
|
end
|
693
|
-
rescue RuntimeError => e
|
694
|
-
raise e.exception("#{warning}\nBundler also failed to create a temporary home directory':\n#{e}")
|
695
692
|
end
|
696
693
|
|
697
694
|
# @param env [Hash]
|
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.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- André Arko
|
@@ -19,10 +19,10 @@ authors:
|
|
19
19
|
- Terence Lee
|
20
20
|
- Carl Lerche
|
21
21
|
- Yehuda Katz
|
22
|
-
autorequire:
|
22
|
+
autorequire:
|
23
23
|
bindir: exe
|
24
24
|
cert_chain: []
|
25
|
-
date:
|
25
|
+
date: 2022-01-26 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
|
@@ -41,6 +41,7 @@ files:
|
|
41
41
|
- exe/bundle
|
42
42
|
- exe/bundler
|
43
43
|
- lib/bundler.rb
|
44
|
+
- lib/bundler/.document
|
44
45
|
- lib/bundler/build_metadata.rb
|
45
46
|
- lib/bundler/capistrano.rb
|
46
47
|
- lib/bundler/cli.rb
|
@@ -83,6 +84,7 @@ files:
|
|
83
84
|
- lib/bundler/dependency.rb
|
84
85
|
- lib/bundler/deployment.rb
|
85
86
|
- lib/bundler/deprecate.rb
|
87
|
+
- lib/bundler/digest.rb
|
86
88
|
- lib/bundler/dsl.rb
|
87
89
|
- lib/bundler/endpoint_specification.rb
|
88
90
|
- lib/bundler/env.rb
|
@@ -100,7 +102,6 @@ files:
|
|
100
102
|
- lib/bundler/gem_helpers.rb
|
101
103
|
- lib/bundler/gem_tasks.rb
|
102
104
|
- lib/bundler/gem_version_promoter.rb
|
103
|
-
- lib/bundler/gemdeps.rb
|
104
105
|
- lib/bundler/graph.rb
|
105
106
|
- lib/bundler/index.rb
|
106
107
|
- lib/bundler/injector.rb
|
@@ -188,6 +189,7 @@ files:
|
|
188
189
|
- lib/bundler/rubygems_gem_installer.rb
|
189
190
|
- lib/bundler/rubygems_integration.rb
|
190
191
|
- lib/bundler/runtime.rb
|
192
|
+
- lib/bundler/self_manager.rb
|
191
193
|
- lib/bundler/settings.rb
|
192
194
|
- lib/bundler/settings/validator.rb
|
193
195
|
- lib/bundler/setup.rb
|
@@ -202,7 +204,9 @@ files:
|
|
202
204
|
- lib/bundler/source/path/installer.rb
|
203
205
|
- lib/bundler/source/rubygems.rb
|
204
206
|
- lib/bundler/source/rubygems/remote.rb
|
207
|
+
- lib/bundler/source/rubygems_aggregate.rb
|
205
208
|
- lib/bundler/source_list.rb
|
209
|
+
- lib/bundler/source_map.rb
|
206
210
|
- lib/bundler/spec_set.rb
|
207
211
|
- lib/bundler/stub_specification.rb
|
208
212
|
- lib/bundler/templates/.document
|
@@ -232,10 +236,12 @@ files:
|
|
232
236
|
- lib/bundler/templates/newgem/newgem.gemspec.tt
|
233
237
|
- lib/bundler/templates/newgem/rspec.tt
|
234
238
|
- lib/bundler/templates/newgem/rubocop.yml.tt
|
239
|
+
- lib/bundler/templates/newgem/sig/newgem.rbs.tt
|
235
240
|
- lib/bundler/templates/newgem/spec/newgem_spec.rb.tt
|
236
241
|
- lib/bundler/templates/newgem/spec/spec_helper.rb.tt
|
237
|
-
- lib/bundler/templates/newgem/
|
242
|
+
- lib/bundler/templates/newgem/standard.yml.tt
|
238
243
|
- lib/bundler/templates/newgem/test/minitest/test_helper.rb.tt
|
244
|
+
- lib/bundler/templates/newgem/test/minitest/test_newgem.rb.tt
|
239
245
|
- lib/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt
|
240
246
|
- lib/bundler/templates/newgem/test/test-unit/test_helper.rb.tt
|
241
247
|
- lib/bundler/templates/newgem/travis.yml.tt
|
@@ -244,11 +250,15 @@ files:
|
|
244
250
|
- lib/bundler/ui/shell.rb
|
245
251
|
- lib/bundler/ui/silent.rb
|
246
252
|
- lib/bundler/uri_credentials_filter.rb
|
253
|
+
- lib/bundler/vendor/.document
|
254
|
+
- lib/bundler/vendor/connection_pool/LICENSE
|
247
255
|
- lib/bundler/vendor/connection_pool/lib/connection_pool.rb
|
248
|
-
- lib/bundler/vendor/connection_pool/lib/connection_pool/monotonic_time.rb
|
249
256
|
- lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb
|
250
257
|
- lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb
|
258
|
+
- lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb
|
259
|
+
- lib/bundler/vendor/fileutils/LICENSE.txt
|
251
260
|
- lib/bundler/vendor/fileutils/lib/fileutils.rb
|
261
|
+
- lib/bundler/vendor/molinillo/LICENSE
|
252
262
|
- lib/bundler/vendor/molinillo/lib/molinillo.rb
|
253
263
|
- lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb
|
254
264
|
- lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb
|
@@ -269,10 +279,12 @@ files:
|
|
269
279
|
- lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb
|
270
280
|
- lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb
|
271
281
|
- lib/bundler/vendor/molinillo/lib/molinillo/state.rb
|
282
|
+
- lib/bundler/vendor/net-http-persistent/README.rdoc
|
272
283
|
- lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb
|
273
284
|
- lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
|
274
285
|
- lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb
|
275
286
|
- lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb
|
287
|
+
- lib/bundler/vendor/thor/LICENSE.md
|
276
288
|
- lib/bundler/vendor/thor/lib/thor.rb
|
277
289
|
- lib/bundler/vendor/thor/lib/thor/actions.rb
|
278
290
|
- lib/bundler/vendor/thor/lib/thor/actions/create_file.rb
|
@@ -305,6 +317,9 @@ files:
|
|
305
317
|
- lib/bundler/vendor/thor/lib/thor/util.rb
|
306
318
|
- lib/bundler/vendor/thor/lib/thor/version.rb
|
307
319
|
- lib/bundler/vendor/tmpdir/lib/tmpdir.rb
|
320
|
+
- lib/bundler/vendor/tsort/LICENSE.txt
|
321
|
+
- lib/bundler/vendor/tsort/lib/tsort.rb
|
322
|
+
- lib/bundler/vendor/uri/LICENSE.txt
|
308
323
|
- lib/bundler/vendor/uri/lib/uri.rb
|
309
324
|
- lib/bundler/vendor/uri/lib/uri/common.rb
|
310
325
|
- lib/bundler/vendor/uri/lib/uri/file.rb
|
@@ -318,11 +333,14 @@ files:
|
|
318
333
|
- lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb
|
319
334
|
- lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb
|
320
335
|
- lib/bundler/vendor/uri/lib/uri/version.rb
|
336
|
+
- lib/bundler/vendor/uri/lib/uri/ws.rb
|
337
|
+
- lib/bundler/vendor/uri/lib/uri/wss.rb
|
321
338
|
- lib/bundler/vendored_fileutils.rb
|
322
339
|
- lib/bundler/vendored_molinillo.rb
|
323
340
|
- lib/bundler/vendored_persistent.rb
|
324
341
|
- lib/bundler/vendored_thor.rb
|
325
342
|
- lib/bundler/vendored_tmpdir.rb
|
343
|
+
- lib/bundler/vendored_tsort.rb
|
326
344
|
- lib/bundler/vendored_uri.rb
|
327
345
|
- lib/bundler/version.rb
|
328
346
|
- lib/bundler/version_ranges.rb
|
@@ -337,7 +355,7 @@ metadata:
|
|
337
355
|
changelog_uri: https://github.com/rubygems/rubygems/blob/master/bundler/CHANGELOG.md
|
338
356
|
homepage_uri: https://bundler.io/
|
339
357
|
source_code_uri: https://github.com/rubygems/rubygems/
|
340
|
-
post_install_message:
|
358
|
+
post_install_message:
|
341
359
|
rdoc_options: []
|
342
360
|
require_paths:
|
343
361
|
- lib
|
@@ -352,8 +370,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
352
370
|
- !ruby/object:Gem::Version
|
353
371
|
version: 2.5.2
|
354
372
|
requirements: []
|
355
|
-
rubygems_version: 3.
|
356
|
-
signing_key:
|
373
|
+
rubygems_version: 3.3.6
|
374
|
+
signing_key:
|
357
375
|
specification_version: 4
|
358
376
|
summary: The best way to manage your application's dependencies
|
359
377
|
test_files: []
|
data/lib/bundler/gemdeps.rb
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Bundler
|
4
|
-
class Gemdeps
|
5
|
-
def initialize(runtime)
|
6
|
-
@runtime = runtime
|
7
|
-
end
|
8
|
-
|
9
|
-
def requested_specs
|
10
|
-
@runtime.requested_specs
|
11
|
-
end
|
12
|
-
|
13
|
-
def specs
|
14
|
-
@runtime.specs
|
15
|
-
end
|
16
|
-
|
17
|
-
def dependencies
|
18
|
-
@runtime.dependencies
|
19
|
-
end
|
20
|
-
|
21
|
-
def current_dependencies
|
22
|
-
@runtime.current_dependencies
|
23
|
-
end
|
24
|
-
|
25
|
-
def requires
|
26
|
-
@runtime.requires
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,66 +0,0 @@
|
|
1
|
-
# Global monotonic clock from Concurrent Ruby 1.0.
|
2
|
-
# Copyright (c) Jerry D'Antonio -- released under the MIT license.
|
3
|
-
# Slightly modified; used with permission.
|
4
|
-
# https://github.com/ruby-concurrency/concurrent-ruby
|
5
|
-
|
6
|
-
require 'thread'
|
7
|
-
|
8
|
-
class Bundler::ConnectionPool
|
9
|
-
|
10
|
-
class_definition = Class.new do
|
11
|
-
|
12
|
-
if defined?(Process::CLOCK_MONOTONIC)
|
13
|
-
|
14
|
-
# @!visibility private
|
15
|
-
def get_time
|
16
|
-
Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
17
|
-
end
|
18
|
-
|
19
|
-
elsif defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
|
20
|
-
|
21
|
-
# @!visibility private
|
22
|
-
def get_time
|
23
|
-
java.lang.System.nanoTime() / 1_000_000_000.0
|
24
|
-
end
|
25
|
-
|
26
|
-
else
|
27
|
-
|
28
|
-
# @!visibility private
|
29
|
-
def initialize
|
30
|
-
@mutex = Mutex.new
|
31
|
-
@last_time = Time.now.to_f
|
32
|
-
end
|
33
|
-
|
34
|
-
# @!visibility private
|
35
|
-
def get_time
|
36
|
-
@mutex.synchronize do
|
37
|
-
now = Time.now.to_f
|
38
|
-
if @last_time < now
|
39
|
-
@last_time = now
|
40
|
-
else # clock has moved back in time
|
41
|
-
@last_time += 0.000_001
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
##
|
49
|
-
# Clock that cannot be set and represents monotonic time since
|
50
|
-
# some unspecified starting point.
|
51
|
-
#
|
52
|
-
# @!visibility private
|
53
|
-
GLOBAL_MONOTONIC_CLOCK = class_definition.new
|
54
|
-
private_constant :GLOBAL_MONOTONIC_CLOCK
|
55
|
-
|
56
|
-
class << self
|
57
|
-
##
|
58
|
-
# Returns the current time a tracked by the application monotonic clock.
|
59
|
-
#
|
60
|
-
# @return [Float] The current monotonic time when `since` not given else
|
61
|
-
# the elapsed monotonic time between `since` and the current time
|
62
|
-
def monotonic_time
|
63
|
-
GLOBAL_MONOTONIC_CLOCK.get_time
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|