summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHomu <homu@barosl.com>2016-09-02 23:39:46 +0900
committerHomu <homu@barosl.com>2016-09-02 23:39:46 +0900
commit5f6af54ffba96922bb86137c7b8c08a46556e5ff (patch)
treeaa447508607caf2c4b9197554a5957b96d692993
parent30441cb9c8d1f0e4c580a248375894d05d073936 (diff)
parent917272a913f414bcceb4e593cc53c5b14747dc86 (diff)
downloadbundler-5f6af54ffba96922bb86137c7b8c08a46556e5ff.tar.gz
Auto merge of #4892 - bundler:seg-revert-infer-ruby-version, r=segiddins
Revert inferring from .ruby-version See https://github.com/bundler/bundler/issues/4856. Reverts most of https://github.com/bundler/bundler/pull/4036
-rw-r--r--lib/bundler/dsl.rb7
-rw-r--r--spec/other/platform_spec.rb12
2 files changed, 0 insertions, 19 deletions
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb
index abfa1337ab..0f6098b27c 100644
--- a/lib/bundler/dsl.rb
+++ b/lib/bundler/dsl.rb
@@ -37,7 +37,6 @@ module Bundler
@gemfile = Pathname.new(gemfile)
contents ||= Bundler.read_file(gemfile.to_s)
instance_eval(contents, gemfile.to_s, 1)
- infer_ruby_version(gemfile)
rescue Exception => e
message = "There was an error " \
"#{e.is_a?(GemfileEvalError) ? "evaluating" : "parsing"} " \
@@ -418,12 +417,6 @@ module Bundler
" end", true
end
- def infer_ruby_version(gemfile)
- return if @ruby_version
- ruby_version_path = gemfile.parent + ".ruby-version"
- ruby(ruby_version_path.read.strip) if ruby_version_path.file?
- end
-
class DSLError < GemfileError
# @return [String] the description that should be presented to the user.
#
diff --git a/spec/other/platform_spec.rb b/spec/other/platform_spec.rb
index 299d91d55f..55cf6d0231 100644
--- a/spec/other/platform_spec.rb
+++ b/spec/other/platform_spec.rb
@@ -118,18 +118,6 @@ G
expect(out).to eq("ruby 1.9.3")
end
- it "infers from .ruby-version" do
- gemfile <<-G
- source "file://#{gem_repo1}"
- gem "foo"
- G
- create_file(".ruby-version", "2.2.3\n")
-
- bundle "platform --ruby"
-
- expect(out).to eq("ruby 2.2.3")
- end
-
it "handles jruby" do
gemfile <<-G
source "file://#{gem_repo1}"