diff --git a/lib/tzip/base.rb b/lib/tzip/base.rb index 5f6cf9d..da19409 100644 --- a/lib/tzip/base.rb +++ b/lib/tzip/base.rb @@ -3,8 +3,8 @@ module ClassMethods def find_by_zipcode(zipcode) [5,4,3,2,1].each do |i| return MAPPING[zipcode.to_s[0,i]] if MAPPING.has_key?(zipcode.to_s[0,i]) - end + end return nil end end -end \ No newline at end of file +end diff --git a/lib/tzip/values/central.rb b/lib/tzip/values/central.rb index a32bda6..023bd63 100644 --- a/lib/tzip/values/central.rb +++ b/lib/tzip/values/central.rb @@ -1,6 +1,6 @@ module TZip ZONINGS[:central] = %w{35 36 370 3720 3723 381 383 39 } - ZONINGS[:central] += %w{4641} + ZONINGS[:central] += %w{4641 49801 49812 49815 49821 49831 49834 49847 49858 49873 49874 49881 49887 49892 49893 49896 49920 49935 49938 49947 49968 49969 } ZONINGS[:central] += %w{50 51 52 53 54 55 56 57 581 582 585 } ZONINGS[:central] += %w{60 61 62 63 64 65 660 661 6660 672 680 681 685} ZONINGS[:central] += %w{7} diff --git a/lib/tzip/values/eastern.rb b/lib/tzip/values/eastern.rb index 7888356..8b67aef 100644 --- a/lib/tzip/values/eastern.rb +++ b/lib/tzip/values/eastern.rb @@ -1,6 +1,6 @@ module TZip ZONINGS[:eastern] = %w{0 1 2} ZONINGS[:eastern] += %w{30 31 32 33 34 376 379 398 399} - ZONINGS[:eastern] += %w{402 405 410 43 44 45 460 462 462 480 481 482 483 485 488 489 490 495 496 } + ZONINGS[:eastern] += %w{402 405 410 43 44 45 460 462 462 480 481 482 483 484 485 488 489 490 495 496 499} ZONINGS[:eastern] += %w{569} end diff --git a/spec/tzip_spec.rb b/spec/tzip_spec.rb index 8756142..e2428bd 100644 --- a/spec/tzip_spec.rb +++ b/spec/tzip_spec.rb @@ -12,12 +12,12 @@ } # Central - %w(37013 38104 38138 38301 60629 66062 67214 58103 58201 58501 66606 68510).each{|zip| + %w(37013 38104 38138 38301 49801 49812 49815 49821 49831 49834 49847 49858 49873 49874 49881 49887 49892 49893 49896 49920 49935 49938 49968 49969 60629 66062 67214 58103 58201 58501 66606 68510).each{|zip| it { print zip; lookup_zip(zip).should == 'Central Time (US & Canada)' } } # Eastern - %w(00926 08701 11226 23464 28269 30043 30044 48201 48109 32308 37604 37917 32207 32216 41017 40502 46032 48124 48197 48307 48532 48912 49008 49546 49684 48503 ).each{|zip| + %w(00926 08701 11226 23464 28269 30043 30044 48201 48430 48109 32308 37604 37917 32207 32216 41017 40502 46032 48124 48197 48307 48532 48912 49008 49925 49546 49684 48503 ).each{|zip| it { print zip; lookup_zip(zip).should == 'Eastern Time (US & Canada)' } }