sys-uname 0.8.5 → 0.8.6

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,8 @@
1
+ == 0.8.6 - 2-Sep-2011
2
+ * Fixed a failing test for Ruby 1.9.x.
3
+ * The gemspec for Windows is now 'universal'.
4
+ * Some minor doc updates.
5
+
1
6
  == 0.8.5 - 11-Dec-2010
2
7
  * Removed some non-ascii characters that somehow made it into the source.
3
8
  * Some updates to the Rakefile, including a default task.
data/README CHANGED
@@ -6,7 +6,7 @@
6
6
  gem install sys-uname
7
7
 
8
8
  # If that doesn't work and you're on Windows try this:
9
- gem install sys-uname --platform x86-mingw32
9
+ gem install sys-uname --platform universal-mingw32
10
10
 
11
11
  = Synopsis
12
12
  require 'sys/uname'
@@ -15,20 +15,20 @@
15
15
  p Uname.uname
16
16
 
17
17
  = Solaris Notes
18
- Folks building this package on SunOS get two extra methods: architecture()
18
+ Folks building this library on SunOS get two extra methods: architecture()
19
19
  and platform()
20
20
 
21
21
  = BSD flavors, including OS X
22
22
  Users on BSD platforms get the extra Uname.model method.
23
23
 
24
24
  = HP-UX Notes
25
- HP-UX users get the extra Uname.id_number method. This is actually a
25
+ HP-UX users get the extra Uname.id_number method. This is actually a
26
26
  String, not a Fixnum, because that's how it's defined in the utsname
27
27
  struct.
28
28
 
29
29
  = MS Windows Notes
30
30
  The C version for Windows has been completely scrapped in favor of an OLE
31
- plus WMI approach. It is pure Ruby. Please see the MSDN documentation for
31
+ plus WMI approach. It is pure Ruby. Please see the MSDN documentation for
32
32
  the Win32_OperatingSystem class for a complete list of what each of the
33
33
  UnameStruct members mean.
34
34
 
data/Rakefile CHANGED
@@ -16,6 +16,15 @@ CLEAN.include(
16
16
  "**/*.#{CONFIG['DLEXT']}" # C shared object
17
17
  )
18
18
 
19
+ desc "Build the source for C extensions"
20
+ task :build => [:clean] do
21
+ Dir.chdir("ext"){
22
+ ruby "extconf.rb"
23
+ sh "make"
24
+ cp "uname." + Config::CONFIG['DLEXT'], 'sys'
25
+ }
26
+ end
27
+
19
28
  desc "Run the example program"
20
29
  task :example => [:build] do
21
30
  if WINDOWS
@@ -32,6 +41,9 @@ namespace 'gem' do
32
41
  if WINDOWS
33
42
  spec.files = spec.files.reject{ |f| f.include?('ext') }
34
43
  spec.platform = Gem::Platform::CURRENT
44
+ spec.platform.cpu = 'universal'
45
+ spec.platform.version = nil
46
+ spec.original_platform = spec.platform
35
47
  else
36
48
  spec.files = spec.files.reject{ |f| f.include?('lib') }
37
49
  spec.extensions = ['ext/extconf.rb']
@@ -26,25 +26,25 @@ VERSION
26
26
 
27
27
  == Class Methods
28
28
  Uname.sysname
29
- Returns the operating system name. e.g. "SunOS"
29
+ Returns the operating system name, e.g. "SunOS"
30
30
 
31
31
  Uname.nodename
32
- Returns the nodename. This is usually, but not necessarily, the
32
+ Returns the nodename. This is usually, but not necessarily, the
33
33
  same as the system's hostname.
34
34
 
35
35
  You cannot currently set the nodename (root or otherwise). This may
36
36
  be added in a future release.
37
37
 
38
38
  Uname.machine
39
- Returns the machine hardware type. e.g. "i686"
39
+ Returns the machine hardware type, e.g. "i686"
40
40
 
41
41
  Uname.version
42
- Returns the operating system version. e.g. "5.8". In the case of MS
42
+ Returns the operating system version. e.g. "5.8". In the case of MS
43
43
  Windows, it returns the version plus patch information, separated by
44
44
  a hyphen, e.g. "2915-Service Pack 2".
45
45
 
46
46
  Uname.release
47
- Returns the operating system release. e.g. "2.2.16-3"
47
+ Returns the operating system release, e.g. "2.2.16-3"
48
48
 
49
49
  Uname.uname
50
50
  Returns a struct of type UnameStruct that contains sysname, nodename,
@@ -57,10 +57,10 @@ Uname.uname
57
57
 
58
58
  == Solaris Only
59
59
  Uname.architecture
60
- Returns the instruction set architecture. e.g. "sparc"
60
+ Returns the instruction set architecture, e.g. "sparc"
61
61
 
62
62
  Uname.platform
63
- Returns the platform identifier. e.g. "SUNW,Sun-Blade-100"
63
+ Returns the platform identifier, e.g. "SUNW,Sun-Blade-100"
64
64
 
65
65
  Uname.isa_list
66
66
  Returns a space separated string containing a list of all variant
@@ -88,8 +88,8 @@ Uname.model
88
88
  Returns the model type, e.g. "PowerBook5,1"
89
89
 
90
90
  == HP-UX Only
91
- Uname.id
92
- Returns the id number, e.g. 234233587. This is a String, not a Fixnum.
91
+ Uname.id_number
92
+ Returns the id number, e.g. 234233587. This is a String, not a Fixnum.
93
93
 
94
94
  == Notes
95
95
  Not all of the information that you might be used to seeing with
@@ -112,7 +112,7 @@ Uname.id
112
112
  Artistic 2.0
113
113
 
114
114
  == Copyright
115
- (C) 2002-2010 Daniel J. Berger
115
+ (C) 2002-2011 Daniel J. Berger
116
116
  All Rights Reserved
117
117
 
118
118
  == Warranty
@@ -6,7 +6,7 @@
6
6
  #include <ruby.h>
7
7
  #include <sys/utsname.h>
8
8
 
9
- #define SYS_UNAME_VERSION "0.8.5"
9
+ #define SYS_UNAME_VERSION "0.8.6"
10
10
 
11
11
  /* Solaris */
12
12
  #ifdef HAVE_SYS_SYSTEMINFO_H
@@ -298,7 +298,7 @@ void Init_uname()
298
298
  #endif
299
299
  NULL);
300
300
 
301
- /* 0.8.5: The version of this library */
301
+ /* 0.8.6: The version of the sys-uname library */
302
302
  rb_define_const(cUname, "VERSION", rb_str_new2(SYS_UNAME_VERSION));
303
303
  }
304
304
 
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'sys-uname'
5
- spec.version = '0.8.5'
5
+ spec.version = '0.8.6'
6
6
  spec.license = 'Artistic 2.0'
7
7
  spec.author = 'Daniel J. Berger'
8
8
  spec.email = 'djberg96@gmail.com'
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
  spec.extra_rdoc_files = ['CHANGES', 'README', 'MANIFEST', 'doc/uname.txt']
16
16
  spec.rubyforge_project = 'sysutils'
17
17
 
18
- spec.add_development_dependency('test-unit', '>= 2.0.6')
18
+ spec.add_development_dependency('test-unit', '>= 2.1.0')
19
19
 
20
20
  spec.description = <<-EOF
21
21
  The sys-uname library provides an interface for gathering information
@@ -21,7 +21,7 @@ class TC_Sys_Uname < Test::Unit::TestCase
21
21
  assert_not_nil(Uname::VERSION)
22
22
  assert_nothing_raised{ Uname::VERSION }
23
23
  assert_kind_of(String, Uname::VERSION)
24
- assert_equal('0.8.5', Uname::VERSION)
24
+ assert_equal('0.8.6', Uname::VERSION)
25
25
  end
26
26
 
27
27
  def test_machine
@@ -148,6 +148,11 @@ class TC_Sys_Uname < Test::Unit::TestCase
148
148
  end
149
149
  assert_nothing_raised{ Uname.uname }
150
150
  assert_kind_of(Struct, Uname.uname)
151
+
152
+ if RUBY_VERSION.to_f >= 1.9
153
+ members = members.map{ |e| e.to_sym }
154
+ end
155
+
151
156
  assert_equal(members, Uname.uname.members)
152
157
  end
153
158
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sys-uname
3
3
  version: !ruby/object:Gem::Version
4
- hash: 53
5
- prerelease: false
4
+ hash: 51
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 8
9
- - 5
10
- version: 0.8.5
9
+ - 6
10
+ version: 0.8.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Daniel J. Berger
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-11 00:00:00 -07:00
19
- default_executable:
18
+ date: 2011-09-02 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: test-unit
@@ -26,12 +25,12 @@ dependencies:
26
25
  requirements:
27
26
  - - ">="
28
27
  - !ruby/object:Gem::Version
29
- hash: 3
28
+ hash: 11
30
29
  segments:
31
30
  - 2
31
+ - 1
32
32
  - 0
33
- - 6
34
- version: 2.0.6
33
+ version: 2.1.0
35
34
  type: :development
36
35
  version_requirements: *id001
37
36
  description: " The sys-uname library provides an interface for gathering information\n about your current platform. The library is named after the Unix 'uname'\n command but also works on MS Windows. Available information includes\n OS name, OS version, system name and so on. Additional information is\n available for certain platforms.\n"
@@ -57,7 +56,6 @@ files:
57
56
  - README
58
57
  - sys-uname.gemspec
59
58
  - test/test_sys_uname.rb
60
- has_rdoc: true
61
59
  homepage: http://www.rubyforge.org/projects/sysutils
62
60
  licenses:
63
61
  - Artistic 2.0
@@ -87,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
85
  requirements: []
88
86
 
89
87
  rubyforge_project: sysutils
90
- rubygems_version: 1.3.7
88
+ rubygems_version: 1.8.10
91
89
  signing_key:
92
90
  specification_version: 3
93
91
  summary: An interface for returning system platform information