sys-uname 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f0350a4361d223981f8128c5163b9cb854717c0367baa9f947a2cf0f8f3438be
4
- data.tar.gz: ce970f97096b73bc0d1554d0c9335b8f4ebf8c67ec79109a7fb443e0f87244bb
3
+ metadata.gz: 31180667be68e53785ebbe5829ca946fe69eebd3596fc53689935ca60a54753c
4
+ data.tar.gz: 566387a32d6982437cf8ee3906632dc3931b162da4049f14fdb74d91ad332752
5
5
  SHA512:
6
- metadata.gz: ea807be8cc162ec2ae5fdf340cd54ca2bc75b05de5608d7b0358a5db3b438c8d62de5300098b5b17fc3f7ddbf76c40ed9666954bd8e21b860efca4afa8b6e9ca
7
- data.tar.gz: 552c4a13d1a953bbf6eadc04dbba8abc342b4414d5dc7a9ad9de1c78ab8b8476d100b2425a278c0527cfb697773dfa2f9f17c411b6557b89f41b6c50891a5fae
6
+ metadata.gz: a81a5ef770b0f9bb317554c0af95772fe4c931ea225036ff2237ff655cae5da94f7cf879f09bad67d1fe41bde5b1d2bebcc424e3ff17a01743c3255215e47f83
7
+ data.tar.gz: 21b8c13ac1ebcc542475d9441dbecf70be0dcd1f4e17f7f893f0bc09107bbc21f5f7a5365e2e6058e0b69569a8d0a51690ebb8b537bf4b7c6789ceb926e33aea
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,7 @@
1
+ == 1.1.1 - 10-Doc-2019
2
+ * Renamed various text files to include explicit .rdoc extension so that
3
+ they show up more nicely on github.
4
+
1
5
  == 1.1.0 - 29-Aug-2019
2
6
  * Changed license to Apache-2.0.
3
7
  * Updated the doc/uname.txt file.
@@ -1,6 +1,6 @@
1
- * MANIFEST
2
- * CHANGES
3
- * README
1
+ * CHANGES.rdoc
2
+ * MANIFEST.rdoc
3
+ * README.rdoc
4
4
  * Rakefile
5
5
  * sys-uname.gemspec
6
6
  * certs/djberg96_pub.pem
@@ -0,0 +1,51 @@
1
+ == Description
2
+ A cross-platform Ruby interface for getting operating system information. The name
3
+ comes from the Unix 'uname' command, but this library works on MS Windows as well.
4
+
5
+ == Prerequisites
6
+ ffi 1.0 or later
7
+
8
+ == Installation
9
+ gem install sys-uname
10
+
11
+ == Synopsis
12
+ require 'sys/uname' # require 'sys-uname' works, too
13
+
14
+ # You now have Sys::Uname and Sys::Platform classes available.
15
+
16
+ # Get full information about your system
17
+ p Sys::Uname.uname
18
+
19
+ # Check individual platform details about your system
20
+ p Sys::Platform.linux? # => true
21
+ p Sys::Platform::ARCH # => :x86_64
22
+
23
+ == Solaris Notes
24
+ Users on SunOS get several extra methods: architecture, platform,
25
+ hw_serial, hw_provider, srpc_domain, isa_list, and dhcp_cache.
26
+
27
+ == BSD flavors, including OS X
28
+ Users on BSD platforms get the extra Uname.model method.
29
+
30
+ == HP-UX Notes
31
+ HP-UX users get the extra Uname.id_number method. This is actually a
32
+ String, not a Fixnum, because that's how it's defined in the utsname
33
+ struct.
34
+
35
+ == MS Windows Notes
36
+ The C version for Windows has been completely scrapped in favor of an OLE
37
+ plus WMI approach. It is pure Ruby. Please see the MSDN documentation for
38
+ the Win32_OperatingSystem class for a complete list of what each of the
39
+ UnameStruct members mean.
40
+
41
+ == The Platform Class
42
+ This was added both as a nicer way to check simple information about your
43
+ system, and as a replacement for the old 'Platform' gem which is no longer
44
+ maintained.
45
+
46
+ == Future Plans
47
+ I may dump the "Uname" portion of this library, and rename the project
48
+ to just sys-platform.
49
+
50
+ == Documentation
51
+ For more details, see the 'uname.rdoc' file under the 'doc' directory.
@@ -0,0 +1,127 @@
1
+ == Description
2
+ A cross platform Ruby interface for getting operating system information. The
3
+ name comes from the Unix 'uname' command, but this library works on Windows as well.
4
+
5
+ == Synopsis
6
+ require 'sys/uname'
7
+ include Sys
8
+
9
+ # Unix
10
+ puts Uname.nodename => my_host
11
+ puts Uname.version => #1 Fri Oct 24 22:43:28 MDT 2003
12
+ puts Uname.sysname => Linux
13
+ puts Uname.machine => i686
14
+ puts Uname.release => 2.4.22-21mdk
15
+
16
+ p Uname.uname => Show all UnameStruct members
17
+
18
+ # Windows
19
+ u = Uname.uname
20
+ puts u.caption => 'Microsoft Windows XP Home Edition
21
+ puts u.csd_version => 'Service Pack 2'
22
+
23
+ == Constants
24
+ VERSION
25
+ The current version number of the sys-uname library. This is a String.
26
+
27
+ == Class Methods
28
+ Uname.sysname
29
+ Returns the operating system name, e.g. "SunOS"
30
+
31
+ Uname.nodename
32
+ Returns the nodename. This is usually, but not necessarily, the
33
+ same as the system's hostname.
34
+
35
+ You cannot currently set the nodename (root or otherwise). This may
36
+ be added in a future release.
37
+
38
+ Uname.machine
39
+ Returns the machine hardware type, e.g. "i686"
40
+
41
+ Uname.version
42
+ Returns the operating system version. e.g. "5.8". In the case of MS
43
+ Windows, it returns the version plus patch information, separated by
44
+ a hyphen, e.g. "2915-Service Pack 2".
45
+
46
+ Uname.release
47
+ Returns the operating system release, e.g. "2.2.16-3"
48
+
49
+ Uname.uname
50
+ Returns a struct of type UnameStruct that contains sysname, nodename,
51
+ machine, version, and release. On Solaris, it will also include
52
+ architecture and platform. On HP-UX, it will also include id_number.
53
+
54
+ MS Windows - there are many more, and different, fields in the struct.
55
+ Please see the MSDN documenation on the Win32_OperatingSystem WMI class
56
+ for a complete explanation of what each of these members mean.
57
+
58
+ == Solaris Only
59
+ Uname.architecture
60
+ Returns the instruction set architecture, e.g. "sparc"
61
+
62
+ Uname.platform
63
+ Returns the platform identifier, e.g. "SUNW,Sun-Blade-100"
64
+
65
+ Uname.isa_list
66
+ Returns a space separated string containing a list of all variant
67
+ instruction set architectures executable on the current system.
68
+
69
+ They are listed in order of performance, from best to worst.
70
+
71
+ Uname.hw_provider
72
+ Returns the name of the hardware manufacturer.
73
+
74
+ Uname.hw_serial_number
75
+ Returns the ASCII representation of the hardware-specific serial number
76
+ of the machine that executes the function.
77
+
78
+ Uname.srpc_domain
79
+ Returns the name of the Secure Remote Procedure Call domain, if any.
80
+
81
+ Uname.dhcp_cache
82
+ Returns a hexidecimal encoding, in String form, of the name of the
83
+ interface configured by boot(1M) followed by the DHCPACK reply from
84
+ the server.
85
+
86
+ == BSD Platforms Only (including OS X)
87
+ Uname.model
88
+ Returns the model type, e.g. "PowerBook5,1"
89
+
90
+ == HP-UX Only
91
+ Uname.id
92
+ Returns the id number, e.g. 234233587. This is a String, not a Fixnum.
93
+
94
+ == Notes
95
+ Not all of the information that you might be used to seeing with
96
+ a 'uname -a' is available. This may be added in future releases,
97
+ but since different implementations provide different information
98
+ (via different header files) it will be a bit of a pain.
99
+
100
+ Windows users - please see the MSDN documentation for the
101
+ Win32_OperatingSystem class for a complete list of what each of the
102
+ UnameStruct members mean.
103
+
104
+ == Known Bugs
105
+ None that I'm aware of. Please log any bugs on the project page at
106
+ https://github.com/djberg96/sys-uname
107
+
108
+ == Future Plans
109
+ Add additional info for Linux, Solaris, BSD.
110
+
111
+ == License
112
+ Apache-2.0
113
+
114
+ == Copyright
115
+ (C) 2002-2019 Daniel J. Berger
116
+ All Rights Reserved
117
+
118
+ == Warranty
119
+ This package is provided "as is" and without any express or
120
+ implied warranties, including, without limitation, the implied
121
+ warranties of merchantability and fitness for a particular purpose.
122
+
123
+ == Author
124
+ Daniel Berger
125
+
126
+ == See Also
127
+ uname(1) for unix, or WMI for MS Windows.
@@ -1,7 +1,7 @@
1
1
  module Sys
2
2
  class Uname
3
3
  # The version of the sys-uname gem.
4
- VERSION = '1.1.0'.freeze
4
+ VERSION = '1.1.1'.freeze
5
5
  end
6
6
 
7
7
  class Platform
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'sys-uname'
5
- spec.version = '1.1.0'
5
+ spec.version = '1.1.1'
6
6
  spec.author = 'Daniel J. Berger'
7
7
  spec.email = 'djberg96@gmail.com'
8
8
  spec.homepage = 'http://github.com/djberg96/sys-uname'
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.test_files = Dir['test/test*.rb']
13
13
  spec.cert_chain = ['certs/djberg96_pub.pem']
14
14
 
15
- spec.extra_rdoc_files = ['CHANGES', 'README', 'MANIFEST', 'doc/uname.txt']
15
+ spec.extra_rdoc_files = Dir['*.rdoc']
16
16
 
17
17
  spec.add_dependency('ffi', '>= 1.0.0')
18
18
 
@@ -14,7 +14,7 @@ class TC_Sys_Platform < Test::Unit::TestCase
14
14
  end
15
15
 
16
16
  test "the VERSION constant is set to the expected value" do
17
- assert_equal('1.1.0', Sys::Platform::VERSION)
17
+ assert_equal('1.1.1', Sys::Platform::VERSION)
18
18
  assert_true(Sys::Platform::VERSION.frozen?)
19
19
  end
20
20
 
@@ -14,7 +14,7 @@ class TC_Sys_Uname < Test::Unit::TestCase
14
14
  end
15
15
 
16
16
  test "version constant is set to expected value" do
17
- assert_equal('1.1.0', Uname::VERSION)
17
+ assert_equal('1.1.1', Uname::VERSION)
18
18
  assert_true(Uname::VERSION.frozen?)
19
19
  end
20
20
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sys-uname
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel J. Berger
@@ -61,34 +61,33 @@ email: djberg96@gmail.com
61
61
  executables: []
62
62
  extensions: []
63
63
  extra_rdoc_files:
64
- - CHANGES
65
- - README
66
- - MANIFEST
67
- - doc/uname.txt
64
+ - MANIFEST.rdoc
65
+ - README.rdoc
66
+ - CHANGES.rdoc
68
67
  files:
69
- - CHANGES
70
68
  - test
71
- - test/test_sys_uname.rb
72
69
  - test/test_sys_platform.rb
70
+ - test/test_sys_uname.rb
73
71
  - examples
74
72
  - examples/uname_test.rb
75
- - doc
76
- - doc/uname.txt
77
- - sys-uname.gemspec
78
- - README
79
73
  - Rakefile
80
- - MANIFEST
81
74
  - lib
82
75
  - lib/sys-uname.rb
83
76
  - lib/sys
84
77
  - lib/sys/platform.rb
85
78
  - lib/sys/windows
86
79
  - lib/sys/windows/uname.rb
87
- - lib/sys/uname.rb
88
80
  - lib/sys/unix
89
81
  - lib/sys/unix/uname.rb
82
+ - lib/sys/uname.rb
90
83
  - certs
91
84
  - certs/djberg96_pub.pem
85
+ - MANIFEST.rdoc
86
+ - README.rdoc
87
+ - doc
88
+ - doc/uname.rdoc
89
+ - sys-uname.gemspec
90
+ - CHANGES.rdoc
92
91
  homepage: http://github.com/djberg96/sys-uname
93
92
  licenses:
94
93
  - Apache-2.0
@@ -119,5 +118,5 @@ signing_key:
119
118
  specification_version: 4
120
119
  summary: An interface for returning uname (platform) information
121
120
  test_files:
122
- - test/test_sys_uname.rb
123
121
  - test/test_sys_platform.rb
122
+ - test/test_sys_uname.rb
metadata.gz.sig CHANGED
Binary file
data/README DELETED
@@ -1,51 +0,0 @@
1
- = Description
2
- A Ruby interface for getting operating system information. The name comes
3
- from the Unix 'uname' command, but this library works on MS Windows as well.
4
-
5
- = Prerequisites
6
- ffi 1.0 or later
7
-
8
- = Installation
9
- gem install sys-uname
10
-
11
- = Synopsis
12
- require 'sys/uname' # require 'sys-uname' works, too
13
-
14
- # You now have Sys::Uname and Sys::Platform classes available.
15
-
16
- # Get full information about your system
17
- p Sys::Uname.uname
18
-
19
- # Check individual platform details about your system
20
- p Sys::Platform.linux? # => true
21
- p Sys::Platform::ARCH # => :x86_64
22
-
23
- = Solaris Notes
24
- Users on SunOS get several extra methods: architecture, platform,
25
- hw_serial, hw_provider, srpc_domain, isa_list, and dhcp_cache.
26
-
27
- = BSD flavors, including OS X
28
- Users on BSD platforms get the extra Uname.model method.
29
-
30
- = HP-UX Notes
31
- HP-UX users get the extra Uname.id_number method. This is actually a
32
- String, not a Fixnum, because that's how it's defined in the utsname
33
- struct.
34
-
35
- = MS Windows Notes
36
- The C version for Windows has been completely scrapped in favor of an OLE
37
- plus WMI approach. It is pure Ruby. Please see the MSDN documentation for
38
- the Win32_OperatingSystem class for a complete list of what each of the
39
- UnameStruct members mean.
40
-
41
- = The Platform Class
42
- This was added both as a nicer way to check simple information about your
43
- system, and as a replacement for the old 'Platform' gem which is no longer
44
- maintained.
45
-
46
- = Future Plans
47
- I may dump the "Uname" portion of this library, and rename the project
48
- to just sys-platform.
49
-
50
- = Documentation
51
- For more details, see the 'uname.txt' file under the 'doc' directory.
@@ -1,127 +0,0 @@
1
- == Description
2
- A Ruby interface for getting operating system information. The name comes
3
- from the Unix 'uname' command, but this library works on Windows as well.
4
-
5
- == Synopsis
6
- require 'sys/uname'
7
- include Sys
8
-
9
- # Unix
10
- puts Uname.nodename => my_host
11
- puts Uname.version => #1 Fri Oct 24 22:43:28 MDT 2003
12
- puts Uname.sysname => Linux
13
- puts Uname.machine => i686
14
- puts Uname.release => 2.4.22-21mdk
15
-
16
- p Uname.uname => Show all UnameStruct members
17
-
18
- # Windows
19
- u = Uname.uname
20
- puts u.caption => 'Microsoft Windows XP Home Edition
21
- puts u.csd_version => 'Service Pack 2'
22
-
23
- == Constants
24
- VERSION
25
- The current version number of the sys-uname library. This is a String.
26
-
27
- == Class Methods
28
- Uname.sysname
29
- Returns the operating system name, e.g. "SunOS"
30
-
31
- Uname.nodename
32
- Returns the nodename. This is usually, but not necessarily, the
33
- same as the system's hostname.
34
-
35
- You cannot currently set the nodename (root or otherwise). This may
36
- be added in a future release.
37
-
38
- Uname.machine
39
- Returns the machine hardware type, e.g. "i686"
40
-
41
- Uname.version
42
- Returns the operating system version. e.g. "5.8". In the case of MS
43
- Windows, it returns the version plus patch information, separated by
44
- a hyphen, e.g. "2915-Service Pack 2".
45
-
46
- Uname.release
47
- Returns the operating system release, e.g. "2.2.16-3"
48
-
49
- Uname.uname
50
- Returns a struct of type UnameStruct that contains sysname, nodename,
51
- machine, version, and release. On Solaris, it will also include
52
- architecture and platform. On HP-UX, it will also include id_number.
53
-
54
- MS Windows - there are many more, and different, fields in the struct.
55
- Please see the MSDN documenation on the Win32_OperatingSystem WMI class
56
- for a complete explanation of what each of these members mean.
57
-
58
- == Solaris Only
59
- Uname.architecture
60
- Returns the instruction set architecture, e.g. "sparc"
61
-
62
- Uname.platform
63
- Returns the platform identifier, e.g. "SUNW,Sun-Blade-100"
64
-
65
- Uname.isa_list
66
- Returns a space separated string containing a list of all variant
67
- instruction set architectures executable on the current system.
68
-
69
- They are listed in order of performance, from best to worst.
70
-
71
- Uname.hw_provider
72
- Returns the name of the hardware manufacturer.
73
-
74
- Uname.hw_serial_number
75
- Returns the ASCII representation of the hardware-specific serial number
76
- of the machine that executes the function.
77
-
78
- Uname.srpc_domain
79
- Returns the name of the Secure Remote Procedure Call domain, if any.
80
-
81
- Uname.dhcp_cache
82
- Returns a hexidecimal encoding, in String form, of the name of the
83
- interface configured by boot(1M) followed by the DHCPACK reply from
84
- the server.
85
-
86
- == BSD Platforms Only (including OS X)
87
- Uname.model
88
- Returns the model type, e.g. "PowerBook5,1"
89
-
90
- == HP-UX Only
91
- Uname.id
92
- Returns the id number, e.g. 234233587. This is a String, not a Fixnum.
93
-
94
- == Notes
95
- Not all of the information that you might be used to seeing with
96
- a 'uname -a' is available. This may be added in future releases,
97
- but since different implementations provide different information
98
- (via different header files) it will be a bit of a pain.
99
-
100
- Windows users - please see the MSDN documentation for the
101
- Win32_OperatingSystem class for a complete list of what each of the
102
- UnameStruct members mean.
103
-
104
- == Known Bugs
105
- None that I'm aware of. Please log any bugs on the project page at
106
- https://github.com/djberg96/sys-uname
107
-
108
- == Future Plans
109
- Add additional info for Linux, Solaris, BSD.
110
-
111
- == License
112
- Apache-2.0
113
-
114
- == Copyright
115
- (C) 2002-2019 Daniel J. Berger
116
- All Rights Reserved
117
-
118
- == Warranty
119
- This package is provided "as is" and without any express or
120
- implied warranties, including, without limitation, the implied
121
- warranties of merchantability and fitness for a particular purpose.
122
-
123
- == Author
124
- Daniel Berger
125
-
126
- == See Also
127
- uname(1) for unix, or WMI for MS Windows.