aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2013-01-12 00:30:38 -0800
committerAndre Arko <andre@arko.net>2013-09-28 12:52:24 -0700
commit5efd1c5f7e2e6a8baa80c1284579b561b63a912e (patch)
treedbb012db855731234dd1047a8deb6a9481a2197d /lib/bundler
parente82fde44e9d0a73efd1c88689210c7437673c82c (diff)
downloadbundler-5efd1c5f7e2e6a8baa80c1284579b561b63a912e.tar.gz
extract into Bundler.ruby_version
Diffstat (limited to 'lib/bundler')
-rw-r--r--lib/bundler/definition.rb5
-rw-r--r--lib/bundler/installer.rb2
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 4e538e61..6c6a60b1 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -369,8 +369,7 @@ module Bundler
def validate_ruby!
return unless ruby_version
- system_ruby_version = Bundler::SystemRubyVersion.new
- if diff = ruby_version.diff(system_ruby_version)
+ if diff = ruby_version.diff(Bundler.ruby_version)
problem, expected, actual = diff
msg = case problem
@@ -379,7 +378,7 @@ module Bundler
when :version
"Your Ruby version is #{actual}, but your Gemfile specified #{expected}"
when :engine_version
- "Your #{system_ruby_version.engine} version is #{actual}, but your Gemfile specified #{ruby_version.engine} #{expected}"
+ "Your #{Bundler.ruby_version.engine} version is #{actual}, but your Gemfile specified #{ruby_version.engine} #{expected}"
when :patchlevel
"Your Ruby patchlevel is #{actual}, but your Gemfile specified #{expected}"
end
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb
index 7470248c..ebc36f4c 100644
--- a/lib/bundler/installer.rb
+++ b/lib/bundler/installer.rb
@@ -250,7 +250,7 @@ module Bundler
spec.require_paths.each do |path|
full_path = File.join(spec.full_gem_path, path)
gem_path = Pathname.new(full_path).relative_path_from(Bundler.root.join(bundler_path))
- paths << gem_path.to_s.sub("#{SystemRubyVersion.new.engine}/#{RbConfig::CONFIG['ruby_version']}", '#{ruby_engine}/#{ruby_version}')
+ paths << gem_path.to_s.sub("#{Bundler.ruby_version.engine}/#{RbConfig::CONFIG['ruby_version']}", '#{ruby_engine}/#{ruby_version}')
end
end