greyhawkweather 0.0.5 → 0.0.6
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/.gemtest +0 -0
- data/History.txt +3 -0
- data/lib/baselinedata.rb +1 -1
- data/lib/greyhawkweather.rb +1 -1
- data/lib/precipitationoccurance.rb +7 -7
- data/lib/skyconditions.rb +2 -1
- data/lib/weathergenerator.rb +3 -3
- data/todo.org +14 -11
- data.tar.gz.sig +0 -0
- metadata +11 -42
- metadata.gz.sig +0 -0
    
        data/.gemtest
    ADDED
    
    | 
            File without changes
         | 
    
        data/History.txt
    CHANGED
    
    
    
        data/lib/baselinedata.rb
    CHANGED
    
    
    
        data/lib/greyhawkweather.rb
    CHANGED
    
    
| @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            require 'YAML' unless defined?  | 
| 1 | 
            +
            require 'YAML' unless defined? YAML
         | 
| 2 2 |  | 
| 3 3 | 
             
            require 'rangehash'
         | 
| 4 4 |  | 
| @@ -12,8 +12,9 @@ class PrecipitationOccurance < RangeHash | |
| 12 12 | 
             
                PrecipitationOccurance.new(data)
         | 
| 13 13 | 
             
              end
         | 
| 14 14 |  | 
| 15 | 
            -
              def initialize(args =  | 
| 16 | 
            -
                super  | 
| 15 | 
            +
              def initialize(args = {})
         | 
| 16 | 
            +
                super NullPrecipitationInfo.new()
         | 
| 17 | 
            +
                merge!(args)
         | 
| 17 18 | 
             
              end
         | 
| 18 19 |  | 
| 19 20 | 
             
              def type(dieroller, temp_range = nil, terrain = :plains)
         | 
| @@ -67,17 +68,16 @@ class PrecipitationOccurance < RangeHash | |
| 67 68 |  | 
| 68 69 | 
             
              def line_above(precip_info)
         | 
| 69 70 | 
             
                prev_key = sorted_keys[[0,index_of_precip(precip_info)-1].max]
         | 
| 70 | 
            -
                 | 
| 71 | 
            +
                self[prev_key]
         | 
| 71 72 | 
             
              end
         | 
| 72 73 |  | 
| 73 74 | 
             
              def line_below(precip_info)
         | 
| 74 75 | 
             
                next_key = sorted_keys[[sorted_keys.length,index_of_precip(precip_info)+1].min]
         | 
| 75 | 
            -
                 | 
| 76 | 
            +
                self[next_key]
         | 
| 76 77 | 
             
              end
         | 
| 77 78 |  | 
| 78 79 | 
             
              def index_of_precip(precip_info)
         | 
| 79 | 
            -
                key =  | 
| 80 | 
            +
                key = index(precip_info)
         | 
| 80 81 | 
             
                index_of_key = sorted_keys.index(key)
         | 
| 81 82 | 
             
              end
         | 
| 82 | 
            -
              
         | 
| 83 83 | 
             
            end
         | 
    
        data/lib/skyconditions.rb
    CHANGED
    
    | @@ -3,7 +3,8 @@ require 'rangehash' | |
| 3 3 | 
             
            class SkyConditions
         | 
| 4 4 | 
             
              def initialize (clear_range, partly_range, cloudy_range)
         | 
| 5 5 | 
             
                hash = { clear_range => :clear, partly_range => :partly_cloudy, cloudy_range => :cloudy}
         | 
| 6 | 
            -
                @condition_ranges = RangeHash.new( | 
| 6 | 
            +
                @condition_ranges = RangeHash.new(:none)
         | 
| 7 | 
            +
                @condition_ranges.merge!(hash)
         | 
| 7 8 | 
             
              end
         | 
| 8 9 |  | 
| 9 10 | 
             
              def condition(roller)
         | 
    
        data/lib/weathergenerator.rb
    CHANGED
    
    | @@ -32,13 +32,13 @@ class WeatherGenerator | |
| 32 32 | 
             
              end
         | 
| 33 33 |  | 
| 34 34 | 
             
              def check_record_high_low(dieroller)
         | 
| 35 | 
            -
                record_high_low_range = RangeHash.new( | 
| 35 | 
            +
                record_high_low_range = RangeHash.new(:normal)
         | 
| 36 | 
            +
                record_high_low_range.merge!({ 1 => [:low, :low, :low],
         | 
| 36 37 | 
             
                                                      2 => [:low, :low],
         | 
| 37 38 | 
             
                                                      3..4 => :low,
         | 
| 38 39 | 
             
                                                      97..98 => :high,
         | 
| 39 40 | 
             
                                                      99 => [:high, :high],
         | 
| 40 | 
            -
                                                      100 => [:high, :high, :high]} | 
| 41 | 
            -
                                                      :normal)
         | 
| 41 | 
            +
                                                      100 => [:high, :high, :high]})
         | 
| 42 42 | 
             
                record_high_low_range[dieroller.roll(100)]
         | 
| 43 43 | 
             
              end
         | 
| 44 44 | 
             
            end
         | 
    
        data/todo.org
    CHANGED
    
    | @@ -25,26 +25,29 @@ Minimum features needed to let me use the tool in my own game | |
| 25 25 | 
             
            ** DONE check for requirements on precip
         | 
| 26 26 | 
             
            *** DONE temp range
         | 
| 27 27 | 
             
            *** DONE terrain
         | 
| 28 | 
            +
            ** DONE clean up after gem-ify work, and removal of rangehash
         | 
| 29 | 
            +
            ** DONE rearrange code a bit (helper classes in subdirectories etc.)
         | 
| 30 | 
            +
            * Release #1.5
         | 
| 31 | 
            +
            ** TODO Switch to rspec
         | 
| 32 | 
            +
            * Release #2
         | 
| 28 33 | 
             
            ** need to calc diff in base temp caused by latitude
         | 
| 34 | 
            +
            ** modify weather given terrain
         | 
| 29 35 | 
             
            ** duration of record high/low
         | 
| 30 | 
            -
             | 
| 31 36 | 
             
            ** determine windspeed from precipitation
         | 
| 37 | 
            +
            ** clean warnings from test runs
         | 
| 38 | 
            +
            ** report affects of precip (duration etc.)
         | 
| 39 | 
            +
            ** greyhawk calendar festivals
         | 
| 32 40 |  | 
| 33 | 
            -
             | 
| 34 | 
            -
             | 
| 41 | 
            +
            * humidity
         | 
| 42 | 
            +
            * report wind chill temp
         | 
| 43 | 
            +
            * report high wind effect table
         | 
| 44 | 
            +
            * need to calc diff in base temp caused by altitude
         | 
| 35 45 | 
             
            * fix infinite loop in weather generation (probaly only a problem in tests)
         | 
| 36 46 | 
             
            * need to calc diff in sun-rise/-set time caused by longitude
         | 
| 37 | 
            -
            * need to calc diff in base temp caused by altitude
         | 
| 38 47 | 
             
            * phase of moons for date
         | 
| 39 48 | 
             
            * sunrise/sunset times for date
         | 
| 40 | 
            -
            * modify weather given terrain
         | 
| 41 49 | 
             
            * interpret special precipitation (based upon terrain)
         | 
| 42 | 
            -
            * report wind chill temp
         | 
| 43 | 
            -
            * report high wind effect table
         | 
| 44 | 
            -
            * report affects of precip (duration etc.)
         | 
| 45 | 
            -
            * humidity
         | 
| 46 50 | 
             
            * arbitrary start day
         | 
| 47 | 
            -
            * greyhawk calendar festivals
         | 
| 48 | 
            -
            * DONE rearrange code a bit (helper classes in subdirectories etc.)
         | 
| 49 51 | 
             
            * precipitation occurance chart should not be publically a ranged hash?
         | 
| 50 52 | 
             
            * ranged hash sorting is bad stuff (and not yet complete!)
         | 
| 53 | 
            +
             | 
    
        data.tar.gz.sig
    CHANGED
    
    | Binary file | 
    
        metadata
    CHANGED
    
    | @@ -1,13 +1,13 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: greyhawkweather
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              hash:  | 
| 5 | 
            -
              prerelease:  | 
| 4 | 
            +
              hash: 19
         | 
| 5 | 
            +
              prerelease: 
         | 
| 6 6 | 
             
              segments: 
         | 
| 7 7 | 
             
              - 0
         | 
| 8 8 | 
             
              - 0
         | 
| 9 | 
            -
              -  | 
| 10 | 
            -
              version: 0.0. | 
| 9 | 
            +
              - 6
         | 
| 10 | 
            +
              version: 0.0.6
         | 
| 11 11 | 
             
            platform: ruby
         | 
| 12 12 | 
             
            authors: 
         | 
| 13 13 | 
             
            - Mark Simpson
         | 
| @@ -36,7 +36,7 @@ cert_chain: | |
| 36 36 | 
             
              rPnJW2hNpPLFrA==
         | 
| 37 37 | 
             
              -----END CERTIFICATE-----
         | 
| 38 38 |  | 
| 39 | 
            -
            date: 2011- | 
| 39 | 
            +
            date: 2011-04-26 00:00:00 -04:00
         | 
| 40 40 | 
             
            default_executable: 
         | 
| 41 41 | 
             
            dependencies: 
         | 
| 42 42 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| @@ -56,53 +56,21 @@ dependencies: | |
| 56 56 | 
             
              type: :runtime
         | 
| 57 57 | 
             
              version_requirements: *id001
         | 
| 58 58 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 59 | 
            -
              name:  | 
| 59 | 
            +
              name: hoe
         | 
| 60 60 | 
             
              prerelease: false
         | 
| 61 61 | 
             
              requirement: &id002 !ruby/object:Gem::Requirement 
         | 
| 62 62 | 
             
                none: false
         | 
| 63 63 | 
             
                requirements: 
         | 
| 64 64 | 
             
                - - ">="
         | 
| 65 65 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 66 | 
            -
                    hash:  | 
| 66 | 
            +
                    hash: 35
         | 
| 67 67 | 
             
                    segments: 
         | 
| 68 68 | 
             
                    - 2
         | 
| 69 | 
            -
                    -  | 
| 69 | 
            +
                    - 9
         | 
| 70 70 | 
             
                    - 4
         | 
| 71 | 
            -
                    version: 2. | 
| 71 | 
            +
                    version: 2.9.4
         | 
| 72 72 | 
             
              type: :development
         | 
| 73 73 | 
             
              version_requirements: *id002
         | 
| 74 | 
            -
            - !ruby/object:Gem::Dependency 
         | 
| 75 | 
            -
              name: gemcutter
         | 
| 76 | 
            -
              prerelease: false
         | 
| 77 | 
            -
              requirement: &id003 !ruby/object:Gem::Requirement 
         | 
| 78 | 
            -
                none: false
         | 
| 79 | 
            -
                requirements: 
         | 
| 80 | 
            -
                - - ">="
         | 
| 81 | 
            -
                  - !ruby/object:Gem::Version 
         | 
| 82 | 
            -
                    hash: 5
         | 
| 83 | 
            -
                    segments: 
         | 
| 84 | 
            -
                    - 0
         | 
| 85 | 
            -
                    - 6
         | 
| 86 | 
            -
                    - 1
         | 
| 87 | 
            -
                    version: 0.6.1
         | 
| 88 | 
            -
              type: :development
         | 
| 89 | 
            -
              version_requirements: *id003
         | 
| 90 | 
            -
            - !ruby/object:Gem::Dependency 
         | 
| 91 | 
            -
              name: hoe
         | 
| 92 | 
            -
              prerelease: false
         | 
| 93 | 
            -
              requirement: &id004 !ruby/object:Gem::Requirement 
         | 
| 94 | 
            -
                none: false
         | 
| 95 | 
            -
                requirements: 
         | 
| 96 | 
            -
                - - ">="
         | 
| 97 | 
            -
                  - !ruby/object:Gem::Version 
         | 
| 98 | 
            -
                    hash: 27
         | 
| 99 | 
            -
                    segments: 
         | 
| 100 | 
            -
                    - 2
         | 
| 101 | 
            -
                    - 5
         | 
| 102 | 
            -
                    - 0
         | 
| 103 | 
            -
                    version: 2.5.0
         | 
| 104 | 
            -
              type: :development
         | 
| 105 | 
            -
              version_requirements: *id004
         | 
| 106 74 | 
             
            description: |-
         | 
| 107 75 | 
             
              This program will assist in the generation of randomized weather for
         | 
| 108 76 | 
             
              the Greyhawk AD&D Campaign setting.  It uses data from the Greyhawk
         | 
| @@ -161,6 +129,7 @@ files: | |
| 161 129 | 
             
            - test/test_weather_generator.rb
         | 
| 162 130 | 
             
            - test/test_wind.rb
         | 
| 163 131 | 
             
            - todo.org
         | 
| 132 | 
            +
            - .gemtest
         | 
| 164 133 | 
             
            has_rdoc: true
         | 
| 165 134 | 
             
            homepage: http://github.com/verdammelt/Greyhawk-Weather
         | 
| 166 135 | 
             
            licenses: []
         | 
| @@ -192,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 192 161 | 
             
            requirements: []
         | 
| 193 162 |  | 
| 194 163 | 
             
            rubyforge_project: greyhawkweather
         | 
| 195 | 
            -
            rubygems_version: 1. | 
| 164 | 
            +
            rubygems_version: 1.5.0
         | 
| 196 165 | 
             
            signing_key: 
         | 
| 197 166 | 
             
            specification_version: 3
         | 
| 198 167 | 
             
            summary: This program will assist in the generation of randomized weather for the Greyhawk AD&D Campaign setting
         | 
    
        metadata.gz.sig
    CHANGED
    
    | Binary file |