sys-cpu 0.6.2-x86-mingw32 → 0.6.3-x86-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.
- data/CHANGES +9 -1
- data/MANIFEST +2 -2
- data/README +58 -61
- data/Rakefile +48 -45
- data/examples/example_sys_cpu_linux.rb +5 -6
- data/ext/bsd/bsd.c +1 -1
- data/ext/extconf.rb +5 -4
- data/ext/hpux/hpux.c +1 -1
- data/ext/sunos/sunos.c +1 -1
- data/ext/version.h +1 -1
- data/install.rb +34 -33
- data/lib/linux/sys/cpu.rb +1 -1
- data/lib/windows/sys/cpu.rb +759 -753
- data/sys-cpu.gemspec +2 -2
- data/test/test_sys_cpu_version.rb +3 -3
- data/test/test_sys_cpu_windows.rb +47 -47
- metadata +27 -9
    
        data/sys-cpu.gemspec
    CHANGED
    
    | @@ -2,7 +2,7 @@ require 'rubygems' | |
| 2 2 |  | 
| 3 3 | 
             
            Gem::Specification.new do |spec|
         | 
| 4 4 | 
             
              spec.name      = 'sys-cpu'
         | 
| 5 | 
            -
              spec.version   = '0.6. | 
| 5 | 
            +
              spec.version   = '0.6.3'
         | 
| 6 6 | 
             
              spec.author    = 'Daniel J. Berger'
         | 
| 7 7 | 
             
              spec.email     = 'djberg96 at nospam at gmail dot com'
         | 
| 8 8 | 
             
              spec.homepage  = 'http://www.rubyforge.org/projects/sysutils'
         | 
| @@ -10,7 +10,7 @@ Gem::Specification.new do |spec| | |
| 10 10 | 
             
              spec.summary   = 'A Ruby interface for providing CPU information'
         | 
| 11 11 | 
             
              spec.has_rdoc  = true
         | 
| 12 12 | 
             
              spec.test_file = 'test/test_sys_cpu.rb'
         | 
| 13 | 
            -
              spec.files     = Dir['**/*'].reject{ |f| f.include?(' | 
| 13 | 
            +
              spec.files     = Dir['**/*'].reject{ |f| f.include?('git') }
         | 
| 14 14 |  | 
| 15 15 | 
             
              spec.rubyforge_project = 'sysutils'
         | 
| 16 16 | 
             
              spec.extra_rdoc_files  = ['CHANGES', 'README', 'MANIFEST']
         | 
| @@ -14,59 +14,59 @@ require 'socket' | |
| 14 14 | 
             
            include Sys
         | 
| 15 15 |  | 
| 16 16 | 
             
            class TC_Sys_CPU_Windows < Test::Unit::TestCase
         | 
| 17 | 
            -
             | 
| 18 | 
            -
             | 
| 19 | 
            -
             | 
| 17 | 
            +
              def self.startup
         | 
| 18 | 
            +
                @@host = Socket.gethostname
         | 
| 19 | 
            +
              end
         | 
| 20 20 |  | 
| 21 | 
            -
             | 
| 22 | 
            -
             | 
| 23 | 
            -
             | 
| 24 | 
            -
             | 
| 25 | 
            -
             | 
| 26 | 
            -
             | 
| 21 | 
            +
              def test_architecture
         | 
| 22 | 
            +
                assert_respond_to(CPU, :architecture)
         | 
| 23 | 
            +
                assert_nothing_raised{ CPU.architecture }
         | 
| 24 | 
            +
                assert_nothing_raised{ CPU.architecture(@@host) }
         | 
| 25 | 
            +
                assert_kind_of(String, CPU.architecture, 'Invalid Type')
         | 
| 26 | 
            +
              end
         | 
| 27 27 |  | 
| 28 | 
            -
             | 
| 29 | 
            -
             | 
| 30 | 
            -
             | 
| 31 | 
            -
             | 
| 32 | 
            -
             | 
| 33 | 
            -
             | 
| 34 | 
            -
             | 
| 28 | 
            +
              def test_freq
         | 
| 29 | 
            +
                assert_respond_to(CPU, :freq)
         | 
| 30 | 
            +
                assert_nothing_raised{ CPU.freq }
         | 
| 31 | 
            +
                assert_nothing_raised{ CPU.freq(0) }
         | 
| 32 | 
            +
                assert_nothing_raised{ CPU.freq(0, @@host) }
         | 
| 33 | 
            +
                assert_kind_of(Integer, CPU.freq, 'Invalid Type')
         | 
| 34 | 
            +
              end
         | 
| 35 35 |  | 
| 36 | 
            -
             | 
| 37 | 
            -
             | 
| 38 | 
            -
             | 
| 39 | 
            -
             | 
| 40 | 
            -
             | 
| 41 | 
            -
             | 
| 36 | 
            +
              def test_model
         | 
| 37 | 
            +
                assert_respond_to(CPU, :model)
         | 
| 38 | 
            +
                assert_nothing_raised{ CPU.model }
         | 
| 39 | 
            +
                assert_nothing_raised{ CPU.model(@@host) }
         | 
| 40 | 
            +
                assert_kind_of(String, CPU.model, 'Invalid Type')
         | 
| 41 | 
            +
              end
         | 
| 42 42 |  | 
| 43 | 
            -
             | 
| 44 | 
            -
             | 
| 45 | 
            -
             | 
| 46 | 
            -
             | 
| 47 | 
            -
             | 
| 48 | 
            -
             | 
| 43 | 
            +
              def test_num_cpu
         | 
| 44 | 
            +
                assert_respond_to(CPU, :num_cpu)
         | 
| 45 | 
            +
                assert_nothing_raised{ CPU.num_cpu }
         | 
| 46 | 
            +
                assert_nothing_raised{ CPU.num_cpu(@@host) }
         | 
| 47 | 
            +
                assert_kind_of(Integer, CPU.num_cpu, 'Invalid Type')
         | 
| 48 | 
            +
              end
         | 
| 49 49 |  | 
| 50 | 
            -
             | 
| 51 | 
            -
             | 
| 52 | 
            -
             | 
| 53 | 
            -
             | 
| 54 | 
            -
             | 
| 55 | 
            -
             | 
| 50 | 
            +
              def test_type
         | 
| 51 | 
            +
                assert_respond_to(CPU, :type)
         | 
| 52 | 
            +
                assert_nothing_raised{ CPU.type }
         | 
| 53 | 
            +
                assert_nothing_raised{ CPU.type(@@host) }
         | 
| 54 | 
            +
                assert_kind_of(String, CPU.type, 'Invalid Type')
         | 
| 55 | 
            +
              end
         | 
| 56 56 |  | 
| 57 | 
            -
             | 
| 58 | 
            -
             | 
| 59 | 
            -
             | 
| 60 | 
            -
             | 
| 61 | 
            -
             | 
| 62 | 
            -
             | 
| 57 | 
            +
              def test_load_avg
         | 
| 58 | 
            +
                assert_respond_to(CPU, :load_avg)
         | 
| 59 | 
            +
                assert_nothing_raised{ CPU.load_avg }
         | 
| 60 | 
            +
                assert_nothing_raised{ CPU.load_avg(0, @@host) }
         | 
| 61 | 
            +
                assert_kind_of(Integer, CPU.load_avg, 'Invalid Type')
         | 
| 62 | 
            +
              end
         | 
| 63 63 |  | 
| 64 | 
            -
             | 
| 65 | 
            -
             | 
| 66 | 
            -
             | 
| 67 | 
            -
             | 
| 64 | 
            +
              def test_processors
         | 
| 65 | 
            +
                assert_respond_to(CPU, :processors)
         | 
| 66 | 
            +
                assert_nothing_raised{ CPU.processors{} }
         | 
| 67 | 
            +
              end
         | 
| 68 68 |  | 
| 69 | 
            -
             | 
| 70 | 
            -
             | 
| 71 | 
            -
             | 
| 69 | 
            +
              def self.shutdown
         | 
| 70 | 
            +
                @@host = nil
         | 
| 71 | 
            +
              end  
         | 
| 72 72 | 
             
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,13 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: sys-cpu
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
               | 
| 4 | 
            +
              hash: 1
         | 
| 5 | 
            +
              prerelease: false
         | 
| 6 | 
            +
              segments: 
         | 
| 7 | 
            +
              - 0
         | 
| 8 | 
            +
              - 6
         | 
| 9 | 
            +
              - 3
         | 
| 10 | 
            +
              version: 0.6.3
         | 
| 5 11 | 
             
            platform: x86-mingw32
         | 
| 6 12 | 
             
            authors: 
         | 
| 7 13 | 
             
            - Daniel J. Berger
         | 
| @@ -9,19 +15,25 @@ autorequire: | |
| 9 15 | 
             
            bindir: bin
         | 
| 10 16 | 
             
            cert_chain: []
         | 
| 11 17 |  | 
| 12 | 
            -
            date: 2010- | 
| 18 | 
            +
            date: 2010-10-09 00:00:00 -06:00
         | 
| 13 19 | 
             
            default_executable: 
         | 
| 14 20 | 
             
            dependencies: 
         | 
| 15 21 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 16 22 | 
             
              name: test-unit
         | 
| 17 | 
            -
               | 
| 18 | 
            -
               | 
| 19 | 
            -
             | 
| 23 | 
            +
              prerelease: false
         | 
| 24 | 
            +
              requirement: &id001 !ruby/object:Gem::Requirement 
         | 
| 25 | 
            +
                none: false
         | 
| 20 26 | 
             
                requirements: 
         | 
| 21 27 | 
             
                - - ">="
         | 
| 22 28 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 29 | 
            +
                    hash: 9
         | 
| 30 | 
            +
                    segments: 
         | 
| 31 | 
            +
                    - 2
         | 
| 32 | 
            +
                    - 0
         | 
| 33 | 
            +
                    - 3
         | 
| 23 34 | 
             
                    version: 2.0.3
         | 
| 24 | 
            -
             | 
| 35 | 
            +
              type: :development
         | 
| 36 | 
            +
              version_requirements: *id001
         | 
| 25 37 | 
             
            description: "    The sys-cpu library provides an interface for gathering information\n    about your system's processor(s). Information includes speed, type,\n    and load average.\n"
         | 
| 26 38 | 
             
            email: djberg96 at nospam at gmail dot com
         | 
| 27 39 | 
             
            executables: []
         | 
| @@ -75,21 +87,27 @@ require_paths: | |
| 75 87 | 
             
            - lib
         | 
| 76 88 | 
             
            - lib/windows
         | 
| 77 89 | 
             
            required_ruby_version: !ruby/object:Gem::Requirement 
         | 
| 90 | 
            +
              none: false
         | 
| 78 91 | 
             
              requirements: 
         | 
| 79 92 | 
             
              - - ">="
         | 
| 80 93 | 
             
                - !ruby/object:Gem::Version 
         | 
| 94 | 
            +
                  hash: 3
         | 
| 95 | 
            +
                  segments: 
         | 
| 96 | 
            +
                  - 0
         | 
| 81 97 | 
             
                  version: "0"
         | 
| 82 | 
            -
              version: 
         | 
| 83 98 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement 
         | 
| 99 | 
            +
              none: false
         | 
| 84 100 | 
             
              requirements: 
         | 
| 85 101 | 
             
              - - ">="
         | 
| 86 102 | 
             
                - !ruby/object:Gem::Version 
         | 
| 103 | 
            +
                  hash: 3
         | 
| 104 | 
            +
                  segments: 
         | 
| 105 | 
            +
                  - 0
         | 
| 87 106 | 
             
                  version: "0"
         | 
| 88 | 
            -
              version: 
         | 
| 89 107 | 
             
            requirements: []
         | 
| 90 108 |  | 
| 91 109 | 
             
            rubyforge_project: sysutils
         | 
| 92 | 
            -
            rubygems_version: 1.3. | 
| 110 | 
            +
            rubygems_version: 1.3.7
         | 
| 93 111 | 
             
            signing_key: 
         | 
| 94 112 | 
             
            specification_version: 3
         | 
| 95 113 | 
             
            summary: A Ruby interface for providing CPU information
         |