| Server IP : 68.178.247.200 / Your IP : 216.73.216.110 Web Server : Apache System : Linux p3plzcpnl489463.prod.phx3.secureserver.net 4.18.0-553.126.2.lve.el8.x86_64 #1 SMP Thu May 28 14:12:30 UTC 2026 x86_64 User : x9dppmxs4rgd ( 8559391) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /proc/thread-self/root/opt/alt/ruby32/share/gems/gems/rest-client-2.1.0/lib/restclient/ |
Upload File : |
require 'rbconfig'
module RestClient
module Platform
# Return true if we are running on a darwin-based Ruby platform. This will
# be false for jruby even on OS X.
#
# @return [Boolean]
def self.mac_mri?
RUBY_PLATFORM.include?('darwin')
end
# Return true if we are running on Windows.
#
# @return [Boolean]
#
def self.windows?
# Ruby only sets File::ALT_SEPARATOR on Windows, and the Ruby standard
# library uses that to test what platform it's on.
!!File::ALT_SEPARATOR
end
# Return true if we are running on jruby.
#
# @return [Boolean]
#
def self.jruby?
# defined on mri >= 1.9
RUBY_ENGINE == 'jruby'
end
def self.architecture
"#{RbConfig::CONFIG['host_os']} #{RbConfig::CONFIG['host_cpu']}"
end
def self.ruby_agent_version
case RUBY_ENGINE
when 'jruby'
"jruby/#{JRUBY_VERSION} (#{RUBY_VERSION}p#{RUBY_PATCHLEVEL})"
else
"#{RUBY_ENGINE}/#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}"
end
end
def self.default_user_agent
"rest-client/#{VERSION} (#{architecture}) #{ruby_agent_version}"
end
end
end