[bundler/bundler] Remove a bunch of unneeded rubygems requires

https://github.com/bundler/bundler/commit/f9cb39e614
This commit is contained in:
David Rodríguez 2019-08-03 12:22:36 +02:00 коммит произвёл Hiroshi SHIBATA
Родитель 7659f00a8d
Коммит f753961611
3 изменённых файлов: 0 добавлений и 20 удалений

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

@ -12,7 +12,6 @@ RSpec.describe "Bundler.setup" do
G
ruby <<-RUBY
require 'rubygems'
require 'bundler'
Bundler.setup
@ -35,7 +34,6 @@ RSpec.describe "Bundler.setup" do
it "doesn't make all groups available" do
ruby <<-RUBY
require 'rubygems'
require 'bundler'
Bundler.setup(:default)
@ -51,7 +49,6 @@ RSpec.describe "Bundler.setup" do
it "accepts string for group name" do
ruby <<-RUBY
require 'rubygems'
require 'bundler'
Bundler.setup(:default, 'test')
@ -64,7 +61,6 @@ RSpec.describe "Bundler.setup" do
it "leaves all groups available if they were already" do
ruby <<-RUBY
require 'rubygems'
require 'bundler'
Bundler.setup
Bundler.setup(:default)
@ -78,7 +74,6 @@ RSpec.describe "Bundler.setup" do
it "leaves :default available if setup is called twice" do
ruby <<-RUBY
require 'rubygems'
require 'bundler'
Bundler.setup(:default)
Bundler.setup(:default, :test)
@ -127,7 +122,6 @@ RSpec.describe "Bundler.setup" do
ENV["RUBYLIB"] = "rubylib_dir"
ruby <<-RUBY
require 'rubygems'
require 'bundler'
Bundler.setup
puts $LOAD_PATH
@ -150,7 +144,6 @@ RSpec.describe "Bundler.setup" do
G
ruby! <<-RUBY
require 'rubygems'
require 'bundler'
Bundler.setup
puts $LOAD_PATH
@ -179,7 +172,6 @@ RSpec.describe "Bundler.setup" do
G
ruby! <<-RUBY
require 'rubygems'
require 'bundler/setup'
puts $LOAD_PATH
RUBY
@ -201,7 +193,6 @@ RSpec.describe "Bundler.setup" do
G
ruby <<-R
require 'rubygems'
require 'bundler'
begin
@ -222,7 +213,6 @@ RSpec.describe "Bundler.setup" do
G
ruby <<-R
require 'rubygems'
require 'bundler'
Bundler.setup
@ -246,7 +236,6 @@ RSpec.describe "Bundler.setup" do
G
ruby <<-R
require 'rubygems'
require 'bundler'
Bundler.setup
@ -300,7 +289,6 @@ RSpec.describe "Bundler.setup" do
ENV["BUNDLE_GEMFILE"] = "Gemfile"
ruby <<-R
require 'rubygems'
require 'bundler'
begin
@ -456,7 +444,6 @@ RSpec.describe "Bundler.setup" do
break_git!
ruby <<-R
require 'rubygems'
require 'bundler'
begin
@ -478,7 +465,6 @@ RSpec.describe "Bundler.setup" do
break_git!
ruby <<-R
require "rubygems"
require "bundler"
begin
@ -937,8 +923,6 @@ end
it "does not pull in system gems" do
run <<-R
require 'rubygems'
begin;
require 'rack'
rescue LoadError
@ -1221,7 +1205,6 @@ end
let(:activation_warning_hack) { strip_whitespace(<<-RUBY) }
require #{spec_dir.join("support/hax").to_s.dump}
require "rubygems"
if Gem::Specification.instance_methods.map(&:to_sym).include?(:activate)
Gem::Specification.send(:alias_method, :bundler_spec_activate, :activate)

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

@ -44,7 +44,6 @@ class Endpoint < Sinatra::Base
def dependencies_for(gem_names, gem_repo = GEM_REPO)
return [] if gem_names.nil? || gem_names.empty?
require "rubygems"
require "bundler"
Bundler::Deprecate.skip_during do
all_specs = %w[specs.4.8 prerelease_specs.4.8].map do |filename|

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

@ -1,7 +1,5 @@
# frozen_string_literal: true
require "rubygems"
module Gem
if version = ENV["BUNDLER_SPEC_RUBYGEMS_VERSION"]
remove_const(:VERSION) if const_defined?(:VERSION)