Sha256: c2028aa5fd0457948e7837af66ed7d8aada97da21eb9032bc79b27f6353b4805
Contents?: true
Size: 841 Bytes
Versions: 36
Compression:
Stored size: 841 Bytes
Contents
require 'rbconfig' module R10K module Util module Platform FIPS_FILE = "/proc/sys/crypto/fips_enabled" def self.platform # Test JRuby first to handle JRuby on Windows as well. if self.jruby? :jruby elsif self.windows? :windows else :posix end end # We currently only suport FIPS mode on redhat 7, where it is # toggled via a file. def self.fips? if File.exist?(FIPS_FILE) File.read(FIPS_FILE).chomp == "1" else false end end def self.windows? RbConfig::CONFIG['host_os'] =~ /mswin|win32|dos|mingw|cygwin/i end def self.jruby? RUBY_PLATFORM == "java" end def self.posix? !windows? && !jruby? end end end end
Version data entries
36 entries across 36 versions & 2 rubygems