bundler 4.0.9 → 4.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +147 -0
- data/bundler.gemspec +2 -2
- data/lib/bundler/build_metadata.rb +1 -1
- data/lib/bundler/cli/add.rb +3 -0
- data/lib/bundler/cli/check.rb +1 -3
- data/lib/bundler/cli/common.rb +6 -0
- data/lib/bundler/cli/config.rb +8 -3
- data/lib/bundler/cli/gem.rb +2 -3
- data/lib/bundler/cli/install.rb +3 -0
- data/lib/bundler/cli/issue.rb +2 -2
- data/lib/bundler/cli/lock.rb +3 -0
- data/lib/bundler/cli/open.rb +12 -2
- data/lib/bundler/cli/outdated.rb +42 -2
- data/lib/bundler/cli/update.rb +2 -0
- data/lib/bundler/cli.rb +18 -12
- data/lib/bundler/compact_index_client/cache.rb +11 -0
- data/lib/bundler/compact_index_client/cache_file.rb +1 -1
- data/lib/bundler/compact_index_client/parser.rb +4 -1
- data/lib/bundler/definition.rb +51 -12
- data/lib/bundler/dsl.rb +10 -3
- data/lib/bundler/endpoint_specification.rb +17 -2
- data/lib/bundler/fetcher/base.rb +3 -0
- data/lib/bundler/fetcher/compact_index.rb +13 -0
- data/lib/bundler/fetcher/gem_remote_fetcher.rb +2 -0
- data/lib/bundler/fetcher.rb +12 -2
- data/lib/bundler/injector.rb +1 -2
- data/lib/bundler/installer/parallel_installer.rb +68 -23
- data/lib/bundler/installer.rb +12 -1
- data/lib/bundler/lockfile_generator.rb +39 -1
- data/lib/bundler/lockfile_parser.rb +23 -1
- data/lib/bundler/man/bundle-add.1 +6 -3
- data/lib/bundler/man/bundle-add.1.ronn +7 -2
- data/lib/bundler/man/bundle-binstubs.1 +1 -1
- data/lib/bundler/man/bundle-cache.1 +4 -1
- data/lib/bundler/man/bundle-cache.1.ronn +6 -0
- 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 +121 -157
- data/lib/bundler/man/bundle-config.1.ronn +33 -1
- data/lib/bundler/man/bundle-console.1 +3 -3
- data/lib/bundler/man/bundle-console.1.ronn +2 -2
- data/lib/bundler/man/bundle-doctor.1 +1 -1
- data/lib/bundler/man/bundle-env.1 +1 -1
- data/lib/bundler/man/bundle-exec.1 +1 -1
- data/lib/bundler/man/bundle-fund.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 +1 -1
- data/lib/bundler/man/bundle-init.1 +2 -2
- data/lib/bundler/man/bundle-init.1.ronn +1 -1
- data/lib/bundler/man/bundle-install.1 +5 -2
- data/lib/bundler/man/bundle-install.1.ronn +9 -1
- data/lib/bundler/man/bundle-issue.1 +1 -1
- data/lib/bundler/man/bundle-licenses.1 +1 -1
- data/lib/bundler/man/bundle-list.1 +1 -1
- data/lib/bundler/man/bundle-lock.1 +5 -2
- data/lib/bundler/man/bundle-lock.1.ronn +6 -0
- data/lib/bundler/man/bundle-open.1 +1 -1
- data/lib/bundler/man/bundle-outdated.1 +17 -14
- data/lib/bundler/man/bundle-outdated.1.ronn +19 -12
- data/lib/bundler/man/bundle-platform.1 +1 -1
- data/lib/bundler/man/bundle-plugin.1 +2 -2
- data/lib/bundler/man/bundle-plugin.1.ronn +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 -2
- data/lib/bundler/man/bundle-update.1.ronn +8 -0
- data/lib/bundler/man/bundle-version.1 +1 -1
- data/lib/bundler/man/bundle.1 +23 -2
- data/lib/bundler/man/bundle.1.ronn +22 -1
- data/lib/bundler/man/gemfile.5 +13 -2
- data/lib/bundler/man/gemfile.5.ronn +20 -1
- data/lib/bundler/mirror.rb +7 -7
- data/lib/bundler/plugin/unloaded_source.rb +25 -0
- data/lib/bundler/plugin.rb +12 -6
- data/lib/bundler/remote_specification.rb +1 -1
- data/lib/bundler/resolver/base.rb +9 -0
- data/lib/bundler/resolver/strategy.rb +6 -3
- data/lib/bundler/resolver.rb +80 -1
- data/lib/bundler/rubygems_ext.rb +22 -0
- data/lib/bundler/rubygems_gem_installer.rb +35 -2
- data/lib/bundler/runtime.rb +11 -11
- data/lib/bundler/self_manager.rb +6 -1
- data/lib/bundler/settings/validator.rb +7 -0
- data/lib/bundler/settings.rb +2 -0
- data/lib/bundler/shared_helpers.rb +6 -1
- data/lib/bundler/source/git/git_proxy.rb +13 -2
- data/lib/bundler/source/git.rb +1 -1
- data/lib/bundler/source/metadata.rb +4 -0
- data/lib/bundler/source/path.rb +3 -2
- data/lib/bundler/source/rubygems/remote.rb +12 -2
- data/lib/bundler/source/rubygems.rb +81 -13
- data/lib/bundler/source_list.rb +44 -3
- data/lib/bundler/spec_set.rb +2 -2
- data/lib/bundler/stub_specification.rb +1 -0
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +10 -1
- data/lib/bundler/vendored_tsort.rb +19 -2
- data/lib/bundler/version.rb +1 -1
- data/lib/bundler.rb +11 -1
- metadata +5 -6
- data/lib/bundler/vendor/tsort/LICENSE.txt +0 -22
- data/lib/bundler/vendor/tsort/lib/tsort.rb +0 -455
data/lib/bundler/source_list.rb
CHANGED
|
@@ -50,7 +50,13 @@ module Bundler
|
|
|
50
50
|
|
|
51
51
|
def add_rubygems_source(options = {})
|
|
52
52
|
new_source = Source::Rubygems.new(options)
|
|
53
|
-
|
|
53
|
+
if @global_rubygems_source == new_source
|
|
54
|
+
warn_on_cooldown_conflict(new_source, @global_rubygems_source)
|
|
55
|
+
return @global_rubygems_source
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
existing_source = @rubygems_sources.find {|s| s == new_source }
|
|
59
|
+
warn_on_cooldown_conflict(new_source, existing_source) if existing_source
|
|
54
60
|
|
|
55
61
|
add_source_to_list new_source, @rubygems_sources
|
|
56
62
|
end
|
|
@@ -59,8 +65,15 @@ module Bundler
|
|
|
59
65
|
add_source_to_list Plugin.source(source).new(options), @plugin_sources
|
|
60
66
|
end
|
|
61
67
|
|
|
62
|
-
def add_global_rubygems_remote(uri)
|
|
63
|
-
|
|
68
|
+
def add_global_rubygems_remote(uri, cooldown: nil)
|
|
69
|
+
unless cooldown.nil?
|
|
70
|
+
new_source = source_class.new("remotes" => uri, "cooldown" => cooldown)
|
|
71
|
+
[global_rubygems_source, *@rubygems_sources].find do |existing_source|
|
|
72
|
+
warn_on_cooldown_conflict(new_source, existing_source)
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
global_rubygems_source.add_remote(uri, cooldown: cooldown)
|
|
64
77
|
global_rubygems_source
|
|
65
78
|
end
|
|
66
79
|
|
|
@@ -136,6 +149,14 @@ module Bundler
|
|
|
136
149
|
all_sources.each(&:remote!)
|
|
137
150
|
end
|
|
138
151
|
|
|
152
|
+
def clear_cache
|
|
153
|
+
rubygems_sources.each(&:clear_cache)
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
def release_resolution_memory!
|
|
157
|
+
rubygems_sources.each(&:release_resolution_memory!)
|
|
158
|
+
end
|
|
159
|
+
|
|
139
160
|
private
|
|
140
161
|
|
|
141
162
|
def map_sources(replacement_sources)
|
|
@@ -165,6 +186,10 @@ module Bundler
|
|
|
165
186
|
# locked sources never include credentials so always prefer remotes from the gemfile
|
|
166
187
|
replacement_source.remotes = gemfile_source.remotes
|
|
167
188
|
|
|
189
|
+
# cooldowns are only ever declared in the Gemfile, so carry them over
|
|
190
|
+
# along with the remotes they apply to
|
|
191
|
+
replacement_source.remote_cooldowns = gemfile_source.remote_cooldowns
|
|
192
|
+
|
|
168
193
|
yield replacement_source if block_given?
|
|
169
194
|
|
|
170
195
|
replacement_source
|
|
@@ -210,6 +235,22 @@ module Bundler
|
|
|
210
235
|
end
|
|
211
236
|
end
|
|
212
237
|
|
|
238
|
+
def warn_on_cooldown_conflict(new_source, existing_source)
|
|
239
|
+
new_source.remote_cooldowns.any? do |uri, cooldown|
|
|
240
|
+
next false unless existing_source.remotes.include?(uri)
|
|
241
|
+
|
|
242
|
+
existing_cooldown = existing_source.cooldown_for(uri)
|
|
243
|
+
next false if existing_cooldown == cooldown
|
|
244
|
+
|
|
245
|
+
previous = existing_cooldown ? "`cooldown: #{existing_cooldown}`" : "no cooldown"
|
|
246
|
+
Bundler.ui.warn "The source #{uri} is declared more than once with different cooldown " \
|
|
247
|
+
"values (`cooldown: #{cooldown}` here, #{previous} previously). All declarations of " \
|
|
248
|
+
"the same source URL share a single cooldown, so only one of these values will apply " \
|
|
249
|
+
"to all gems from this source."
|
|
250
|
+
true
|
|
251
|
+
end
|
|
252
|
+
end
|
|
253
|
+
|
|
213
254
|
def warn_on_git_protocol(source)
|
|
214
255
|
return if Bundler.settings["git.allow_insecure"]
|
|
215
256
|
|
data/lib/bundler/spec_set.rb
CHANGED
|
@@ -5,7 +5,7 @@ require_relative "vendored_tsort"
|
|
|
5
5
|
module Bundler
|
|
6
6
|
class SpecSet
|
|
7
7
|
include Enumerable
|
|
8
|
-
include TSort
|
|
8
|
+
include Gem::TSort
|
|
9
9
|
|
|
10
10
|
def initialize(specs)
|
|
11
11
|
@specs = specs
|
|
@@ -315,7 +315,7 @@ module Bundler
|
|
|
315
315
|
|
|
316
316
|
def sorted
|
|
317
317
|
@sorted ||= ([@specs.find {|s| s.name == "rake" }] + tsort).compact.uniq
|
|
318
|
-
rescue TSort::Cyclic => error
|
|
318
|
+
rescue Gem::TSort::Cyclic => error
|
|
319
319
|
cgems = extract_circular_gems(error)
|
|
320
320
|
raise CyclicDependencyError, "Your bundle requires gems that depend" \
|
|
321
321
|
" on each other, creating an infinite loop. Please remove either" \
|
|
@@ -52,6 +52,7 @@ module Bundler
|
|
|
52
52
|
|
|
53
53
|
# This is defined directly to avoid having to loading the full spec
|
|
54
54
|
def missing_extensions?
|
|
55
|
+
return false if RUBY_ENGINE == "jruby"
|
|
55
56
|
return false if default_gem?
|
|
56
57
|
return false if extensions.empty?
|
|
57
58
|
return false if File.exist? gem_build_complete_path
|
|
@@ -22,6 +22,12 @@ Gem::Specification.new do |spec|
|
|
|
22
22
|
spec.metadata["changelog_uri"] = "<%= config[:changelog_uri] %>"
|
|
23
23
|
<%- end -%>
|
|
24
24
|
|
|
25
|
+
# Uncomment the line below to require MFA for gem pushes.
|
|
26
|
+
# This helps protect your gem from supply chain attacks by ensuring
|
|
27
|
+
# no one can publish a new version without multi-factor authentication.
|
|
28
|
+
# See: https://guides.rubygems.org/mfa-requirement-opt-in/
|
|
29
|
+
# spec.metadata["rubygems_mfa_required"] = "true"
|
|
30
|
+
|
|
25
31
|
# Specify which files should be added to the gem when it is released.
|
|
26
32
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
27
33
|
gemspec = File.basename(__FILE__)
|
|
@@ -40,10 +46,13 @@ Gem::Specification.new do |spec|
|
|
|
40
46
|
|
|
41
47
|
# Uncomment to register a new dependency of your gem
|
|
42
48
|
# spec.add_dependency "example-gem", "~> 1.0"
|
|
49
|
+
<%- if config[:ext] == 'rust' -%>
|
|
50
|
+
spec.add_dependency "rb_sys", "~> 0.9.128"
|
|
51
|
+
<%- end -%>
|
|
43
52
|
<%- if config[:ext] == 'go' -%>
|
|
44
53
|
spec.add_dependency "go_gem", "~> 0.2"
|
|
45
54
|
<%- end -%>
|
|
46
55
|
|
|
47
56
|
# For more information and examples about making a new gem, check out our
|
|
48
|
-
# guide at: https://
|
|
57
|
+
# guide at: https://guides.rubygems.org/make-your-own-gem/
|
|
49
58
|
end
|
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
# The defined? guard avoids reopening Gem::TSort when an old RubyGems has
|
|
4
|
+
# already loaded its own copy, e.g. through rubygems/request_set from
|
|
5
|
+
# Gem.activate_bin_path in binstubs.
|
|
6
|
+
#
|
|
7
|
+
unless defined?(Gem::TSort)
|
|
8
|
+
begin
|
|
9
|
+
require "rubygems/vendored_tsort"
|
|
10
|
+
rescue LoadError
|
|
11
|
+
begin
|
|
12
|
+
# RubyGems 3.4 and 3.5 ship the same file under its pre-3.6 name.
|
|
13
|
+
# Requiring the real tsort here instead would activate the tsort
|
|
14
|
+
# default gem, and `bundler/setup` must not activate any gems.
|
|
15
|
+
require "rubygems/tsort"
|
|
16
|
+
rescue LoadError
|
|
17
|
+
require "tsort"
|
|
18
|
+
Gem::TSort = TSort
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
data/lib/bundler/version.rb
CHANGED
data/lib/bundler.rb
CHANGED
|
@@ -26,7 +26,7 @@ require_relative "bundler/build_metadata"
|
|
|
26
26
|
# or Bundler.setup to setup environment where only specified gems and their
|
|
27
27
|
# specified versions could be used.
|
|
28
28
|
#
|
|
29
|
-
# See {Bundler
|
|
29
|
+
# See {Bundler documentation}[https://guides.rubygems.org/command-reference/bundle/] for extensive documentation
|
|
30
30
|
# on gemfiles creation and Bundler usage.
|
|
31
31
|
#
|
|
32
32
|
# As a standard library inside project, Bundler could be used for introspection
|
|
@@ -156,6 +156,7 @@ module Bundler
|
|
|
156
156
|
# Return if all groups are already loaded
|
|
157
157
|
return @setup if defined?(@setup) && @setup
|
|
158
158
|
|
|
159
|
+
configure_custom_gemfile
|
|
159
160
|
definition.validate_runtime!
|
|
160
161
|
|
|
161
162
|
SharedHelpers.print_major_deprecations!
|
|
@@ -586,6 +587,15 @@ module Bundler
|
|
|
586
587
|
Bundler.rubygems.clear_paths
|
|
587
588
|
end
|
|
588
589
|
|
|
590
|
+
def configure_custom_gemfile(custom_gemfile = nil)
|
|
591
|
+
custom_gemfile ||= Bundler.settings[:gemfile]
|
|
592
|
+
|
|
593
|
+
if custom_gemfile && !custom_gemfile.empty?
|
|
594
|
+
Bundler::SharedHelpers.set_env "BUNDLE_GEMFILE", File.expand_path(custom_gemfile)
|
|
595
|
+
reset_settings_and_root!
|
|
596
|
+
end
|
|
597
|
+
end
|
|
598
|
+
|
|
589
599
|
def self_manager
|
|
590
600
|
@self_manager ||= begin
|
|
591
601
|
require_relative "bundler/self_manager"
|
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: 4.0.
|
|
4
|
+
version: 4.0.18
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- André Arko
|
|
@@ -194,6 +194,7 @@ files:
|
|
|
194
194
|
- lib/bundler/plugin/installer/path.rb
|
|
195
195
|
- lib/bundler/plugin/installer/rubygems.rb
|
|
196
196
|
- lib/bundler/plugin/source_list.rb
|
|
197
|
+
- lib/bundler/plugin/unloaded_source.rb
|
|
197
198
|
- lib/bundler/process_lock.rb
|
|
198
199
|
- lib/bundler/remote_specification.rb
|
|
199
200
|
- lib/bundler/resolver.rb
|
|
@@ -349,8 +350,6 @@ files:
|
|
|
349
350
|
- lib/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb
|
|
350
351
|
- lib/bundler/vendor/thor/lib/thor/util.rb
|
|
351
352
|
- lib/bundler/vendor/thor/lib/thor/version.rb
|
|
352
|
-
- lib/bundler/vendor/tsort/LICENSE.txt
|
|
353
|
-
- lib/bundler/vendor/tsort/lib/tsort.rb
|
|
354
353
|
- lib/bundler/vendor/uri/COPYING
|
|
355
354
|
- lib/bundler/vendor/uri/lib/uri.rb
|
|
356
355
|
- lib/bundler/vendor/uri/lib/uri/common.rb
|
|
@@ -385,9 +384,9 @@ licenses:
|
|
|
385
384
|
- MIT
|
|
386
385
|
metadata:
|
|
387
386
|
bug_tracker_uri: https://github.com/ruby/rubygems/issues?q=is%3Aopen+is%3Aissue+label%3ABundler
|
|
388
|
-
changelog_uri: https://github.com/ruby/rubygems/blob/master/bundler
|
|
387
|
+
changelog_uri: https://github.com/ruby/rubygems/blob/master/CHANGELOG-bundler.md
|
|
389
388
|
homepage_uri: https://bundler.io/
|
|
390
|
-
source_code_uri: https://github.com/ruby/rubygems
|
|
389
|
+
source_code_uri: https://github.com/ruby/rubygems
|
|
391
390
|
rdoc_options: []
|
|
392
391
|
require_paths:
|
|
393
392
|
- lib
|
|
@@ -402,7 +401,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
402
401
|
- !ruby/object:Gem::Version
|
|
403
402
|
version: 3.4.1
|
|
404
403
|
requirements: []
|
|
405
|
-
rubygems_version:
|
|
404
|
+
rubygems_version: 3.6.9
|
|
406
405
|
specification_version: 4
|
|
407
406
|
summary: The best way to manage your application's dependencies
|
|
408
407
|
test_files: []
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
Copyright (C) 1993-2013 Yukihiro Matsumoto. All rights reserved.
|
|
2
|
-
|
|
3
|
-
Redistribution and use in source and binary forms, with or without
|
|
4
|
-
modification, are permitted provided that the following conditions
|
|
5
|
-
are met:
|
|
6
|
-
1. Redistributions of source code must retain the above copyright
|
|
7
|
-
notice, this list of conditions and the following disclaimer.
|
|
8
|
-
2. Redistributions in binary form must reproduce the above copyright
|
|
9
|
-
notice, this list of conditions and the following disclaimer in the
|
|
10
|
-
documentation and/or other materials provided with the distribution.
|
|
11
|
-
|
|
12
|
-
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
13
|
-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
14
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
15
|
-
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
16
|
-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
17
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
18
|
-
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
19
|
-
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
20
|
-
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
21
|
-
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
22
|
-
SUCH DAMAGE.
|