зеркало из https://github.com/github/ruby.git
[bundler/bundler] Fully remove compatibility guard
https://github.com/bundler/bundler/commit/2a7a5daba0
This commit is contained in:
Родитель
452516f50f
Коммит
6fb73e6043
|
@ -1,7 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative "bundler/compatibility_guard"
|
||||
|
||||
require_relative "bundler/vendored_fileutils"
|
||||
require "pathname"
|
||||
require "rbconfig"
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
# frozen_string_literal: false
|
||||
|
||||
require_relative "version"
|
||||
|
||||
if Bundler::VERSION.split(".").first.to_i >= 2
|
||||
if Gem::Version.new(Object::RUBY_VERSION.dup) < Gem::Version.new("2.3")
|
||||
abort "Bundler 2 requires Ruby 2.3 or later. Either install bundler 1 or update to a supported Ruby version."
|
||||
end
|
||||
end
|
|
@ -1,7 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative "compatibility_guard"
|
||||
|
||||
# Allows for declaring a Gemfile inline in a ruby script, optionally installing
|
||||
# any gems that aren't already installed on the user's system.
|
||||
#
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative "compatibility_guard"
|
||||
|
||||
require "pathname"
|
||||
require "rbconfig"
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@ RSpec.describe "bundle install" do
|
|||
|
||||
simulate_bundler_version "99999999.99.1"
|
||||
|
||||
bundle! "check", :env => { "BUNDLER_SPEC_IGNORE_COMPATIBILITY_GUARD" => "1" }
|
||||
bundle! "check"
|
||||
expect(out).to include("The Gemfile's dependencies are satisfied")
|
||||
end
|
||||
|
||||
|
@ -153,7 +153,7 @@ RSpec.describe "bundle install" do
|
|||
|
||||
simulate_bundler_version "99999999.99.1"
|
||||
|
||||
bundle! "check", :env => { "BUNDLER_SPEC_IGNORE_COMPATIBILITY_GUARD" => "1" }
|
||||
bundle! "check"
|
||||
expect(out).to include("The Gemfile's dependencies are satisfied")
|
||||
end
|
||||
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
RSpec.describe "the lockfile format" do
|
||||
include Bundler::GemHelpers
|
||||
|
||||
before { ENV["BUNDLER_SPEC_IGNORE_COMPATIBILITY_GUARD"] = "TRUE" }
|
||||
|
||||
it "generates a simple lockfile for a single source, gem" do
|
||||
install_gemfile <<-G
|
||||
source "#{file_uri_for(gem_repo1)}"
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
RSpec.describe "bundler compatibility guard" do
|
||||
context "when the bundler version is 2+" do
|
||||
before { simulate_bundler_version "2.0.a" }
|
||||
|
||||
context "when running on Ruby < 2.3", :ruby => "< 2.3" do
|
||||
before { simulate_rubygems_version "2.6.11" }
|
||||
|
||||
it "raises a friendly error" do
|
||||
bundle :version
|
||||
expect(err).to eq("Bundler 2 requires Ruby 2.3 or later. Either install bundler 1 or update to a supported Ruby version.")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -59,11 +59,3 @@ class Object
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
if ENV["BUNDLER_SPEC_IGNORE_COMPATIBILITY_GUARD"]
|
||||
$LOADED_FEATURES << File.expand_path("../../../bundler/compatibility_guard.rb", __FILE__)
|
||||
$LOADED_FEATURES << File.expand_path("../../../bundler/compatibility_guard", __FILE__)
|
||||
$LOADED_FEATURES << "bundler/compatibility_guard.rb"
|
||||
$LOADED_FEATURES << "bundler/compatibility_guard"
|
||||
require "bundler/compatibility_guard"
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче