module Jekyll::Utils::Platforms
def bash_on_windows?
def bash_on_windows? linux_os? && microsoft_proc_version? end
def jruby?
def jruby? RUBY_ENGINE == "jruby" end
def linux?
def linux? linux_os? && !microsoft_proc_version? end
def linux_os?
def linux_os? rbconfig_host.include?("linux") end
def microsoft_proc_version?
def microsoft_proc_version? proc_version.include?("microsoft") end
def mri?
def mri? RUBY_ENGINE == "ruby" end
def osx?
def osx? rbconfig_host.match?(%r!darwin|mac os!) end
def proc_version
def proc_version @proc_version ||= \ begin File.read("/proc/version").downcase rescue Errno::ENOENT, Errno::EACCES "" end end
def rbconfig_host
def rbconfig_host @rbconfig_host ||= RbConfig::CONFIG["host_os"].downcase end
def unix?
def unix? rbconfig_host.match?(%r!solaris|bsd!) end
def vanilla_windows?
def vanilla_windows? rbconfig_host.match?(%r!mswin|mingw|cygwin!) && proc_version.empty? end
def windows?
def windows? vanilla_windows? || bash_on_windows? end