tzip 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  require 'rubygems'
2
2
  require 'active_support'
3
- require 'active_support/time'
3
+ require 'active_support/time_with_zone'
4
4
 
5
5
  require 'tzip/base'
6
6
  require 'tzip/values/zone_names'
@@ -15,4 +15,4 @@ require 'tzip/values/hawaii'
15
15
  require 'tzip/values/unused'
16
16
  require 'tzip/mapping'
17
17
 
18
- ActiveSupport::TimeZone.send(:extend, TZip::ClassMethods) if Object.const_defined?("ActiveSupport")
18
+ ActiveSupport::TimeZone.send(:extend, TZip::ClassMethods) if Object.const_defined?("ActiveSupport")
@@ -1,3 +1,3 @@
1
1
  module TZip
2
- ZONINGS[:alaska] = %w{995 996 996 998 999}
3
- end
2
+ ZONINGS[:alaska] = %w{995 996 997 998 999}
3
+ end
@@ -1,3 +1,3 @@
1
1
  module TZip
2
- ZONINGS[:arizona] = %w{0 1 2}
3
- end
2
+ ZONINGS[:arizona] = %w{85 86}
3
+ end
@@ -1,6 +1,7 @@
1
1
  module TZip
2
- ZONINGS[:central] = %w{35 36 39}
3
- ZONINGS[:central] += %w{50 51 52 53 54 55 56}
4
- ZONINGS[:central] += %w{60 61 62 63 64 65}
2
+ ZONINGS[:central] = %w{35 36 370 3720 3723 381 383 39 }
3
+ ZONINGS[:central] += %w{4641}
4
+ ZONINGS[:central] += %w{50 51 52 53 54 55 56 57 581 582 585 }
5
+ ZONINGS[:central] += %w{60 61 62 63 64 65 660 661 6660 672 680 681 685}
5
6
  ZONINGS[:central] += %w{7}
6
- end
7
+ end
@@ -1,6 +1,6 @@
1
1
  module TZip
2
2
  ZONINGS[:eastern] = %w{0 1 2}
3
- ZONINGS[:eastern] += %w{30 31 33 34 398 399}
4
- ZONINGS[:eastern] += %w{43 44 45}
3
+ ZONINGS[:eastern] += %w{30 31 32 33 34 376 379 398 399}
4
+ ZONINGS[:eastern] += %w{402 405 410 43 44 45 460 462 462 480 481 482 483 485 488 489 490 495 496 }
5
5
  ZONINGS[:eastern] += %w{569}
6
- end
6
+ end
@@ -1,3 +1,3 @@
1
1
  module TZip
2
2
  ZONINGS[:hawaii] = %w{967 968}
3
- end
3
+ end
@@ -1,5 +1,7 @@
1
1
  module TZip
2
- ZONINGS[:mountain] = %w{59}
2
+ ZONINGS[:mountain] = %w{577}
3
+ ZONINGS[:mountain] += %w{59}
3
4
  ZONINGS[:mountain] += %w{798 799}
4
- ZONINGS[:mountain] += %w{80 81 82 83 831 84 87 88}
5
- end
5
+ ZONINGS[:mountain] += %w{80 81 82 83 831 84 8501 87 88}
6
+ ZONINGS[:mountain] += %w{979}
7
+ end
@@ -1,4 +1,4 @@
1
1
  module TZip
2
2
  ZONINGS[:pacific] = %w{835 838 889 89}
3
- ZONINGS[:pacific] += %w{90 91 92 93 94 95 960 961 98 990 991 992 993 994}
4
- end
3
+ ZONINGS[:pacific] += %w{90 91 92 93 94 95 960 961 962 963 964 965 969 972 973 975 977 98 990 991 992 993 994}
4
+ end
@@ -1,3 +1,3 @@
1
1
  module TZip
2
- VERSION = "0.0.1" unless defined?(::TZip::VERSION)
2
+ VERSION = "0.0.3" unless defined?(::TZip::VERSION)
3
3
  end
@@ -2,6 +2,15 @@
2
2
 
3
3
  TZip makes it a little bit easier to set TimeZones in a rails app, since it can figure out the appropriate identifier from a ZIP code.
4
4
 
5
+ ## Install & Implement ##
6
+
7
+ $ gem install tzip
8
+
9
+ # Gemfile
10
+ gem 'tzip'
11
+
5
12
  ## Usage ##
6
13
 
14
+ # Set the default time zone for a Rails app
15
+ # Rails configuration file (config/application.rb or config/environments/development.rb, etc)
7
16
  config.time_zone = ActiveSupport::TimeZone.find_by_zipcode('90210')
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tzip
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
5
- prerelease:
4
+ prerelease: false
6
5
  segments:
7
6
  - 0
8
7
  - 0
9
- - 1
10
- version: 0.0.1
8
+ - 3
9
+ version: 0.0.3
11
10
  platform: ruby
12
11
  authors:
13
12
  - Chris Kalafarski
@@ -15,23 +14,20 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2011-02-27 00:00:00 -05:00
17
+ date: 2012-09-29 00:00:00 -04:00
19
18
  default_executable:
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: activesupport
23
22
  prerelease: false
24
23
  requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
24
  requirements:
27
25
  - - ">="
28
26
  - !ruby/object:Gem::Version
29
- hash: 7
30
27
  segments:
28
+ - 2
31
29
  - 3
32
- - 0
33
- - 0
34
- version: 3.0.0
30
+ version: "2.3"
35
31
  type: :runtime
36
32
  version_requirements: *id001
37
33
  description: TZip can resolve United States ZIP codes into the appropriate Rails time zone identifier. This makes it easier to setup your rails app, or change time zones based on user input.
@@ -58,7 +54,7 @@ files:
58
54
  - lib/tzip/values/zonings.rb
59
55
  - lib/tzip/version.rb
60
56
  - lib/tzip.rb
61
- - README.md
57
+ - readme.md
62
58
  has_rdoc: true
63
59
  homepage: http://github.com/farski/tzip
64
60
  licenses: []
@@ -69,20 +65,16 @@ rdoc_options: []
69
65
  require_paths:
70
66
  - lib
71
67
  required_ruby_version: !ruby/object:Gem::Requirement
72
- none: false
73
68
  requirements:
74
69
  - - ">="
75
70
  - !ruby/object:Gem::Version
76
- hash: 3
77
71
  segments:
78
72
  - 0
79
73
  version: "0"
80
74
  required_rubygems_version: !ruby/object:Gem::Requirement
81
- none: false
82
75
  requirements:
83
76
  - - ">="
84
77
  - !ruby/object:Gem::Version
85
- hash: 23
86
78
  segments:
87
79
  - 1
88
80
  - 3
@@ -91,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
83
  requirements: []
92
84
 
93
85
  rubyforge_project:
94
- rubygems_version: 1.5.2
86
+ rubygems_version: 1.3.6
95
87
  signing_key:
96
88
  specification_version: 3
97
89
  summary: Simplifies defining time zones in Rails apps with ZIP codes.