sys-uname 0.9.2-universal-mingw32 → 1.5.1-universal-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.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data/{CHANGES → CHANGES.md} +113 -26
- data/Gemfile +2 -0
- data/LICENSE +177 -0
- data/MANIFEST.md +12 -0
- data/README.md +62 -0
- data/Rakefile +13 -19
- data/certs/djberg96_pub.pem +26 -0
- data/doc/uname.rdoc +95 -0
- data/examples/uname_test.rb +7 -19
- data/lib/sys/platform.rb +51 -0
- data/lib/sys/uname.rb +21 -0
- data/lib/{unix/sys → sys/unix}/uname.rb +33 -88
- data/lib/sys/windows/uname.rb +509 -0
- data/lib/sys-uname.rb +3 -0
- data/spec/spec_helper.rb +11 -0
- data/spec/sys_platform_spec.rb +64 -0
- data/spec/sys_uname_spec.rb +471 -0
- data/sys-uname.gemspec +36 -16
- data.tar.gz.sig +0 -0
- metadata +170 -35
- metadata.gz.sig +0 -0
- data/MANIFEST +0 -11
- data/README +0 -39
- data/doc/uname.txt +0 -127
- data/lib/windows/sys/uname.rb +0 -469
- data/test/test_sys_uname.rb +0 -463
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: c5398c92af9bed59a6f1af226e0526a3570de5d5f976246e67b143d4d4f37094
|
|
4
|
+
data.tar.gz: ec4d94974f08a97ad8a74db528c98ae20e8584306d2fa80d9042377a6920f117
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 3dca25b112598e3044a58425f5ec91215160ea9149e7264d4acace914687f4d286a5ecb35428f9c4bc7521eec24a7092340848d8ea7267f1d7512be7da484b3e
|
|
7
|
+
data.tar.gz: 970405233ec817cb92a99be719f4439c9e60a91f269cb601f1006fb3322db698cd1d1182dffdf11c7d1f2abfd8882b5eeb73ca148dd8a7c229dd796f1c049397
|
checksums.yaml.gz.sig
ADDED
|
Binary file
|
data/{CHANGES → CHANGES.md}
RENAMED
|
@@ -1,29 +1,116 @@
|
|
|
1
|
-
|
|
1
|
+
## 1.5.1 - 17-Mar-2026
|
|
2
|
+
* Updated the gemspec for Windows. Going forward we'll have to release two
|
|
3
|
+
versions of each gem since Windows has different dependencies. I already
|
|
4
|
+
do this for most of my other gems, I was being lazy and hoping it wouldn't
|
|
5
|
+
matter, but cucumber already puked on it.
|
|
6
|
+
|
|
7
|
+
## 1.5.0 - 16-Feb-2026
|
|
8
|
+
* The win32ole gem is now a dependency for Windows since it's no longer
|
|
9
|
+
bundled with Ruby 4.x.
|
|
10
|
+
|
|
11
|
+
## 1.4.1 - 1-Sep-2025
|
|
12
|
+
* Use memoist3 instead of memoist since the latter is unmaintained. Thanks
|
|
13
|
+
got to Matijs van Zuijlen for the suggestion.
|
|
14
|
+
|
|
15
|
+
## 1.4.0 - 26-Aug-2025
|
|
16
|
+
* The sysname, nodename, release, version and machine methods are now memoized.
|
|
17
|
+
* The memoist gem has been added as a dependency.
|
|
18
|
+
* Specs added for memoization.
|
|
19
|
+
|
|
20
|
+
## 1.3.1 - 19-Nov-2024
|
|
21
|
+
* Remove a useless ostruct require. Thanks go to Koichi Ito for the spot and patch.
|
|
22
|
+
|
|
23
|
+
## 1.3.0 - 10-Jun-2024
|
|
24
|
+
* Added DragonflyBSD support.
|
|
25
|
+
* Removed Solaris support, it's dead.
|
|
26
|
+
|
|
27
|
+
## 1.2.3 - 9-Apr-2023
|
|
28
|
+
* Added rubygems_mfa_required and github_repo to metadata.
|
|
29
|
+
* Miscellaneous rubocop related updates.
|
|
30
|
+
* Fixed one test for Windows.
|
|
31
|
+
* The rubocop and rubocop-rspec gems are now development dependencies.
|
|
32
|
+
* Now assumes Ruby 2.0 or later.
|
|
33
|
+
|
|
34
|
+
## 1.2.2 - 30-Oct-2020
|
|
35
|
+
* Added a Gemfile.
|
|
36
|
+
* The ffi dependency is now slightly more restrictive.
|
|
37
|
+
* Added rake as a development dependency (which it really always was).
|
|
38
|
+
* Switched from rdoc to markdown because github wouldn't render it properly.
|
|
39
|
+
|
|
40
|
+
## 1.2.1 - 17-Mar-2020
|
|
41
|
+
* Properly include a LICENSE file as per the Apache-2.0 license.
|
|
42
|
+
|
|
43
|
+
## 1.2.0 - 5-Jan-2020
|
|
44
|
+
* Changed test suite from test-unit to rspec, which was also added as a
|
|
45
|
+
development dependency.
|
|
46
|
+
* Several new fields were added to the returned object on Windows. The fields
|
|
47
|
+
are encryption_level, product_type, suite_mask and system_drive.
|
|
48
|
+
|
|
49
|
+
## 1.1.1 - 10-Dec-2019
|
|
50
|
+
* Renamed various text files to include explicit .rdoc extension so that
|
|
51
|
+
they show up more nicely on github.
|
|
52
|
+
|
|
53
|
+
## 1.1.0 - 29-Aug-2019
|
|
54
|
+
* Changed license to Apache-2.0.
|
|
55
|
+
* Updated the doc/uname.txt file.
|
|
56
|
+
* Minor test updates.
|
|
57
|
+
|
|
58
|
+
## 1.0.4 - 4-Nov-2018
|
|
59
|
+
* Added metadata to the gemspec.
|
|
60
|
+
* Updated the cert, which will expire in about 10 years.
|
|
61
|
+
|
|
62
|
+
## 1.0.3 - 31-Oct-2016
|
|
63
|
+
* Updated the gem cert. It will expire on 31-Oct-2019.
|
|
64
|
+
* Minor updates to the Rakefile and gemspec.
|
|
65
|
+
|
|
66
|
+
## 1.0.2 - 3-Sep-2015
|
|
67
|
+
* The gem is now signed.
|
|
68
|
+
* Modified gemspec and Rakefile to support signing.
|
|
69
|
+
|
|
70
|
+
## 1.0.1 - 19-Aug-2015
|
|
71
|
+
* Modified Platform::IMPL so that it does not include "32" as part of the
|
|
72
|
+
symbol name. This isn't useful since it's the same on 32 or 64-bit Windows.
|
|
73
|
+
* Reorganized code a bit so that the VERSION constant is in a single place.
|
|
74
|
+
* For consistency, there is also a Platform::VERSION. This is the same value
|
|
75
|
+
as Uname::VERSION.
|
|
76
|
+
* Added a test for Sys::Platform::IMPL on Windows.
|
|
77
|
+
|
|
78
|
+
## 1.0.0 - 19-Aug-2015
|
|
79
|
+
* Added a sys-uname.rb shim so that you can require this library with
|
|
80
|
+
"sys-uname" or "sys/uname".
|
|
81
|
+
* Added the architecture method for MS Windows.
|
|
82
|
+
* Added a Sys::Platform class that adds several boolean methods to check
|
|
83
|
+
your operating system. It also adds the ARCH, OS, and IMPL constants
|
|
84
|
+
to simulate, and ultimately replace, the old "Platform" gem.
|
|
85
|
+
* There is now just a single gem, instead of a separate gem for Windows
|
|
86
|
+
and Unix, so you shouldn't need to worry about platform checking.
|
|
87
|
+
|
|
88
|
+
## 0.9.2 - 1-May-2013
|
|
2
89
|
* Added a workaround for a win32ole thread bug. Thanks go to Tianlong Wu
|
|
3
90
|
for the spot.
|
|
4
91
|
* Altered platform handling slightly for Windows in the Rakefile.
|
|
5
92
|
|
|
6
|
-
|
|
93
|
+
## 0.9.1 - 3-Jan-2013
|
|
7
94
|
* Made FFI functions private.
|
|
8
95
|
* Properly alias uname FFI function.
|
|
9
96
|
* Fixed the QuantumLength and QuantumType bug again (see 0.8.4), which I
|
|
10
97
|
somehow accidentally reintroduced.
|
|
11
98
|
|
|
12
|
-
|
|
99
|
+
## 0.9.0 - 8-Dec-2011
|
|
13
100
|
* Conversion to FFI.
|
|
14
101
|
* Added some additional methods and information for Solaris.
|
|
15
102
|
* Minor tweaks for 1.9 to silence warnings.
|
|
16
103
|
|
|
17
|
-
|
|
104
|
+
## 0.8.6 - 2-Sep-2011
|
|
18
105
|
* Fixed a failing test for Ruby 1.9.x.
|
|
19
106
|
* The gemspec for Windows is now 'universal'.
|
|
20
107
|
* Some minor doc updates.
|
|
21
108
|
|
|
22
|
-
|
|
109
|
+
## 0.8.5 - 11-Dec-2010
|
|
23
110
|
* Removed some non-ascii characters that somehow made it into the source.
|
|
24
111
|
* Some updates to the Rakefile, including a default task.
|
|
25
112
|
|
|
26
|
-
|
|
113
|
+
## 0.8.4 - 29-Jan-2010
|
|
27
114
|
* Bug fix for Windows 7, which appears to have removed the QuantumLength and
|
|
28
115
|
QuantumType members of the Win32_OperatingSystem class. Thanks go to Mark
|
|
29
116
|
Seymour for the spot. RubyForge bug # 27645.
|
|
@@ -32,23 +119,23 @@
|
|
|
32
119
|
now all inlined within the Rakefile build task itself.
|
|
33
120
|
* Minor doc updates and some code reformatting.
|
|
34
121
|
|
|
35
|
-
|
|
122
|
+
## 0.8.3 - 26-Apr-2008
|
|
36
123
|
* Added an explicit "require 'time'" in the Windows version because recent
|
|
37
124
|
versions of Ruby now need it.
|
|
38
125
|
* Changed the way I do platform checks in the Rakefile.
|
|
39
126
|
|
|
40
|
-
|
|
127
|
+
## 0.8.2 - 22-Nov-2007
|
|
41
128
|
* Fixed an issue where Ruby no longer parsed a certain type of date that
|
|
42
129
|
MS Windows uses. See RubyForge Bug #10646 for more information.
|
|
43
130
|
|
|
44
|
-
|
|
131
|
+
## 0.8.1 - 29-Aug-2007
|
|
45
132
|
* Made a minor modification to the build script for Linux. It turns out Linux
|
|
46
133
|
has sysctl, but not the necessary mibs for the Uname.model method. Thanks go
|
|
47
134
|
to Mickey Knox (?) for the spot.
|
|
48
135
|
* Removed the install.rb file. The code from that program was integrated
|
|
49
136
|
directly into the Rakefile.
|
|
50
137
|
|
|
51
|
-
|
|
138
|
+
## 0.8.0 - 10-Apr-2007
|
|
52
139
|
* The Uname.model method should now work on most BSD platforms, not just OS X,
|
|
53
140
|
since it uses the sysctl() function behind the scenes.
|
|
54
141
|
* The 'id' method was changed to 'id_number' on HP-UX to avoid confusion with
|
|
@@ -59,22 +146,22 @@
|
|
|
59
146
|
* Removed some pre-setup code from the test suite that was no longer necessary
|
|
60
147
|
as a result of the Rake test task.
|
|
61
148
|
|
|
62
|
-
|
|
149
|
+
## 0.7.4 - 19-Nov-2006
|
|
63
150
|
* Internal layout changes, doc updates and gemspec improvements.
|
|
64
151
|
* No code changes.
|
|
65
152
|
|
|
66
|
-
|
|
153
|
+
## 0.7.3 - 30-Jul-2006
|
|
67
154
|
* Bug fix for 64 bit platforms.
|
|
68
155
|
* Minor modification of the extconf.rb file.
|
|
69
156
|
|
|
70
|
-
|
|
157
|
+
## 0.7.2 - 5-Jul-2006
|
|
71
158
|
* Removed '?' from the struct member names on MS Windows since these are no
|
|
72
159
|
longer legal.
|
|
73
160
|
* Removed duplicate definition of Uname.version on MS Windows (oops).
|
|
74
161
|
* Added a gemspec.
|
|
75
162
|
* Added inline rdoc documentation to the source files.
|
|
76
163
|
|
|
77
|
-
|
|
164
|
+
## 0.7.1 - 5-May-2005
|
|
78
165
|
* Removed the uname.rd file. The uname.txt file is rdoc friendly, so you
|
|
79
166
|
can autogenerate html from that file if you wish.
|
|
80
167
|
* Removed the version.h file - no longer needed now that the Windows version
|
|
@@ -83,7 +170,7 @@
|
|
|
83
170
|
* Minor setup modifications to the test suite.
|
|
84
171
|
* This package is now hosted on RubyForge.
|
|
85
172
|
|
|
86
|
-
|
|
173
|
+
## 0.7.0 - 11-Jan-2004
|
|
87
174
|
* Scrapped the C version for Windows in favor of a pure Ruby version that uses
|
|
88
175
|
WMI + OLE. I highly recommend using Ruby 1.8.2 or later on Win32 systems.
|
|
89
176
|
Earlier versions may cause segfaults.
|
|
@@ -95,18 +182,18 @@
|
|
|
95
182
|
* Removed the INSTALL file. That information is now included in the README.
|
|
96
183
|
* Documentation updates.
|
|
97
184
|
|
|
98
|
-
|
|
185
|
+
## 0.6.1 - 25-Apr-2004
|
|
99
186
|
* Simplified extconf.rb script and installation instructions.
|
|
100
187
|
* Combined three test scripts into a single test script.
|
|
101
188
|
* Warranty information added.
|
|
102
189
|
|
|
103
|
-
|
|
190
|
+
## 0.6.0 - 25-Jun-2003
|
|
104
191
|
* Added HP-UX support, including the id() class method (HP-UX only)
|
|
105
192
|
* Fixed minor bug in extconf.rb (forgot 'require ftools' at top)
|
|
106
193
|
* Added HP-UX specific tests and support
|
|
107
194
|
* Made test.rb friendlier for folks without TestUnit installed
|
|
108
195
|
|
|
109
|
-
|
|
196
|
+
## 0.5.0 - 16-Jun-2003
|
|
110
197
|
* Added OS X support, including the "model" method. Thanks to Mike Hall
|
|
111
198
|
for the patch
|
|
112
199
|
* Removed VERSION() class method. Use the constant instead
|
|
@@ -119,17 +206,17 @@
|
|
|
119
206
|
* Fixed up test suite. Added OS X specific tests and support. Should now
|
|
120
207
|
work with TestUnit 0.1.6 or later
|
|
121
208
|
|
|
122
|
-
|
|
209
|
+
## 0.4.1 - 7-Feb-2003
|
|
123
210
|
* Fixed C89 issue (again) - thanks go to Daniel Zepeda for the spot
|
|
124
211
|
* Fixed bugs in extconf.rb file (rescue clause, ftools)
|
|
125
212
|
|
|
126
|
-
|
|
213
|
+
## 0.4.0 - 6-Feb-2003
|
|
127
214
|
* MS Windows support!
|
|
128
215
|
* Added a test suite and automatic test.rb creation
|
|
129
216
|
* Documentation additions/fixes
|
|
130
217
|
* Internal directory layout and filename changes (Changelog -> CHANGES)
|
|
131
218
|
|
|
132
|
-
|
|
219
|
+
## 0.3.3 - 6-Jan-2003
|
|
133
220
|
* Made the code C89 compliant for older compilers. Thanks to Paul Brannan
|
|
134
221
|
for teaching me how to fix this in general.
|
|
135
222
|
* Moved README to doc/uname.txt
|
|
@@ -139,14 +226,14 @@
|
|
|
139
226
|
* Changed tarball name to reflect RAA package name
|
|
140
227
|
* Minor doc changes
|
|
141
228
|
|
|
142
|
-
|
|
229
|
+
## 0.3.2 - 8-Aug-2002
|
|
143
230
|
* Changed the struct name returned by the 'uname()' method from
|
|
144
231
|
"Uname::UnameStruct" to just "UnameStruct". This was to make it
|
|
145
232
|
compliant with future versions of Ruby. The extra namespace was
|
|
146
233
|
redundant anyway.
|
|
147
234
|
* I include the documentation now, instead of making you install rd2 :)
|
|
148
235
|
|
|
149
|
-
|
|
236
|
+
## 0.3.1 - 22-Jul-2002
|
|
150
237
|
* Added the 'uname' class method, which returns a struct that contains all
|
|
151
238
|
of the uname information
|
|
152
239
|
* Added a test script. Do 'ruby test.rb' to run it.
|
|
@@ -156,7 +243,7 @@
|
|
|
156
243
|
* Changed version number style to be consistent with other 'Sys' modules
|
|
157
244
|
* Now installs into 'Sys-Uname-x.x.x' directory (instead of just 'Uname')
|
|
158
245
|
|
|
159
|
-
|
|
246
|
+
## 0.03 - 6-June-2002
|
|
160
247
|
* rd style documentation now inline
|
|
161
248
|
* README.html is now uname.html - created via rdtool
|
|
162
249
|
* The 'platform()' and 'architecture()' methods have been added for Solaris
|
|
@@ -164,7 +251,7 @@
|
|
|
164
251
|
* The whole 'Sys' class has been removed. Delete your sys.so file if you
|
|
165
252
|
installed a previous version of Sys-Uname
|
|
166
253
|
|
|
167
|
-
|
|
254
|
+
## 0.02 - 3-June-2002
|
|
168
255
|
* Potentially fatal memory problems corrected.
|
|
169
256
|
* Should now build with C++ as well
|
|
170
257
|
* Thanks to Mike Hall for both the spot and the fix
|
|
@@ -172,5 +259,5 @@
|
|
|
172
259
|
* Added a README.html file
|
|
173
260
|
* Added a Manifest file
|
|
174
261
|
|
|
175
|
-
|
|
262
|
+
## 0.01 - 31-May-2002
|
|
176
263
|
* Initial release (unannounced)
|
data/Gemfile
ADDED
data/LICENSE
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
data/MANIFEST.md
ADDED
data/README.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
[](https://github.com/djberg96/sys-uname/actions/workflows/ruby.yml)
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
A cross-platform Ruby interface for getting operating system information. The name
|
|
5
|
+
comes from the Unix 'uname' command, but this library works on MS Windows as well.
|
|
6
|
+
|
|
7
|
+
## Prerequisites
|
|
8
|
+
ffi 1.0 or later
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
`gem install sys-uname`
|
|
12
|
+
|
|
13
|
+
## Adding the trusted cert
|
|
14
|
+
`gem cert --add <(curl -Ls https://raw.githubusercontent.com/djberg96/sys-uname/main/certs/djberg96_pub.pem)`
|
|
15
|
+
|
|
16
|
+
## Synopsis
|
|
17
|
+
```ruby
|
|
18
|
+
require 'sys/uname' # require 'sys-uname' works, too
|
|
19
|
+
|
|
20
|
+
# You now have Sys::Uname and Sys::Platform classes available.
|
|
21
|
+
|
|
22
|
+
# Get full information about your system
|
|
23
|
+
p Sys::Uname.uname
|
|
24
|
+
|
|
25
|
+
# Check individual platform details about your system
|
|
26
|
+
p Sys::Platform.linux? # => true
|
|
27
|
+
p Sys::Platform::ARCH # => :x86_64
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Memoist Notes
|
|
31
|
+
As of version 1.4.0 most methods are memoized via the memoist gem since
|
|
32
|
+
these values are extremely unlikely to change without a restart/reboot. As
|
|
33
|
+
per the memoist documentation, you can force a cache flush if desired to
|
|
34
|
+
refresh the values.
|
|
35
|
+
|
|
36
|
+
https://github.com/honzasterba/memoist
|
|
37
|
+
|
|
38
|
+
## BSD flavors, including OS X
|
|
39
|
+
Users on BSD platforms get the extra `Uname.model` method.
|
|
40
|
+
|
|
41
|
+
## HP-UX Notes
|
|
42
|
+
HP-UX users get the extra `Uname.id_number` method. This is actually a
|
|
43
|
+
String, not a Fixnum, because that's how it's defined in the utsname
|
|
44
|
+
struct.
|
|
45
|
+
|
|
46
|
+
## MS Windows Notes
|
|
47
|
+
The C version for Windows has been completely scrapped in favor of an OLE
|
|
48
|
+
plus WMI approach. It is pure Ruby. Please see the MSDN documentation for
|
|
49
|
+
the `Win32_OperatingSystem` class for a complete list of what each of the
|
|
50
|
+
UnameStruct members mean.
|
|
51
|
+
|
|
52
|
+
## The Platform Class
|
|
53
|
+
This was added both as a nicer way to check simple information about your
|
|
54
|
+
system, and as a replacement for the old 'Platform' gem which is no longer
|
|
55
|
+
maintained.
|
|
56
|
+
|
|
57
|
+
## Future Plans
|
|
58
|
+
I may dump the "Uname" portion of this library, and rename the project
|
|
59
|
+
to just sys-platform.
|
|
60
|
+
|
|
61
|
+
## Documentation
|
|
62
|
+
For more details, see the 'uname.rdoc' file under the 'doc' directory.
|
data/Rakefile
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
require 'rake'
|
|
2
|
-
require 'rake/testtask'
|
|
3
2
|
require 'rake/clean'
|
|
4
3
|
require 'rbconfig'
|
|
4
|
+
require 'rspec/core/rake_task'
|
|
5
|
+
require 'rubocop/rake_task'
|
|
5
6
|
|
|
6
|
-
CLEAN.include("**/*.rbc", "**/*.rbx", "**/*.gem")
|
|
7
|
+
CLEAN.include("**/*.rbc", "**/*.rbx", "**/*.gem", "**/*.lock")
|
|
7
8
|
|
|
8
9
|
desc "Run the example program"
|
|
9
10
|
task :example do
|
|
@@ -17,32 +18,25 @@ end
|
|
|
17
18
|
namespace :gem do
|
|
18
19
|
desc "Create the sys-uname gem"
|
|
19
20
|
task :create => [:clean] do
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
Gem::Builder.new(spec).build
|
|
21
|
+
require 'rubygems/package'
|
|
22
|
+
spec = Gem::Specification.load('sys-uname.gemspec')
|
|
23
|
+
spec.signing_key = File.join(Dir.home, '.ssh', 'gem-private_key.pem')
|
|
24
|
+
Gem::Package.build(spec)
|
|
27
25
|
end
|
|
28
26
|
|
|
29
27
|
desc "Install the sys-uname gem"
|
|
30
|
-
task :install => [:
|
|
28
|
+
task :install => [:create] do
|
|
31
29
|
file = Dir["*.gem"].first
|
|
32
30
|
sh "gem install #{file}"
|
|
33
31
|
end
|
|
34
32
|
end
|
|
35
33
|
|
|
36
|
-
|
|
37
|
-
Rake::TestTask.new("test") do |t|
|
|
38
|
-
if File::ALT_SEPARATOR
|
|
39
|
-
t.libs << 'lib/windows'
|
|
40
|
-
else
|
|
41
|
-
t.libs << 'lib/unix'
|
|
42
|
-
end
|
|
34
|
+
RuboCop::RakeTask.new
|
|
43
35
|
|
|
44
|
-
|
|
36
|
+
desc "Run the test suite"
|
|
37
|
+
RSpec::Core::RakeTask.new(:spec) do |t|
|
|
45
38
|
t.verbose = true
|
|
39
|
+
t.rspec_opts = '-f documentation -w'
|
|
46
40
|
end
|
|
47
41
|
|
|
48
|
-
task :default => :
|
|
42
|
+
task :default => :spec
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
|
2
|
+
MIIEcDCCAtigAwIBAgIBATANBgkqhkiG9w0BAQsFADA/MREwDwYDVQQDDAhkamJl
|
|
3
|
+
cmc5NjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYDY29t
|
|
4
|
+
MB4XDTE4MDMxODE1MjIwN1oXDTI4MDMxNTE1MjIwN1owPzERMA8GA1UEAwwIZGpi
|
|
5
|
+
ZXJnOTYxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
|
|
6
|
+
bTCCAaIwDQYJKoZIhvcNAQEBBQADggGPADCCAYoCggGBALgfaroVM6CI06cxr0/h
|
|
7
|
+
A+j+pc8fgpRgBVmHFaFunq28GPC3IvW7Nvc3Y8SnAW7pP1EQIbhlwRIaQzJ93/yj
|
|
8
|
+
u95KpkP7tA9erypnV7dpzBkzNlX14ACaFD/6pHoXoe2ltBxk3CCyyzx70mTqJpph
|
|
9
|
+
75IB03ni9a8yqn8pmse+s83bFJOAqddSj009sGPcQO+QOWiNxqYv1n5EHcvj2ebO
|
|
10
|
+
6hN7YTmhx7aSia4qL/quc4DlIaGMWoAhvML7u1fmo53CYxkKskfN8MOecq2vfEmL
|
|
11
|
+
iLu+SsVVEAufMDDFMXMJlvDsviolUSGMSNRTujkyCcJoXKYYxZSNtIiyd9etI0X3
|
|
12
|
+
ctu0uhrFyrMZXCedutvXNjUolD5r9KGBFSWH1R9u2I3n3SAyFF2yzv/7idQHLJJq
|
|
13
|
+
74BMnx0FIq6fCpu5slAipvxZ3ZkZpEXZFr3cIBtO1gFvQWW7E/Y3ijliWJS1GQFq
|
|
14
|
+
058qERadHGu1yu1dojmFRo6W2KZvY9al2yIlbkpDrD5MYQIDAQABo3cwdTAJBgNV
|
|
15
|
+
HRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUFZsMapgzJimzsbaBG2Tm8j5e
|
|
16
|
+
AzgwHQYDVR0RBBYwFIESZGpiZXJnOTZAZ21haWwuY29tMB0GA1UdEgQWMBSBEmRq
|
|
17
|
+
YmVyZzk2QGdtYWlsLmNvbTANBgkqhkiG9w0BAQsFAAOCAYEAW2tnYixXQtKxgGXq
|
|
18
|
+
/3iSWG2bLwvxS4go3srO+aRXZHrFUMlJ5W0mCxl03aazxxKTsVVpZD8QZxvK91OQ
|
|
19
|
+
h9zr9JBYqCLcCVbr8SkmYCi/laxIZxsNE5YI8cC8vvlLI7AMgSfPSnn/Epq1GjGY
|
|
20
|
+
6L1iRcEDtanGCIvjqlCXO9+BmsnCfEVehqZkQHeYczA03tpOWb6pon2wzvMKSsKH
|
|
21
|
+
ks0ApVdstSLz1kzzAqem/uHdG9FyXdbTAwH1G4ZPv69sQAFAOCgAqYmdnzedsQtE
|
|
22
|
+
1LQfaQrx0twO+CZJPcRLEESjq8ScQxWRRkfuh2VeR7cEU7L7KqT10mtUwrvw7APf
|
|
23
|
+
DYoeCY9KyjIBjQXfbj2ke5u1hZj94Fsq9FfbEQg8ygCgwThnmkTrrKEiMSs3alYR
|
|
24
|
+
ORVCZpRuCPpmC8qmqxUnARDArzucjaclkxjLWvCVHeFa9UP7K3Nl9oTjJNv+7/jM
|
|
25
|
+
WZs4eecIcUc4tKdHxcAJ0MO/Dkqq7hGaiHpwKY76wQ1+8xAh
|
|
26
|
+
-----END CERTIFICATE-----
|