tzinfo 1.0.0 → 1.0.1
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.
Potentially problematic release.
This version of tzinfo might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGES +6 -0
- data/lib/tzinfo/zoneinfo_data_source.rb +4 -4
- data/test/tc_zoneinfo_data_source.rb +6 -10
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: bb01878ee2394f288ea1e03bb90f9e34f9f02679
         | 
| 4 | 
            +
              data.tar.gz: 0648dcb741ecf2022492728bd458ce8de57e5f4a
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 26d0f0927d7b940e982ede4fa16d3b28dc70eb0241f3f882af5a2b51db9d51e108fbcb49493b05fd5e214a6d39efa33b37fc87aed66e470050e4d6b453edfa36
         | 
| 7 | 
            +
              data.tar.gz: 82227c919c4d9b44a89809e0a478feffacc50ed170276123eed483a71558fa496827fb341e3e4a478f692c7f7d99cea18542a4eae67506285b53fd0985d49584
         | 
    
        data/CHANGES
    CHANGED
    
    
| @@ -205,8 +205,8 @@ module TZInfo | |
| 205 205 | 
             
                  File.directory?(path) && File.file?(File.join(path, 'zone.tab')) && File.file?(File.join(path, 'iso3166.tab'))
         | 
| 206 206 | 
             
                end
         | 
| 207 207 |  | 
| 208 | 
            -
                # Unless called | 
| 209 | 
            -
                #  | 
| 208 | 
            +
                # Unless already called, scans @zoneinfo_dir looking for the available
         | 
| 209 | 
            +
                # timezone identifiers.
         | 
| 210 210 | 
             
                def load_timezone_index
         | 
| 211 211 | 
             
                  unless @timezone_index
         | 
| 212 212 | 
             
                    index = []
         | 
| @@ -219,8 +219,8 @@ module TZInfo | |
| 219 219 | 
             
                  end
         | 
| 220 220 | 
             
                end
         | 
| 221 221 |  | 
| 222 | 
            -
                # Recursively scans a directory of timezones,  | 
| 223 | 
            -
                #  | 
| 222 | 
            +
                # Recursively scans a directory of timezones, calling the passed in block
         | 
| 223 | 
            +
                # for each identifier found.
         | 
| 224 224 | 
             
                def enum_timezones(dir, exclude = [], &block)
         | 
| 225 225 | 
             
                  Dir.foreach(dir ? File.join(@zoneinfo_dir, dir) : @zoneinfo_dir) do |entry|
         | 
| 226 226 | 
             
                    unless entry =~ /\./ || exclude.include?(entry)
         | 
| @@ -460,20 +460,16 @@ class TCZoneinfoDataSource < Test::Unit::TestCase | |
| 460 460 | 
             
                prefix = File.expand_path(directory) + File::SEPARATOR
         | 
| 461 461 |  | 
| 462 462 | 
             
                entries = entries.select do |file|
         | 
| 463 | 
            -
                   | 
| 464 | 
            -
             | 
| 465 | 
            -
                    File.file?(file)
         | 
| 466 | 
            -
                  else
         | 
| 467 | 
            -
                    false      
         | 
| 468 | 
            -
                  end
         | 
| 463 | 
            +
                  file.untaint
         | 
| 464 | 
            +
                  File.file?(file)
         | 
| 469 465 | 
             
                end
         | 
| 470 466 |  | 
| 471 467 | 
             
                entries = entries.collect {|file| file[directory.length + File::SEPARATOR.length, file.length - directory.length - File::SEPARATOR.length]}
         | 
| 472 | 
            -
             | 
| 473 | 
            -
                # Exclude right (with leapseconds) and posix (copy) directories | 
| 468 | 
            +
             | 
| 469 | 
            +
                # Exclude right (with leapseconds) and posix (copy) directories; .tab files; localtime, posixrules and Factory zones
         | 
| 474 470 | 
             
                entries = entries.select do |file| 
         | 
| 475 | 
            -
                  file !~ /\A(posix|right)\// && | 
| 476 | 
            -
                    file !~ / | 
| 471 | 
            +
                  file !~ /\A(posix|right)\// &&
         | 
| 472 | 
            +
                    file !~ /\.tab\z/ &&
         | 
| 477 473 | 
             
                    !%w(localtime posixrules Factory).include?(file)
         | 
| 478 474 | 
             
                end
         | 
| 479 475 |  | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: tzinfo
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.0. | 
| 4 | 
            +
              version: 1.0.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Philip Ross
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2013-06- | 
| 11 | 
            +
            date: 2013-06-22 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies: []
         | 
| 13 13 | 
             
            description: TZInfo provides daylight savings aware transformations between times
         | 
| 14 14 | 
             
              in different time zones.
         |