bundler 2.7.2 → 4.0.0.beta1
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 +990 -917
- data/README.md +4 -4
- data/bundler.gemspec +3 -3
- data/lib/bundler/build_metadata.rb +2 -2
- data/lib/bundler/capistrano.rb +1 -19
- data/lib/bundler/cli/cache.rb +1 -11
- data/lib/bundler/cli/common.rb +20 -3
- data/lib/bundler/cli/config.rb +1 -2
- data/lib/bundler/cli/console.rb +5 -0
- data/lib/bundler/cli/exec.rb +29 -4
- data/lib/bundler/cli/gem.rb +19 -33
- data/lib/bundler/cli/install.rb +7 -82
- data/lib/bundler/cli/issue.rb +2 -2
- data/lib/bundler/cli/list.rb +33 -2
- data/lib/bundler/cli/plugin.rb +5 -1
- data/lib/bundler/cli/show.rb +1 -1
- data/lib/bundler/cli/update.rb +3 -3
- data/lib/bundler/cli.rb +75 -83
- data/lib/bundler/compact_index_client.rb +0 -1
- data/lib/bundler/current_ruby.rb +3 -15
- data/lib/bundler/definition.rb +45 -35
- data/lib/bundler/deployment.rb +1 -64
- data/lib/bundler/digest.rb +1 -1
- data/lib/bundler/dsl.rb +13 -35
- data/lib/bundler/endpoint_specification.rb +0 -22
- data/lib/bundler/errors.rb +1 -5
- data/lib/bundler/feature_flag.rb +0 -33
- data/lib/bundler/fetcher/compact_index.rb +1 -1
- data/lib/bundler/friendly_errors.rb +2 -2
- data/lib/bundler/index.rb +0 -7
- data/lib/bundler/inline.rb +1 -1
- data/lib/bundler/installer/gem_installer.rb +0 -11
- data/lib/bundler/installer.rb +0 -6
- data/lib/bundler/lockfile_generator.rb +1 -1
- data/lib/bundler/lockfile_parser.rb +2 -12
- data/lib/bundler/man/bundle-add.1 +1 -1
- data/lib/bundler/man/bundle-binstubs.1 +3 -6
- data/lib/bundler/man/bundle-binstubs.1.ronn +4 -6
- data/lib/bundler/man/bundle-cache.1 +2 -14
- data/lib/bundler/man/bundle-cache.1.ronn +1 -14
- data/lib/bundler/man/bundle-check.1 +2 -5
- data/lib/bundler/man/bundle-check.1.ronn +0 -5
- data/lib/bundler/man/bundle-clean.1 +1 -1
- data/lib/bundler/man/bundle-config.1 +6 -33
- data/lib/bundler/man/bundle-config.1.ronn +20 -55
- data/lib/bundler/man/bundle-console.1 +1 -1
- 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 +2 -5
- data/lib/bundler/man/bundle-exec.1.ronn +1 -5
- data/lib/bundler/man/bundle-fund.1 +1 -1
- data/lib/bundler/man/bundle-gem.1 +3 -6
- data/lib/bundler/man/bundle-gem.1.ronn +2 -5
- 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 +1 -1
- data/lib/bundler/man/bundle-install.1 +8 -59
- data/lib/bundler/man/bundle-install.1.ronn +12 -107
- 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 +6 -1
- data/lib/bundler/man/bundle-list.1.ronn +5 -0
- 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-plugin.1 +2 -9
- data/lib/bundler/man/bundle-plugin.1.ronn +0 -8
- data/lib/bundler/man/bundle-pristine.1 +1 -1
- data/lib/bundler/man/bundle-remove.1 +2 -8
- data/lib/bundler/man/bundle-remove.1.ronn +1 -8
- data/lib/bundler/man/bundle-show.1 +2 -5
- data/lib/bundler/man/bundle-show.1.ronn +0 -4
- data/lib/bundler/man/bundle-update.1 +1 -1
- data/lib/bundler/man/bundle-version.1 +1 -1
- data/lib/bundler/man/bundle.1 +1 -10
- data/lib/bundler/man/bundle.1.ronn +0 -9
- data/lib/bundler/man/gemfile.5 +1 -1
- data/lib/bundler/man/index.txt +0 -2
- data/lib/bundler/materialization.rb +1 -1
- data/lib/bundler/plugin/installer.rb +0 -10
- data/lib/bundler/plugin/source_list.rb +1 -1
- data/lib/bundler/plugin.rb +1 -1
- data/lib/bundler/resolver.rb +1 -1
- data/lib/bundler/ruby_dsl.rb +2 -0
- data/lib/bundler/ruby_version.rb +1 -3
- data/lib/bundler/rubygems_ext.rb +1 -1
- data/lib/bundler/rubygems_gem_installer.rb +1 -1
- data/lib/bundler/rubygems_integration.rb +1 -5
- data/lib/bundler/self_manager.rb +1 -1
- data/lib/bundler/settings.rb +7 -26
- data/lib/bundler/shared_helpers.rb +8 -20
- data/lib/bundler/source/git/git_proxy.rb +3 -11
- data/lib/bundler/source/git.rb +2 -3
- data/lib/bundler/source/path.rb +3 -7
- data/lib/bundler/source/rubygems.rb +11 -17
- data/lib/bundler/source.rb +1 -1
- data/lib/bundler/source_list.rb +4 -45
- data/lib/bundler/source_map.rb +2 -5
- data/lib/bundler/spec_set.rb +6 -15
- data/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +7 -129
- data/lib/bundler/templates/newgem/circleci/config.yml.tt +12 -0
- data/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +1 -1
- data/lib/bundler/templates/newgem/ext/newgem/extconf-go.rb.tt +11 -0
- data/lib/bundler/templates/newgem/ext/newgem/go.mod.tt +5 -0
- data/lib/bundler/templates/newgem/ext/newgem/newgem-go.c.tt +2 -0
- data/lib/bundler/templates/newgem/ext/newgem/newgem.go.tt +31 -0
- data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +6 -0
- data/lib/bundler/templates/newgem/gitlab-ci.yml.tt +9 -0
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +4 -1
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +26 -23
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
- data/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +50 -6
- data/lib/bundler/vendor/fileutils/lib/fileutils.rb +57 -52
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +5 -2
- data/lib/bundler/vendor/thor/lib/thor/runner.rb +1 -1
- data/lib/bundler/vendor/uri/lib/uri/common.rb +57 -15
- data/lib/bundler/vendor/uri/lib/uri/file.rb +1 -1
- data/lib/bundler/vendor/uri/lib/uri/generic.rb +34 -21
- data/lib/bundler/vendor/uri/lib/uri/http.rb +12 -0
- data/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +9 -8
- data/lib/bundler/vendor/uri/lib/uri/version.rb +2 -2
- data/lib/bundler/version.rb +1 -1
- data/lib/bundler/vlad.rb +1 -14
- data/lib/bundler.rb +6 -28
- metadata +9 -13
- data/lib/bundler/cli/inject.rb +0 -60
- data/lib/bundler/cli/viz.rb +0 -31
- data/lib/bundler/graph.rb +0 -152
- data/lib/bundler/man/bundle-inject.1 +0 -31
- data/lib/bundler/man/bundle-inject.1.ronn +0 -32
- data/lib/bundler/man/bundle-viz.1 +0 -30
- data/lib/bundler/man/bundle-viz.1.ronn +0 -36
- data/lib/bundler/similarity_detector.rb +0 -63
data/lib/bundler/deployment.rb
CHANGED
|
@@ -1,69 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require_relative "shared_helpers"
|
|
4
|
-
Bundler::SharedHelpers.
|
|
4
|
+
Bundler::SharedHelpers.feature_removed! "Bundler no longer integrates with " \
|
|
5
5
|
"Capistrano, but Capistrano provides its own integration with " \
|
|
6
6
|
"Bundler via the capistrano-bundler gem. Use it instead."
|
|
7
|
-
|
|
8
|
-
module Bundler
|
|
9
|
-
class Deployment
|
|
10
|
-
def self.define_task(context, task_method = :task, opts = {})
|
|
11
|
-
if defined?(Capistrano) && context.is_a?(Capistrano::Configuration)
|
|
12
|
-
context_name = "capistrano"
|
|
13
|
-
role_default = "{:except => {:no_release => true}}"
|
|
14
|
-
error_type = ::Capistrano::CommandError
|
|
15
|
-
else
|
|
16
|
-
context_name = "vlad"
|
|
17
|
-
role_default = "[:app]"
|
|
18
|
-
error_type = ::Rake::CommandFailedError
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
roles = context.fetch(:bundle_roles, false)
|
|
22
|
-
opts[:roles] = roles if roles
|
|
23
|
-
|
|
24
|
-
context.send :namespace, :bundle do
|
|
25
|
-
send :desc, <<-DESC
|
|
26
|
-
Install the current Bundler environment. By default, gems will be \
|
|
27
|
-
installed to the shared/bundle path. Gems in the development and \
|
|
28
|
-
test group will not be installed. The install command is executed \
|
|
29
|
-
with the --deployment and --quiet flags. If the bundle cmd cannot \
|
|
30
|
-
be found then you can override the bundle_cmd variable to specify \
|
|
31
|
-
which one it should use. The base path to the app is fetched from \
|
|
32
|
-
the :latest_release variable. Set it for custom deploy layouts.
|
|
33
|
-
|
|
34
|
-
You can override any of these defaults by setting the variables shown below.
|
|
35
|
-
|
|
36
|
-
N.B. bundle_roles must be defined before you require 'bundler/#{context_name}' \
|
|
37
|
-
in your deploy.rb file.
|
|
38
|
-
|
|
39
|
-
set :bundle_gemfile, "Gemfile"
|
|
40
|
-
set :bundle_dir, File.join(fetch(:shared_path), 'bundle')
|
|
41
|
-
set :bundle_flags, "--deployment --quiet"
|
|
42
|
-
set :bundle_without, [:development, :test]
|
|
43
|
-
set :bundle_with, [:mysql]
|
|
44
|
-
set :bundle_cmd, "bundle" # e.g. "/opt/ruby/bin/bundle"
|
|
45
|
-
set :bundle_roles, #{role_default} # e.g. [:app, :batch]
|
|
46
|
-
DESC
|
|
47
|
-
send task_method, :install, opts do
|
|
48
|
-
bundle_cmd = context.fetch(:bundle_cmd, "bundle")
|
|
49
|
-
bundle_flags = context.fetch(:bundle_flags, "--deployment --quiet")
|
|
50
|
-
bundle_dir = context.fetch(:bundle_dir, File.join(context.fetch(:shared_path), "bundle"))
|
|
51
|
-
bundle_gemfile = context.fetch(:bundle_gemfile, "Gemfile")
|
|
52
|
-
bundle_without = [*context.fetch(:bundle_without, [:development, :test])].compact
|
|
53
|
-
bundle_with = [*context.fetch(:bundle_with, [])].compact
|
|
54
|
-
app_path = context.fetch(:latest_release)
|
|
55
|
-
if app_path.to_s.empty?
|
|
56
|
-
raise error_type.new("Cannot detect current release path - make sure you have deployed at least once.")
|
|
57
|
-
end
|
|
58
|
-
args = ["--gemfile #{File.join(app_path, bundle_gemfile)}"]
|
|
59
|
-
args << "--path #{bundle_dir}" unless bundle_dir.to_s.empty?
|
|
60
|
-
args << bundle_flags.to_s
|
|
61
|
-
args << "--without #{bundle_without.join(" ")}" unless bundle_without.empty?
|
|
62
|
-
args << "--with #{bundle_with.join(" ")}" unless bundle_with.empty?
|
|
63
|
-
|
|
64
|
-
run "cd #{app_path} && #{bundle_cmd} install #{args.join(" ")}"
|
|
65
|
-
end
|
|
66
|
-
end
|
|
67
|
-
end
|
|
68
|
-
end
|
|
69
|
-
end
|
data/lib/bundler/digest.rb
CHANGED
|
@@ -26,7 +26,7 @@ module Bundler
|
|
|
26
26
|
end
|
|
27
27
|
a, b, c, d, e = *words
|
|
28
28
|
(16..79).each do |i|
|
|
29
|
-
w[i] = SHA1_MASK & rotate(
|
|
29
|
+
w[i] = SHA1_MASK & rotate(w[i - 3] ^ w[i - 8] ^ w[i - 14] ^ w[i - 16], 1)
|
|
30
30
|
end
|
|
31
31
|
0.upto(79) do |i|
|
|
32
32
|
case i
|
data/lib/bundler/dsl.rb
CHANGED
|
@@ -411,7 +411,13 @@ module Bundler
|
|
|
411
411
|
next if VALID_PLATFORMS.include?(p)
|
|
412
412
|
raise GemfileError, "`#{p}` is not a valid platform. The available options are: #{VALID_PLATFORMS.inspect}"
|
|
413
413
|
end
|
|
414
|
-
|
|
414
|
+
|
|
415
|
+
windows_platforms = platforms.select {|pl| pl.to_s.match?(/mingw|mswin/) }
|
|
416
|
+
if windows_platforms.any?
|
|
417
|
+
windows_platforms = windows_platforms.map! {|pl| ":#{pl}" }.join(", ")
|
|
418
|
+
removed_message = "Platform #{windows_platforms} has been removed. Please use platform :windows instead."
|
|
419
|
+
Bundler::SharedHelpers.feature_removed! removed_message
|
|
420
|
+
end
|
|
415
421
|
|
|
416
422
|
# Save sources passed in a key
|
|
417
423
|
if opts.key?("source")
|
|
@@ -477,14 +483,10 @@ module Bundler
|
|
|
477
483
|
def normalize_source(source)
|
|
478
484
|
case source
|
|
479
485
|
when :gemcutter, :rubygems, :rubyforge
|
|
480
|
-
message =
|
|
481
|
-
"The source :#{source} is deprecated because HTTP requests are insecure.\n" \
|
|
482
|
-
"Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not."
|
|
483
486
|
removed_message =
|
|
484
487
|
"The source :#{source} is disallowed because HTTP requests are insecure.\n" \
|
|
485
488
|
"Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not."
|
|
486
|
-
Bundler::SharedHelpers.
|
|
487
|
-
"http://rubygems.org"
|
|
489
|
+
Bundler::SharedHelpers.feature_removed! removed_message
|
|
488
490
|
when String
|
|
489
491
|
source
|
|
490
492
|
else
|
|
@@ -492,16 +494,6 @@ module Bundler
|
|
|
492
494
|
end
|
|
493
495
|
end
|
|
494
496
|
|
|
495
|
-
def deprecate_legacy_windows_platforms(platforms)
|
|
496
|
-
windows_platforms = platforms.select {|pl| pl.to_s.match?(/mingw|mswin/) }
|
|
497
|
-
return if windows_platforms.empty?
|
|
498
|
-
|
|
499
|
-
windows_platforms = windows_platforms.map! {|pl| ":#{pl}" }.join(", ")
|
|
500
|
-
message = "Platform #{windows_platforms} is deprecated. Please use platform :windows instead."
|
|
501
|
-
removed_message = "Platform #{windows_platforms} has been removed. Please use platform :windows instead."
|
|
502
|
-
Bundler::SharedHelpers.major_deprecation 2, message, removed_message: removed_message
|
|
503
|
-
end
|
|
504
|
-
|
|
505
497
|
def check_path_source_safety
|
|
506
498
|
return if @sources.global_path_source.nil?
|
|
507
499
|
|
|
@@ -513,7 +505,7 @@ module Bundler
|
|
|
513
505
|
" gem 'rails'\n" \
|
|
514
506
|
" end\n\n"
|
|
515
507
|
|
|
516
|
-
SharedHelpers.
|
|
508
|
+
SharedHelpers.feature_removed! msg.strip
|
|
517
509
|
end
|
|
518
510
|
|
|
519
511
|
def check_rubygems_source_safety
|
|
@@ -521,24 +513,10 @@ module Bundler
|
|
|
521
513
|
end
|
|
522
514
|
|
|
523
515
|
def multiple_global_source_warning
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
raise GemfileEvalError, msg
|
|
529
|
-
else
|
|
530
|
-
message =
|
|
531
|
-
"Your Gemfile contains multiple global sources. " \
|
|
532
|
-
"Using `source` more than once without a block is a security risk, and " \
|
|
533
|
-
"may result in installing unexpected gems. To resolve this warning, use " \
|
|
534
|
-
"a block to indicate which gems should come from the secondary source."
|
|
535
|
-
removed_message =
|
|
536
|
-
"Your Gemfile contains multiple global sources. " \
|
|
537
|
-
"Using `source` more than once without a block is a security risk, and " \
|
|
538
|
-
"may result in installing unexpected gems. To resolve this error, use " \
|
|
539
|
-
"a block to indicate which gems should come from the secondary source."
|
|
540
|
-
Bundler::SharedHelpers.major_deprecation 2, message, removed_message: removed_message
|
|
541
|
-
end
|
|
516
|
+
msg = "This Gemfile contains multiple global sources. " \
|
|
517
|
+
"Each source after the first must include a block to indicate which gems " \
|
|
518
|
+
"should come from that source"
|
|
519
|
+
raise GemfileEvalError, msg
|
|
542
520
|
end
|
|
543
521
|
|
|
544
522
|
class DSLError < GemfileError
|
|
@@ -60,28 +60,6 @@ module Bundler
|
|
|
60
60
|
end
|
|
61
61
|
end
|
|
62
62
|
|
|
63
|
-
# needed for binstubs
|
|
64
|
-
def executables
|
|
65
|
-
if @remote_specification
|
|
66
|
-
@remote_specification.executables
|
|
67
|
-
elsif _local_specification
|
|
68
|
-
_local_specification.executables
|
|
69
|
-
else
|
|
70
|
-
super
|
|
71
|
-
end
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
# needed for bundle clean
|
|
75
|
-
def bindir
|
|
76
|
-
if @remote_specification
|
|
77
|
-
@remote_specification.bindir
|
|
78
|
-
elsif _local_specification
|
|
79
|
-
_local_specification.bindir
|
|
80
|
-
else
|
|
81
|
-
super
|
|
82
|
-
end
|
|
83
|
-
end
|
|
84
|
-
|
|
85
63
|
# needed for post_install_messages during install
|
|
86
64
|
def post_install_message
|
|
87
65
|
if @remote_specification
|
data/lib/bundler/errors.rb
CHANGED
|
@@ -25,6 +25,7 @@ module Bundler
|
|
|
25
25
|
|
|
26
26
|
class GemNotFound < BundlerError; status_code(7); end
|
|
27
27
|
class InstallHookError < BundlerError; status_code(8); end
|
|
28
|
+
class RemovedError < BundlerError; status_code(9); end
|
|
28
29
|
class GemfileNotFound < BundlerError; status_code(10); end
|
|
29
30
|
class GitError < BundlerError; status_code(11); end
|
|
30
31
|
class DeprecatedError < BundlerError; status_code(12); end
|
|
@@ -76,11 +77,6 @@ module Bundler
|
|
|
76
77
|
def mismatch_resolution_instructions
|
|
77
78
|
removable, remote = [@existing, @checksum].partition(&:removable?)
|
|
78
79
|
case removable.size
|
|
79
|
-
when 0
|
|
80
|
-
msg = +"Mismatched checksums each have an authoritative source:\n"
|
|
81
|
-
msg << " 1. #{@existing.sources.reject(&:removable?).map(&:to_s).join(" and ")}\n"
|
|
82
|
-
msg << " 2. #{@checksum.sources.reject(&:removable?).map(&:to_s).join(" and ")}\n"
|
|
83
|
-
msg << "You may need to alter your Gemfile sources to resolve this issue.\n"
|
|
84
80
|
when 1
|
|
85
81
|
msg = +"If you trust #{remote.first.sources.first}, to resolve this issue you can:\n"
|
|
86
82
|
msg << removable.first.removal_instructions
|
data/lib/bundler/feature_flag.rb
CHANGED
|
@@ -2,41 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Bundler
|
|
4
4
|
class FeatureFlag
|
|
5
|
-
def self.settings_flag(flag, &default)
|
|
6
|
-
unless Bundler::Settings::BOOL_KEYS.include?(flag.to_s)
|
|
7
|
-
raise "Cannot use `#{flag}` as a settings feature flag since it isn't a bool key"
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
settings_method("#{flag}?", flag, &default)
|
|
11
|
-
end
|
|
12
|
-
private_class_method :settings_flag
|
|
13
|
-
|
|
14
|
-
def self.settings_option(key, &default)
|
|
15
|
-
settings_method(key, key, &default)
|
|
16
|
-
end
|
|
17
|
-
private_class_method :settings_option
|
|
18
|
-
|
|
19
|
-
def self.settings_method(name, key, &default)
|
|
20
|
-
define_method(name) do
|
|
21
|
-
value = Bundler.settings[key]
|
|
22
|
-
value = instance_eval(&default) if value.nil?
|
|
23
|
-
value
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
private_class_method :settings_method
|
|
27
|
-
|
|
28
5
|
(1..10).each {|v| define_method("bundler_#{v}_mode?") { @major_version >= v } }
|
|
29
6
|
|
|
30
|
-
settings_flag(:allow_offline_install) { bundler_4_mode? }
|
|
31
|
-
settings_flag(:cache_all) { bundler_4_mode? }
|
|
32
|
-
settings_flag(:forget_cli_options) { bundler_4_mode? }
|
|
33
|
-
settings_flag(:global_gem_cache) { bundler_5_mode? }
|
|
34
|
-
settings_flag(:lockfile_checksums) { bundler_4_mode? }
|
|
35
|
-
settings_flag(:plugins) { @bundler_version >= Gem::Version.new("1.14") }
|
|
36
|
-
settings_flag(:update_requires_all_flag) { bundler_5_mode? }
|
|
37
|
-
|
|
38
|
-
settings_option(:default_cli_command) { bundler_4_mode? ? :cli_help : :install }
|
|
39
|
-
|
|
40
7
|
def removed_major?(target_major_version)
|
|
41
8
|
@major_version > target_major_version
|
|
42
9
|
end
|
|
@@ -110,7 +110,7 @@ module Bundler
|
|
|
110
110
|
def call(path, headers)
|
|
111
111
|
fetcher.downloader.fetch(fetcher.fetch_uri + path, headers)
|
|
112
112
|
rescue NetworkDownError => e
|
|
113
|
-
raise unless
|
|
113
|
+
raise unless headers["If-None-Match"]
|
|
114
114
|
ui.warn "Using the cached data for the new index because of a network error: #{e}"
|
|
115
115
|
Gem::Net::HTTPNotModified.new(nil, nil, nil)
|
|
116
116
|
end
|
|
@@ -104,12 +104,12 @@ module Bundler
|
|
|
104
104
|
message = message.split("-").first if exception.is_a?(Errno)
|
|
105
105
|
require "cgi/escape"
|
|
106
106
|
require "cgi/util" unless defined?(CGI::EscapeExt)
|
|
107
|
-
"https://github.com/
|
|
107
|
+
"https://github.com/ruby/rubygems/search?q=" \
|
|
108
108
|
"#{CGI.escape(message)}&type=Issues"
|
|
109
109
|
end
|
|
110
110
|
|
|
111
111
|
def new_issue_url
|
|
112
|
-
"https://github.com/
|
|
112
|
+
"https://github.com/ruby/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md"
|
|
113
113
|
end
|
|
114
114
|
end
|
|
115
115
|
|
data/lib/bundler/index.rb
CHANGED
|
@@ -46,13 +46,6 @@ module Bundler
|
|
|
46
46
|
true
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
-
def search_all(name, &blk)
|
|
50
|
-
return enum_for(:search_all, name) unless blk
|
|
51
|
-
specs_by_name(name).each(&blk)
|
|
52
|
-
@duplicates[name]&.each(&blk)
|
|
53
|
-
@sources.each {|source| source.search_all(name, &blk) }
|
|
54
|
-
end
|
|
55
|
-
|
|
56
49
|
# Search this index's specs, and any source indexes that this index knows
|
|
57
50
|
# about, returning all of the results.
|
|
58
51
|
def search(query)
|
data/lib/bundler/inline.rb
CHANGED
|
@@ -51,7 +51,7 @@ def gemfile(force_latest_compatible = false, options = {}, &gemfile)
|
|
|
51
51
|
Bundler.instance_variable_set(:@bundle_path, Pathname.new(Gem.dir))
|
|
52
52
|
Bundler::SharedHelpers.set_env "BUNDLE_GEMFILE", "Gemfile"
|
|
53
53
|
|
|
54
|
-
Bundler::Plugin.gemfile_install(&gemfile) if Bundler.
|
|
54
|
+
Bundler::Plugin.gemfile_install(&gemfile) if Bundler.settings[:plugins]
|
|
55
55
|
builder = Bundler::Dsl.new
|
|
56
56
|
builder.instance_eval(&gemfile)
|
|
57
57
|
|
|
@@ -16,7 +16,6 @@ module Bundler
|
|
|
16
16
|
def install_from_spec
|
|
17
17
|
post_install_message = install
|
|
18
18
|
Bundler.ui.debug "#{worker}: #{spec.name} (#{spec.version}) from #{spec.loaded_from}"
|
|
19
|
-
generate_executable_stubs
|
|
20
19
|
[true, post_install_message]
|
|
21
20
|
rescue Bundler::InstallHookError, Bundler::SecurityError, Bundler::APIResponseMismatchError, Bundler::InsecureInstallPathError
|
|
22
21
|
raise
|
|
@@ -71,15 +70,5 @@ module Bundler
|
|
|
71
70
|
def out_of_space_message
|
|
72
71
|
"#{install_error_message}\nYour disk is out of space. Free some space to be able to install your bundle."
|
|
73
72
|
end
|
|
74
|
-
|
|
75
|
-
def generate_executable_stubs
|
|
76
|
-
return if Bundler.feature_flag.forget_cli_options?
|
|
77
|
-
return if Bundler.settings[:inline]
|
|
78
|
-
if Bundler.settings[:bin] && standalone
|
|
79
|
-
installer.generate_standalone_bundler_executable_stubs(spec)
|
|
80
|
-
elsif Bundler.settings[:bin]
|
|
81
|
-
installer.generate_bundler_executable_stubs(spec, force: true)
|
|
82
|
-
end
|
|
83
|
-
end
|
|
84
73
|
end
|
|
85
74
|
end
|
data/lib/bundler/installer.rb
CHANGED
|
@@ -7,12 +7,6 @@ require_relative "installer/gem_installer"
|
|
|
7
7
|
|
|
8
8
|
module Bundler
|
|
9
9
|
class Installer
|
|
10
|
-
class << self
|
|
11
|
-
attr_accessor :ambiguous_gems
|
|
12
|
-
|
|
13
|
-
Installer.ambiguous_gems = []
|
|
14
|
-
end
|
|
15
|
-
|
|
16
10
|
attr_reader :post_install_messages, :definition
|
|
17
11
|
|
|
18
12
|
# Begins the installation process for Bundler.
|
|
@@ -141,18 +141,8 @@ module Bundler
|
|
|
141
141
|
@pos.advance!(line)
|
|
142
142
|
end
|
|
143
143
|
|
|
144
|
-
if
|
|
145
|
-
|
|
146
|
-
@platforms.delete(Gem::Platform::X64_MINGW_LEGACY)
|
|
147
|
-
SharedHelpers.major_deprecation(2,
|
|
148
|
-
"Found x64-mingw32 in lockfile, which is deprecated. Removing it. Support for x64-mingw32 will be removed in Bundler 4.0.",
|
|
149
|
-
removed_message: "Found x64-mingw32 in lockfile, which is no longer supported as of Bundler 4.0.")
|
|
150
|
-
else
|
|
151
|
-
@platforms[@platforms.index(Gem::Platform::X64_MINGW_LEGACY)] = Gem::Platform::X64_MINGW
|
|
152
|
-
SharedHelpers.major_deprecation(2,
|
|
153
|
-
"Found x64-mingw32 in lockfile, which is deprecated. Using x64-mingw-ucrt, the replacement for x64-mingw32 in modern rubies, instead. Support for x64-mingw32 will be removed in Bundler 4.0.",
|
|
154
|
-
removed_message: "Found x64-mingw32 in lockfile, which is no longer supported as of Bundler 4.0.")
|
|
155
|
-
end
|
|
144
|
+
if @platforms.include?(Gem::Platform::X64_MINGW_LEGACY)
|
|
145
|
+
SharedHelpers.feature_deprecated!("Found x64-mingw32 in lockfile, which is deprecated and will be removed in the future.")
|
|
156
146
|
end
|
|
157
147
|
|
|
158
148
|
@most_specific_locked_platform = @platforms.min_by do |bundle_platform|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.\" generated with Ronn-NG/v0.10.1
|
|
2
2
|
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
|
3
|
-
.TH "BUNDLE\-ADD" "1" "
|
|
3
|
+
.TH "BUNDLE\-ADD" "1" "September 2025" ""
|
|
4
4
|
.SH "NAME"
|
|
5
5
|
\fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
|
|
6
6
|
.SH "SYNOPSIS"
|
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
.\" generated with Ronn-NG/v0.10.1
|
|
2
2
|
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
|
3
|
-
.TH "BUNDLE\-BINSTUBS" "1" "
|
|
3
|
+
.TH "BUNDLE\-BINSTUBS" "1" "September 2025" ""
|
|
4
4
|
.SH "NAME"
|
|
5
5
|
\fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
|
|
6
6
|
.SH "SYNOPSIS"
|
|
7
|
-
\fBbundle binstubs\fR \fIGEM_NAME\fR [\-\-force] [\-\-
|
|
7
|
+
\fBbundle binstubs\fR \fIGEM_NAME\fR [\-\-force] [\-\-standalone] [\-\-all\-platforms]
|
|
8
8
|
.SH "DESCRIPTION"
|
|
9
9
|
Binstubs are scripts that wrap around executables\. Bundler creates a small Ruby file (a binstub) that loads Bundler, runs the command, and puts it into \fBbin/\fR\. Binstubs are a shortcut\-or alternative\- to always using \fBbundle exec\fR\. This gives you a file that can be run directly, and one that will always run the correct gem version used by the application\.
|
|
10
10
|
.P
|
|
11
11
|
For example, if you run \fBbundle binstubs rspec\-core\fR, Bundler will create the file \fBbin/rspec\fR\. That file will contain enough code to load Bundler, tell it to load the bundled gems, and then run rspec\.
|
|
12
12
|
.P
|
|
13
|
-
This command generates binstubs for executables in \fBGEM_NAME\fR\. Binstubs are put into \fBbin\fR, or the \
|
|
13
|
+
This command generates binstubs for executables in \fBGEM_NAME\fR\. Binstubs are put into \fBbin\fR, or the directory specified by \fBbin\fR setting if it has been configured\. Calling binstubs with [GEM [GEM]] will create binstubs for all given gems\.
|
|
14
14
|
.SH "OPTIONS"
|
|
15
15
|
.TP
|
|
16
16
|
\fB\-\-force\fR
|
|
17
17
|
Overwrite existing binstubs if they exist\.
|
|
18
18
|
.TP
|
|
19
|
-
\fB\-\-path[=PATH]\fR
|
|
20
|
-
The location to install the specified binstubs to\. This defaults to \fBbin\fR\.
|
|
21
|
-
.TP
|
|
22
19
|
\fB\-\-standalone\fR
|
|
23
20
|
Makes binstubs that can work without depending on Rubygems or Bundler at runtime\.
|
|
24
21
|
.TP
|
|
@@ -3,7 +3,7 @@ bundle-binstubs(1) -- Install the binstubs of the listed gems
|
|
|
3
3
|
|
|
4
4
|
## SYNOPSIS
|
|
5
5
|
|
|
6
|
-
`bundle binstubs` <GEM_NAME> [--force] [--
|
|
6
|
+
`bundle binstubs` <GEM_NAME> [--force] [--standalone] [--all-platforms]
|
|
7
7
|
|
|
8
8
|
## DESCRIPTION
|
|
9
9
|
|
|
@@ -19,17 +19,15 @@ the file `bin/rspec`. That file will contain enough code to load Bundler,
|
|
|
19
19
|
tell it to load the bundled gems, and then run rspec.
|
|
20
20
|
|
|
21
21
|
This command generates binstubs for executables in `GEM_NAME`.
|
|
22
|
-
Binstubs are put into `bin`, or the
|
|
23
|
-
Calling binstubs with [GEM [GEM]] will create binstubs for
|
|
22
|
+
Binstubs are put into `bin`, or the directory specified by `bin` setting if it
|
|
23
|
+
has been configured. Calling binstubs with [GEM [GEM]] will create binstubs for
|
|
24
|
+
all given gems.
|
|
24
25
|
|
|
25
26
|
## OPTIONS
|
|
26
27
|
|
|
27
28
|
* `--force`:
|
|
28
29
|
Overwrite existing binstubs if they exist.
|
|
29
30
|
|
|
30
|
-
* `--path[=PATH]`:
|
|
31
|
-
The location to install the specified binstubs to. This defaults to `bin`.
|
|
32
|
-
|
|
33
31
|
* `--standalone`:
|
|
34
32
|
Makes binstubs that can work without depending on Rubygems or Bundler at
|
|
35
33
|
runtime.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.\" generated with Ronn-NG/v0.10.1
|
|
2
2
|
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
|
3
|
-
.TH "BUNDLE\-CACHE" "1" "
|
|
3
|
+
.TH "BUNDLE\-CACHE" "1" "September 2025" ""
|
|
4
4
|
.SH "NAME"
|
|
5
5
|
\fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
|
|
6
6
|
.SH "SYNOPSIS"
|
|
@@ -11,9 +11,6 @@ alias: \fBpackage\fR, \fBpack\fR
|
|
|
11
11
|
Copy all of the \fB\.gem\fR files needed to run the application into the \fBvendor/cache\fR directory\. In the future, when running \fBbundle install(1)\fR \fIbundle\-install\.1\.html\fR, use the gems in the cache in preference to the ones on \fBrubygems\.org\fR\.
|
|
12
12
|
.SH "OPTIONS"
|
|
13
13
|
.TP
|
|
14
|
-
\fB\-\-all\fR
|
|
15
|
-
Include all sources (including path and git)\.
|
|
16
|
-
.TP
|
|
17
14
|
\fB\-\-all\-platforms\fR
|
|
18
15
|
Include gems for all platforms present in the lockfile, not only the current one\.
|
|
19
16
|
.TP
|
|
@@ -26,19 +23,10 @@ Use the specified gemfile instead of Gemfile\.
|
|
|
26
23
|
\fB\-\-no\-install\fR
|
|
27
24
|
Don't install the gems, only update the cache\.
|
|
28
25
|
.TP
|
|
29
|
-
\fB\-\-no\-prune\fR
|
|
30
|
-
Don't remove stale gems from the cache\.
|
|
31
|
-
.TP
|
|
32
|
-
\fB\-\-path=PATH\fR
|
|
33
|
-
Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME)\.
|
|
34
|
-
.TP
|
|
35
26
|
\fB\-\-quiet\fR
|
|
36
27
|
Only output warnings and errors\.
|
|
37
|
-
.TP
|
|
38
|
-
\fB\-\-frozen\fR
|
|
39
|
-
Do not allow the Gemfile\.lock to be updated after this bundle cache operation's install\.
|
|
40
28
|
.SH "GIT AND PATH GEMS"
|
|
41
|
-
The \fBbundle cache\fR command can also package \fB:git\fR and \fB:path\fR dependencies besides \.gem files\. This
|
|
29
|
+
The \fBbundle cache\fR command can also package \fB:git\fR and \fB:path\fR dependencies besides \.gem files\. This can be disabled setting \fBcache_all\fR to false\.
|
|
42
30
|
.SH "SUPPORT FOR MULTIPLE PLATFORMS"
|
|
43
31
|
When using gems that have different packages for different platforms, Bundler supports caching of gems for other platforms where the Gemfile has been resolved (i\.e\. present in the lockfile) in \fBvendor/cache\fR\. This needs to be enabled via the \fB\-\-all\-platforms\fR option\. This setting will be remembered in your local bundler configuration\.
|
|
44
32
|
.SH "REMOTE FETCHING"
|
|
@@ -15,9 +15,6 @@ use the gems in the cache in preference to the ones on `rubygems.org`.
|
|
|
15
15
|
|
|
16
16
|
## OPTIONS
|
|
17
17
|
|
|
18
|
-
* `--all`:
|
|
19
|
-
Include all sources (including path and git).
|
|
20
|
-
|
|
21
18
|
* `--all-platforms`:
|
|
22
19
|
Include gems for all platforms present in the lockfile, not only the current one.
|
|
23
20
|
|
|
@@ -30,23 +27,13 @@ use the gems in the cache in preference to the ones on `rubygems.org`.
|
|
|
30
27
|
* `--no-install`:
|
|
31
28
|
Don't install the gems, only update the cache.
|
|
32
29
|
|
|
33
|
-
* `--no-prune`:
|
|
34
|
-
Don't remove stale gems from the cache.
|
|
35
|
-
|
|
36
|
-
* `--path=PATH`:
|
|
37
|
-
Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME).
|
|
38
|
-
|
|
39
30
|
* `--quiet`:
|
|
40
31
|
Only output warnings and errors.
|
|
41
32
|
|
|
42
|
-
* `--frozen`:
|
|
43
|
-
Do not allow the Gemfile.lock to be updated after this bundle cache operation's install.
|
|
44
|
-
|
|
45
33
|
## GIT AND PATH GEMS
|
|
46
34
|
|
|
47
35
|
The `bundle cache` command can also package `:git` and `:path` dependencies
|
|
48
|
-
besides .gem files. This
|
|
49
|
-
Once used, the `--all` option will be remembered.
|
|
36
|
+
besides .gem files. This can be disabled setting `cache_all` to false.
|
|
50
37
|
|
|
51
38
|
## SUPPORT FOR MULTIPLE PLATFORMS
|
|
52
39
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
.\" generated with Ronn-NG/v0.10.1
|
|
2
2
|
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
|
3
|
-
.TH "BUNDLE\-CHECK" "1" "
|
|
3
|
+
.TH "BUNDLE\-CHECK" "1" "September 2025" ""
|
|
4
4
|
.SH "NAME"
|
|
5
5
|
\fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
|
|
6
6
|
.SH "SYNOPSIS"
|
|
7
|
-
\fBbundle check\fR [\-\-dry\-run] [\-\-gemfile=FILE]
|
|
7
|
+
\fBbundle check\fR [\-\-dry\-run] [\-\-gemfile=FILE]
|
|
8
8
|
.SH "DESCRIPTION"
|
|
9
9
|
\fBcheck\fR searches the local machine for each of the gems requested in the Gemfile\. If all gems are found, Bundler prints a success message and exits with a status of 0\.
|
|
10
10
|
.P
|
|
@@ -18,7 +18,4 @@ Locks the [\fBGemfile(5)\fR][Gemfile(5)] before running the command\.
|
|
|
18
18
|
.TP
|
|
19
19
|
\fB\-\-gemfile=GEMFILE\fR
|
|
20
20
|
Use the specified gemfile instead of the [\fBGemfile(5)\fR][Gemfile(5)]\.
|
|
21
|
-
.TP
|
|
22
|
-
\fB\-\-path=PATH\fR
|
|
23
|
-
Specify a different path than the system default (\fB$BUNDLE_PATH\fR or \fB$GEM_HOME\fR)\. Bundler will remember this value for future installs on this machine\.
|
|
24
21
|
|
|
@@ -5,7 +5,6 @@ bundle-check(1) -- Verifies if dependencies are satisfied by installed gems
|
|
|
5
5
|
|
|
6
6
|
`bundle check` [--dry-run]
|
|
7
7
|
[--gemfile=FILE]
|
|
8
|
-
[--path=PATH]
|
|
9
8
|
|
|
10
9
|
## DESCRIPTION
|
|
11
10
|
|
|
@@ -25,7 +24,3 @@ installed on the local machine, if they satisfy the requirements.
|
|
|
25
24
|
|
|
26
25
|
* `--gemfile=GEMFILE`:
|
|
27
26
|
Use the specified gemfile instead of the [`Gemfile(5)`][Gemfile(5)].
|
|
28
|
-
|
|
29
|
-
* `--path=PATH`:
|
|
30
|
-
Specify a different path than the system default (`$BUNDLE_PATH` or `$GEM_HOME`).
|
|
31
|
-
Bundler will remember this value for future installs on this machine.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.\" generated with Ronn-NG/v0.10.1
|
|
2
2
|
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
|
3
|
-
.TH "BUNDLE\-CLEAN" "1" "
|
|
3
|
+
.TH "BUNDLE\-CLEAN" "1" "September 2025" ""
|
|
4
4
|
.SH "NAME"
|
|
5
5
|
\fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory
|
|
6
6
|
.SH "SYNOPSIS"
|