bundler 2.6.5 → 2.7.1
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 +1172 -1024
- data/README.md +7 -7
- data/bundler.gemspec +2 -2
- data/lib/bundler/build_metadata.rb +10 -11
- data/lib/bundler/checksum.rb +22 -12
- data/lib/bundler/cli/common.rb +1 -1
- data/lib/bundler/cli/config.rb +2 -2
- data/lib/bundler/cli/doctor/diagnose.rb +167 -0
- data/lib/bundler/cli/doctor/ssl.rb +249 -0
- data/lib/bundler/cli/doctor.rb +27 -155
- data/lib/bundler/cli/gem.rb +62 -30
- data/lib/bundler/cli/inject.rb +2 -2
- data/lib/bundler/cli/install.rb +5 -5
- data/lib/bundler/cli/issue.rb +2 -2
- data/lib/bundler/cli/lock.rb +2 -1
- data/lib/bundler/cli/outdated.rb +1 -1
- data/lib/bundler/cli/update.rb +3 -3
- data/lib/bundler/cli.rb +26 -49
- data/lib/bundler/compact_index_client/cache.rb +1 -1
- data/lib/bundler/compact_index_client/parser.rb +1 -1
- data/lib/bundler/compact_index_client/updater.rb +2 -1
- data/lib/bundler/compact_index_client.rb +1 -5
- data/lib/bundler/current_ruby.rb +27 -3
- data/lib/bundler/definition.rb +184 -151
- data/lib/bundler/dependency.rb +1 -1
- data/lib/bundler/dsl.rb +35 -26
- data/lib/bundler/errors.rb +18 -0
- data/lib/bundler/feature_flag.rb +15 -12
- data/lib/bundler/fetcher/dependency.rb +2 -1
- data/lib/bundler/fetcher/downloader.rb +33 -7
- data/lib/bundler/fetcher.rb +49 -19
- data/lib/bundler/friendly_errors.rb +3 -2
- data/lib/bundler/index.rb +7 -2
- data/lib/bundler/injector.rb +9 -9
- data/lib/bundler/installer.rb +6 -5
- data/lib/bundler/lazy_specification.rb +38 -19
- data/lib/bundler/lockfile_parser.rb +29 -10
- 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 +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 +175 -129
- data/lib/bundler/man/bundle-config.1.ronn +93 -88
- data/lib/bundler/man/bundle-console.1 +1 -1
- data/lib/bundler/man/bundle-doctor.1 +43 -4
- data/lib/bundler/man/bundle-doctor.1.ronn +48 -4
- data/lib/bundler/man/bundle-env.1 +1 -1
- data/lib/bundler/man/bundle-exec.1 +3 -3
- data/lib/bundler/man/bundle-exec.1.ronn +2 -2
- data/lib/bundler/man/bundle-fund.1 +1 -1
- data/lib/bundler/man/bundle-gem.1 +67 -44
- data/lib/bundler/man/bundle-gem.1.ronn +8 -4
- 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-inject.1 +2 -2
- data/lib/bundler/man/bundle-inject.1.ronn +1 -1
- data/lib/bundler/man/bundle-install.1 +4 -4
- data/lib/bundler/man/bundle-install.1.ronn +3 -4
- 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 +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 +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 +4 -4
- 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 +1 -1
- data/lib/bundler/match_platform.rb +31 -12
- data/lib/bundler/materialization.rb +2 -2
- data/lib/bundler/plugin/api/source.rb +1 -1
- data/lib/bundler/plugin/index.rb +1 -1
- data/lib/bundler/plugin/installer/path.rb +8 -0
- data/lib/bundler/plugin.rb +1 -1
- data/lib/bundler/resolver/candidate.rb +12 -9
- data/lib/bundler/resolver/package.rb +1 -1
- data/lib/bundler/resolver/strategy.rb +40 -0
- data/lib/bundler/resolver.rb +18 -27
- data/lib/bundler/rubygems_ext.rb +131 -120
- data/lib/bundler/rubygems_integration.rb +11 -6
- data/lib/bundler/runtime.rb +9 -6
- data/lib/bundler/self_manager.rb +32 -42
- data/lib/bundler/settings/validator.rb +0 -23
- data/lib/bundler/settings.rb +4 -6
- data/lib/bundler/shared_helpers.rb +10 -4
- data/lib/bundler/source/gemspec.rb +1 -4
- data/lib/bundler/source/git/git_proxy.rb +17 -6
- data/lib/bundler/source/git.rb +5 -1
- data/lib/bundler/source/path.rb +9 -2
- data/lib/bundler/source/rubygems/remote.rb +11 -3
- data/lib/bundler/source_list.rb +30 -16
- data/lib/bundler/source_map.rb +1 -1
- data/lib/bundler/spec_set.rb +55 -16
- data/lib/bundler/templates/Executable +0 -11
- data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +2 -0
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +6 -5
- data/lib/bundler/ui/shell.rb +2 -2
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +53 -3
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
- data/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +11 -0
- data/lib/bundler/vendor/net-http-persistent/README.rdoc +1 -1
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +2 -1
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +81 -42
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb +4 -24
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/strategy.rb +42 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +20 -8
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +17 -29
- data/lib/bundler/vendor/uri/lib/uri/common.rb +7 -3
- data/lib/bundler/vendor/uri/lib/uri/generic.rb +12 -11
- data/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +6 -6
- data/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
- data/lib/bundler/version.rb +10 -2
- data/lib/bundler/worker.rb +1 -1
- data/lib/bundler.rb +14 -12
- metadata +9 -16
- data/lib/bundler/compact_index_client/gem_parser.rb +0 -32
- data/lib/bundler/gem_helpers.rb +0 -144
- data/lib/bundler/templates/Executable.bundler +0 -109
- data/lib/bundler/vendor/connection_pool/.document +0 -1
- data/lib/bundler/vendor/fileutils/.document +0 -1
- data/lib/bundler/vendor/net-http-persistent/.document +0 -1
- data/lib/bundler/vendor/pub_grub/.document +0 -1
- data/lib/bundler/vendor/securerandom/.document +0 -1
- data/lib/bundler/vendor/thor/.document +0 -1
- data/lib/bundler/vendor/tsort/.document +0 -1
- data/lib/bundler/vendor/uri/.document +0 -1
data/lib/bundler/cli.rb
CHANGED
@@ -77,7 +77,7 @@ module Bundler
|
|
77
77
|
self.options ||= {}
|
78
78
|
unprinted_warnings = Bundler.ui.unprinted_warnings
|
79
79
|
Bundler.ui = UI::Shell.new(options)
|
80
|
-
Bundler.ui.level = "debug" if options[
|
80
|
+
Bundler.ui.level = "debug" if options[:verbose] || Bundler.settings[:verbose]
|
81
81
|
unprinted_warnings.each {|w| Bundler.ui.warn(w) }
|
82
82
|
end
|
83
83
|
|
@@ -130,7 +130,7 @@ module Bundler
|
|
130
130
|
|
131
131
|
if man_pages.include?(command)
|
132
132
|
man_page = man_pages[command]
|
133
|
-
if Bundler.which("man") && !man_path.match?(%r{^file
|
133
|
+
if Bundler.which("man") && !man_path.match?(%r{^(?:file:/.+!|uri:classloader:)/META-INF/jruby.home/.+})
|
134
134
|
Kernel.exec("man", man_page)
|
135
135
|
else
|
136
136
|
puts File.read("#{man_path}/#{File.basename(man_page)}.ronn")
|
@@ -220,7 +220,7 @@ module Bundler
|
|
220
220
|
method_option "local", type: :boolean, banner: "Do not attempt to fetch gems remotely and use the gem cache instead"
|
221
221
|
method_option "prefer-local", type: :boolean, banner: "Only attempt to fetch gems remotely if not present locally, even if newer versions are available remotely"
|
222
222
|
method_option "no-cache", type: :boolean, banner: "Don't update the existing gem cache."
|
223
|
-
method_option "
|
223
|
+
method_option "force", type: :boolean, aliases: "--redownload", banner: "Force reinstalling every gem, even if already installed"
|
224
224
|
method_option "no-prune", type: :boolean, banner: "Don't remove stale gems from the cache."
|
225
225
|
method_option "path", type: :string, banner: "Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME).#{" Bundler will remember this value for future installs on this machine" unless Bundler.feature_flag.forget_cli_options?}"
|
226
226
|
method_option "quiet", type: :boolean, banner: "Only output warnings and errors."
|
@@ -232,15 +232,13 @@ module Bundler
|
|
232
232
|
method_option "without", type: :array, banner: "Exclude gems that are part of the specified named group."
|
233
233
|
method_option "with", type: :array, banner: "Include gems that are part of the specified named group."
|
234
234
|
def install
|
235
|
-
SharedHelpers.major_deprecation(2, "The `--force` option has been renamed to `--redownload`") if ARGV.include?("--force")
|
236
|
-
|
237
235
|
%w[clean deployment frozen no-prune path shebang without with].each do |option|
|
238
236
|
remembered_flag_deprecation(option)
|
239
237
|
end
|
240
238
|
|
241
239
|
print_remembered_flag_deprecation("--system", "path.system", "true") if ARGV.include?("--system")
|
242
240
|
|
243
|
-
|
241
|
+
remembered_flag_deprecation("deployment", negative: true)
|
244
242
|
|
245
243
|
require_relative "cli/install"
|
246
244
|
Bundler.settings.temporary(no_install: false) do
|
@@ -263,7 +261,7 @@ module Bundler
|
|
263
261
|
method_option "local", type: :boolean, banner: "Do not attempt to fetch gems remotely and use the gem cache instead"
|
264
262
|
method_option "quiet", type: :boolean, banner: "Only output warnings and errors."
|
265
263
|
method_option "source", type: :array, banner: "Update a specific source (and all gems associated with it)"
|
266
|
-
method_option "
|
264
|
+
method_option "force", type: :boolean, aliases: "--redownload", banner: "Force reinstalling every gem, even if already installed"
|
267
265
|
method_option "ruby", type: :boolean, banner: "Update ruby specified in Gemfile.lock"
|
268
266
|
method_option "bundler", type: :string, lazy_default: "> 0.a", banner: "Update the locked version of bundler"
|
269
267
|
method_option "patch", type: :boolean, banner: "Prefer updating only to next patch version"
|
@@ -274,7 +272,6 @@ module Bundler
|
|
274
272
|
method_option "conservative", type: :boolean, banner: "Use bundle install conservative update behavior and do not allow shared dependencies to be updated."
|
275
273
|
method_option "all", type: :boolean, banner: "Update everything."
|
276
274
|
def update(*gems)
|
277
|
-
SharedHelpers.major_deprecation(2, "The `--force` option has been renamed to `--redownload`") if ARGV.include?("--force")
|
278
275
|
require_relative "cli/update"
|
279
276
|
Bundler.settings.temporary(no_install: false) do
|
280
277
|
Update.new(options, gems).run
|
@@ -331,6 +328,8 @@ module Bundler
|
|
331
328
|
method_option "all", type: :boolean, banner: "Install binstubs for all gems"
|
332
329
|
method_option "all-platforms", type: :boolean, default: false, banner: "Install binstubs for all platforms"
|
333
330
|
def binstubs(*gems)
|
331
|
+
remembered_flag_deprecation("path", option_name: "bin")
|
332
|
+
|
334
333
|
require_relative "cli/binstubs"
|
335
334
|
Binstubs.new(options, gems).run
|
336
335
|
end
|
@@ -414,7 +413,7 @@ module Bundler
|
|
414
413
|
def cache
|
415
414
|
print_remembered_flag_deprecation("--all", "cache_all", "true") if ARGV.include?("--all")
|
416
415
|
|
417
|
-
if
|
416
|
+
if flag_passed?("--path")
|
418
417
|
message =
|
419
418
|
"The `--path` flag is deprecated because its semantics are unclear. " \
|
420
419
|
"Use `bundle config cache_path` to configure the path of your cache of gems, " \
|
@@ -486,13 +485,13 @@ module Bundler
|
|
486
485
|
def version
|
487
486
|
cli_help = current_command.name == "cli_help"
|
488
487
|
if cli_help || ARGV.include?("version")
|
489
|
-
build_info = " (#{BuildMetadata.
|
488
|
+
build_info = " (#{BuildMetadata.timestamp} commit #{BuildMetadata.git_commit_sha})"
|
490
489
|
end
|
491
490
|
|
492
|
-
if !cli_help && Bundler.feature_flag.
|
493
|
-
Bundler.ui.info "#{Bundler
|
491
|
+
if !cli_help && Bundler.feature_flag.bundler_4_mode?
|
492
|
+
Bundler.ui.info "#{Bundler.verbose_version}#{build_info}"
|
494
493
|
else
|
495
|
-
Bundler.ui.info "Bundler version #{Bundler
|
494
|
+
Bundler.ui.info "Bundler version #{Bundler.verbose_version}#{build_info}"
|
496
495
|
end
|
497
496
|
end
|
498
497
|
|
@@ -512,7 +511,7 @@ module Bundler
|
|
512
511
|
end
|
513
512
|
end
|
514
513
|
|
515
|
-
unless Bundler.feature_flag.
|
514
|
+
unless Bundler.feature_flag.bundler_4_mode?
|
516
515
|
desc "viz [OPTIONS]", "Generates a visual dependency graph", hide: true
|
517
516
|
long_desc <<-D
|
518
517
|
Viz generates a PNG file of the current Gemfile as a dependency graph.
|
@@ -544,6 +543,7 @@ module Bundler
|
|
544
543
|
method_option :ci, type: :string, lazy_default: Bundler.settings["gem.ci"] || "", enum: %w[github gitlab circle], desc: "Generate CI configuration, either GitHub Actions, GitLab CI or CircleCI. Set a default with `bundle config set --global gem.ci (github|gitlab|circle)`"
|
545
544
|
method_option :linter, type: :string, lazy_default: Bundler.settings["gem.linter"] || "", enum: %w[rubocop standard], desc: "Add a linter and code formatter, either RuboCop or Standard. Set a default with `bundle config set --global gem.linter (rubocop|standard)`"
|
546
545
|
method_option :github_username, type: :string, default: Bundler.settings["gem.github_username"], banner: "Set your username on GitHub", desc: "Fill in GitHub username on README so that you don't have to do it manually. Set a default with `bundle config set --global gem.github_username <your_username>`."
|
546
|
+
method_option :bundle, type: :boolean, default: Bundler.settings["gem.bundle"], desc: "Automatically run `bundle install` after creation. Set a default with `bundle config set --global gem.bundle true`"
|
547
547
|
|
548
548
|
def gem(name)
|
549
549
|
require_relative "cli/gem"
|
@@ -610,17 +610,8 @@ module Bundler
|
|
610
610
|
end
|
611
611
|
|
612
612
|
desc "doctor [OPTIONS]", "Checks the bundle for common problems"
|
613
|
-
|
614
|
-
|
615
|
-
missing dependencies are detected, Bundler prints them and exits status 1.
|
616
|
-
Otherwise, Bundler prints a success message and exits with a status of 0.
|
617
|
-
D
|
618
|
-
method_option "gemfile", type: :string, banner: "Use the specified gemfile instead of Gemfile"
|
619
|
-
method_option "quiet", type: :boolean, banner: "Only output warnings and errors."
|
620
|
-
def doctor
|
621
|
-
require_relative "cli/doctor"
|
622
|
-
Doctor.new(options).run
|
623
|
-
end
|
613
|
+
require_relative "cli/doctor"
|
614
|
+
subcommand("doctor", Doctor)
|
624
615
|
|
625
616
|
desc "issue", "Learn how to report an issue in Bundler"
|
626
617
|
def issue
|
@@ -722,14 +713,9 @@ module Bundler
|
|
722
713
|
command_name = cmd.name
|
723
714
|
return if PARSEABLE_COMMANDS.include?(command_name)
|
724
715
|
command = ["bundle", command_name] + args
|
725
|
-
|
726
|
-
options_to_print.delete_if do |k, v|
|
727
|
-
next unless o = cmd.options[k]
|
728
|
-
o.default == v
|
729
|
-
end
|
730
|
-
command << Thor::Options.to_switches(options_to_print.sort_by(&:first)).strip
|
716
|
+
command << Thor::Options.to_switches(options.sort_by(&:first)).strip
|
731
717
|
command.reject!(&:empty?)
|
732
|
-
Bundler.ui.info "Running `#{command * " "}` with bundler #{Bundler
|
718
|
+
Bundler.ui.info "Running `#{command * " "}` with bundler #{Bundler.verbose_version}"
|
733
719
|
end
|
734
720
|
|
735
721
|
def warn_on_outdated_bundler
|
@@ -756,30 +742,17 @@ module Bundler
|
|
756
742
|
nil
|
757
743
|
end
|
758
744
|
|
759
|
-
def
|
760
|
-
positive_name = name.gsub(/\Ano-/, "")
|
761
|
-
option = current_command.options[positive_name]
|
762
|
-
flag_name = "--no-" + option.switch_name.gsub(/\A--/, "")
|
763
|
-
|
764
|
-
flag_deprecation(positive_name, flag_name, option)
|
765
|
-
end
|
766
|
-
|
767
|
-
def remembered_flag_deprecation(name)
|
745
|
+
def remembered_flag_deprecation(name, negative: false, option_name: nil)
|
768
746
|
option = current_command.options[name]
|
769
747
|
flag_name = option.switch_name
|
770
|
-
|
771
|
-
|
772
|
-
end
|
773
|
-
|
774
|
-
def flag_deprecation(name, flag_name, option)
|
775
|
-
name_index = ARGV.find {|arg| flag_name == arg.split("=")[0] }
|
776
|
-
return unless name_index
|
748
|
+
flag_name = "--no-" + flag_name.gsub(/\A--/, "") if negative
|
749
|
+
return unless flag_passed?(flag_name)
|
777
750
|
|
778
751
|
value = options[name]
|
779
752
|
value = value.join(" ").to_s if option.type == :array
|
780
753
|
value = "'#{value}'" unless option.type == :boolean
|
781
754
|
|
782
|
-
print_remembered_flag_deprecation(flag_name, name.tr("-", "_"), value)
|
755
|
+
print_remembered_flag_deprecation(flag_name, option_name || name.tr("-", "_"), value)
|
783
756
|
end
|
784
757
|
|
785
758
|
def print_remembered_flag_deprecation(flag_name, option_name, option_value)
|
@@ -795,5 +768,9 @@ module Bundler
|
|
795
768
|
"#{option_value}`, and stop using this flag"
|
796
769
|
Bundler::SharedHelpers.major_deprecation 2, message, removed_message: removed_message
|
797
770
|
end
|
771
|
+
|
772
|
+
def flag_passed?(name)
|
773
|
+
ARGV.any? {|arg| name == arg.split("=")[0] }
|
774
|
+
end
|
798
775
|
end
|
799
776
|
end
|
@@ -37,7 +37,8 @@ module Bundler
|
|
37
37
|
file.digests = parse_digests(response)
|
38
38
|
# server may ignore Range and return the full response
|
39
39
|
if response.is_a?(Gem::Net::HTTPPartialContent)
|
40
|
-
|
40
|
+
tail = response.body.byteslice(1..-1)
|
41
|
+
break false unless tail && file.append(tail)
|
41
42
|
else
|
42
43
|
file.write(response.body)
|
43
44
|
end
|
@@ -28,11 +28,7 @@ module Bundler
|
|
28
28
|
# It may be called concurrently without global interpreter lock in some Rubies.
|
29
29
|
# As a result, some methods may look more complex than necessary to save memory or time.
|
30
30
|
class CompactIndexClient
|
31
|
-
|
32
|
-
# because we use it to generate the etag on first request during the upgrade
|
33
|
-
# to the compact index client that uses opaque etags saved to files.
|
34
|
-
# Remove once 2.5.0 has been out for a while.
|
35
|
-
SUPPORTED_DIGESTS = { "sha-256" => :SHA256, "md5" => :MD5 }.freeze
|
31
|
+
SUPPORTED_DIGESTS = { "sha-256" => :SHA256 }.freeze
|
36
32
|
DEBUG_MUTEX = Thread::Mutex.new
|
37
33
|
|
38
34
|
# info returns an Array of INFO Arrays. Each INFO Array has the following indices:
|
data/lib/bundler/current_ruby.rb
CHANGED
@@ -32,7 +32,7 @@ module Bundler
|
|
32
32
|
end.freeze
|
33
33
|
|
34
34
|
def ruby?
|
35
|
-
return true if Bundler::
|
35
|
+
return true if Bundler::MatchPlatform.generic_local_platform_is_ruby?
|
36
36
|
|
37
37
|
!windows? && (RUBY_ENGINE == "ruby" || RUBY_ENGINE == "rbx" || RUBY_ENGINE == "maglev" || RUBY_ENGINE == "truffleruby")
|
38
38
|
end
|
@@ -50,6 +50,18 @@ module Bundler
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def maglev?
|
53
|
+
message =
|
54
|
+
"`CurrentRuby#maglev?` is deprecated with no replacement. Please use the " \
|
55
|
+
"built-in Ruby `RUBY_ENGINE` constant to check the Ruby implementation you are running on."
|
56
|
+
removed_message =
|
57
|
+
"`CurrentRuby#maglev?` was removed with no replacement. Please use the " \
|
58
|
+
"built-in Ruby `RUBY_ENGINE` constant to check the Ruby implementation you are running on."
|
59
|
+
internally_exempted = caller_locations(1, 1).first.path == __FILE__
|
60
|
+
|
61
|
+
unless internally_exempted
|
62
|
+
SharedHelpers.major_deprecation(2, message, removed_message: removed_message, print_caller_location: true)
|
63
|
+
end
|
64
|
+
|
53
65
|
RUBY_ENGINE == "maglev"
|
54
66
|
end
|
55
67
|
|
@@ -71,12 +83,24 @@ module Bundler
|
|
71
83
|
RUBY_VERSION.start_with?("#{version}.")
|
72
84
|
end
|
73
85
|
|
74
|
-
|
75
|
-
all_platforms.each do |platform|
|
86
|
+
PLATFORM_MAP.keys.each do |platform|
|
76
87
|
define_method(:"#{platform}_#{trimmed_version}?") do
|
77
88
|
send(:"#{platform}?") && send(:"on_#{trimmed_version}?")
|
78
89
|
end
|
79
90
|
end
|
91
|
+
|
92
|
+
define_method(:"maglev_#{trimmed_version}?") do
|
93
|
+
message =
|
94
|
+
"`CurrentRuby##{__method__}` is deprecated with no replacement. Please use the " \
|
95
|
+
"built-in Ruby `RUBY_ENGINE` and `RUBY_VERSION` constants to perform a similar check."
|
96
|
+
removed_message =
|
97
|
+
"`CurrentRuby##{__method__}` was removed with no replacement. Please use the " \
|
98
|
+
"built-in Ruby `RUBY_ENGINE` and `RUBY_VERSION` constants to perform a similar check."
|
99
|
+
|
100
|
+
SharedHelpers.major_deprecation(2, message, removed_message: removed_message, print_caller_location: true)
|
101
|
+
|
102
|
+
send(:"maglev?") && send(:"on_#{trimmed_version}?")
|
103
|
+
end
|
80
104
|
end
|
81
105
|
end
|
82
106
|
end
|