summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorankitkataria <ankitkataria28@gmail.com>2018-09-02 06:47:13 +0530
committerankitkataria <ankitkataria28@gmail.com>2018-09-02 06:50:38 +0530
commit94b71049f946a0cbcd9bc26f0eb6c83e3108d794 (patch)
treea222364044e3b7b0af823c68d200271f9c277b6e
parent546d0a52f6811ce19568822a60df47fbefb4cd76 (diff)
downloadbundler-94b71049f946a0cbcd9bc26f0eb6c83e3108d794.tar.gz
Uses logic from cli and removes redundant test
-rw-r--r--lib/bundler/cli/exec.rb2
-rw-r--r--lib/bundler/shared_helpers.rb5
-rw-r--r--spec/commands/exec_spec.rb7
3 files changed, 0 insertions, 14 deletions
diff --git a/lib/bundler/cli/exec.rb b/lib/bundler/cli/exec.rb
index 5c05f17db6..386565c575 100644
--- a/lib/bundler/cli/exec.rb
+++ b/lib/bundler/cli/exec.rb
@@ -23,8 +23,6 @@ module Bundler
def run
validate_cmd!
SharedHelpers.set_bundle_environment
- SharedHelpers.custom_gemfile(@options[:gemfile]) unless @options[:gemfile].nil?
-
if bin_path = Bundler.which(cmd)
if !Bundler.settings[:disable_exec_load] && ruby_shebang?(bin_path)
return kernel_load(bin_path, *args)
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb
index b3051b9f2e..7ff391ab60 100644
--- a/lib/bundler/shared_helpers.rb
+++ b/lib/bundler/shared_helpers.rb
@@ -230,11 +230,6 @@ module Bundler
filesystem_access(gemfile_path) {|g| File.open(g, "w") {|file| file.puts contents } }
end
- def custom_gemfile(gemfile)
- file = find_file(gemfile).to_s
- Bundler::SharedHelpers.set_env "BUNDLE_GEMFILE", file unless file.nil?
- end
-
private
def validate_bundle_path
diff --git a/spec/commands/exec_spec.rb b/spec/commands/exec_spec.rb
index 35b6b53d13..95c10c0a9f 100644
--- a/spec/commands/exec_spec.rb
+++ b/spec/commands/exec_spec.rb
@@ -11,15 +11,8 @@ RSpec.describe "bundle exec" do
gem "rack", "1.0.0"
G
- create_file "CustomGemfile2", <<-G
- gem "rack", "0.9.1"
- G
-
bundle "exec --gemfile CustomGemfile rackup"
expect(out).to eq("1.0.0")
-
- bundle "exec --gemfile CustomGemfile2 rackup"
- expect(out).to eq("0.9.1")
end
it "activates the correct gem" do