minpaso 0.1.0 → 002
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/.gemified +11 -0
- data/History.txt +9 -2
- data/License.txt +55 -2
- data/Manifest.txt +2 -18
- data/README.txt +3 -3
- data/Rakefile +3 -3
- data/bin/minpaso +132 -0
- data/lib/minpaso.rb +2 -0
- data/spec/minpaso_spec.rb +126 -161
- metadata +15 -36
- data/config/hoe.rb +0 -72
- data/config/requirements.rb +0 -17
- data/lib/minpaso/version.rb +0 -9
- data/log/debug.log +0 -0
- data/script/destroy +0 -14
- data/script/generate +0 -14
- data/script/txt2html +0 -74
- data/spec/spec.opts +0 -1
- data/spec/spec_helper.rb +0 -6
- data/tasks/deployment.rake +0 -34
- data/tasks/environment.rake +0 -7
- data/tasks/rspec.rake +0 -21
- data/tasks/website.rake +0 -17
- data/website/index.html +0 -114
- data/website/index.txt +0 -53
- data/website/javascripts/rounded_corners_lite.inc.js +0 -285
- data/website/stylesheets/screen.css +0 -138
- data/website/template.rhtml +0 -48
    
        data/.gemified
    ADDED
    
    | @@ -0,0 +1,11 @@ | |
| 1 | 
            +
            --- 
         | 
| 2 | 
            +
            :summary: This is a wrapper library for Minpaso API(http://minpaso.goga.co.jp/).
         | 
| 3 | 
            +
            :email: keita.yamaguchi@gmail.com
         | 
| 4 | 
            +
            :has_rdoc: true
         | 
| 5 | 
            +
            :name: minpaso
         | 
| 6 | 
            +
            :homepage: http://rubyforge.org/projects/minpaso/
         | 
| 7 | 
            +
            :version: "002"
         | 
| 8 | 
            +
            :dependencies: 
         | 
| 9 | 
            +
            - units
         | 
| 10 | 
            +
            :rubyforge_project: minpaso
         | 
| 11 | 
            +
            :author: Keita Yamaguchi
         | 
    
        data/History.txt
    CHANGED
    
    | @@ -1,4 +1,11 @@ | |
| 1 | 
            -
            ==  | 
| 1 | 
            +
            == 002: 2008-04-16
         | 
| 2 2 |  | 
| 3 | 
            -
            *  | 
| 3 | 
            +
            * Keita Yamaguchi:
         | 
| 4 | 
            +
              * GitHub: http://github.com/keita/ruby-minpaso/tree/master
         | 
| 5 | 
            +
              * Reduced files included in the gem
         | 
| 6 | 
            +
              * added bin/minpaso
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            == 0.1.0: 2007-12-31
         | 
| 9 | 
            +
             | 
| 10 | 
            +
            * Keita Yamaguchi:
         | 
| 4 11 | 
             
              * Initial release
         | 
    
        data/License.txt
    CHANGED
    
    | @@ -1,3 +1,56 @@ | |
| 1 | 
            -
             | 
| 1 | 
            +
            ruby-minpaso is copyrighted free software by Keita Yamaguchi <keita.yamaguchi@gmail.com>.
         | 
| 2 | 
            +
            You can redistribute it and/or modify it under either the terms of the GPL
         | 
| 3 | 
            +
            (see the file GPL), or the conditions below:
         | 
| 2 4 |  | 
| 3 | 
            -
             | 
| 5 | 
            +
              1. You may make and give away verbatim copies of the source form of the
         | 
| 6 | 
            +
                 software without restriction, provided that you duplicate all of the
         | 
| 7 | 
            +
                 original copyright notices and associated disclaimers.
         | 
| 8 | 
            +
             | 
| 9 | 
            +
              2. You may modify your copy of the software in any way, provided that
         | 
| 10 | 
            +
                 you do at least ONE of the following:
         | 
| 11 | 
            +
             | 
| 12 | 
            +
                   a) place your modifications in the Public Domain or otherwise
         | 
| 13 | 
            +
                      make them Freely Available, such as by posting said
         | 
| 14 | 
            +
            	  modifications to Usenet or an equivalent medium, or by allowing
         | 
| 15 | 
            +
            	  the author to include your modifications in the software.
         | 
| 16 | 
            +
             | 
| 17 | 
            +
                   b) use the modified software only within your corporation or
         | 
| 18 | 
            +
                      organization.
         | 
| 19 | 
            +
             | 
| 20 | 
            +
                   c) give non-standard binaries non-standard names, with
         | 
| 21 | 
            +
                      instructions on where to get the original software distribution.
         | 
| 22 | 
            +
             | 
| 23 | 
            +
                   d) make other distribution arrangements with the author.
         | 
| 24 | 
            +
             | 
| 25 | 
            +
              3. You may distribute the software in object code or binary form,
         | 
| 26 | 
            +
                 provided that you do at least ONE of the following:
         | 
| 27 | 
            +
             | 
| 28 | 
            +
                   a) distribute the binaries and library files of the software,
         | 
| 29 | 
            +
            	  together with instructions (in the manual page or equivalent)
         | 
| 30 | 
            +
            	  on where to get the original distribution.
         | 
| 31 | 
            +
             | 
| 32 | 
            +
                   b) accompany the distribution with the machine-readable source of
         | 
| 33 | 
            +
            	  the software.
         | 
| 34 | 
            +
             | 
| 35 | 
            +
                   c) give non-standard binaries non-standard names, with
         | 
| 36 | 
            +
                      instructions on where to get the original software distribution.
         | 
| 37 | 
            +
             | 
| 38 | 
            +
                   d) make other distribution arrangements with the author.
         | 
| 39 | 
            +
             | 
| 40 | 
            +
              4. You may modify and include the part of the software into any other
         | 
| 41 | 
            +
                 software (possibly commercial).  But some files in the distribution
         | 
| 42 | 
            +
                 are not written by the author, so that they are not under these terms.
         | 
| 43 | 
            +
             | 
| 44 | 
            +
                 For the list of those files and their copying conditions, see the
         | 
| 45 | 
            +
                 file LEGAL.
         | 
| 46 | 
            +
             | 
| 47 | 
            +
              5. The scripts and library files supplied as input to or produced as 
         | 
| 48 | 
            +
                 output from the software do not automatically fall under the
         | 
| 49 | 
            +
                 copyright of the software, but belong to whomever generated them, 
         | 
| 50 | 
            +
                 and may be sold commercially, and may be aggregated with this
         | 
| 51 | 
            +
                 software.
         | 
| 52 | 
            +
             | 
| 53 | 
            +
              6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
         | 
| 54 | 
            +
                 IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
         | 
| 55 | 
            +
                 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
         | 
| 56 | 
            +
                 PURPOSE.
         | 
    
        data/Manifest.txt
    CHANGED
    
    | @@ -1,26 +1,10 @@ | |
| 1 | 
            +
            .gemified
         | 
| 1 2 | 
             
            History.txt
         | 
| 2 3 | 
             
            License.txt
         | 
| 3 4 | 
             
            Manifest.txt
         | 
| 4 5 | 
             
            README.txt
         | 
| 5 6 | 
             
            Rakefile
         | 
| 6 | 
            -
            config/hoe.rb
         | 
| 7 | 
            -
            config/requirements.rb
         | 
| 8 7 | 
             
            lib/minpaso.rb
         | 
| 9 | 
            -
             | 
| 10 | 
            -
            log/debug.log
         | 
| 11 | 
            -
            script/destroy
         | 
| 12 | 
            -
            script/generate
         | 
| 13 | 
            -
            script/txt2html
         | 
| 8 | 
            +
            bin/minpaso
         | 
| 14 9 | 
             
            setup.rb
         | 
| 15 10 | 
             
            spec/minpaso_spec.rb
         | 
| 16 | 
            -
            spec/spec.opts
         | 
| 17 | 
            -
            spec/spec_helper.rb
         | 
| 18 | 
            -
            tasks/deployment.rake
         | 
| 19 | 
            -
            tasks/environment.rake
         | 
| 20 | 
            -
            tasks/rspec.rake
         | 
| 21 | 
            -
            tasks/website.rake
         | 
| 22 | 
            -
            website/index.html
         | 
| 23 | 
            -
            website/index.txt
         | 
| 24 | 
            -
            website/javascripts/rounded_corners_lite.inc.js
         | 
| 25 | 
            -
            website/stylesheets/screen.css
         | 
| 26 | 
            -
            website/template.rhtml
         | 
    
        data/README.txt
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            = README
         | 
| 2 2 |  | 
| 3 3 | 
             
            Authors::   Keita Yamaguchi(山口慶太)
         | 
| 4 | 
            -
            Copyright::  | 
| 4 | 
            +
            Copyright:: © Keita Yamaguchi, 2007-2008. All rights reserved.
         | 
| 5 5 | 
             
            License::   Ruby License
         | 
| 6 6 |  | 
| 7 7 | 
             
            == What
         | 
| @@ -13,5 +13,5 @@ ruby-minpaso is a wrapper library for Minpaso API. | |
| 13 13 | 
             
            * {Minpaso}[http://minpaso.goga.co.jp/]
         | 
| 14 14 | 
             
              * {API}[http://minpaso.goga.co.jp/ja-JP/api.php]
         | 
| 15 15 | 
             
            * ruby-minpaso
         | 
| 16 | 
            -
              {Website}[http://minpaso.rubyforge.org/]
         | 
| 17 | 
            -
              {Rubyforge Project}[http://rubyforge.org/projects/minpaso/]
         | 
| 16 | 
            +
              * {Website}[http://minpaso.rubyforge.org/]
         | 
| 17 | 
            +
              * {Rubyforge Project}[http://rubyforge.org/projects/minpaso/]
         | 
    
        data/Rakefile
    CHANGED
    
    | @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            require  | 
| 2 | 
            -
            require  | 
| 1 | 
            +
            require "rubygems"
         | 
| 2 | 
            +
            require "rtask"
         | 
| 3 3 |  | 
| 4 | 
            -
             | 
| 4 | 
            +
            RTask.new(:use => :all, :version => Minpaso::VERSION)
         | 
    
        data/bin/minpaso
    ADDED
    
    | @@ -0,0 +1,132 @@ | |
| 1 | 
            +
            #!/usr/bin/env ruby
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            require "rubygems"
         | 
| 4 | 
            +
            require "minpaso"
         | 
| 5 | 
            +
            require "optparse"
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            $config = Hash.new
         | 
| 8 | 
            +
             | 
| 9 | 
            +
            Option = OptionParser.new do |opt|
         | 
| 10 | 
            +
              opt.on("-m", "--manifacturer NAME", "Search by manufacturer") do |name|
         | 
| 11 | 
            +
                $config[:manifacturer] = name
         | 
| 12 | 
            +
              end
         | 
| 13 | 
            +
             | 
| 14 | 
            +
              opt.on("-p", "--product NAME", "Search by product") do |name|
         | 
| 15 | 
            +
                $config[:product_name] = name
         | 
| 16 | 
            +
              end
         | 
| 17 | 
            +
             | 
| 18 | 
            +
              opt.on("-c", "--cpu NAME", "Search by CPU") do |name|
         | 
| 19 | 
            +
                $config[:cpu_name] = name
         | 
| 20 | 
            +
              end
         | 
| 21 | 
            +
             | 
| 22 | 
            +
              opt.on("-g", "--graphics NAME", "Search by graphic adapter") do |name|
         | 
| 23 | 
            +
                $config[:graphics_adapter] = name
         | 
| 24 | 
            +
              end
         | 
| 25 | 
            +
             | 
| 26 | 
            +
              opt.on("--wei-min SCORE", "Sets minimum WEI score") do |score|
         | 
| 27 | 
            +
                $config[:web_min] = score.to_i
         | 
| 28 | 
            +
              end
         | 
| 29 | 
            +
             | 
| 30 | 
            +
              opt.on("--wei-max SCORE", "Sets maximum WEI score") do |score|
         | 
| 31 | 
            +
                $config[:wei_max] = score.to_i
         | 
| 32 | 
            +
              end
         | 
| 33 | 
            +
             | 
| 34 | 
            +
              opt.on("--cpu-min SCORE", "Sets minimum CPU score") do |score|
         | 
| 35 | 
            +
                $config[:cpu_min] = score.to_i
         | 
| 36 | 
            +
              end
         | 
| 37 | 
            +
             | 
| 38 | 
            +
              opt.on("--cpu-max SCORE", "Sets maximum CPU score") do |score|
         | 
| 39 | 
            +
                $config[:cpu_max] = score.to_i
         | 
| 40 | 
            +
              end
         | 
| 41 | 
            +
             | 
| 42 | 
            +
              opt.on("--memory-min SCORE", "Sets minimum memory score") do |score|
         | 
| 43 | 
            +
                $config[:memory_min] = score.to_i
         | 
| 44 | 
            +
              end
         | 
| 45 | 
            +
             | 
| 46 | 
            +
              opt.on("--memory-max SCORE", "Sets maximum memory score") do |score|
         | 
| 47 | 
            +
                $config[:memory_max] = score.to_i
         | 
| 48 | 
            +
              end
         | 
| 49 | 
            +
             | 
| 50 | 
            +
              opt.on("--video-min SCORE", "Sets minimum video score") do |score|
         | 
| 51 | 
            +
                $config[:video_min] = score.to_i
         | 
| 52 | 
            +
              end
         | 
| 53 | 
            +
             | 
| 54 | 
            +
              opt.on("--video-max SCORE", "Sets maximum video score") do |score|
         | 
| 55 | 
            +
                $config[:video_max] = score.to_i
         | 
| 56 | 
            +
              end
         | 
| 57 | 
            +
             | 
| 58 | 
            +
              opt.on("--game-min SCORE", "Sets minimum game score") do |score|
         | 
| 59 | 
            +
                $config[:game_min] = score.to_i
         | 
| 60 | 
            +
              end
         | 
| 61 | 
            +
             | 
| 62 | 
            +
              opt.on("--game-max SCORE", "Sets maximum game score") do |score|
         | 
| 63 | 
            +
                $config[:game_max] = score.to_i
         | 
| 64 | 
            +
              end
         | 
| 65 | 
            +
             | 
| 66 | 
            +
              opt.on("--hdd_min SCORE", "Sets minimum HDD score") do |score|
         | 
| 67 | 
            +
                $config[:hdd_min] = score.to_i
         | 
| 68 | 
            +
              end
         | 
| 69 | 
            +
             | 
| 70 | 
            +
              opt.on("--hdd_max SCORE", "Sets maximum HDD score") do |score|
         | 
| 71 | 
            +
                $config[:hdd_max] = score.to_i
         | 
| 72 | 
            +
              end
         | 
| 73 | 
            +
             | 
| 74 | 
            +
              opt.on("--total_min SCORE", "Sets minimum total score") do |score|
         | 
| 75 | 
            +
                $config[:total_min] = score.to_i
         | 
| 76 | 
            +
              end
         | 
| 77 | 
            +
             | 
| 78 | 
            +
              opt.on("--tatal_max SCORE", "Sets maximum total score") do |score|
         | 
| 79 | 
            +
                $config[:total_max] = score.to_i
         | 
| 80 | 
            +
              end
         | 
| 81 | 
            +
             | 
| 82 | 
            +
              opt.on("--sort CRITERION", "Sets sort criterion") do |c|
         | 
| 83 | 
            +
                $config[:sort] = c
         | 
| 84 | 
            +
              end
         | 
| 85 | 
            +
             | 
| 86 | 
            +
              opt.on("--page NUMBER", "Specifies the page number") do |n|
         | 
| 87 | 
            +
                $config[:page] = n
         | 
| 88 | 
            +
              end
         | 
| 89 | 
            +
             | 
| 90 | 
            +
              opt.on("--hide-homebuilt-computers", "Hides home-built computers") do
         | 
| 91 | 
            +
                $config[:h] = 0
         | 
| 92 | 
            +
              end
         | 
| 93 | 
            +
             | 
| 94 | 
            +
              opt.on("--disable-score-estimation", "Disable score estimation") do
         | 
| 95 | 
            +
                $config[:e] = 0
         | 
| 96 | 
            +
              end
         | 
| 97 | 
            +
             | 
| 98 | 
            +
              opt.on("-h", "--help", "Show this message") do
         | 
| 99 | 
            +
                puts opt.help
         | 
| 100 | 
            +
                exit
         | 
| 101 | 
            +
              end
         | 
| 102 | 
            +
             | 
| 103 | 
            +
              opt.on("-v", "--version", "Show the version of ruby-minpaso") do
         | 
| 104 | 
            +
                puts Minpaso::VERSION
         | 
| 105 | 
            +
                exit
         | 
| 106 | 
            +
              end
         | 
| 107 | 
            +
             | 
| 108 | 
            +
              opt.parse!(ARGV)
         | 
| 109 | 
            +
            end
         | 
| 110 | 
            +
             | 
| 111 | 
            +
            $label_width = 15
         | 
| 112 | 
            +
             | 
| 113 | 
            +
            def show(label, val)
         | 
| 114 | 
            +
              puts "#{label}:".ljust($label_width) + val.to_s
         | 
| 115 | 
            +
            end
         | 
| 116 | 
            +
             | 
| 117 | 
            +
            result = Minpaso.search($config)
         | 
| 118 | 
            +
            result.items.each do |item|
         | 
| 119 | 
            +
              puts "=== ID #{item.id} ==="
         | 
| 120 | 
            +
              show "Product Name", item.product_name
         | 
| 121 | 
            +
              show "Manufacture", item.manufacture
         | 
| 122 | 
            +
              show "WEI Score", item.wei_score
         | 
| 123 | 
            +
              show "CPU Score", item.cpu_score
         | 
| 124 | 
            +
              show "Memory Score", item.memory_score
         | 
| 125 | 
            +
              show "Video Score", item.video_score
         | 
| 126 | 
            +
              show "Game Score", item.game_score
         | 
| 127 | 
            +
              show "HDD Score", item.hdd_score
         | 
| 128 | 
            +
              show "Total Score", item.total_score
         | 
| 129 | 
            +
              puts
         | 
| 130 | 
            +
            end
         | 
| 131 | 
            +
             | 
| 132 | 
            +
            show "Nunber of Result", result.size
         | 
    
        data/lib/minpaso.rb
    CHANGED
    
    
    
        data/spec/minpaso_spec.rb
    CHANGED
    
    | @@ -1,222 +1,187 @@ | |
| 1 | 
            -
             | 
| 1 | 
            +
            $KCODE = "UTF-8"
         | 
| 2 | 
            +
            require "rubygems"
         | 
| 3 | 
            +
            $LOAD_PATH << File.join(File.dirname(__FILE__), "..", "lib")
         | 
| 4 | 
            +
            require "minpaso"
         | 
| 5 | 
            +
            require "bacon"
         | 
| 2 6 |  | 
| 3 | 
            -
             | 
| 4 | 
            -
              before(:all) do
         | 
| 5 | 
            -
                @result = Minpaso.search(:manufacturer => "HITACHI")
         | 
| 6 | 
            -
                @item = @result.items.first
         | 
| 7 | 
            -
              end
         | 
| 7 | 
            +
            $result = Minpaso.search(:manufacturer => "HITACHI")
         | 
| 8 8 |  | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
               | 
| 9 | 
            +
            describe "Minpaso::SearchResultPager" do
         | 
| 10 | 
            +
              @result = $result
         | 
| 11 | 
            +
              @item = @result.items.first
         | 
| 12 12 |  | 
| 13 13 | 
             
              it "size" do
         | 
| 14 | 
            -
                @result.size > 0
         | 
| 14 | 
            +
                @result.size.should > 0
         | 
| 15 15 | 
             
              end
         | 
| 16 16 |  | 
| 17 17 | 
             
              it "page" do
         | 
| 18 | 
            -
                @result.page == 1
         | 
| 18 | 
            +
                @result.page.should == 1
         | 
| 19 19 | 
             
              end
         | 
| 20 20 |  | 
| 21 21 | 
             
              it "next" do
         | 
| 22 | 
            -
                pager = @result
         | 
| 23 | 
            -
                 | 
| 24 | 
            -
             | 
| 25 | 
            -
                  pager.items.size.should > 0
         | 
| 26 | 
            -
                  pager = pager.next
         | 
| 27 | 
            -
                end
         | 
| 22 | 
            +
                pager = @result.next
         | 
| 23 | 
            +
                pager.should.be.kind_of(Minpaso::SearchResultPager)
         | 
| 24 | 
            +
                pager.items.size.should > 0
         | 
| 28 25 | 
             
              end
         | 
| 29 26 |  | 
| 30 27 | 
             
              it "prev" do
         | 
| 31 | 
            -
                @result.prev.should | 
| 28 | 
            +
                @result.prev.should.be.nil
         | 
| 32 29 | 
             
              end
         | 
| 30 | 
            +
            end
         | 
| 33 31 |  | 
| 34 | 
            -
             | 
| 35 | 
            -
             | 
| 36 | 
            -
                  @item.id.should be_a_kind_of(Integer)
         | 
| 37 | 
            -
                end
         | 
| 38 | 
            -
             | 
| 39 | 
            -
                it "manufacture" do
         | 
| 40 | 
            -
                  @item.manufacture.should == "HITACHI"
         | 
| 41 | 
            -
                end
         | 
| 42 | 
            -
             | 
| 43 | 
            -
                it "product_name" do
         | 
| 44 | 
            -
                  @item.product_name.should be_a_kind_of(String)
         | 
| 45 | 
            -
                end
         | 
| 32 | 
            +
            describe "Minpaso::SearchResultPager::Item" do
         | 
| 33 | 
            +
              @item = $result.items.first
         | 
| 46 34 |  | 
| 47 | 
            -
             | 
| 48 | 
            -
             | 
| 49 | 
            -
             | 
| 50 | 
            -
                end
         | 
| 35 | 
            +
              it "id" do
         | 
| 36 | 
            +
                @item.id.should.be.kind_of(Integer)
         | 
| 37 | 
            +
              end
         | 
| 51 38 |  | 
| 52 | 
            -
             | 
| 53 | 
            -
             | 
| 54 | 
            -
             | 
| 55 | 
            -
                end
         | 
| 39 | 
            +
              it "manufacture" do
         | 
| 40 | 
            +
                @item.manufacture.should == "HITACHI"
         | 
| 41 | 
            +
              end
         | 
| 56 42 |  | 
| 57 | 
            -
             | 
| 58 | 
            -
             | 
| 59 | 
            -
             | 
| 60 | 
            -
                end
         | 
| 43 | 
            +
              it "product_name" do
         | 
| 44 | 
            +
                @item.product_name.should.be.kind_of(String)
         | 
| 45 | 
            +
              end
         | 
| 61 46 |  | 
| 62 | 
            -
             | 
| 63 | 
            -
             | 
| 64 | 
            -
             | 
| 65 | 
            -
             | 
| 47 | 
            +
              it "wei_score" do
         | 
| 48 | 
            +
                @item.wei_score.should.be.kind_of(Float)
         | 
| 49 | 
            +
                @item.wei_score.should > 0
         | 
| 50 | 
            +
              end
         | 
| 66 51 |  | 
| 67 | 
            -
             | 
| 68 | 
            -
             | 
| 69 | 
            -
             | 
| 70 | 
            -
             | 
| 52 | 
            +
              it "cpu_score" do
         | 
| 53 | 
            +
                @item.cpu_score.should.be.kind_of(Float)
         | 
| 54 | 
            +
                @item.cpu_score.should > 0
         | 
| 55 | 
            +
              end
         | 
| 71 56 |  | 
| 72 | 
            -
             | 
| 73 | 
            -
             | 
| 74 | 
            -
             | 
| 75 | 
            -
             | 
| 57 | 
            +
              it "memory_score" do
         | 
| 58 | 
            +
                @item.memory_score.should.be.kind_of(Float)
         | 
| 59 | 
            +
                @item.memory_score.should > 0
         | 
| 60 | 
            +
              end
         | 
| 76 61 |  | 
| 77 | 
            -
             | 
| 78 | 
            -
             | 
| 79 | 
            -
             | 
| 80 | 
            -
                end
         | 
| 62 | 
            +
              it "video_score" do
         | 
| 63 | 
            +
                @item.video_score.should.be.kind_of(Float)
         | 
| 64 | 
            +
                @item.video_score.should > 0
         | 
| 81 65 | 
             
              end
         | 
| 82 | 
            -
            end
         | 
| 83 66 |  | 
| 84 | 
            -
             | 
| 85 | 
            -
             | 
| 86 | 
            -
                @ | 
| 67 | 
            +
              it "game_score" do
         | 
| 68 | 
            +
                @item.game_score.should.be.kind_of(Float)
         | 
| 69 | 
            +
                @item.game_score.should > 0
         | 
| 87 70 | 
             
              end
         | 
| 88 71 |  | 
| 89 | 
            -
               | 
| 90 | 
            -
                @ | 
| 72 | 
            +
              it "hdd_score" do
         | 
| 73 | 
            +
                @item.hdd_score.should.be.kind_of(Float)
         | 
| 74 | 
            +
                @item.hdd_score.should > 0
         | 
| 91 75 | 
             
              end
         | 
| 92 76 |  | 
| 93 | 
            -
               | 
| 94 | 
            -
                 | 
| 95 | 
            -
             | 
| 96 | 
            -
             | 
| 77 | 
            +
              it "total_score" do
         | 
| 78 | 
            +
                @item.total_score.should.be.kind_of(Float)
         | 
| 79 | 
            +
                @item.total_score.should > 0
         | 
| 80 | 
            +
              end
         | 
| 81 | 
            +
            end
         | 
| 97 82 |  | 
| 98 | 
            -
             | 
| 99 | 
            -
                  @system.score.should == 7.4
         | 
| 100 | 
            -
                end
         | 
| 83 | 
            +
            $pcinfo = Minpaso::PCInfo.new(1788)
         | 
| 101 84 |  | 
| 102 | 
            -
             | 
| 103 | 
            -
             | 
| 104 | 
            -
                end
         | 
| 85 | 
            +
            describe "Minpaso::PCInfo::System" do
         | 
| 86 | 
            +
              @system = $pcinfo.system
         | 
| 105 87 |  | 
| 106 | 
            -
             | 
| 107 | 
            -
             | 
| 108 | 
            -
             | 
| 88 | 
            +
              it "score" do
         | 
| 89 | 
            +
                @system.score.should == 7.4
         | 
| 90 | 
            +
              end
         | 
| 109 91 |  | 
| 110 | 
            -
             | 
| 111 | 
            -
             | 
| 112 | 
            -
             | 
| 92 | 
            +
              it "total_score" do
         | 
| 93 | 
            +
                @system.total_score.should == 40.7
         | 
| 94 | 
            +
              end
         | 
| 113 95 |  | 
| 114 | 
            -
             | 
| 115 | 
            -
             | 
| 116 | 
            -
                end
         | 
| 96 | 
            +
              it "manufacturer" do
         | 
| 97 | 
            +
                @system.manufacturer.should == "Supermicro"
         | 
| 117 98 | 
             
              end
         | 
| 118 99 |  | 
| 119 | 
            -
               | 
| 120 | 
            -
                 | 
| 121 | 
            -
             | 
| 122 | 
            -
                end
         | 
| 100 | 
            +
              it "product_name" do
         | 
| 101 | 
            +
                @system.product_name.should == "X7DA8"
         | 
| 102 | 
            +
              end
         | 
| 123 103 |  | 
| 124 | 
            -
             | 
| 125 | 
            -
             | 
| 126 | 
            -
             | 
| 104 | 
            +
              it "os" do
         | 
| 105 | 
            +
                @system.os.should == "Windows Vista (TM) Ultimate"
         | 
| 106 | 
            +
              end
         | 
| 107 | 
            +
            end
         | 
| 127 108 |  | 
| 128 | 
            -
             | 
| 129 | 
            -
             | 
| 130 | 
            -
                end
         | 
| 109 | 
            +
            describe "Minpaso::PCInfo::CPU" do
         | 
| 110 | 
            +
              @cpu = $pcinfo.cpu
         | 
| 131 111 |  | 
| 132 | 
            -
             | 
| 133 | 
            -
             | 
| 134 | 
            -
                end
         | 
| 112 | 
            +
              it "score" do
         | 
| 113 | 
            +
                @cpu.score.should == 9.7
         | 
| 135 114 | 
             
              end
         | 
| 136 115 |  | 
| 137 | 
            -
               | 
| 138 | 
            -
                 | 
| 139 | 
            -
             | 
| 140 | 
            -
             | 
| 141 | 
            -
             | 
| 142 | 
            -
                after(:all) do
         | 
| 143 | 
            -
                  @memory = nil
         | 
| 144 | 
            -
                end
         | 
| 116 | 
            +
              it "processor_name" do
         | 
| 117 | 
            +
                @cpu.processor_name.should == "Intel(R) Xeon(R) CPU           E5345  @ 2.33GHz"
         | 
| 118 | 
            +
              end
         | 
| 119 | 
            +
            end
         | 
| 145 120 |  | 
| 146 | 
            -
             | 
| 147 | 
            -
             | 
| 148 | 
            -
                end
         | 
| 121 | 
            +
            describe "Minpaso::PCInfo::Memory" do
         | 
| 122 | 
            +
              @memory = $pcinfo.memory
         | 
| 149 123 |  | 
| 150 | 
            -
             | 
| 151 | 
            -
             | 
| 152 | 
            -
                end
         | 
| 124 | 
            +
              it "score" do
         | 
| 125 | 
            +
                @memory.score.should == 7.5
         | 
| 153 126 | 
             
              end
         | 
| 154 127 |  | 
| 155 | 
            -
               | 
| 156 | 
            -
                 | 
| 157 | 
            -
             | 
| 158 | 
            -
             | 
| 159 | 
            -
             | 
| 160 | 
            -
                after(:all) do
         | 
| 161 | 
            -
                  @graphics = nil
         | 
| 162 | 
            -
                end
         | 
| 128 | 
            +
              it "size" do
         | 
| 129 | 
            +
                @memory.size.should == 8588034048
         | 
| 130 | 
            +
              end
         | 
| 131 | 
            +
            end
         | 
| 163 132 |  | 
| 164 | 
            -
             | 
| 165 | 
            -
             | 
| 166 | 
            -
                end
         | 
| 133 | 
            +
            describe "Graphics" do
         | 
| 134 | 
            +
              @graphics = $pcinfo.graphics
         | 
| 167 135 |  | 
| 168 | 
            -
             | 
| 169 | 
            -
             | 
| 170 | 
            -
             | 
| 136 | 
            +
              it "video_score" do
         | 
| 137 | 
            +
                @graphics.video_score.should == 7.6
         | 
| 138 | 
            +
              end
         | 
| 171 139 |  | 
| 172 | 
            -
             | 
| 173 | 
            -
             | 
| 174 | 
            -
             | 
| 140 | 
            +
              it "game_score" do
         | 
| 141 | 
            +
                @graphics.game_score.should == 7.4
         | 
| 142 | 
            +
              end
         | 
| 175 143 |  | 
| 176 | 
            -
             | 
| 177 | 
            -
             | 
| 178 | 
            -
             | 
| 144 | 
            +
              it "adapter" do
         | 
| 145 | 
            +
                @graphics.adapter.should == "NVIDIA GeForce 8800 GTS"
         | 
| 146 | 
            +
              end
         | 
| 179 147 |  | 
| 180 | 
            -
             | 
| 181 | 
            -
             | 
| 182 | 
            -
             | 
| 148 | 
            +
              it "driver_version" do
         | 
| 149 | 
            +
                @graphics.driver_version.should == "7.15.11.65"
         | 
| 150 | 
            +
              end
         | 
| 183 151 |  | 
| 184 | 
            -
             | 
| 185 | 
            -
             | 
| 186 | 
            -
             | 
| 152 | 
            +
              it "total_graphics_memory" do
         | 
| 153 | 
            +
                @graphics.total_graphics_memory.should == 1438515200.byte
         | 
| 154 | 
            +
              end
         | 
| 187 155 |  | 
| 188 | 
            -
             | 
| 189 | 
            -
             | 
| 190 | 
            -
             | 
| 156 | 
            +
              it "dedicated_video_memory" do
         | 
| 157 | 
            +
                @graphics.dedicated_video_memory.should == 633733120.byte
         | 
| 158 | 
            +
              end
         | 
| 191 159 |  | 
| 192 | 
            -
             | 
| 193 | 
            -
             | 
| 194 | 
            -
                end
         | 
| 160 | 
            +
              it "dedicated_system_memory" do
         | 
| 161 | 
            +
                @graphics.dedicated_system_memory.should == 0.byte
         | 
| 195 162 | 
             
              end
         | 
| 196 163 |  | 
| 197 | 
            -
               | 
| 198 | 
            -
                 | 
| 199 | 
            -
             | 
| 200 | 
            -
             | 
| 164 | 
            +
              it "shared_system_memory" do
         | 
| 165 | 
            +
                @graphics.shared_system_memory.should == 804782080.byte
         | 
| 166 | 
            +
              end
         | 
| 167 | 
            +
            end
         | 
| 201 168 |  | 
| 202 | 
            -
             | 
| 203 | 
            -
             | 
| 204 | 
            -
                end
         | 
| 169 | 
            +
            describe "Minpaso::PCInfo::HDD" do
         | 
| 170 | 
            +
              @hdd = $pcinfo.hdd
         | 
| 205 171 |  | 
| 206 | 
            -
             | 
| 207 | 
            -
             | 
| 208 | 
            -
             | 
| 172 | 
            +
              it "score" do
         | 
| 173 | 
            +
                @hdd.score.should == 8.5
         | 
| 174 | 
            +
              end
         | 
| 209 175 |  | 
| 210 | 
            -
             | 
| 211 | 
            -
             | 
| 212 | 
            -
             | 
| 176 | 
            +
              it "primary_size" do
         | 
| 177 | 
            +
                @hdd.primary_size.should == 639460438016.byte
         | 
| 178 | 
            +
              end
         | 
| 213 179 |  | 
| 214 | 
            -
             | 
| 215 | 
            -
             | 
| 216 | 
            -
             | 
| 180 | 
            +
              it "primary_free_space" do
         | 
| 181 | 
            +
                @hdd.primary_free_space.should == 496327954432.byte
         | 
| 182 | 
            +
              end
         | 
| 217 183 |  | 
| 218 | 
            -
             | 
| 219 | 
            -
             | 
| 220 | 
            -
                end
         | 
| 184 | 
            +
              it "total_size" do
         | 
| 185 | 
            +
                @hdd.total_size.should == 639460438016.byte
         | 
| 221 186 | 
             
              end
         | 
| 222 187 | 
             
            end
         |