sys-uname 1.0.0 → 1.0.1
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 +4 -4
- data/CHANGES +8 -0
- data/lib/sys/platform.rb +1 -1
- data/lib/sys/uname.rb +12 -0
- data/lib/sys/unix/uname.rb +0 -3
- data/lib/sys/windows/uname.rb +0 -3
- data/sys-uname.gemspec +1 -1
- data/test/test_sys_platform.rb +9 -0
- data/test/test_sys_uname.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6cf58c2b49c3653f0a2908bc9467e367ddf6dc7e
|
4
|
+
data.tar.gz: 1219f16c56bea85b6a8bf089924d58e241ecf941
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adf858a01bc6da65ce82bb826ff491128b783f62966c67c01daf1e9e3229d039704ccc90655f9a004dda86db137c2b402c66d7606ee3d9b63ae44939ddcc9007
|
7
|
+
data.tar.gz: 94ce64befd69e63857943c17c672e1d36fdb7b38f387066a8f1e1138d1ef45446352a2bfbecc821f583b40073ef64272fdf0923cadc73a8c08b80d572e4f92fb
|
data/CHANGES
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
== 1.0.1 - 19-Aug-2015
|
2
|
+
* Modified Platform::IMPL so that it does not include "32" as part of the
|
3
|
+
symbol name. This isn't useful since it's the same on 32 or 64-bit Windows.
|
4
|
+
* Reorganized code a bit so that the VERSION constant is in a single place.
|
5
|
+
* For consistency, there is also a Platform::VERSION. This is the same value
|
6
|
+
as Uname::VERSION.
|
7
|
+
* Added a test for Sys::Platform::IMPL on Windows.
|
8
|
+
|
1
9
|
== 1.0.0 - 19-Aug-2015
|
2
10
|
* Added a sys-uname.rb shim so that you can require this library with
|
3
11
|
"sys-uname" or "sys/uname".
|
data/lib/sys/platform.rb
CHANGED
data/lib/sys/uname.rb
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
module Sys
|
2
|
+
class Uname
|
3
|
+
# The version of the sys-uname gem.
|
4
|
+
VERSION = "1.0.1"
|
5
|
+
end
|
6
|
+
|
7
|
+
class Platform
|
8
|
+
# The version of the sys-uname gem.
|
9
|
+
VERSION = Uname::VERSION
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
1
13
|
if File::ALT_SEPARATOR
|
2
14
|
require_relative 'windows/uname'
|
3
15
|
else
|
data/lib/sys/unix/uname.rb
CHANGED
data/lib/sys/windows/uname.rb
CHANGED
data/sys-uname.gemspec
CHANGED
data/test/test_sys_platform.rb
CHANGED
@@ -13,6 +13,10 @@ class TC_Sys_Platform < Test::Unit::TestCase
|
|
13
13
|
@@windows = @@host_os =~ /mingw|mswin|windows/i ? true : false
|
14
14
|
end
|
15
15
|
|
16
|
+
test "the VERSION constant is set to the expected value" do
|
17
|
+
assert_equal('1.0.1', Sys::Platform::VERSION)
|
18
|
+
end
|
19
|
+
|
16
20
|
test "the ARCH constant is defined" do
|
17
21
|
assert_kind_of(Symbol, Sys::Platform::ARCH)
|
18
22
|
end
|
@@ -25,6 +29,11 @@ class TC_Sys_Platform < Test::Unit::TestCase
|
|
25
29
|
assert_kind_of(Symbol, Sys::Platform::IMPL)
|
26
30
|
end
|
27
31
|
|
32
|
+
test "the IMPL returns an expected value" do
|
33
|
+
omit_unless(@@windows)
|
34
|
+
assert_true([:mingw, :mswin].include?(Sys::Platform::IMPL))
|
35
|
+
end
|
36
|
+
|
28
37
|
test "the mac? method is defined and returns a boolean" do
|
29
38
|
assert_respond_to(Sys::Platform, :mac?)
|
30
39
|
assert_boolean(Sys::Platform.mac?)
|
data/test/test_sys_uname.rb
CHANGED
metadata
CHANGED
@@ -1,24 +1,24 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sys-uname
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2015-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: ffi
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
16
15
|
requirements:
|
17
16
|
- - ">="
|
18
17
|
- !ruby/object:Gem::Version
|
19
18
|
version: 1.0.0
|
20
|
-
|
19
|
+
name: ffi
|
21
20
|
prerelease: false
|
21
|
+
type: :runtime
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
@@ -57,7 +57,7 @@ homepage: http://github.com/djberg96/sys-uname
|
|
57
57
|
licenses:
|
58
58
|
- Artistic 2.0
|
59
59
|
metadata: {}
|
60
|
-
post_install_message:
|
60
|
+
post_install_message:
|
61
61
|
rdoc_options: []
|
62
62
|
require_paths:
|
63
63
|
- lib
|
@@ -72,9 +72,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
72
|
- !ruby/object:Gem::Version
|
73
73
|
version: '0'
|
74
74
|
requirements: []
|
75
|
-
rubyforge_project:
|
76
|
-
rubygems_version: 2.4.
|
77
|
-
signing_key:
|
75
|
+
rubyforge_project:
|
76
|
+
rubygems_version: 2.4.8
|
77
|
+
signing_key:
|
78
78
|
specification_version: 4
|
79
79
|
summary: An interface for returning uname (platform) information
|
80
80
|
test_files:
|