ziptz 3.0.0 → 3.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 58a543bdf4161509318a1d76b85fcda2feaa38c1c109cbb306360a1d770d4caa
4
- data.tar.gz: a8ea39f8f78aba709e3c3a08916d56a64c70f7add692e5af4f6b77fc612649ad
3
+ metadata.gz: 8e5744397fb6e6d424238af3ca48d40eebb5f1ca107e9e4d9e0cd302c4c31f49
4
+ data.tar.gz: 588e5c4a194a65fbc59057536cd91c2965dffbdb459c6a23f4ce5505b4773615
5
5
  SHA512:
6
- metadata.gz: 3970fc1eb3951eb742c348936012ac61124583f89d7758bdcd159c1ec8de66352387201bcedce8141e929046be78c7bb3e78bb497523e0965a5b47a6ad08153e
7
- data.tar.gz: 070d0bb85eac2a9256447000df5e9cd5d929a29aa34025b48a8c6967a54bbe95c284227541ff12d5e223414a23b70366a8aa6099e684174f17afda130170a4d1
6
+ metadata.gz: 932ae3f44e49973da22f2ed41149702e234e206d3293aa50c5c028ebcc747d10b79fe2cc0e679f812770115c67f5d4ac639a12aba20565492b1ac07422bfac23
7
+ data.tar.gz: 9f0b3dc7989b08ed92dab78e1d834bf2492fdedbef1bba78af2f19ff1dd6ecdee54db6b22fbb263c36c065b8341f241531b7d0e773a80de3efb48ffc953e33f9
data/Gemfile.lock CHANGED
@@ -1,28 +1,28 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ziptz (2.1.14)
4
+ ziptz (3.0.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- activemodel (6.0.3.4)
10
- activesupport (= 6.0.3.4)
11
- activerecord (6.0.3.4)
12
- activemodel (= 6.0.3.4)
13
- activesupport (= 6.0.3.4)
14
- activesupport (6.0.3.4)
9
+ activemodel (6.1.3.1)
10
+ activesupport (= 6.1.3.1)
11
+ activerecord (6.1.3.1)
12
+ activemodel (= 6.1.3.1)
13
+ activesupport (= 6.1.3.1)
14
+ activesupport (6.1.3.1)
15
15
  concurrent-ruby (~> 1.0, >= 1.0.2)
16
- i18n (>= 0.7, < 2)
17
- minitest (~> 5.1)
18
- tzinfo (~> 1.1)
19
- zeitwerk (~> 2.2, >= 2.2.2)
20
- ast (2.4.1)
16
+ i18n (>= 1.6, < 2)
17
+ minitest (>= 5.1)
18
+ tzinfo (~> 2.0)
19
+ zeitwerk (~> 2.3)
20
+ ast (2.4.2)
21
21
  byebug (11.1.3)
22
22
  coderay (1.1.3)
23
- concurrent-ruby (1.1.7)
23
+ concurrent-ruby (1.1.8)
24
24
  diff-lcs (1.4.4)
25
- ffi (1.13.1)
25
+ ffi (1.15.0)
26
26
  formatador (0.2.5)
27
27
  guard (2.16.2)
28
28
  formatador (>= 0.2.4)
@@ -38,81 +38,80 @@ GEM
38
38
  guard (~> 2.1)
39
39
  guard-compat (~> 1.1)
40
40
  rspec (>= 2.99.0, < 4.0)
41
- i18n (1.8.5)
41
+ i18n (1.8.10)
42
42
  concurrent-ruby (~> 1.0)
43
- io-console (0.5.6)
44
- irb (1.2.7)
43
+ io-console (0.5.9)
44
+ irb (1.3.5)
45
45
  reline (>= 0.1.5)
46
- listen (3.2.1)
46
+ listen (3.5.1)
47
47
  rb-fsevent (~> 0.10, >= 0.10.3)
48
48
  rb-inotify (~> 0.9, >= 0.9.10)
49
49
  lumberjack (1.2.8)
50
50
  method_source (1.0.0)
51
- minitest (5.14.2)
51
+ minitest (5.14.4)
52
52
  mysql2 (0.5.3)
53
53
  nenv (0.3.0)
54
54
  notiffany (0.1.3)
55
55
  nenv (~> 0.1)
56
56
  shellany (~> 0.0)
57
- parallel (1.19.2)
58
- parser (2.7.2.0)
57
+ parallel (1.20.1)
58
+ parser (3.0.1.0)
59
59
  ast (~> 2.4.1)
60
- pry (0.13.1)
60
+ pry (0.14.1)
61
61
  coderay (~> 1.1)
62
62
  method_source (~> 1.0)
63
63
  rainbow (3.0.0)
64
- rake (13.0.1)
64
+ rake (13.0.3)
65
65
  rb-fsevent (0.10.4)
66
66
  rb-inotify (0.10.1)
67
67
  ffi (~> 1.0)
68
- regexp_parser (1.8.2)
69
- reline (0.1.7)
68
+ regexp_parser (2.1.1)
69
+ reline (0.2.5)
70
70
  io-console (~> 0.5)
71
- rexml (3.2.4)
71
+ rexml (3.2.5)
72
72
  rspec (3.10.0)
73
73
  rspec-core (~> 3.10.0)
74
74
  rspec-expectations (~> 3.10.0)
75
75
  rspec-mocks (~> 3.10.0)
76
- rspec-core (3.10.0)
76
+ rspec-core (3.10.1)
77
77
  rspec-support (~> 3.10.0)
78
- rspec-expectations (3.10.0)
78
+ rspec-expectations (3.10.1)
79
79
  diff-lcs (>= 1.2.0, < 2.0)
80
80
  rspec-support (~> 3.10.0)
81
- rspec-mocks (3.10.0)
81
+ rspec-mocks (3.10.2)
82
82
  diff-lcs (>= 1.2.0, < 2.0)
83
83
  rspec-support (~> 3.10.0)
84
- rspec-support (3.10.0)
85
- rubocop (0.93.1)
84
+ rspec-support (3.10.2)
85
+ rubocop (1.13.0)
86
86
  parallel (~> 1.10)
87
- parser (>= 2.7.1.5)
87
+ parser (>= 3.0.0.0)
88
88
  rainbow (>= 2.2.2, < 4.0)
89
- regexp_parser (>= 1.8)
89
+ regexp_parser (>= 1.8, < 3.0)
90
90
  rexml
91
- rubocop-ast (>= 0.6.0)
91
+ rubocop-ast (>= 1.2.0, < 2.0)
92
92
  ruby-progressbar (~> 1.7)
93
- unicode-display_width (>= 1.4.0, < 2.0)
94
- rubocop-ast (1.1.0)
93
+ unicode-display_width (>= 1.4.0, < 3.0)
94
+ rubocop-ast (1.4.1)
95
95
  parser (>= 2.7.1.5)
96
- rubocop-performance (1.8.1)
97
- rubocop (>= 0.87.0)
96
+ rubocop-performance (1.11.1)
97
+ rubocop (>= 1.7.0, < 2.0)
98
98
  rubocop-ast (>= 0.4.0)
99
- rubocop-rspec (1.44.1)
100
- rubocop (~> 0.87)
101
- rubocop-ast (>= 0.7.1)
102
- ruby-progressbar (1.10.1)
99
+ rubocop-rspec (2.3.0)
100
+ rubocop (~> 1.0)
101
+ rubocop-ast (>= 1.1.0)
102
+ ruby-progressbar (1.11.0)
103
103
  shellany (0.0.1)
104
- thor (1.0.1)
105
- thread_safe (0.3.6)
104
+ thor (1.1.0)
106
105
  tty-cursor (0.7.1)
107
106
  tty-spinner (0.9.3)
108
107
  tty-cursor (~> 0.7)
109
- tzinfo (1.2.7)
110
- thread_safe (~> 0.1)
111
- unicode-display_width (1.7.0)
112
- zeitwerk (2.4.1)
108
+ tzinfo (2.0.4)
109
+ concurrent-ruby (~> 1.0)
110
+ unicode-display_width (2.0.0)
111
+ zeitwerk (2.4.2)
113
112
 
114
113
  PLATFORMS
115
- ruby
114
+ x86_64-darwin-19
116
115
 
117
116
  DEPENDENCIES
118
117
  activerecord
@@ -131,4 +130,4 @@ DEPENDENCIES
131
130
  ziptz!
132
131
 
133
132
  BUNDLED WITH
134
- 2.1.4
133
+ 2.2.16
data/README.md CHANGED
@@ -4,9 +4,15 @@
4
4
  [![Total Downloads](https://img.shields.io/gem/dt/ziptz.svg)](https://rubygems.org/gems/ziptz/)
5
5
  [![License](https://img.shields.io/github/license/infused/ziptz.svg)](https://github.com/infused/ziptz)
6
6
 
7
- Get time zone and daylight saving time for any US ZIP code.
7
+ Get time zone, daylight saving time, and base offset for any US ZIP code.
8
8
 
9
- <i>ZIP codes are up to date as of <b>February 2021</b>.</i>
9
+ <i>ZIP codes are up to date as of <b>July 2021</b>.</i>
10
+
11
+ ## Compatibility
12
+
13
+ Ziptz is tested to work with the following versions of Ruby:
14
+
15
+ * Ruby 2.3.x, 2.4.x, 2.5.x, 2.6.x, 2.7.x, 3.0.x, and TruffleRuby
10
16
 
11
17
  ## Installation
12
18
 
@@ -34,7 +40,7 @@ Determine if the ZIP code uses Daylight Saving Time:
34
40
 
35
41
  Get all the zip codes in a time zone:
36
42
 
37
- z.zips('Pacific/Pago_Pago') #=> ["96799", "96941", "96942", "96943", "96944"]
43
+ z.zips('Pacific/Chuuk') #=> ["96942", "96943"]
38
44
 
39
45
 
40
46
  ## Supported Time Zones
@@ -90,7 +96,7 @@ If you would prefer raw data instead of a gem, see my [ZIP Code Time Zones](http
90
96
  ## Version 3 breaking changes
91
97
 
92
98
  * APO, DPO, and FPO zip codes are no longer included, because they are non-geographic.
93
- * Time zone offset are now specified in seconds instead of hours.
99
+ * Time zone offsets are now specified in seconds instead of hours.
94
100
  * Time zone are now more granular. The full list of time zones is:
95
101
  * America/Adak
96
102
  * America/Anchorage
data/data/tz.data CHANGED
Binary file
data/data/tzm.data CHANGED
Binary file
data/lib/ziptz.rb CHANGED
@@ -2,7 +2,7 @@ require 'yaml'
2
2
  require 'zlib'
3
3
 
4
4
  class Ziptz
5
- VERSION = '3.0.0'.freeze
5
+ VERSION = '3.0.5'.freeze
6
6
 
7
7
  def time_zone_name(zip)
8
8
  tz_info = time_zone_info(zip)
@@ -59,7 +59,7 @@ class Ziptz
59
59
  def load_tz_data
60
60
  uncompressed = Zlib::Inflate.inflate(File.read(tz_data_path, encoding: 'ASCII-8BIT'))
61
61
  uncompressed.each_line.with_object({}) do |line, data|
62
- zip, tz, dst = line.strip.split(':')
62
+ zip, tz, dst = line.strip.split('|')
63
63
  data[zip] = {tz: tz, dst: dst == '1'}
64
64
  end
65
65
  end
@@ -67,7 +67,7 @@ class Ziptz
67
67
  def load_tzm_data
68
68
  uncompressed = Zlib::Inflate.inflate(File.read(tzm_data_path, encoding: 'ASCII-8BIT'))
69
69
  uncompressed.each_line.with_object({}) do |line, data|
70
- tz, offset = line.strip.split(':')
70
+ tz, offset = line.strip.split('|')
71
71
  data[tz] = {offset: offset}
72
72
  end
73
73
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ziptz
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keith Morrison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-23 00:00:00.000000000 Z
11
+ date: 2021-07-01 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Get timezone info for all 5-digit US zip codes
14
14
  email: keithm@infused.org
@@ -52,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
52
52
  - !ruby/object:Gem::Version
53
53
  version: '0'
54
54
  requirements: []
55
- rubygems_version: 3.1.4
55
+ rubygems_version: 3.2.15
56
56
  signing_key:
57
57
  specification_version: 4
58
58
  summary: TimeZone info for any 5-digit US zip code