bundler 2.4.7 → 2.4.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +167 -0
- data/README.md +1 -4
- data/exe/bundle +5 -13
- data/lib/bundler/build_metadata.rb +2 -2
- data/lib/bundler/cli/binstubs.rb +1 -1
- data/lib/bundler/cli/info.rb +1 -1
- data/lib/bundler/cli/install.rb +1 -1
- data/lib/bundler/cli/outdated.rb +1 -1
- data/lib/bundler/cli/platform.rb +7 -5
- data/lib/bundler/definition.rb +108 -58
- data/lib/bundler/dsl.rb +1 -1
- data/lib/bundler/endpoint_specification.rb +0 -4
- data/lib/bundler/env.rb +1 -1
- data/lib/bundler/environment_preserver.rb +2 -2
- data/lib/bundler/feature_flag.rb +0 -1
- data/lib/bundler/fetcher/compact_index.rb +3 -3
- data/lib/bundler/fetcher/dependency.rb +1 -5
- data/lib/bundler/fetcher/downloader.rb +2 -0
- data/lib/bundler/fetcher/index.rb +1 -2
- data/lib/bundler/fetcher.rb +13 -3
- data/lib/bundler/friendly_errors.rb +1 -1
- data/lib/bundler/gem_helper.rb +3 -4
- data/lib/bundler/gem_version_promoter.rb +1 -1
- data/lib/bundler/index.rb +2 -2
- data/lib/bundler/injector.rb +1 -1
- data/lib/bundler/installer/parallel_installer.rb +2 -15
- data/lib/bundler/installer.rb +1 -1
- data/lib/bundler/lazy_specification.rb +5 -9
- data/lib/bundler/lockfile_generator.rb +2 -2
- data/lib/bundler/lockfile_parser.rb +12 -11
- data/lib/bundler/man/bundle-add.1 +1 -1
- data/lib/bundler/man/bundle-binstubs.1 +1 -1
- data/lib/bundler/man/bundle-cache.1 +3 -3
- data/lib/bundler/man/bundle-cache.1.ronn +2 -2
- 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 +1 -4
- data/lib/bundler/man/bundle-config.1.ronn +0 -3
- data/lib/bundler/man/bundle-console.1 +1 -1
- 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 +1 -1
- data/lib/bundler/man/bundle-help.1 +1 -1
- data/lib/bundler/man/bundle-info.1 +3 -3
- data/lib/bundler/man/bundle-info.1.ronn +3 -3
- 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 +1 -1
- 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 +13 -9
- data/lib/bundler/man/bundle-outdated.1.ronn +12 -9
- data/lib/bundler/man/bundle-platform.1 +1 -1
- data/lib/bundler/man/bundle-plugin.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 +1 -1
- data/lib/bundler/man/bundle-version.1 +1 -1
- data/lib/bundler/man/bundle-viz.1 +1 -1
- data/lib/bundler/man/bundle.1 +1 -1
- data/lib/bundler/man/gemfile.5 +15 -2
- data/lib/bundler/man/gemfile.5.ronn +6 -1
- data/lib/bundler/plugin/index.rb +1 -1
- data/lib/bundler/plugin/installer.rb +5 -2
- data/lib/bundler/plugin.rb +1 -1
- data/lib/bundler/remote_specification.rb +2 -6
- data/lib/bundler/resolver/base.rb +37 -7
- data/lib/bundler/resolver.rb +22 -11
- data/lib/bundler/ruby_dsl.rb +6 -0
- data/lib/bundler/ruby_version.rb +3 -3
- data/lib/bundler/rubygems_ext.rb +5 -3
- data/lib/bundler/rubygems_integration.rb +2 -2
- data/lib/bundler/runtime.rb +1 -1
- data/lib/bundler/safe_marshal.rb +31 -0
- data/lib/bundler/settings.rb +4 -4
- data/lib/bundler/setup.rb +4 -1
- data/lib/bundler/shared_helpers.rb +1 -1
- data/lib/bundler/source/git/git_proxy.rb +52 -17
- data/lib/bundler/source/git.rb +42 -15
- data/lib/bundler/source/path.rb +1 -1
- data/lib/bundler/source/rubygems.rb +14 -15
- data/lib/bundler/source.rb +1 -1
- data/lib/bundler/source_list.rb +0 -4
- data/lib/bundler/spec_set.rb +15 -5
- data/lib/bundler/templates/Executable.bundler +1 -1
- data/lib/bundler/templates/newgem/Gemfile.tt +1 -1
- data/lib/bundler/templates/newgem/Rakefile.tt +10 -0
- data/lib/bundler/templates/newgem/bin/console.tt +0 -4
- data/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +1 -1
- data/lib/bundler/templates/newgem/ext/newgem/extconf-c.rb.tt +5 -0
- data/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt +1 -1
- data/lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt +4 -4
- data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +1 -1
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +2 -1
- data/lib/bundler/ui/rg_proxy.rb +1 -1
- data/lib/bundler/uri_normalizer.rb +23 -0
- data/lib/bundler/vendor/fileutils/lib/fileutils.rb +1 -1
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb +0 -5
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +9 -4
- data/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +2 -2
- data/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +3 -3
- data/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
- data/lib/bundler/version.rb +1 -1
- data/lib/bundler.rb +17 -24
- metadata +5 -3
@@ -7,12 +7,10 @@ module Bundler
|
|
7
7
|
class Rubygems < Source
|
8
8
|
autoload :Remote, File.expand_path("rubygems/remote", __dir__)
|
9
9
|
|
10
|
-
# Use the API when installing less than X gems
|
11
|
-
API_REQUEST_LIMIT = 500
|
12
10
|
# Ask for X gems per API request
|
13
11
|
API_REQUEST_SIZE = 50
|
14
12
|
|
15
|
-
attr_reader :remotes
|
13
|
+
attr_reader :remotes
|
16
14
|
|
17
15
|
def initialize(options = {})
|
18
16
|
@options = options
|
@@ -21,11 +19,14 @@ module Bundler
|
|
21
19
|
@allow_remote = false
|
22
20
|
@allow_cached = false
|
23
21
|
@allow_local = options["allow_local"] || false
|
24
|
-
@caches = [cache_path, *Bundler.rubygems.gem_cache]
|
25
22
|
|
26
23
|
Array(options["remotes"]).reverse_each {|r| add_remote(r) }
|
27
24
|
end
|
28
25
|
|
26
|
+
def caches
|
27
|
+
@caches ||= [cache_path, *Bundler.rubygems.gem_cache]
|
28
|
+
end
|
29
|
+
|
29
30
|
def local_only!
|
30
31
|
@specs = nil
|
31
32
|
@allow_local = true
|
@@ -122,6 +123,7 @@ module Bundler
|
|
122
123
|
end
|
123
124
|
end
|
124
125
|
alias_method :name, :identifier
|
126
|
+
alias_method :to_gemfile, :identifier
|
125
127
|
|
126
128
|
def specs
|
127
129
|
@specs ||= begin
|
@@ -326,9 +328,9 @@ module Bundler
|
|
326
328
|
|
327
329
|
def cached_path(spec)
|
328
330
|
global_cache_path = download_cache_path(spec)
|
329
|
-
|
331
|
+
caches << global_cache_path if global_cache_path
|
330
332
|
|
331
|
-
possibilities =
|
333
|
+
possibilities = caches.map {|p| package_path(p, spec) }
|
332
334
|
possibilities.find {|p| File.exist?(p) }
|
333
335
|
end
|
334
336
|
|
@@ -337,8 +339,7 @@ module Bundler
|
|
337
339
|
end
|
338
340
|
|
339
341
|
def normalize_uri(uri)
|
340
|
-
uri = uri.to_s
|
341
|
-
uri = "#{uri}/" unless %r{/$}.match?(uri)
|
342
|
+
uri = URINormalizer.normalize_suffix(uri.to_s)
|
342
343
|
require_relative "../vendored_uri"
|
343
344
|
uri = Bundler::URI(uri)
|
344
345
|
raise ArgumentError, "The source must be an absolute URI. For example:\n" \
|
@@ -381,7 +382,6 @@ module Bundler
|
|
381
382
|
idx = @allow_local ? installed_specs.dup : Index.new
|
382
383
|
|
383
384
|
Dir["#{cache_path}/*.gem"].each do |gemfile|
|
384
|
-
next if /^bundler\-[\d\.]+?\.gem/.match?(gemfile)
|
385
385
|
s ||= Bundler.rubygems.spec_from_gem(gemfile)
|
386
386
|
s.source = self
|
387
387
|
idx << s
|
@@ -402,12 +402,11 @@ module Bundler
|
|
402
402
|
# gather lists from non-api sites
|
403
403
|
fetch_names(index_fetchers, nil, idx, false)
|
404
404
|
|
405
|
-
#
|
406
|
-
#
|
407
|
-
#
|
408
|
-
|
409
|
-
|
410
|
-
" Downloading full index instead..." unless allow_api
|
405
|
+
# legacy multi-remote sources need special logic to figure out
|
406
|
+
# dependency names and that logic can be very costly if one remote
|
407
|
+
# uses the dependency API but others don't. So use full indexes
|
408
|
+
# consistently in that particular case.
|
409
|
+
allow_api = !multiple_remotes?
|
411
410
|
|
412
411
|
fetch_names(api_fetchers, allow_api && dependency_names, idx, false)
|
413
412
|
end
|
data/lib/bundler/source.rb
CHANGED
@@ -100,7 +100,7 @@ module Bundler
|
|
100
100
|
end
|
101
101
|
|
102
102
|
def print_using_message(message)
|
103
|
-
if !message.include?("(was ")
|
103
|
+
if !message.include?("(was ")
|
104
104
|
Bundler.ui.debug message
|
105
105
|
else
|
106
106
|
Bundler.ui.info message
|
data/lib/bundler/source_list.rb
CHANGED
@@ -101,10 +101,6 @@ module Bundler
|
|
101
101
|
source_list_for(source).find {|s| equivalent_source?(source, s) }
|
102
102
|
end
|
103
103
|
|
104
|
-
def get_with_fallback(source)
|
105
|
-
get(source) || default_source
|
106
|
-
end
|
107
|
-
|
108
104
|
def lock_sources
|
109
105
|
lock_other_sources + lock_rubygems_sources
|
110
106
|
end
|
data/lib/bundler/spec_set.rb
CHANGED
@@ -24,6 +24,7 @@ module Bundler
|
|
24
24
|
|
25
25
|
name = dep[0].name
|
26
26
|
platform = dep[1]
|
27
|
+
incomplete = false
|
27
28
|
|
28
29
|
key = [name, platform]
|
29
30
|
next if handled.key?(key)
|
@@ -36,14 +37,19 @@ module Bundler
|
|
36
37
|
|
37
38
|
specs_for_dep.first.dependencies.each do |d|
|
38
39
|
next if d.type == :development
|
40
|
+
incomplete = true if d.name != "bundler" && lookup[d.name].empty?
|
39
41
|
deps << [d, dep[1]]
|
40
42
|
end
|
41
|
-
|
42
|
-
|
43
|
+
else
|
44
|
+
incomplete = true
|
45
|
+
end
|
46
|
+
|
47
|
+
if incomplete && check
|
48
|
+
@incomplete_specs += lookup[name].any? ? lookup[name] : [LazySpecification.new(name, nil, nil)]
|
43
49
|
end
|
44
50
|
end
|
45
51
|
|
46
|
-
specs
|
52
|
+
specs.uniq
|
47
53
|
end
|
48
54
|
|
49
55
|
def [](key)
|
@@ -57,8 +63,8 @@ module Bundler
|
|
57
63
|
@sorted = nil
|
58
64
|
end
|
59
65
|
|
60
|
-
def delete(
|
61
|
-
@specs.delete(spec)
|
66
|
+
def delete(specs)
|
67
|
+
specs.each {|spec| @specs.delete(spec) }
|
62
68
|
@lookup = nil
|
63
69
|
@sorted = nil
|
64
70
|
end
|
@@ -95,6 +101,10 @@ module Bundler
|
|
95
101
|
end
|
96
102
|
|
97
103
|
def incomplete_ruby_specs?(deps)
|
104
|
+
return false if @specs.empty?
|
105
|
+
|
106
|
+
@incomplete_specs = []
|
107
|
+
|
98
108
|
self.for(deps, true, [Gem::Platform::RUBY])
|
99
109
|
|
100
110
|
@incomplete_specs.any?
|
@@ -41,6 +41,15 @@ require "standard/rake"
|
|
41
41
|
<% if config[:ext] -%>
|
42
42
|
<% default_task_names.unshift(:compile) -%>
|
43
43
|
<% default_task_names.unshift(:clobber) unless config[:ext] == 'rust' -%>
|
44
|
+
<% if config[:ext] == 'rust' -%>
|
45
|
+
require "rb_sys/extensiontask"
|
46
|
+
|
47
|
+
task build: :compile
|
48
|
+
|
49
|
+
RbSys::ExtensionTask.new(<%= config[:name].inspect %>) do |ext|
|
50
|
+
ext.lib_dir = "lib/<%= config[:namespaced_path] %>"
|
51
|
+
end
|
52
|
+
<% else -%>
|
44
53
|
require "rake/extensiontask"
|
45
54
|
|
46
55
|
task build: :compile
|
@@ -48,6 +57,7 @@ task build: :compile
|
|
48
57
|
Rake::ExtensionTask.new("<%= config[:underscored_name] %>") do |ext|
|
49
58
|
ext.lib_dir = "lib/<%= config[:namespaced_path] %>"
|
50
59
|
end
|
60
|
+
<% end -%>
|
51
61
|
|
52
62
|
<% end -%>
|
53
63
|
<% if default_task_names.size == 1 -%>
|
@@ -7,9 +7,5 @@ require "<%= config[:namespaced_path] %>"
|
|
7
7
|
# You can add fixtures and/or initialization code here to make experimenting
|
8
8
|
# with your gem easier. You can also use a different console, if you like.
|
9
9
|
|
10
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
-
# require "pry"
|
12
|
-
# Pry.start
|
13
|
-
|
14
10
|
require "irb"
|
15
11
|
IRB.start(__FILE__)
|
@@ -2,4 +2,9 @@
|
|
2
2
|
|
3
3
|
require "mkmf"
|
4
4
|
|
5
|
+
# Makes all symbols private by default to avoid unintended conflict
|
6
|
+
# with other gems. To explicitly export symbols you can use RUBY_FUNC_EXPORTED
|
7
|
+
# selectively, or entirely remove this flag.
|
8
|
+
append_cflags("-fvisibility=hidden")
|
9
|
+
|
5
10
|
create_makefile(<%= config[:makefile_path].inspect %>)
|
@@ -1,12 +1,12 @@
|
|
1
|
-
use magnus::{
|
1
|
+
use magnus::{function, prelude::*, Error, Ruby};
|
2
2
|
|
3
3
|
fn hello(subject: String) -> String {
|
4
|
-
format!("Hello from Rust, {}!"
|
4
|
+
format!("Hello from Rust, {subject}!")
|
5
5
|
}
|
6
6
|
|
7
7
|
#[magnus::init]
|
8
|
-
fn init() -> Result<(), Error> {
|
9
|
-
let module =
|
8
|
+
fn init(ruby: &Ruby) -> Result<(), Error> {
|
9
|
+
let module = ruby.<%= config[:constant_array].map {|c| "define_module(#{c.dump})?"}.join(".") %>;
|
10
10
|
module.define_singleton_method("hello", function!(hello, 1))?;
|
11
11
|
Ok(())
|
12
12
|
}
|
@@ -20,7 +20,7 @@ jobs:
|
|
20
20
|
- uses: actions/checkout@v3
|
21
21
|
<%- if config[:ext] == 'rust' -%>
|
22
22
|
- name: Set up Ruby & Rust
|
23
|
-
uses: oxidize-rb/actions/setup-ruby-and-rust@
|
23
|
+
uses: oxidize-rb/actions/setup-ruby-and-rust@v1
|
24
24
|
with:
|
25
25
|
ruby-version: ${{ matrix.ruby }}
|
26
26
|
bundler-cache: true
|
@@ -29,7 +29,8 @@ Gem::Specification.new do |spec|
|
|
29
29
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
30
30
|
spec.files = Dir.chdir(__dir__) do
|
31
31
|
`git ls-files -z`.split("\x0").reject do |f|
|
32
|
-
(File.expand_path(f) == __FILE__) ||
|
32
|
+
(File.expand_path(f) == __FILE__) ||
|
33
|
+
f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor Gemfile])
|
33
34
|
end
|
34
35
|
end
|
35
36
|
spec.bindir = "exe"
|
data/lib/bundler/ui/rg_proxy.rb
CHANGED
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bundler
|
4
|
+
module URINormalizer
|
5
|
+
module_function
|
6
|
+
|
7
|
+
# Normalizes uri to a consistent version, either with or without trailing
|
8
|
+
# slash.
|
9
|
+
#
|
10
|
+
# TODO: Currently gem sources are locked with a trailing slash, while git
|
11
|
+
# sources are locked without a trailing slash. This should be normalized but
|
12
|
+
# the inconsistency is there for now to avoid changing all lockfiles
|
13
|
+
# including GIT sources. We could normalize this on the next major.
|
14
|
+
#
|
15
|
+
def normalize_suffix(uri, trailing_slash: true)
|
16
|
+
if trailing_slash
|
17
|
+
uri.end_with?("/") ? uri : "#{uri}/"
|
18
|
+
else
|
19
|
+
uri.end_with?("/") ? uri.delete_suffix("/") : uri
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -8,9 +8,6 @@ module Bundler::PubGrub
|
|
8
8
|
InvalidDependency = Struct.new(:package, :constraint) do
|
9
9
|
end
|
10
10
|
|
11
|
-
CircularDependency = Struct.new(:package, :constraint) do
|
12
|
-
end
|
13
|
-
|
14
11
|
NoVersions = Struct.new(:constraint) do
|
15
12
|
end
|
16
13
|
|
@@ -66,8 +63,6 @@ module Bundler::PubGrub
|
|
66
63
|
"#{terms[0].to_s(allow_every: true)} depends on #{terms[1].invert}"
|
67
64
|
when Bundler::PubGrub::Incompatibility::InvalidDependency
|
68
65
|
"#{terms[0].to_s(allow_every: true)} depends on unknown package #{cause.package}"
|
69
|
-
when Bundler::PubGrub::Incompatibility::CircularDependency
|
70
|
-
"#{terms[0].to_s(allow_every: true)} depends on itself"
|
71
66
|
when Bundler::PubGrub::Incompatibility::NoVersions
|
72
67
|
"no versions satisfy #{cause.constraint}"
|
73
68
|
when Bundler::PubGrub::Incompatibility::ConflictCause
|
@@ -162,7 +162,7 @@ module Bundler::PubGrub
|
|
162
162
|
def resolve_conflict(incompatibility)
|
163
163
|
logger.info { "conflict: #{incompatibility}" }
|
164
164
|
|
165
|
-
new_incompatibility =
|
165
|
+
new_incompatibility = nil
|
166
166
|
|
167
167
|
while !incompatibility.failure?
|
168
168
|
most_recent_term = nil
|
@@ -204,7 +204,7 @@ module Bundler::PubGrub
|
|
204
204
|
solution.backtrack(previous_level)
|
205
205
|
|
206
206
|
if new_incompatibility
|
207
|
-
add_incompatibility(
|
207
|
+
add_incompatibility(new_incompatibility)
|
208
208
|
end
|
209
209
|
|
210
210
|
return incompatibility
|
@@ -219,9 +219,14 @@ module Bundler::PubGrub
|
|
219
219
|
new_terms << difference.invert
|
220
220
|
end
|
221
221
|
|
222
|
-
|
222
|
+
new_incompatibility = Incompatibility.new(new_terms, cause: Incompatibility::ConflictCause.new(incompatibility, most_recent_satisfier.cause))
|
223
223
|
|
224
|
-
|
224
|
+
if incompatibility.to_s == new_incompatibility.to_s
|
225
|
+
logger.info { "!! failed to resolve conflicts, this shouldn't have happened" }
|
226
|
+
break
|
227
|
+
end
|
228
|
+
|
229
|
+
incompatibility = new_incompatibility
|
225
230
|
|
226
231
|
partially = difference ? " partially" : ""
|
227
232
|
logger.info { "! #{most_recent_term} is#{partially} satisfied by #{most_recent_satisfier.term}" }
|
@@ -497,8 +497,8 @@ module Bundler::URI
|
|
497
497
|
ret = {}
|
498
498
|
|
499
499
|
# for Bundler::URI::split
|
500
|
-
ret[:ABS_URI] = Regexp.new('\A\s
|
501
|
-
ret[:REL_URI] = Regexp.new('\A\s
|
500
|
+
ret[:ABS_URI] = Regexp.new('\A\s*+' + pattern[:X_ABS_URI] + '\s*\z', Regexp::EXTENDED)
|
501
|
+
ret[:REL_URI] = Regexp.new('\A\s*+' + pattern[:X_REL_URI] + '\s*\z', Regexp::EXTENDED)
|
502
502
|
|
503
503
|
# for Bundler::URI::extract
|
504
504
|
ret[:URI_REF] = Regexp.new(pattern[:URI_REF])
|
@@ -2,8 +2,8 @@
|
|
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]
|
6
|
-
RFC3986_relative_ref = /\A(?<relative-ref>(?<relative-part>\/\/(?<authority>(?:(?<userinfo>(?:%\h\h|[!$&-.0-;=A-Z_a-z~])
|
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/
|
7
7
|
attr_reader :regexp
|
8
8
|
|
9
9
|
def initialize
|
@@ -100,7 +100,7 @@ module Bundler::URI
|
|
100
100
|
QUERY: /\A(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*\z/,
|
101
101
|
FRAGMENT: /\A(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*\z/,
|
102
102
|
OPAQUE: /\A(?:[^\/].*)?\z/,
|
103
|
-
PORT: /\A[\x09\x0a\x0c\x0d ]
|
103
|
+
PORT: /\A[\x09\x0a\x0c\x0d ]*+\d*[\x09\x0a\x0c\x0d ]*\z/,
|
104
104
|
}
|
105
105
|
end
|
106
106
|
|
data/lib/bundler/version.rb
CHANGED
data/lib/bundler.rb
CHANGED
@@ -39,16 +39,6 @@ module Bundler
|
|
39
39
|
environment_preserver.replace_with_backup
|
40
40
|
SUDO_MUTEX = Thread::Mutex.new
|
41
41
|
|
42
|
-
SAFE_MARSHAL_CLASSES = [Symbol, TrueClass, String, Array, Hash].freeze
|
43
|
-
SAFE_MARSHAL_ERROR = "Unexpected class %s present in marshaled data. Only %s are allowed.".freeze
|
44
|
-
SAFE_MARSHAL_PROC = proc do |object|
|
45
|
-
object.tap do
|
46
|
-
unless SAFE_MARSHAL_CLASSES.include?(object.class)
|
47
|
-
raise TypeError, format(SAFE_MARSHAL_ERROR, object.class, SAFE_MARSHAL_CLASSES.join(", "))
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
42
|
autoload :Definition, File.expand_path("bundler/definition", __dir__)
|
53
43
|
autoload :Dependency, File.expand_path("bundler/dependency", __dir__)
|
54
44
|
autoload :Deprecate, File.expand_path("bundler/deprecate", __dir__)
|
@@ -85,10 +75,12 @@ module Bundler
|
|
85
75
|
autoload :StubSpecification, File.expand_path("bundler/stub_specification", __dir__)
|
86
76
|
autoload :UI, File.expand_path("bundler/ui", __dir__)
|
87
77
|
autoload :URICredentialsFilter, File.expand_path("bundler/uri_credentials_filter", __dir__)
|
78
|
+
autoload :URINormalizer, File.expand_path("bundler/uri_normalizer", __dir__)
|
79
|
+
autoload :SafeMarshal, File.expand_path("bundler/safe_marshal", __dir__)
|
88
80
|
|
89
81
|
class << self
|
90
82
|
def configure
|
91
|
-
@
|
83
|
+
@configure ||= configure_gem_home_and_path
|
92
84
|
end
|
93
85
|
|
94
86
|
def ui
|
@@ -218,9 +210,10 @@ module Bundler
|
|
218
210
|
end
|
219
211
|
|
220
212
|
def frozen_bundle?
|
221
|
-
frozen = settings[:
|
222
|
-
frozen
|
223
|
-
|
213
|
+
frozen = settings[:frozen]
|
214
|
+
return frozen unless frozen.nil?
|
215
|
+
|
216
|
+
settings[:deployment]
|
224
217
|
end
|
225
218
|
|
226
219
|
def locked_gems
|
@@ -506,7 +499,7 @@ EOF
|
|
506
499
|
if File.file?(executable) && File.executable?(executable)
|
507
500
|
executable
|
508
501
|
elsif paths = ENV["PATH"]
|
509
|
-
quote = '"'
|
502
|
+
quote = '"'
|
510
503
|
paths.split(File::PATH_SEPARATOR).find do |path|
|
511
504
|
path = path[1..-2] if path.start_with?(quote) && path.end_with?(quote)
|
512
505
|
executable_path = File.expand_path(executable, path)
|
@@ -522,13 +515,7 @@ EOF
|
|
522
515
|
end
|
523
516
|
|
524
517
|
def safe_load_marshal(data)
|
525
|
-
load_marshal(data, :marshal_proc =>
|
526
|
-
end
|
527
|
-
|
528
|
-
def load_marshal(data, marshal_proc: nil)
|
529
|
-
Marshal.load(data, marshal_proc)
|
530
|
-
rescue TypeError => e
|
531
|
-
raise MarshalError, "#{e.class}: #{e.message}"
|
518
|
+
load_marshal(data, :marshal_proc => SafeMarshal.proc)
|
532
519
|
end
|
533
520
|
|
534
521
|
def load_gemspec(file, validate = false)
|
@@ -537,7 +524,7 @@ EOF
|
|
537
524
|
@gemspec_cache[key] ||= load_gemspec_uncached(file, validate)
|
538
525
|
# Protect against caching side-effected gemspecs by returning a
|
539
526
|
# new instance each time.
|
540
|
-
@gemspec_cache[key]
|
527
|
+
@gemspec_cache[key]&.dup
|
541
528
|
end
|
542
529
|
|
543
530
|
def load_gemspec_uncached(file, validate = false)
|
@@ -586,7 +573,7 @@ EOF
|
|
586
573
|
@bin_path = nil
|
587
574
|
@bundler_major_version = nil
|
588
575
|
@bundle_path = nil
|
589
|
-
@
|
576
|
+
@configure = nil
|
590
577
|
@configured_bundle_path = nil
|
591
578
|
@definition = nil
|
592
579
|
@load = nil
|
@@ -619,6 +606,12 @@ EOF
|
|
619
606
|
|
620
607
|
private
|
621
608
|
|
609
|
+
def load_marshal(data, marshal_proc: nil)
|
610
|
+
Marshal.load(data, marshal_proc)
|
611
|
+
rescue TypeError => e
|
612
|
+
raise MarshalError, "#{e.class}: #{e.message}"
|
613
|
+
end
|
614
|
+
|
622
615
|
def eval_yaml_gemspec(path, contents)
|
623
616
|
Kernel.require "psych"
|
624
617
|
|
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.
|
4
|
+
version: 2.4.19
|
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-
|
25
|
+
date: 2023-08-17 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
|
@@ -203,6 +203,7 @@ files:
|
|
203
203
|
- lib/bundler/rubygems_gem_installer.rb
|
204
204
|
- lib/bundler/rubygems_integration.rb
|
205
205
|
- lib/bundler/runtime.rb
|
206
|
+
- lib/bundler/safe_marshal.rb
|
206
207
|
- lib/bundler/self_manager.rb
|
207
208
|
- lib/bundler/settings.rb
|
208
209
|
- lib/bundler/settings/validator.rb
|
@@ -266,6 +267,7 @@ files:
|
|
266
267
|
- lib/bundler/ui/shell.rb
|
267
268
|
- lib/bundler/ui/silent.rb
|
268
269
|
- lib/bundler/uri_credentials_filter.rb
|
270
|
+
- lib/bundler/uri_normalizer.rb
|
269
271
|
- lib/bundler/vendor/.document
|
270
272
|
- lib/bundler/vendor/connection_pool/LICENSE
|
271
273
|
- lib/bundler/vendor/connection_pool/lib/connection_pool.rb
|
@@ -379,7 +381,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
379
381
|
- !ruby/object:Gem::Version
|
380
382
|
version: 3.0.1
|
381
383
|
requirements: []
|
382
|
-
rubygems_version: 3.4.
|
384
|
+
rubygems_version: 3.4.19
|
383
385
|
signing_key:
|
384
386
|
specification_version: 4
|
385
387
|
summary: The best way to manage your application's dependencies
|