Sha256: 8b2ca85e302874b1027b129e73f62e18a6d94f8f2b799105adbb84af9837b061

Contents?: true

Size: 930 Bytes

Versions: 5

Compression:

Stored size: 930 Bytes

Contents

########################################################################
# uname_test.rb
#
# Generic test script for general futzing. Modify as you see fit. This
# should generally be run via the 'rake example' task.
########################################################################
require 'sys/uname'
require 'rbconfig'
include Sys

puts "VERSION: " + Uname::VERSION
puts 'Nodename: ' + Uname.nodename
puts 'Sysname: ' + Uname.sysname
puts 'Version: ' + Uname.version
puts 'Release: ' + Uname.release
puts 'Machine: ' + Uname.machine # May be "unknown" on Win32

if RbConfig::CONFIG['host_os'] =~ /powerpc|darwin|bsd|dragonfly|mach/i
  print "\nBSD/OS X specific tests\n"
  puts "======================="
  puts 'Model: ' + Uname.model
end

if RbConfig::CONFIG['host_os'] =~ /hpux/i
  print "\nHP-UX specific tests\n"
  puts "========================"
  puts "ID: " + Uname.id
end

print "\nTest finished successfully\n"

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
cloudsmith-api-2.0.16 vendor/bundle/ruby/2.6.0/gems/sys-uname-1.3.1/examples/uname_test.rb
sys-uname-1.3.1 examples/uname_test.rb
cloudsmith-api-2.0.15 vendor/bundle/ruby/2.6.0/gems/sys-uname-1.3.0/examples/uname_test.rb
cloudsmith-api-2.0.14 vendor/bundle/ruby/2.6.0/gems/sys-uname-1.3.0/examples/uname_test.rb
sys-uname-1.3.0 examples/uname_test.rb