Add note about removing patch fix and add test
This commit is contained in:
parent
e2097be55e
commit
757175b94e
|
@ -12,8 +12,6 @@ require "rubygems/name_tuple"
|
||||||
require_relative "shared_helpers"
|
require_relative "shared_helpers"
|
||||||
require_relative "version"
|
require_relative "version"
|
||||||
require_relative "util/safe_env"
|
require_relative "util/safe_env"
|
||||||
require_relative "util/platform"
|
|
||||||
require "vagrant/util/subprocess"
|
|
||||||
|
|
||||||
module Vagrant
|
module Vagrant
|
||||||
# This class manages Vagrant's interaction with Bundler. Vagrant uses
|
# This class manages Vagrant's interaction with Bundler. Vagrant uses
|
||||||
|
@ -43,6 +41,9 @@ module Vagrant
|
||||||
@plugin_gem_path = Vagrant.user_data_path.join("gems", RUBY_VERSION).freeze
|
@plugin_gem_path = Vagrant.user_data_path.join("gems", RUBY_VERSION).freeze
|
||||||
@logger = Log4r::Logger.new("vagrant::bundler")
|
@logger = Log4r::Logger.new("vagrant::bundler")
|
||||||
|
|
||||||
|
# TODO: Remove fix when https://github.com/rubygems/rubygems/pull/2735
|
||||||
|
# gets merged and released
|
||||||
|
#
|
||||||
# Because of a rubygems bug, we need to set the gemrc file path
|
# Because of a rubygems bug, we need to set the gemrc file path
|
||||||
# through this method rather than relying on the environment varible
|
# through this method rather than relying on the environment varible
|
||||||
# GEMRC. On windows, that path gets split on `:`: and `;`, which means
|
# GEMRC. On windows, that path gets split on `:`: and `;`, which means
|
||||||
|
|
|
@ -28,6 +28,19 @@ describe Vagrant::Bundler do
|
||||||
expect(subject.env_plugin_gem_path).to be_nil
|
expect(subject.env_plugin_gem_path).to be_nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe "#initialize" do
|
||||||
|
let(:gemrc_location) { "C:\\My\\Config\\File" }
|
||||||
|
|
||||||
|
it "should set up GEMRC through a flag instead of GEMRC" do
|
||||||
|
allow(ENV).to receive(:[]).with("VAGRANT_HOME")
|
||||||
|
allow(ENV).to receive(:[]).with("USERPROFILE")
|
||||||
|
|
||||||
|
allow(ENV).to receive(:[]).with("GEMRC").and_return(gemrc_location)
|
||||||
|
expect(Gem::ConfigFile).to receive(:new).with(["--config-file", gemrc_location])
|
||||||
|
init_subject = described_class.new
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
describe "#deinit" do
|
describe "#deinit" do
|
||||||
it "should provide method for backwards compatibility" do
|
it "should provide method for backwards compatibility" do
|
||||||
subject.deinit
|
subject.deinit
|
||||||
|
|
Loading…
Reference in New Issue