ziptz 3.0.8 → 3.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92720a4ea0de8294dcfad4884bfda607f30b76082435280697dfbb0fd6820861
4
- data.tar.gz: 5986ea0a6d40de34f1bdd6fa454818461ef372dd1e4ddf9c135a8c03446f0724
3
+ metadata.gz: 03f21c239ba0b7ff5c47bf3c3fbba03b461469a095b879222f9da67975c4edd2
4
+ data.tar.gz: d74daa8e6e563b172a82b95a8dd7232e2f9eb9ee16baac77974230b5f5eda354
5
5
  SHA512:
6
- metadata.gz: e1a01405d65388da0cf12badb02e63f9643c043012b823d36cc2211701ce43c2f3b78c5e2d10e4a8e28a7b59e8f4c1ecf0bcb4d81db938b15d7b1688c622af34
7
- data.tar.gz: bdfc7f672bc0120ec3c66d10ff126bc23798b76cd7e28b68a12e6d00d347319d44d855cd9c21b397e7d6874123b0b358cd943cf00050dda92f9cdc1303d9c838
6
+ metadata.gz: bc34dc32323c84710cfe16a5d4a379558f8e747bc5101eedd286005563396415ef93e98d359836cbd4109335da943bb867d2a9eb93cc992dc2a8ba9734fdb63a
7
+ data.tar.gz: 066662c36bb2c2d0508e9da0e81317f40e50dc6fdaad03bacabafb13a4986670c2c7b6aa67e2db5e5db9ba741ac719f8c9d8097148073d0e333c1f9c477e419e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ziptz (3.0.8)
4
+ ziptz (3.0.11)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -111,7 +111,9 @@ GEM
111
111
  zeitwerk (2.4.2)
112
112
 
113
113
  PLATFORMS
114
+ arm64-darwin-21
114
115
  x86_64-darwin-19
116
+ x86_64-darwin-21
115
117
 
116
118
  DEPENDENCIES
117
119
  activerecord
@@ -130,4 +132,4 @@ DEPENDENCIES
130
132
  ziptz!
131
133
 
132
134
  BUNDLED WITH
133
- 2.2.16
135
+ 2.3.19
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2015-2021 Keith Morrison <keithm@infused.org>
1
+ Copyright (c) 2015-2022 Keith Morrison <keithm@infused.org>
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,18 +1,18 @@
1
1
  # Ziptz
2
2
  [![Version](http://img.shields.io/gem/v/ziptz.svg?style=flat)](https://rubygems.org/gems/ziptz)
3
- [![Build Status](http://img.shields.io/travis/infused/ziptz/master.svg?style=flat)](http://travis-ci.com/infused/ziptz)
3
+ [![Build Status](https://github.com/infused/ziptz/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/infused/ziptz/actions/workflows/build.yml)
4
4
  [![Total Downloads](https://img.shields.io/gem/dt/ziptz.svg)](https://rubygems.org/gems/ziptz/)
5
5
  [![License](https://img.shields.io/github/license/infused/ziptz.svg)](https://github.com/infused/ziptz)
6
6
 
7
7
  Get time zone, daylight saving time, and base offset for any US ZIP code.
8
8
 
9
- <i>ZIP codes are up to date as of <b>Novermber 2021</b>.</i>
9
+ <i>ZIP codes are up to date as of <b>August 2022</b>.</i>
10
10
 
11
11
  ## Compatibility
12
12
 
13
13
  Ziptz is tested to work with the following versions of Ruby:
14
14
 
15
- * Ruby 2.3.x, 2.4.x, 2.5.x, 2.6.x, 2.7.x, 3.0.x, and TruffleRuby
15
+ * Ruby 2.3.x, 2.4.x, 2.5.x, 2.6.x, 2.7.x, 3.x
16
16
 
17
17
  ## Installation
18
18
 
@@ -160,7 +160,7 @@ Time zone names now reflect standard tz-database names.
160
160
 
161
161
  ## License
162
162
 
163
- Copyright (c) 2015-2021 Keith Morrison <<keithm@infused.org>>
163
+ Copyright (c) 2015-2022 Keith Morrison <<keithm@infused.org>>
164
164
 
165
165
  Permission is hereby granted, free of charge, to any person
166
166
  obtaining a copy of this software and associated documentation
data/data/tz.data CHANGED
Binary file
data/lib/ziptz.rb CHANGED
@@ -2,7 +2,11 @@ require 'yaml'
2
2
  require 'zlib'
3
3
 
4
4
  class Ziptz
5
- VERSION = '3.0.8'.freeze
5
+ VERSION = '3.0.11'.freeze
6
+
7
+ def self.instance
8
+ @instance ||= new
9
+ end
6
10
 
7
11
  def time_zone_name(zip)
8
12
  tz_info = time_zone_info(zip)
data/spec/ziptz_spec.rb CHANGED
@@ -106,4 +106,18 @@ RSpec.describe Ziptz do
106
106
  end
107
107
  end
108
108
  end
109
+
110
+ describe '#instance' do
111
+ context 'when given a 5 digit zip code' do
112
+ it 'matches the behavior of Ziptz.new' do
113
+ expect(Ziptz.instance.time_zone_name('97034')).to eq ziptz.time_zone_name('97034')
114
+ end
115
+ end
116
+
117
+ context 'when called twice' do
118
+ it 'returns identical instances' do
119
+ expect(Ziptz.instance.object_id).to eq Ziptz.instance.object_id
120
+ end
121
+ end
122
+ end
109
123
  end
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: 3.0.8
4
+ version: 3.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keith Morrison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-02 00:00:00.000000000 Z
11
+ date: 2022-08-04 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
@@ -20,7 +20,6 @@ extra_rdoc_files:
20
20
  files:
21
21
  - Gemfile
22
22
  - Gemfile.lock
23
- - Gemfile.travis
24
23
  - Guardfile
25
24
  - LICENSE
26
25
  - README.md
@@ -52,7 +51,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
52
51
  - !ruby/object:Gem::Version
53
52
  version: '0'
54
53
  requirements: []
55
- rubygems_version: 3.2.15
54
+ rubygems_version: 3.3.7
56
55
  signing_key:
57
56
  specification_version: 4
58
57
  summary: TimeZone info for any 5-digit US zip code
data/Gemfile.travis DELETED
@@ -1,7 +0,0 @@
1
- gemspec
2
- source 'https://rubygems.org'
3
-
4
- group :test do
5
- gem 'bundler'
6
- gem 'rspec'
7
- end