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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 634e16ee327f71855ae5beb73f403d3d9801969a
4
- data.tar.gz: 51c9a68e6caaed60bd4795e0a800ca55500a8d03
3
+ metadata.gz: 6cf58c2b49c3653f0a2908bc9467e367ddf6dc7e
4
+ data.tar.gz: 1219f16c56bea85b6a8bf089924d58e241ecf941
5
5
  SHA512:
6
- metadata.gz: 92410aef8438e64c17fd2f055f2015d7d013ee15915bc36511193df3156e66e962e2638caee2a818452b6c5facc43b56d67c84fd5124538723aeb22d0816c1d0
7
- data.tar.gz: 89ddf92b1a4d5a0dcbe8dce8f944f42115d179f69508c7f473ac2cfc23063440e37d1068f39ecd779f3b9e6201a7f4b55d2b463d29a9f8a4d48a98cba9601d74
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".
@@ -12,7 +12,7 @@ module Sys
12
12
  :macosx
13
13
  when /mingw|windows/i
14
14
  require 'rbconfig'
15
- RbConfig::CONFIG['host_os'].split('_').first.to_sym
15
+ RbConfig::CONFIG['host_os'].split('_').first[/[a-z]+/i].downcase.to_sym
16
16
  when /linux/i
17
17
  :linux
18
18
  when /sunos|solaris/i
@@ -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
@@ -12,9 +12,6 @@ module Sys
12
12
  # Error raised if the uname() function fails.
13
13
  class Error < StandardError; end
14
14
 
15
- # The version of the sys-uname library
16
- VERSION = '1.0.0'
17
-
18
15
  # :stopdoc
19
16
 
20
17
  # Buffer size for uname struct char arrays
@@ -19,9 +19,6 @@ module Sys
19
19
  # This is the error raised if any of the Sys::Uname methods should fail.
20
20
  class Error < StandardError; end
21
21
 
22
- # The version of the sys-uname library.
23
- VERSION = '1.0.0'
24
-
25
22
  fields = %w[
26
23
  boot_device
27
24
  build_number
@@ -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.0.0'
5
+ spec.version = '1.0.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'
@@ -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?)
@@ -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.0.0', Uname::VERSION)
17
+ assert_equal('1.0.1', Uname::VERSION)
18
18
  end
19
19
 
20
20
  test "machine singleton method works as expected" do
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.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
- type: :runtime
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.5
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: