diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-11-10 18:12:01 +0100 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-11-11 16:11:15 +0100 |
commit | fd84856cb2c1f377cbe67c2bf13124764dd95ad4 (patch) | |
tree | 16fa18c602dcc41a17f2e7d2fb9c6d9988ea9063 /spec/install | |
parent | cfacb05ed43db03a5214d85baed0ed3231550920 (diff) | |
download | bundler-fd84856cb2c1f377cbe67c2bf13124764dd95ad4.tar.gz |
Improve rubygems version overriding mechanism
Rely on adding a path with a `rubygems.rb` file to load paths in
RUBYOPT, instead of reexecing with `--disable-gems` and then explicitly
requiring the overriding file. By doing this, the correct override
mechanism is propagated around subprocesses.
Diffstat (limited to 'spec/install')
-rw-r--r-- | spec/install/gemfile/git_spec.rb | 3 | ||||
-rw-r--r-- | spec/install/gemfile/path_spec.rb | 3 |
2 files changed, 0 insertions, 6 deletions
diff --git a/spec/install/gemfile/git_spec.rb b/spec/install/gemfile/git_spec.rb index 08789820d8..00f8e96625 100644 --- a/spec/install/gemfile/git_spec.rb +++ b/spec/install/gemfile/git_spec.rb @@ -1056,7 +1056,6 @@ RSpec.describe "bundle install with git sources" do File.open(lib_path("install_hooks.rb"), "w") do |h| h.write <<-H - require '#{spec_dir}/support/rubygems' Gem.pre_install_hooks << lambda do |inst| STDERR.puts "Ran pre-install hook: \#{inst.spec.full_name}" end @@ -1076,7 +1075,6 @@ RSpec.describe "bundle install with git sources" do File.open(lib_path("install_hooks.rb"), "w") do |h| h.write <<-H - require '#{spec_dir}/support/rubygems' Gem.post_install_hooks << lambda do |inst| STDERR.puts "Ran post-install hook: \#{inst.spec.full_name}" end @@ -1096,7 +1094,6 @@ RSpec.describe "bundle install with git sources" do File.open(lib_path("install_hooks.rb"), "w") do |h| h.write <<-H - require '#{spec_dir}/support/rubygems' Gem.pre_install_hooks << lambda do |inst| false end diff --git a/spec/install/gemfile/path_spec.rb b/spec/install/gemfile/path_spec.rb index d8c8904f88..4176ee9f70 100644 --- a/spec/install/gemfile/path_spec.rb +++ b/spec/install/gemfile/path_spec.rb @@ -671,7 +671,6 @@ RSpec.describe "bundle install with explicit source paths" do File.open(lib_path("install_hooks.rb"), "w") do |h| h.write <<-H - require '#{spec_dir}/support/rubygems' Gem.pre_install_hooks << lambda do |inst| STDERR.puts "Ran pre-install hook: \#{inst.spec.full_name}" end @@ -691,7 +690,6 @@ RSpec.describe "bundle install with explicit source paths" do File.open(lib_path("install_hooks.rb"), "w") do |h| h.write <<-H - require '#{spec_dir}/support/rubygems' Gem.post_install_hooks << lambda do |inst| STDERR.puts "Ran post-install hook: \#{inst.spec.full_name}" end @@ -711,7 +709,6 @@ RSpec.describe "bundle install with explicit source paths" do File.open(lib_path("install_hooks.rb"), "w") do |h| h.write <<-H - require '#{spec_dir}/support/rubygems' Gem.pre_install_hooks << lambda do |inst| false end |