ruby-changes:66330
From: David <ko1@a...>
Date: Fri, 28 May 2021 12:17:48 +0900 (JST)
Subject: [ruby-changes:66330] 9382bda78b (master): [rubygems/rubygems] Remove no longer needed `RUBYGEMS_TEST_PATH` env variable
https://git.ruby-lang.org/ruby.git/commit/?id=9382bda78b From 9382bda78bb701bb1df806ff0b25795a4bfc6d0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...> Date: Wed, 12 May 2021 11:43:55 +0200 Subject: [rubygems/rubygems] Remove no longer needed `RUBYGEMS_TEST_PATH` env variable https://github.com/rubygems/rubygems/commit/0efb894c3b --- test/rubygems/test_case.rb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/test/rubygems/test_case.rb b/test/rubygems/test_case.rb index 857c7d7..e268df1 100644 --- a/test/rubygems/test_case.rb +++ b/test/rubygems/test_case.rb @@ -106,8 +106,6 @@ class Gem::TestCase < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_case.rb#L106 attr_accessor :uri # :nodoc: - TEST_PATH = ENV.fetch('RUBYGEMS_TEST_PATH', File.expand_path('../../../test/rubygems', __FILE__)) - def assert_activate(expected, *specs) specs.each do |spec| case spec @@ -1326,8 +1324,8 @@ Also, a list: https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_case.rb#L1324 end end - @@good_rake = "#{rubybin} #{escape_path(TEST_PATH, 'good_rake.rb')}" - @@bad_rake = "#{rubybin} #{escape_path(TEST_PATH, 'bad_rake.rb')}" + @@good_rake = "#{rubybin} #{escape_path(__dir__, 'good_rake.rb')}" + @@bad_rake = "#{rubybin} #{escape_path(__dir__, 'bad_rake.rb')}" ## # Construct a new Gem::Dependency. @@ -1514,12 +1512,12 @@ Also, a list: https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_case.rb#L1512 def self.cert_path(cert_name) if 32 == (Time.at(2**32) rescue 32) - cert_file = "#{TEST_PATH}/#{cert_name}_cert_32.pem" + cert_file = "#{__dir__}/#{cert_name}_cert_32.pem" return cert_file if File.exist? cert_file end - "#{TEST_PATH}/#{cert_name}_cert.pem" + "#{__dir__}/#{cert_name}_cert.pem" end ## @@ -1537,7 +1535,7 @@ Also, a list: https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_case.rb#L1535 # Returns the path to the key named +key_name+ from <tt>test/rubygems</tt> def self.key_path(key_name) - "#{TEST_PATH}/#{key_name}_key.pem" + "#{__dir__}/#{key_name}_key.pem" end # :stopdoc: -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/