lib/bundler/env.rb in bundler-2.0.2 vs lib/bundler/env.rb in bundler-2.1.0.pre.1
- old
+ new
@@ -1,9 +1,9 @@
# frozen_string_literal: true
-require "bundler/rubygems_integration"
-require "bundler/source/git/git_proxy"
+require_relative "rubygems_integration"
+require_relative "source/git/git_proxy"
module Bundler
class Env
def self.write(io)
io.write report
@@ -67,11 +67,11 @@
rescue RuntimeError => e
"#{e.class}: #{e.message}"
end
def self.ruby_version
- str = String.new("#{RUBY_VERSION}")
+ str = String.new(RUBY_VERSION)
str << "p#{RUBY_PATCHLEVEL}" if defined? RUBY_PATCHLEVEL
str << " (#{RUBY_RELEASE_DATE} revision #{RUBY_REVISION}) [#{RUBY_PLATFORM}]"
end
def self.git_version
@@ -98,11 +98,12 @@
out << [" Platforms", Gem.platforms.join(", ")]
out << ["Ruby", ruby_version]
out << [" Full Path", Gem.ruby]
out << [" Config Dir", Pathname.new(Gem::ConfigFile::SYSTEM_WIDE_CONFIG_FILE).dirname]
out << ["RubyGems", Gem::VERSION]
- out << [" Gem Home", ENV.fetch("GEM_HOME") { Gem.dir }]
- out << [" Gem Path", ENV.fetch("GEM_PATH") { Gem.path.join(File::PATH_SEPARATOR) }]
+ out << [" Gem Home", Gem.dir]
+ out << [" Gem Path", Gem.path.join(File::PATH_SEPARATOR)]
+ out << [" User Home", Gem.user_home]
out << [" User Path", Gem.user_dir]
out << [" Bin Dir", Gem.bindir]
if defined?(OpenSSL)
out << ["OpenSSL"]
out << [" Compiled", OpenSSL::OPENSSL_VERSION] if defined?(OpenSSL::OPENSSL_VERSION)