summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2025-06-10 16:11:57 +0200
committerHiroshi SHIBATA <[email protected]>2025-06-19 10:23:36 +0900
commit441f18df5279ba8f921015dcdd9ed1e7299660e9 ()
treeb2d689dc543e951341008ccf97a468fb76938db6 /lib
parent471da0f0bd8adcff4a32d51fcf5fe8828f05d6b0 (diff)
Skip to Bundler 4 directly
-rw-r--r--lib/bundler/cli.rb2
-rw-r--r--lib/bundler/cli/config.rb2
-rw-r--r--lib/bundler/cli/update.rb2
-rw-r--r--lib/bundler/dsl.rb2
-rw-r--r--lib/bundler/environment_preserver.rb2
-rw-r--r--lib/bundler/feature_flag.rb24
-rw-r--r--lib/bundler/self_manager.rb2
-rw-r--r--lib/bundler/source/git/git_proxy.rb2
-rw-r--r--lib/bundler/source_map.rb2
-rw-r--r--lib/bundler/version.rb2
10 files changed, 21 insertions, 21 deletions
@@ -512,7 +512,7 @@ module Bundler
end
end
- unless Bundler.feature_flag.bundler_3_mode?
desc "viz [OPTIONS]", "Generates a visual dependency graph", hide: true
long_desc <<-D
Viz generates a PNG file of the current Gemfile as a dependency graph.
@@ -27,7 +27,7 @@ module Bundler
message = "Using the `config` command without a subcommand [list, get, set, unset] is deprecated and will be removed in the future. Use `bundle #{new_args.join(" ")}` instead."
removed_message = "Using the `config` command without a subcommand [list, get, set, unset] has been removed. Use `bundle #{new_args.join(" ")}` instead."
- SharedHelpers.major_deprecation 3, message, removed_message: removed_message
Base.new(options, name, value, self).run
end
@@ -26,7 +26,7 @@ module Bundler
if Bundler.feature_flag.update_requires_all_flag?
raise InvalidOption, "To update everything, pass the `--all` flag."
end
- SharedHelpers.major_deprecation 3, "Pass --all to `bundle update` to update everything"
elsif !full_update && options[:all]
raise InvalidOption, "Cannot specify --all along with specific options."
end
@@ -521,7 +521,7 @@ module Bundler
end
def multiple_global_source_warning
- if Bundler.feature_flag.bundler_3_mode?
msg = "This Gemfile contains multiple global sources. " \
"Each source after the first must include a block to indicate which gems " \
"should come from that source"
@@ -6,7 +6,7 @@ module Bundler
BUNDLER_KEYS = %w[
BUNDLE_BIN_PATH
BUNDLE_GEMFILE
- BUNDLER_3_MODE
BUNDLER_VERSION
BUNDLER_SETUP
GEM_HOME
@@ -27,20 +27,20 @@ module Bundler
(1..10).each {|v| define_method("bundler_#{v}_mode?") { @major_version >= v } }
- settings_flag(:allow_offline_install) { bundler_3_mode? }
- settings_flag(:auto_clean_without_path) { bundler_3_mode? }
- settings_flag(:cache_all) { bundler_3_mode? }
- settings_flag(:default_install_uses_path) { bundler_3_mode? }
- settings_flag(:forget_cli_options) { bundler_3_mode? }
- settings_flag(:global_gem_cache) { bundler_3_mode? }
- settings_flag(:lockfile_checksums) { bundler_3_mode? }
- settings_flag(:path_relative_to_cwd) { bundler_3_mode? }
settings_flag(:plugins) { @bundler_version >= Gem::Version.new("1.14") }
- settings_flag(:print_only_version_number) { bundler_3_mode? }
- settings_flag(:setup_makes_kernel_gem_public) { !bundler_3_mode? }
- settings_flag(:update_requires_all_flag) { bundler_4_mode? }
- settings_option(:default_cli_command) { bundler_3_mode? ? :cli_help : :install }
def initialize(bundler_version)
@bundler_version = Gem::Version.create(bundler_version)
@@ -105,7 +105,7 @@ module Bundler
def autoswitching_applies?
ENV["BUNDLER_VERSION"].nil? &&
- ENV["BUNDLER_3_MODE"].nil? &&
ruby_can_restart_with_same_arguments? &&
lockfile_version
end
@@ -408,7 +408,7 @@ module Bundler
def capture3_args_for(cmd, dir)
return ["git", *cmd] unless dir
- if Bundler.feature_flag.bundler_3_mode? || supports_minus_c?
["git", "-C", dir.to_s, *cmd]
else
["git", *cmd, { chdir: dir.to_s }]
@@ -23,7 +23,7 @@ module Bundler
if previous_source.nil?
requirements[indirect_dependency_name] = source
else
- no_ambiguous_sources = Bundler.feature_flag.bundler_3_mode?
msg = ["The gem '#{indirect_dependency_name}' was found in multiple relevant sources."]
msg.concat [previous_source, source].map {|s| " * #{s}" }.sort
@@ -1,7 +1,7 @@
# frozen_string_literal: false
module Bundler
- VERSION = (ENV["BUNDLER_3_MODE"] == "true" ? "3.0.0" : "2.7.0.dev").freeze
def self.bundler_major_version
@bundler_major_version ||= VERSION.split(".").first.to_i