solaris-kstat 0.2.3 → 1.0.0

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
+ == 1.0.0
2
+ * Updated the extconf.rb file so that it sets the target prefix properly.
3
+ * Version bump to 1.0.0.
4
+ * No actual source code changes.
5
+
1
6
  == 0.2.3 - 23-Jul-2007
2
7
  * KstatError is now Kstat::Error.
3
8
  * Documentation improvements and updates.
data/README CHANGED
@@ -15,46 +15,46 @@
15
15
  rake install_gem
16
16
 
17
17
  == Synopsis
18
- require "solaris/kstat"
19
- require "pp"
18
+ require 'solaris/kstat'
19
+ require 'pp'
20
20
  include Solaris
21
21
 
22
- k = Kstat.new("cpu_info",0,"cpu_info0")
22
+ k = Kstat.new('cpu_info', 0, 'cpu_info0')
23
23
  pp k
24
24
 
25
- {"cpu_info"=>
25
+ {'cpu_info'=>
26
26
  {0=>
27
- {"cpu_info0"=>
28
- {"chip_id"=>0,
29
- "fpu_type"=>"sparcv9",
30
- "device_ID"=>0,
31
- "cpu_type"=>"sparcv9",
32
- "implementation"=>"Unknown",
33
- "clock_MHz"=>502,
34
- "state_begin"=>1105974702,
35
- "state"=>"on-line"}}}}
27
+ {'cpu_info0'=>
28
+ {'chip_id'=>0,
29
+ 'fpu_type'=>'sparcv9',
30
+ 'device_ID'=>0,
31
+ 'cpu_type'=>'sparcv9',
32
+ 'implementation'=>'Unknown',
33
+ 'clock_MHz'=>502,
34
+ 'state_begin'=>1105974702,
35
+ 'state'=>'on-line'}}}}
36
36
 
37
37
  == Class Methods
38
38
  Kstat.new(module=nil, instance=-1, name=nil)
39
- Creates and returns a Kstat object. This does not traverse the kstat
40
- chain. The Kstat#record method uses the values passed to actually
39
+ Creates and returns a Kstat object. This does not traverse the kstat
40
+ chain. The Kstat#record method uses the values passed to actually
41
41
  retrieve data.
42
42
 
43
- You may specify a module, an instance and a name. The module defaults to
43
+ You may specify a module, an instance and a name. The module defaults to
44
44
  nil (all modules), the instance defaults to -1 (all instances) and the
45
45
  name defaults to nil (all names).
46
46
 
47
47
  == Instance Methods
48
48
  Kstat#record
49
- Returns a nested hash based on the values passed to the constructor. How
49
+ Returns a nested hash based on the values passed to the constructor. How
50
50
  deeply that hash is nested depends on the values passed to the constructor.
51
51
  The more specific your criterion, the less data you will receive.
52
52
 
53
53
  == Error Classes
54
54
  Kstat::Error < StandardError
55
- Raised if anything goes wrong. Typically, this will only occur if you
56
- pass bad arguments to the constructor (e.g. a module name that doesn't
57
- exist, etc).
55
+ Raised if anything goes wrong. Typically this will only occur if you
56
+ pass bad arguments to the constructor e.g. a module name that doesn't
57
+ exist, etc.
58
58
 
59
59
  == Unsupported names
60
60
  The following names will not return any meaningful value:
@@ -64,13 +64,13 @@ Kstat::Error < StandardError
64
64
  * sfmmu_percpu_stat
65
65
 
66
66
  == Known Bugs
67
- You will receive a couple warnings during the build process. You
67
+ You will receive a couple warnings during the build process. You
68
68
  can ignore these.
69
69
 
70
70
  == Designer's Notes
71
71
  I have noticed that results from the cpu_stat module differ from the output
72
72
  of the 'kstat' command line tool. I am convinced that my code is correct and
73
- that there is a bug in the Solaris::Kstat Perl module. Unfortunately, the
73
+ that there is a bug in the Solaris::Kstat Perl module. Unfortunately, the
74
74
  source for the version of the Solaris::Kstat Perl module that works on
75
75
  Solaris 8 and later is not available (the version on CPAN only works on
76
76
  Solaris 6 and 7).
@@ -87,7 +87,7 @@ Kstat::Error < StandardError
87
87
  Ruby's
88
88
 
89
89
  == Copyright
90
- (C) 2003-2007 Daniel J. Berger
90
+ (C) 2003-2008 Daniel J. Berger
91
91
  All Rights Reserved
92
92
 
93
93
  == Warranty
data/ext/extconf.rb CHANGED
@@ -3,14 +3,13 @@ require 'fileutils'
3
3
 
4
4
  dir_config('kstat')
5
5
 
6
- FileUtils.cp('solaris/rkstat.c', '.')
7
- FileUtils.cp('solaris/rkstat.h', '.')
8
-
9
6
  # This package requires Solaris 2.8 or later
10
7
  unless have_header('kstat.h')
11
8
  STDERR.puts "The kstat.h header file was not found. Exiting."
12
9
  exit
13
10
  end
14
11
 
12
+ $INCFLAGS += " -Isolaris"
13
+
15
14
  have_library('kstat')
16
- create_makefile('solaris/kstat')
15
+ create_makefile('solaris/kstat', 'solaris')
data/ext/solaris/rkstat.c CHANGED
@@ -199,7 +199,7 @@ void Init_kstat(){
199
199
  /* Unique name within module */
200
200
  rb_define_attr(cKstat, "name", 1, 1);
201
201
 
202
- /* 0.2.3: The version of this package, returned as a String */
202
+ /* 1.0.0: The version of this library, returned as a String */
203
203
  rb_define_const(cKstat, "VERSION", rb_str_new2(SOLARIS_KSTAT_VERSION));
204
204
  }
205
205
 
data/ext/solaris/rkstat.h CHANGED
@@ -2,7 +2,7 @@
2
2
  extern "C" {
3
3
  #endif
4
4
 
5
- #define SOLARIS_KSTAT_VERSION "0.2.3"
5
+ #define SOLARIS_KSTAT_VERSION "1.0.0"
6
6
 
7
7
  /* Function prototypes */
8
8
  static VALUE map_named_data_type(kstat_t* ksp);
data/test/tc_kstat.rb CHANGED
@@ -15,7 +15,7 @@ class TC_Kstat < Test::Unit::TestCase
15
15
  end
16
16
 
17
17
  def test_version
18
- assert_equal("0.2.3", Kstat::VERSION)
18
+ assert_equal('1.0.0', Kstat::VERSION)
19
19
  end
20
20
 
21
21
  def test_name
metadata CHANGED
@@ -1,33 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.4
3
- specification_version: 1
4
2
  name: solaris-kstat
5
3
  version: !ruby/object:Gem::Version
6
- version: 0.2.3
7
- date: 2007-07-24 00:00:00 -06:00
8
- summary: Interface for the Solaris kstat library
9
- require_paths:
10
- - lib
11
- email: djberg96@gmail.com
12
- homepage: http://www.rubyforge.org/projects/solarisutils
13
- rubyforge_project: solarisutils
14
- description: Interface for the Solaris kstat library
15
- autorequire:
16
- default_executable:
17
- bindir: bin
18
- has_rdoc: true
19
- required_ruby_version: !ruby/object:Gem::Version::Requirement
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: 1.8.0
24
- version:
4
+ version: 1.0.0
25
5
  platform: ruby
26
- signing_key:
27
- cert_chain:
28
- post_install_message:
29
6
  authors:
30
7
  - Daniel J. Berger
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-02-04 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: Interface for the Solaris kstat library
17
+ email: djberg96@gmail.com
18
+ executables: []
19
+
20
+ extensions:
21
+ - ext/extconf.rb
22
+ extra_rdoc_files:
23
+ - README
24
+ - CHANGES
25
+ - MANIFEST
26
+ - ext/solaris/rkstat.c
31
27
  files:
32
28
  - ext/extconf.rb
33
29
  - ext/solaris
@@ -38,20 +34,31 @@ files:
38
34
  - README
39
35
  - CHANGES
40
36
  - MANIFEST
41
- test_files:
42
- - test/tc_kstat.rb
37
+ has_rdoc: true
38
+ homepage: http://www.rubyforge.org/projects/solarisutils
39
+ post_install_message:
43
40
  rdoc_options: []
44
41
 
45
- extra_rdoc_files:
46
- - README
47
- - CHANGES
48
- - MANIFEST
49
- - ext/solaris/rkstat.c
50
- executables: []
51
-
52
- extensions:
53
- - ext/extconf.rb
42
+ require_paths:
43
+ - lib
44
+ required_ruby_version: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: 1.8.0
49
+ version:
50
+ required_rubygems_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: "0"
55
+ version:
54
56
  requirements: []
55
57
 
56
- dependencies: []
57
-
58
+ rubyforge_project: solarisutils
59
+ rubygems_version: 1.0.1
60
+ signing_key:
61
+ specification_version: 2
62
+ summary: Interface for the Solaris kstat library
63
+ test_files:
64
+ - test/tc_kstat.rb