Skip to content
Browse files

more mappings

  • Loading branch information...
1 parent 578ae78 commit 4c6e7b78be39df2682f010685d77aa8feee52383 @smcpherson smcpherson committed
Showing with 16 additions and 8 deletions.
  1. +4 −3 lib/tzip/values/central.rb
  2. +2 −2 lib/tzip/values/eastern.rb
  3. +1 −1 lib/tzip/version.rb
  4. +9 −2 spec/tzip_spec.rb
View
7 lib/tzip/values/central.rb
@@ -1,6 +1,7 @@
module TZip
- ZONINGS[:central] = %w{35 36 3701 3720 3723 3816 39 }
- ZONINGS[:central] += %w{50 51 52 53 54 55 56 57 581}
- ZONINGS[:central] += %w{60 61 62 63 64 65 660 661 672 680 681 }
+ ZONINGS[:central] = %w{35 36 370 3720 3723 381 383 39 }
+ ZONINGS[:central] += %w{4641}
+ 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}
end
View
4 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 37 398 399}
- ZONINGS[:eastern] += %w{4020 4053 43 44 45 4620 4626 4807 4810 4820 4882 4950}
+ 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{569}
end
View
2 lib/tzip/version.rb
@@ -1,3 +1,3 @@
module TZip
- VERSION = "0.0.2.1" unless defined?(::TZip::VERSION)
+ VERSION = "0.0.2.3" unless defined?(::TZip::VERSION)
end
View
11 spec/tzip_spec.rb
@@ -1,30 +1,37 @@
require "spec_helper"
describe TZip do
+ # Alaska
%w(99615 99615 99927).each{|zip|
it { print zip; lookup_zip(zip).should == 'Alaska' }
}
+ # Arizona
%w(85364 85756).each{|zip|
it { print zip; lookup_zip(zip).should == 'Arizona' }
}
- %w(37013 60629 66062 67214 58103).each{|zip|
+ # Central
+ %w(37013 38104 38138 38301 60629 66062 67214 58103 58201 58501 66606 68510).each{|zip|
it { print zip; lookup_zip(zip).should == 'Central Time (US & Canada)' }
}
- %w(00926 08701 11226 23464 28269 30043 30044 48201 48109 32308 37604 37917 32207 32216).each{|zip|
+ # 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|
it { print zip; lookup_zip(zip).should == 'Eastern Time (US & Canada)' }
}
+ # Hawaii
%w(96716 96839).each{|zip|
it { print zip; lookup_zip(zip).should == 'Hawaii' }
}
+ # Mountain
%w(59430 79936 84101 87121 97903).each{|zip|
it { print zip; lookup_zip(zip).should == 'Mountain Time (US & Canada)' }
}
+ # Pacific
%w(89110 90011 90650 97701 97301 97330 97225 97504).each{|zip|
it { print zip; lookup_zip(zip).should == 'Pacific Time (US & Canada)' }
}

0 comments on commit 4c6e7b7

Please sign in to comment.
Something went wrong with that request. Please try again.