sys-uname 0.8.5-x86-mingw32 → 0.9.0-x86-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +165 -155
- data/MANIFEST +11 -11
- data/README +39 -36
- data/Rakefile +50 -61
- data/doc/uname.txt +127 -127
- data/examples/uname_test.rb +42 -41
- data/lib/unix/sys/uname.rb +327 -0
- data/lib/windows/sys/uname.rb +465 -0
- data/sys-uname.gemspec +31 -27
- data/test/test_sys_uname.rb +457 -448
- metadata +31 -61
- data/lib/sys/uname.rb +0 -471
data/CHANGES
CHANGED
@@ -1,155 +1,165 @@
|
|
1
|
-
== 0.
|
2
|
-
*
|
3
|
-
*
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
*
|
10
|
-
|
11
|
-
|
12
|
-
*
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
*
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
*
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
*
|
44
|
-
|
45
|
-
|
46
|
-
*
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
*
|
53
|
-
*
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
*
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
*
|
63
|
-
*
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
*
|
70
|
-
|
71
|
-
*
|
72
|
-
|
73
|
-
*
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
*
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
*
|
84
|
-
*
|
85
|
-
*
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
*
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
* Added
|
94
|
-
|
95
|
-
*
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
*
|
103
|
-
*
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
*
|
109
|
-
|
110
|
-
|
111
|
-
== 0.
|
112
|
-
*
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
*
|
117
|
-
* Added a
|
118
|
-
*
|
119
|
-
*
|
120
|
-
|
121
|
-
== 0.3.
|
122
|
-
*
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
*
|
127
|
-
|
128
|
-
|
129
|
-
*
|
130
|
-
|
131
|
-
|
132
|
-
*
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
*
|
137
|
-
|
138
|
-
== 0.
|
139
|
-
*
|
140
|
-
|
141
|
-
*
|
142
|
-
*
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
*
|
150
|
-
*
|
151
|
-
*
|
152
|
-
*
|
153
|
-
|
154
|
-
|
155
|
-
|
1
|
+
== 0.9.0 - 8-Dec-2011
|
2
|
+
* Conversion to FFI.
|
3
|
+
* Added some additional methods and information for Solaris.
|
4
|
+
* Minor tweaks for 1.9 to silence warnings.
|
5
|
+
|
6
|
+
== 0.8.6 - 2-Sep-2011
|
7
|
+
* Fixed a failing test for Ruby 1.9.x.
|
8
|
+
* The gemspec for Windows is now 'universal'.
|
9
|
+
* Some minor doc updates.
|
10
|
+
|
11
|
+
== 0.8.5 - 11-Dec-2010
|
12
|
+
* Removed some non-ascii characters that somehow made it into the source.
|
13
|
+
* Some updates to the Rakefile, including a default task.
|
14
|
+
|
15
|
+
== 0.8.4 - 29-Jan-2010
|
16
|
+
* Bug fix for Windows 7, which appears to have removed the QuantumLength and
|
17
|
+
QuantumType members of the Win32_OperatingSystem class. Thanks go to Mark
|
18
|
+
Seymour for the spot. RubyForge bug # 27645.
|
19
|
+
* Changed license to Artistic 2.0.
|
20
|
+
* Refactored the Rakefile and gemspec considerably. The gem building code is
|
21
|
+
now all inlined within the Rakefile build task itself.
|
22
|
+
* Minor doc updates and some code reformatting.
|
23
|
+
|
24
|
+
== 0.8.3 - 26-Apr-2008
|
25
|
+
* Added an explicit "require 'time'" in the Windows version because recent
|
26
|
+
versions of Ruby now need it.
|
27
|
+
* Changed the way I do platform checks in the Rakefile.
|
28
|
+
|
29
|
+
== 0.8.2 - 22-Nov-2007
|
30
|
+
* Fixed an issue where Ruby no longer parsed a certain type of date that
|
31
|
+
MS Windows uses. See RubyForge Bug #10646 for more information.
|
32
|
+
|
33
|
+
== 0.8.1 - 29-Aug-2007
|
34
|
+
* Made a minor modification to the build script for Linux. It turns out Linux
|
35
|
+
has sysctl, but not the necessary mibs for the Uname.model method. Thanks go
|
36
|
+
to Mickey Knox (?) for the spot.
|
37
|
+
* Removed the install.rb file. The code from that program was integrated
|
38
|
+
directly into the Rakefile.
|
39
|
+
|
40
|
+
== 0.8.0 - 10-Apr-2007
|
41
|
+
* The Uname.model method should now work on most BSD platforms, not just OS X,
|
42
|
+
since it uses the sysctl() function behind the scenes.
|
43
|
+
* The 'id' method was changed to 'id_number' on HP-UX to avoid confusion with
|
44
|
+
the Object.id method.
|
45
|
+
* The UnameError class is now Uname::Error.
|
46
|
+
* Added a Rakefile. There are now tasks for building, testing and installing
|
47
|
+
this package.
|
48
|
+
* Removed some pre-setup code from the test suite that was no longer necessary
|
49
|
+
as a result of the Rake test task.
|
50
|
+
|
51
|
+
== 0.7.4 - 19-Nov-2006
|
52
|
+
* Internal layout changes, doc updates and gemspec improvements.
|
53
|
+
* No code changes.
|
54
|
+
|
55
|
+
== 0.7.3 - 30-Jul-2006
|
56
|
+
* Bug fix for 64 bit platforms.
|
57
|
+
* Minor modification of the extconf.rb file.
|
58
|
+
|
59
|
+
== 0.7.2 - 5-Jul-2006
|
60
|
+
* Removed '?' from the struct member names on MS Windows since these are no
|
61
|
+
longer legal.
|
62
|
+
* Removed duplicate definition of Uname.version on MS Windows (oops).
|
63
|
+
* Added a gemspec.
|
64
|
+
* Added inline rdoc documentation to the source files.
|
65
|
+
|
66
|
+
== 0.7.1 - 5-May-2005
|
67
|
+
* Removed the uname.rd file. The uname.txt file is rdoc friendly, so you
|
68
|
+
can autogenerate html from that file if you wish.
|
69
|
+
* Removed the version.h file - no longer needed now that the Windows version
|
70
|
+
is pure Ruby.
|
71
|
+
* Renamed test.rb to uname_test.rb
|
72
|
+
* Minor setup modifications to the test suite.
|
73
|
+
* This package is now hosted on RubyForge.
|
74
|
+
|
75
|
+
== 0.7.0 - 11-Jan-2004
|
76
|
+
* Scrapped the C version for Windows in favor of a pure Ruby version that uses
|
77
|
+
WMI + OLE. I highly recommend using Ruby 1.8.2 or later on Win32 systems.
|
78
|
+
Earlier versions may cause segfaults.
|
79
|
+
* Added the isa_list, hw_provider, hw_serial_number, srpc_domain and
|
80
|
+
dhcp_cache methods for Solaris.
|
81
|
+
* Added install.rb program for Windows, and modified extconf.rb to only run on
|
82
|
+
non-Windows systems.
|
83
|
+
* The 'examples' directory has been moved to the toplevel directory.
|
84
|
+
* Removed the INSTALL file. That information is now included in the README.
|
85
|
+
* Documentation updates.
|
86
|
+
|
87
|
+
== 0.6.1 - 25-Apr-2004
|
88
|
+
* Simplified extconf.rb script and installation instructions.
|
89
|
+
* Combined three test scripts into a single test script.
|
90
|
+
* Warranty information added.
|
91
|
+
|
92
|
+
== 0.6.0 - 25-Jun-2003
|
93
|
+
* Added HP-UX support, including the id() class method (HP-UX only)
|
94
|
+
* Fixed minor bug in extconf.rb (forgot 'require ftools' at top)
|
95
|
+
* Added HP-UX specific tests and support
|
96
|
+
* Made test.rb friendlier for folks without TestUnit installed
|
97
|
+
|
98
|
+
== 0.5.0 - 16-Jun-2003
|
99
|
+
* Added OS X support, including the "model" method. Thanks to Mike Hall
|
100
|
+
for the patch
|
101
|
+
* Removed VERSION() class method. Use the constant instead
|
102
|
+
* Moved rd documentation to its own file (under /doc directory)
|
103
|
+
* Added a version.h file under 'lib' to store VERSION info for
|
104
|
+
all source files
|
105
|
+
* Modified extconf.rb file to handle OS X support. In addition, moved
|
106
|
+
test.rb into a static file under /test, instead of dynamically
|
107
|
+
generating it
|
108
|
+
* Fixed up test suite. Added OS X specific tests and support. Should now
|
109
|
+
work with TestUnit 0.1.6 or later
|
110
|
+
|
111
|
+
== 0.4.1 - 7-Feb-2003
|
112
|
+
* Fixed C89 issue (again) - thanks go to Daniel Zepeda for the spot
|
113
|
+
* Fixed bugs in extconf.rb file (rescue clause, ftools)
|
114
|
+
|
115
|
+
== 0.4.0 - 6-Feb-2003
|
116
|
+
* MS Windows support!
|
117
|
+
* Added a test suite and automatic test.rb creation
|
118
|
+
* Documentation additions/fixes
|
119
|
+
* Internal directory layout and filename changes (Changelog -> CHANGES)
|
120
|
+
|
121
|
+
== 0.3.3 - 6-Jan-2003
|
122
|
+
* Made the code C89 compliant for older compilers. Thanks to Paul Brannan
|
123
|
+
for teaching me how to fix this in general.
|
124
|
+
* Moved README to doc/uname.txt
|
125
|
+
* Created an INSTALL file
|
126
|
+
* Added a copyright notice
|
127
|
+
* Added a VERSION class method
|
128
|
+
* Changed tarball name to reflect RAA package name
|
129
|
+
* Minor doc changes
|
130
|
+
|
131
|
+
== 0.3.2 - 8-Aug-2002
|
132
|
+
* Changed the struct name returned by the 'uname()' method from
|
133
|
+
"Uname::UnameStruct" to just "UnameStruct". This was to make it
|
134
|
+
compliant with future versions of Ruby. The extra namespace was
|
135
|
+
redundant anyway.
|
136
|
+
* I include the documentation now, instead of making you install rd2 :)
|
137
|
+
|
138
|
+
== 0.3.1 - 22-Jul-2002
|
139
|
+
* Added the 'uname' class method, which returns a struct that contains all
|
140
|
+
of the uname information
|
141
|
+
* Added a test script. Do 'ruby test.rb' to run it.
|
142
|
+
* If rd2 is installed on your system, the documentation is automatically
|
143
|
+
generated for you.
|
144
|
+
* Moved html documentation to 'doc' directory.
|
145
|
+
* Changed version number style to be consistent with other 'Sys' modules
|
146
|
+
* Now installs into 'Sys-Uname-x.x.x' directory (instead of just 'Uname')
|
147
|
+
|
148
|
+
== 0.03 - 6-June-2002
|
149
|
+
* rd style documentation now inline
|
150
|
+
* README.html is now uname.html - created via rdtool
|
151
|
+
* The 'platform()' and 'architecture()' methods have been added for Solaris
|
152
|
+
* You can now do an 'include Sys' to shorten your syntax
|
153
|
+
* The whole 'Sys' class has been removed. Delete your sys.so file if you
|
154
|
+
installed a previous version of Sys-Uname
|
155
|
+
|
156
|
+
== 0.02 - 3-June-2002
|
157
|
+
* Potentially fatal memory problems corrected.
|
158
|
+
* Should now build with C++ as well
|
159
|
+
* Thanks to Mike Hall for both the spot and the fix
|
160
|
+
* Added a Changelog file
|
161
|
+
* Added a README.html file
|
162
|
+
* Added a Manifest file
|
163
|
+
|
164
|
+
== 0.01 - 31-May-2002
|
165
|
+
* Initial release (unannounced)
|
data/MANIFEST
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
* MANIFEST
|
2
|
-
* CHANGES
|
3
|
-
* README
|
4
|
-
* Rakefile
|
5
|
-
* sys-uname.gemspec
|
6
|
-
* doc/uname.txt
|
7
|
-
* examples/uname_test.rb
|
8
|
-
* ext/extconf.rb
|
9
|
-
* ext/uname.c
|
10
|
-
* lib/sys/uname.rb
|
11
|
-
* test/tc_uname.rb
|
1
|
+
* MANIFEST
|
2
|
+
* CHANGES
|
3
|
+
* README
|
4
|
+
* Rakefile
|
5
|
+
* sys-uname.gemspec
|
6
|
+
* doc/uname.txt
|
7
|
+
* examples/uname_test.rb
|
8
|
+
* ext/extconf.rb
|
9
|
+
* ext/uname.c
|
10
|
+
* lib/sys/uname.rb
|
11
|
+
* test/tc_uname.rb
|
data/README
CHANGED
@@ -1,36 +1,39 @@
|
|
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
|
-
=
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
gem install sys-uname
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
=
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
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
|
+
# If that doesn't work and you're on Windows try this:
|
12
|
+
gem install sys-uname --platform universal-mingw32
|
13
|
+
|
14
|
+
= Synopsis
|
15
|
+
require 'sys/uname'
|
16
|
+
include Sys
|
17
|
+
|
18
|
+
p Uname.uname
|
19
|
+
|
20
|
+
= Solaris Notes
|
21
|
+
Users on SunOS get several extra methods: architecture, platform,
|
22
|
+
hw_serial, hw_provider, srpc_domain, isa_list, and dhcp_cache.
|
23
|
+
|
24
|
+
= BSD flavors, including OS X
|
25
|
+
Users on BSD platforms get the extra Uname.model method.
|
26
|
+
|
27
|
+
= HP-UX Notes
|
28
|
+
HP-UX users get the extra Uname.id_number method. This is actually a
|
29
|
+
String, not a Fixnum, because that's how it's defined in the utsname
|
30
|
+
struct.
|
31
|
+
|
32
|
+
= MS Windows Notes
|
33
|
+
The C version for Windows has been completely scrapped in favor of an OLE
|
34
|
+
plus WMI approach. It is pure Ruby. Please see the MSDN documentation for
|
35
|
+
the Win32_OperatingSystem class for a complete list of what each of the
|
36
|
+
UnameStruct members mean.
|
37
|
+
|
38
|
+
= Documentation
|
39
|
+
For more details, see the 'uname.txt' file under the 'doc' directory.
|
data/Rakefile
CHANGED
@@ -1,61 +1,50 @@
|
|
1
|
-
require 'rake'
|
2
|
-
require 'rake/
|
3
|
-
require 'rake/
|
4
|
-
require 'rbconfig'
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
end
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
end
|
49
|
-
|
50
|
-
|
51
|
-
Rake::TestTask.new("test") do |t|
|
52
|
-
if WINDOWS
|
53
|
-
t.libs << 'lib'
|
54
|
-
else
|
55
|
-
task :test => :build
|
56
|
-
t.libs << 'ext'
|
57
|
-
t.libs.delete('lib')
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
task :default => :test
|
1
|
+
require 'rake'
|
2
|
+
require 'rake/testtask'
|
3
|
+
require 'rake/clean'
|
4
|
+
require 'rbconfig'
|
5
|
+
|
6
|
+
CLEAN.include("**/*.rbc", "**/*.rbx", "**/*.gem")
|
7
|
+
|
8
|
+
desc "Run the example program"
|
9
|
+
task :example do
|
10
|
+
if File::ALT_SEPARATOR
|
11
|
+
sh 'ruby -Ilib/windows examples/uname_test.rb'
|
12
|
+
else
|
13
|
+
sh 'ruby -Ilib/unix examples/uname_test.rb'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
namespace :gem do
|
18
|
+
desc "Create the sys-uname gem"
|
19
|
+
task :create => [:clean] do
|
20
|
+
spec = eval(IO.read('sys-uname.gemspec'))
|
21
|
+
|
22
|
+
if File::ALT_SEPARATOR
|
23
|
+
spec.platform = Gem::Platform::CURRENT
|
24
|
+
spec.platform.cpu = 'universal'
|
25
|
+
spec.platform.version = nil
|
26
|
+
end
|
27
|
+
|
28
|
+
Gem::Builder.new(spec).build
|
29
|
+
end
|
30
|
+
|
31
|
+
desc "Install the sys-uname gem"
|
32
|
+
task :install => [:build] do
|
33
|
+
file = Dir["*.gem"].first
|
34
|
+
sh "gem install #{file}"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
desc "Run the test suite"
|
39
|
+
Rake::TestTask.new("test") do |t|
|
40
|
+
if File::ALT_SEPARATOR
|
41
|
+
t.libs << 'lib/windows'
|
42
|
+
else
|
43
|
+
t.libs << 'lib/unix'
|
44
|
+
end
|
45
|
+
|
46
|
+
t.warning = true
|
47
|
+
t.verbose = true
|
48
|
+
end
|
49
|
+
|
50
|
+
task :default => :test
|