weatherzone 0.8.5 → 0.8.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/bin/weatherzone +0 -0
- data/lib/weatherzone.rb +1 -1
- data/lib/weatherzone/helpers/date_parser.rb +5 -5
- metadata +6 -8
    
        data/bin/weatherzone
    CHANGED
    
    | 
            File without changes
         | 
    
        data/lib/weatherzone.rb
    CHANGED
    
    
| @@ -18,14 +18,14 @@ module Weatherzone | |
| 18 18 | 
             
                        methods.each do |method_name|
         | 
| 19 19 | 
             
                          has_attribute :tz, :on_elements => methods
         | 
| 20 20 | 
             
                          define_method "#{method_name}_utc" do
         | 
| 21 | 
            -
                             | 
| 22 | 
            -
             | 
| 21 | 
            +
                            if (tz_identifier = send("#{method_name}_tz")) && (value = instance_variable_get("@#{method_name}"))
         | 
| 22 | 
            +
                              tz = TZInfo::Timezone.get("Australia/#{tz_identifier}")
         | 
| 23 23 | 
             
                              tz.local_to_utc(Time.parse(value))
         | 
| 24 24 | 
             
                            end
         | 
| 25 25 | 
             
                          end
         | 
| 26 26 | 
             
                          define_method method_name do
         | 
| 27 | 
            -
                            if value = send("#{method_name}_utc")
         | 
| 28 | 
            -
                              tz = TZInfo::Timezone.get("Australia/#{ | 
| 27 | 
            +
                            if (tz_identifier = send("#{method_name}_tz")) && (value = send("#{method_name}_utc"))
         | 
| 28 | 
            +
                              tz = TZInfo::Timezone.get("Australia/#{tz_identifier}")
         | 
| 29 29 | 
             
                              tz.utc_to_local value
         | 
| 30 30 | 
             
                            end
         | 
| 31 31 | 
             
                          end
         | 
| @@ -36,4 +36,4 @@ module Weatherzone | |
| 36 36 | 
             
                  end
         | 
| 37 37 | 
             
                end
         | 
| 38 38 | 
             
              end
         | 
| 39 | 
            -
            end
         | 
| 39 | 
            +
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,13 +1,13 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: weatherzone
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              hash:  | 
| 5 | 
            -
              prerelease:  | 
| 4 | 
            +
              hash: 51
         | 
| 5 | 
            +
              prerelease: 
         | 
| 6 6 | 
             
              segments: 
         | 
| 7 7 | 
             
              - 0
         | 
| 8 8 | 
             
              - 8
         | 
| 9 | 
            -
              -  | 
| 10 | 
            -
              version: 0.8. | 
| 9 | 
            +
              - 6
         | 
| 10 | 
            +
              version: 0.8.6
         | 
| 11 11 | 
             
            platform: ruby
         | 
| 12 12 | 
             
            authors: 
         | 
| 13 13 | 
             
            - Ben Askins
         | 
| @@ -15,8 +15,7 @@ autorequire: | |
| 15 15 | 
             
            bindir: bin
         | 
| 16 16 | 
             
            cert_chain: []
         | 
| 17 17 |  | 
| 18 | 
            -
            date:  | 
| 19 | 
            -
            default_executable: 
         | 
| 18 | 
            +
            date: 2011-08-17 00:00:00 Z
         | 
| 20 19 | 
             
            dependencies: 
         | 
| 21 20 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 22 21 | 
             
              name: hoe
         | 
| @@ -123,7 +122,6 @@ files: | |
| 123 122 | 
             
            - test/test_value_and_unit_helpers.rb
         | 
| 124 123 | 
             
            - test/test_warning.rb
         | 
| 125 124 | 
             
            - test/test_weather.rb
         | 
| 126 | 
            -
            has_rdoc: true
         | 
| 127 125 | 
             
            homepage: http://github.com/benaskins/weatherzone/
         | 
| 128 126 | 
             
            licenses: []
         | 
| 129 127 |  | 
| @@ -154,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 154 152 | 
             
            requirements: []
         | 
| 155 153 |  | 
| 156 154 | 
             
            rubyforge_project: weatherzone
         | 
| 157 | 
            -
            rubygems_version: 1. | 
| 155 | 
            +
            rubygems_version: 1.8.5
         | 
| 158 156 | 
             
            signing_key: 
         | 
| 159 157 | 
             
            specification_version: 3
         | 
| 160 158 | 
             
            summary: Ruby client for the weatherzone webservice.
         |