lib/bundler/env.rb in bundler-1.11.2 vs lib/bundler/env.rb in bundler-1.12.0.pre.1
- old
+ new
@@ -1,5 +1,6 @@
+# frozen_string_literal: true
require "bundler/rubygems_integration"
require "bundler/source/git/git_proxy"
module Bundler
class Env
@@ -9,11 +10,11 @@
def report(options = {})
print_gemfile = options.delete(:print_gemfile)
print_gemspecs = options.delete(:print_gemspecs)
- out = "Environment\n\n"
+ out = String.new("Environment\n\n")
out << " Bundler #{Bundler::VERSION}\n"
out << " Rubygems #{Gem::VERSION}\n"
out << " Ruby #{ruby_version}"
out << " GEM_HOME #{ENV["GEM_HOME"]}\n" unless ENV["GEM_HOME"].nil? || ENV["GEM_HOME"].empty?
out << " GEM_PATH #{ENV["GEM_PATH"]}\n" unless ENV["GEM_PATH"] == ENV["GEM_HOME"]
@@ -41,11 +42,11 @@
end
if print_gemspecs
dsl = Dsl.new.tap {|d| d.eval_gemfile(Bundler.default_gemfile) }
dsl.gemspecs.each do |gs|
- out << "\n#{Pathname.new(gs).basename}:"
+ out << "\n#{Pathname.new(gs).basename}"
out << "\n\n " << read_file(gs).gsub(/\n/, "\n ") << "\n"
end
end
out
@@ -60,10 +61,10 @@
rescue => e
"#{e.class}: #{e.message}"
end
def ruby_version
- str = "#{RUBY_VERSION}"
+ str = String.new("#{RUBY_VERSION}")
if RUBY_VERSION < "1.9"
str << " (#{RUBY_RELEASE_DATE}"
str << " patchlevel #{RUBY_PATCHLEVEL}" if defined? RUBY_PATCHLEVEL
str << ") [#{RUBY_PLATFORM}]\n"
else