zip_to_tz 0.1.0
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 +7 -0
- data/.gitignore +12 -0
- data/AGENTS.md +63 -0
- data/CLAUDE.md +14 -0
- data/LICENSE.txt +21 -0
- data/README.md +97 -0
- data/Rakefile +8 -0
- data/lib/zip_to_tz/converter.rb +65 -0
- data/lib/zip_to_tz/data/timezones_to_zipcodes.yml +83049 -0
- data/lib/zip_to_tz/errors.rb +7 -0
- data/lib/zip_to_tz/version.rb +5 -0
- data/lib/zip_to_tz.rb +25 -0
- data/sig/zip_to_tz.rbs +4 -0
- metadata +55 -0
data/lib/zip_to_tz.rb
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "zip_to_tz/version"
|
|
4
|
+
require_relative "zip_to_tz/errors"
|
|
5
|
+
require_relative "zip_to_tz/converter"
|
|
6
|
+
|
|
7
|
+
module ZipToTz
|
|
8
|
+
class << self
|
|
9
|
+
# ZipToTz.short("33487") # => "EDT"
|
|
10
|
+
def short(zip)
|
|
11
|
+
default_converter.short(zip)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# ZipToTz.full("33487") # => "America/New_York"
|
|
15
|
+
def full(zip)
|
|
16
|
+
default_converter.full(zip)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
private
|
|
20
|
+
|
|
21
|
+
def default_converter
|
|
22
|
+
@default_converter ||= Converter.new
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
data/sig/zip_to_tz.rbs
ADDED
metadata
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: zip_to_tz
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Jeff Miller
|
|
8
|
+
bindir: exe
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies: []
|
|
12
|
+
description: A Ruby port of the zipToTz Node.js library. Looks up the IANA timezone
|
|
13
|
+
name or abbreviation for a US zip code.
|
|
14
|
+
email:
|
|
15
|
+
- jeff@salmahealth.com
|
|
16
|
+
executables: []
|
|
17
|
+
extensions: []
|
|
18
|
+
extra_rdoc_files: []
|
|
19
|
+
files:
|
|
20
|
+
- ".gitignore"
|
|
21
|
+
- AGENTS.md
|
|
22
|
+
- CLAUDE.md
|
|
23
|
+
- LICENSE.txt
|
|
24
|
+
- README.md
|
|
25
|
+
- Rakefile
|
|
26
|
+
- lib/zip_to_tz.rb
|
|
27
|
+
- lib/zip_to_tz/converter.rb
|
|
28
|
+
- lib/zip_to_tz/data/timezones_to_zipcodes.yml
|
|
29
|
+
- lib/zip_to_tz/errors.rb
|
|
30
|
+
- lib/zip_to_tz/version.rb
|
|
31
|
+
- sig/zip_to_tz.rbs
|
|
32
|
+
homepage: https://github.com/ibanez270dx/ziptotz
|
|
33
|
+
licenses:
|
|
34
|
+
- MIT
|
|
35
|
+
metadata:
|
|
36
|
+
homepage_uri: https://github.com/ibanez270dx/ziptotz
|
|
37
|
+
changelog_uri: https://github.com/ibanez270dx/ziptotz/commits/main
|
|
38
|
+
rdoc_options: []
|
|
39
|
+
require_paths:
|
|
40
|
+
- lib
|
|
41
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
42
|
+
requirements:
|
|
43
|
+
- - ">="
|
|
44
|
+
- !ruby/object:Gem::Version
|
|
45
|
+
version: 3.0.0
|
|
46
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
47
|
+
requirements:
|
|
48
|
+
- - ">="
|
|
49
|
+
- !ruby/object:Gem::Version
|
|
50
|
+
version: '0'
|
|
51
|
+
requirements: []
|
|
52
|
+
rubygems_version: 3.6.9
|
|
53
|
+
specification_version: 4
|
|
54
|
+
summary: Convert US zip codes into timezones.
|
|
55
|
+
test_files: []
|