diff options
author | Hemant Kumar <gethemant@gmail.com> | 2013-07-18 11:52:24 +0530 |
---|---|---|
committer | Hemant Kumar <gethemant@gmail.com> | 2013-07-18 11:54:56 +0530 |
commit | be64412a04229e778ecec4b6e9acc91430d58bcb (patch) | |
tree | 219efb2883ce982b3c6e8609bf36cbdf97bb995c /lib/bundler.rb | |
parent | b65fcc000681bcc102648b885770a9a7a90362ee (diff) | |
download | bundler-be64412a04229e778ecec4b6e9acc91430d58bcb.tar.gz |
Extract Current Ruby version/platform detection from dependency.rb
That can be reused across several places in bundler and hence
extracted that code which is responsible for properly
detecting current ruby version.
Diffstat (limited to 'lib/bundler.rb')
-rw-r--r-- | lib/bundler.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb index 969ad8c9..cb81c114 100644 --- a/lib/bundler.rb +++ b/lib/bundler.rb @@ -6,6 +6,7 @@ require 'bundler/rubygems_ext' require 'bundler/rubygems_integration' require 'bundler/version' require 'bundler/constants' +require 'bundler/current_ruby' module Bundler preserve_gem_path @@ -322,6 +323,14 @@ module Bundler end end + + # Returns current version of Ruby + # + # @return [CurrentRuby] Current version of Ruby + def current_ruby + @current_ruby ||= CurrentRuby.new() + end + def clear_gemspec_cache @gemspec_cache = {} end |