[rubygems/rubygems] Unify java_platform? to Gem.java_platform?
https://github.com/rubygems/rubygems/commit/7f27ab32b8
This commit is contained in:
parent
bf8afe434f
commit
cbeea5f3e6
@ -1145,20 +1145,6 @@ Also, a list:
|
||||
self.class.win_platform?
|
||||
end
|
||||
|
||||
##
|
||||
# Is this test being run on a Java platform?
|
||||
|
||||
def self.java_platform?
|
||||
Gem.java_platform?
|
||||
end
|
||||
|
||||
##
|
||||
# see ::java_platform?
|
||||
|
||||
def java_platform?
|
||||
self.class.java_platform?
|
||||
end
|
||||
|
||||
##
|
||||
# Returns whether or not we're on a version of Ruby built with VC++ (or
|
||||
# Borland) versus Cygwin, Mingw, etc.
|
||||
|
@ -593,7 +593,7 @@ class TestGemCommandsBuildCommand < Gem::TestCase
|
||||
end
|
||||
|
||||
def test_build_signed_gem
|
||||
pend "openssl is missing" unless Gem::HAVE_OPENSSL && !java_platform?
|
||||
pend "openssl is missing" unless Gem::HAVE_OPENSSL && !Gem.java_platform?
|
||||
|
||||
trust_dir = Gem::Security.trust_dir
|
||||
|
||||
@ -620,7 +620,7 @@ class TestGemCommandsBuildCommand < Gem::TestCase
|
||||
end
|
||||
|
||||
def test_build_signed_gem_with_cert_expiration_length_days
|
||||
pend "openssl is missing" unless Gem::HAVE_OPENSSL && !java_platform?
|
||||
pend "openssl is missing" unless Gem::HAVE_OPENSSL && !Gem.java_platform?
|
||||
|
||||
gem_path = File.join Gem.user_home, ".gem"
|
||||
Dir.mkdir gem_path
|
||||
@ -664,7 +664,7 @@ class TestGemCommandsBuildCommand < Gem::TestCase
|
||||
end
|
||||
|
||||
def test_build_auto_resign_cert
|
||||
pend "openssl is missing" unless Gem::HAVE_OPENSSL && !java_platform?
|
||||
pend "openssl is missing" unless Gem::HAVE_OPENSSL && !Gem.java_platform?
|
||||
|
||||
gem_path = File.join Gem.user_home, ".gem"
|
||||
Dir.mkdir gem_path
|
||||
|
@ -140,7 +140,7 @@ class TestGemExtCargoBuilder < Gem::TestCase
|
||||
private
|
||||
|
||||
def skip_unsupported_platforms!
|
||||
pend "jruby not supported" if java_platform?
|
||||
pend "jruby not supported" if Gem.java_platform?
|
||||
pend "truffleruby not supported (yet)" if RUBY_ENGINE == "truffleruby"
|
||||
system(@rust_envs, "cargo", "-V", out: IO::NULL, err: [:child, :out])
|
||||
pend "cargo not present" unless $?.success?
|
||||
|
@ -55,6 +55,6 @@ class TestGemExtCargoBuilderUnit < Gem::TestCase
|
||||
end
|
||||
|
||||
def skip_unsupported_platforms!
|
||||
pend "jruby not supported" if java_platform?
|
||||
pend "jruby not supported" if Gem.java_platform?
|
||||
end
|
||||
end
|
||||
|
@ -15,7 +15,7 @@ class TestGemExtExtConfBuilder < Gem::TestCase
|
||||
end
|
||||
|
||||
def test_class_build
|
||||
if java_platform?
|
||||
if Gem.java_platform?
|
||||
pend("failing on jruby")
|
||||
end
|
||||
|
||||
@ -45,7 +45,7 @@ class TestGemExtExtConfBuilder < Gem::TestCase
|
||||
end
|
||||
|
||||
def test_class_build_rbconfig_make_prog
|
||||
if java_platform?
|
||||
if Gem.java_platform?
|
||||
pend("failing on jruby")
|
||||
end
|
||||
|
||||
@ -72,7 +72,7 @@ class TestGemExtExtConfBuilder < Gem::TestCase
|
||||
env_MAKE = ENV.delete "MAKE"
|
||||
ENV["MAKE"] = "anothermake"
|
||||
|
||||
if java_platform?
|
||||
if Gem.java_platform?
|
||||
pend("failing on jruby")
|
||||
end
|
||||
|
||||
|
@ -36,7 +36,7 @@ class TestGemUtil < Gem::TestCase
|
||||
end
|
||||
|
||||
def test_traverse_parents_does_not_crash_on_permissions_error
|
||||
pend "skipped on MS Windows (chmod has no effect)" if win_platform? || java_platform?
|
||||
pend "skipped on MS Windows (chmod has no effect)" if win_platform? || Gem.java_platform?
|
||||
|
||||
FileUtils.mkdir_p "d/e/f"
|
||||
# remove 'execute' permission from "e" directory and make it
|
||||
@ -53,7 +53,7 @@ class TestGemUtil < Gem::TestCase
|
||||
assert_equal File.realpath("../..", @tempdir), paths[3]
|
||||
ensure
|
||||
# restore default permissions, allow the directory to be removed
|
||||
FileUtils.chmod(0775, "d/e") unless win_platform? || java_platform?
|
||||
FileUtils.chmod(0775, "d/e") unless win_platform? || Gem.java_platform?
|
||||
end
|
||||
|
||||
def test_glob_files_in_dir
|
||||
|
@ -225,7 +225,7 @@ class TestGemRequire < Gem::TestCase
|
||||
pend "Not sure what's going on. If another spec creates a 'a' gem before
|
||||
this test, somehow require will load the benchmark in b, and ignore that the
|
||||
stdlib one is already in $LOADED_FEATURES?. Reproducible by running the
|
||||
spaceship_specific_file test before this one" if java_platform?
|
||||
spaceship_specific_file test before this one" if Gem.java_platform?
|
||||
|
||||
pend "not installed yet" unless RbConfig::TOPDIR
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user