[bundler/bundler] Fully remove compatibility guard

https://github.com/bundler/bundler/commit/2a7a5daba0
This commit is contained in:
David Rodríguez 2019-03-21 16:32:35 +01:00 коммит произвёл Hiroshi SHIBATA
Родитель 452516f50f
Коммит 6fb73e6043
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: F9CF13417264FAC2
8 изменённых файлов: 2 добавлений и 43 удалений

Просмотреть файл

@ -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