ziptz 1.0.19 → 1.0.20

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b1ae85b039d285d12321c9113552231e453e803e
4
- data.tar.gz: 7505cc0c13e41542cb65800fefc79a228e88c2a2
3
+ metadata.gz: e816e0cf61571e14d25cec1ac2afd02edce96997
4
+ data.tar.gz: fa82f947cc4f0d1d09b9a4892d5188e9ad1e134b
5
5
  SHA512:
6
- metadata.gz: b52964c52dba04757fa2025e970b5ebe414d608d002afefff69ccf701a320123865dbc370f0e41565e95f982ea9f7d2e30a4e6185bf55cf442716b40f90f8bb6
7
- data.tar.gz: ed98b6ff3393d4608f2b6abbe8592f3219cc6e03e4f1b634f94f147c585bd1acf867f245d6748fc6343989c5265127494070b69bde1c4d2e7d0422b24cc36864
6
+ metadata.gz: 66ddacf9033d9a08fc915453032dd8bc32caae49a9e87dfdeb487944ada49dcd5aeb2060dea26059ae3dfc2384fbe25a4910a608d20127032815e44979aca32b
7
+ data.tar.gz: e990f52dbe964282196cbba1e47c456f68239ee48c18a7752b2f4455015396ddce8e78fbfa0d4a2de2b239b44d02bffaf37dceacc39ac229fc6d6ebbf2f722f5
@@ -1,7 +1,6 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ziptz (1.0.18)
5
4
 
6
5
  GEM
7
6
  remote: https://rubygems.org/
data/Guardfile CHANGED
@@ -1,7 +1,7 @@
1
1
  # A sample Guardfile
2
2
  # More info at https://github.com/guard/guard#readme
3
3
 
4
- guard :rspec do
4
+ guard :rspec, cmd: 'bundle exec rspec' do
5
5
  watch(%r{^spec/.+_spec\.rb$})
6
6
  watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
7
7
  watch('spec/spec_helper.rb') { 'spec' }
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  Get the time zone for any US ZIP code.
8
8
 
9
- <i>ZIP codes are up to date as of <b>November 2016</b>.</i>
9
+ <i>ZIP codes are up to date as of <b>December 2016</b>.</i>
10
10
 
11
11
  ## Installation
12
12
 
@@ -26,7 +26,7 @@ Get the time zone offset for any ZIP code:
26
26
 
27
27
  z.time_zone_offset('97213') #=> -8
28
28
 
29
- <i>Please note that offsets do not include daylight savings time.</i>
29
+ <em>Note that offsets do not include daylight savings time.</em>
30
30
 
31
31
 
32
32
  Get all the zip codes in a time zone:
@@ -49,7 +49,7 @@ Get all the zip codes in a time zone:
49
49
  * "Palau" UTC +09:00
50
50
  * "Micronesia" UTC +11:00
51
51
 
52
- Note that APO/FPO zip codes will not return a known time zone.
52
+ <em>Note that APO/FPO zip codes will not return a known time zone offset.</em>
53
53
 
54
54
  ## License
55
55
 
data/Rakefile CHANGED
@@ -17,7 +17,7 @@ task :console do
17
17
  sh 'irb -rubygems -I lib -r ziptz.rb'
18
18
  end
19
19
 
20
- desc 'Create ziptz.yml from zipcodes database'
20
+ desc 'Create ziptz db from zipcodes database'
21
21
  task :create_ziptz do
22
22
  require 'yaml'
23
23
  require 'active_record'
@@ -672,7 +672,6 @@
672
672
  02215=5
673
673
  02217=5
674
674
  02222=5
675
- 02228=5
676
675
  02238=5
677
676
  02241=5
678
677
  02266=5
@@ -872,7 +871,6 @@
872
871
  02777=5
873
872
  02779=5
874
873
  02780=5
875
- 02783=5
876
874
  02790=5
877
875
  02791=5
878
876
  02801=5
@@ -2466,9 +2464,7 @@
2466
2464
  06912=5
2467
2465
  06913=5
2468
2466
  06914=5
2469
- 06920=5
2470
2467
  06921=5
2471
- 06922=5
2472
2468
  06926=5
2473
2469
  06927=5
2474
2470
  07001=5
@@ -3211,7 +3207,6 @@
3211
3207
  09028=0
3212
3208
  09033=0
3213
3209
  09034=0
3214
- 09038=0
3215
3210
  09044=0
3216
3211
  09046=0
3217
3212
  09049=0
@@ -3265,6 +3260,7 @@
3265
3260
  09263=0
3266
3261
  09264=0
3267
3262
  09265=0
3263
+ 09301=0
3268
3264
  09302=0
3269
3265
  09304=0
3270
3266
  09305=0
@@ -3272,6 +3268,9 @@
3272
3268
  09307=0
3273
3269
  09308=0
3274
3270
  09309=0
3271
+ 09310=0
3272
+ 09311=0
3273
+ 09312=0
3275
3274
  09313=0
3276
3275
  09315=0
3277
3276
  09316=0
@@ -3410,6 +3409,7 @@
3410
3409
  09708=0
3411
3410
  09709=0
3412
3411
  09710=0
3412
+ 09711=0
3413
3413
  09712=0
3414
3414
  09714=0
3415
3415
  09715=0
@@ -3498,7 +3498,6 @@
3498
3498
  09837=0
3499
3499
  09838=0
3500
3500
  09839=0
3501
- 09840=0
3502
3501
  09841=0
3503
3502
  09842=0
3504
3503
  09843=0
@@ -3623,7 +3622,6 @@
3623
3622
  10158=5
3624
3623
  10159=5
3625
3624
  10160=5
3626
- 10161=5
3627
3625
  10162=5
3628
3626
  10163=5
3629
3627
  10164=5
@@ -3651,7 +3649,6 @@
3651
3649
  10242=5
3652
3650
  10249=5
3653
3651
  10256=5
3654
- 10257=5
3655
3652
  10258=5
3656
3653
  10259=5
3657
3654
  10260=5
@@ -3674,7 +3671,6 @@
3674
3671
  10282=5
3675
3672
  10285=5
3676
3673
  10286=5
3677
- 10292=5
3678
3674
  10301=5
3679
3675
  10302=5
3680
3676
  10303=5
@@ -4147,9 +4143,7 @@
4147
4143
  11803=5
4148
4144
  11804=5
4149
4145
  11815=5
4150
- 11819=5
4151
4146
  11853=5
4152
- 11854=5
4153
4147
  11901=5
4154
4148
  11930=5
4155
4149
  11931=5
@@ -4382,9 +4376,7 @@
4382
4376
  12248=5
4383
4377
  12249=5
4384
4378
  12250=5
4385
- 12252=5
4386
4379
  12255=5
4387
- 12256=5
4388
4380
  12257=5
4389
4381
  12260=5
4390
4382
  12261=5
@@ -11528,7 +11520,6 @@
11528
11520
  28244=5
11529
11521
  28246=5
11530
11522
  28247=5
11531
- 28250=5
11532
11523
  28253=5
11533
11524
  28254=5
11534
11525
  28255=5
@@ -12652,7 +12643,6 @@
12652
12643
  30160=5
12653
12644
  30161=5
12654
12645
  30162=5
12655
- 30163=5
12656
12646
  30164=5
12657
12647
  30165=5
12658
12648
  30168=5
@@ -15161,7 +15151,6 @@
15161
15151
  35480=6
15162
15152
  35481=6
15163
15153
  35482=6
15164
- 35485=6
15165
15154
  35486=6
15166
15155
  35487=6
15167
15156
  35490=6
@@ -15574,7 +15563,6 @@
15574
15563
  36511=6
15575
15564
  36512=6
15576
15565
  36513=6
15577
- 36515=6
15578
15566
  36518=6
15579
15567
  36521=6
15580
15568
  36522=6
@@ -16329,7 +16317,6 @@
16329
16317
  38139=6
16330
16318
  38141=6
16331
16319
  38145=6
16332
- 38147=6
16333
16320
  38148=6
16334
16321
  38150=6
16335
16322
  38151=6
@@ -17328,7 +17315,6 @@
17328
17315
  40442=5
17329
17316
  40444=5
17330
17317
  40445=5
17331
- 40446=5
17332
17318
  40447=5
17333
17319
  40448=5
17334
17320
  40452=5
@@ -19635,7 +19621,6 @@
19635
19621
  46259=5
19636
19622
  46260=5
19637
19623
  46262=5
19638
- 46266=5
19639
19624
  46268=5
19640
19625
  46274=5
19641
19626
  46275=5
@@ -19647,7 +19632,6 @@
19647
19632
  46285=5
19648
19633
  46290=5
19649
19634
  46291=5
19650
- 46295=5
19651
19635
  46296=5
19652
19636
  46298=5
19653
19637
  46301=6
@@ -20724,7 +20708,6 @@
20724
20708
  48386=5
20725
20709
  48387=5
20726
20710
  48390=5
20727
- 48391=5
20728
20711
  48393=5
20729
20712
  48397=5
20730
20713
  48401=5
@@ -22838,8 +22821,6 @@
22838
22821
  53237=6
22839
22822
  53259=6
22840
22823
  53263=6
22841
- 53267=6
22842
- 53268=6
22843
22824
  53274=6
22844
22825
  53278=6
22845
22826
  53288=6
@@ -23010,7 +22991,6 @@
23010
22991
  53924=6
23011
22992
  53925=6
23012
22993
  53926=6
23013
- 53927=6
23014
22994
  53928=6
23015
22995
  53929=6
23016
22996
  53930=6
@@ -23747,7 +23727,6 @@
23747
23727
  55380=6
23748
23728
  55381=6
23749
23729
  55382=6
23750
- 55383=6
23751
23730
  55384=6
23752
23731
  55385=6
23753
23732
  55386=6
@@ -23831,11 +23810,9 @@
23831
23810
  55487=6
23832
23811
  55488=6
23833
23812
  55550=6
23834
- 55551=6
23835
23813
  55553=6
23836
23814
  55554=6
23837
23815
  55558=6
23838
- 55568=6
23839
23816
  55569=6
23840
23817
  55570=6
23841
23818
  55571=6
@@ -23847,7 +23824,6 @@
23847
23824
  55577=6
23848
23825
  55578=6
23849
23826
  55579=6
23850
- 55583=6
23851
23827
  55592=6
23852
23828
  55593=6
23853
23829
  55594=6
@@ -23905,7 +23881,6 @@
23905
23881
  55744=6
23906
23882
  55745=6
23907
23883
  55746=6
23908
- 55747=6
23909
23884
  55748=6
23910
23885
  55749=6
23911
23886
  55750=6
@@ -29307,7 +29282,6 @@
29307
29282
  68117=6
29308
29283
  68118=6
29309
29284
  68119=6
29310
- 68120=6
29311
29285
  68122=6
29312
29286
  68123=6
29313
29287
  68124=6
@@ -29329,7 +29303,6 @@
29329
29303
  68147=6
29330
29304
  68152=6
29331
29305
  68154=6
29332
- 68155=6
29333
29306
  68157=6
29334
29307
  68164=6
29335
29308
  68172=6
@@ -31433,7 +31406,6 @@
31433
31406
  73178=6
31434
31407
  73179=6
31435
31408
  73184=6
31436
- 73185=6
31437
31409
  73189=6
31438
31410
  73190=6
31439
31411
  73194=6
@@ -33635,7 +33607,6 @@
33635
33607
  78044=6
33636
33608
  78045=6
33637
33609
  78046=6
33638
- 78049=6
33639
33610
  78050=6
33640
33611
  78052=6
33641
33612
  78054=6
@@ -34555,7 +34526,6 @@
34555
34526
  79976=7
34556
34527
  79978=7
34557
34528
  79980=7
34558
- 79990=7
34559
34529
  79995=7
34560
34530
  79996=7
34561
34531
  79997=7
@@ -35570,7 +35540,6 @@
35570
35540
  83553=8
35571
35541
  83554=8
35572
35542
  83555=8
35573
- 83601=7
35574
35543
  83602=7
35575
35544
  83604=7
35576
35545
  83605=7
@@ -36143,7 +36112,6 @@
36143
36112
  85085=7
36144
36113
  85086=7
36145
36114
  85087=7
36146
- 85097=7
36147
36115
  85098=7
36148
36116
  85117=7
36149
36117
  85118=7
@@ -38222,7 +38190,6 @@
38222
38190
  92509=8
38223
38191
  92513=8
38224
38192
  92514=8
38225
- 92515=8
38226
38193
  92516=8
38227
38194
  92517=8
38228
38195
  92518=8
@@ -1,7 +1,7 @@
1
1
  require 'yaml'
2
2
 
3
3
  class Ziptz
4
- VERSION = '1.0.19'
4
+ VERSION = '1.0.20'
5
5
 
6
6
  TZ_INFO = {
7
7
  '0' => {name: 'APO/FPO (time zone unknown)', offset: 0},
@@ -38,6 +38,10 @@ class Ziptz
38
38
  tz_code && zips_by_code(tz_code)
39
39
  end
40
40
 
41
+ def inspect
42
+ "#<#{self.class}:#{object_id}>"
43
+ end
44
+
41
45
  protected
42
46
 
43
47
  def zips_by_code(tz_code)
@@ -1,6 +1,14 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Ziptz do
4
+ describe 'when inspected' do
5
+ let(:ziptz) { Ziptz.new }
6
+
7
+ it 'does not show internal instance variables' do
8
+ expect(ziptz.inspect).to match /#<Ziptz:\d+>/
9
+ end
10
+ end
11
+
4
12
  describe '#time_zone_name' do
5
13
  let(:ziptz) { Ziptz.new }
6
14
 
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: 1.0.19
4
+ version: 1.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keith Morrison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-02 00:00:00.000000000 Z
11
+ date: 2016-12-02 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