ziptz 3.0.9 → 3.0.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8e8e6cc5b647c8f6f556d5e838de048a13b6425e880d0724fc8775d551c22a2c
4
- data.tar.gz: 908eb605ab26d15d253a00eb400981cdbc106ba3f654337a141ee8d44e4ccece
3
+ metadata.gz: 4d22da9d5540716231ddc2f4ebefa1aa5ad1d72afcc389fdbf20958c424fec44
4
+ data.tar.gz: f1be4a8a2c1013726ab2fddd262063f6b9278c7bf7205b63028649f831d2797d
5
5
  SHA512:
6
- metadata.gz: f92dd5f3ff91b23c04f133ef1d2535a90e37b952e9a2c2aeba132e4c3af5b6d9cf26e9e2e3708c58c3cb17e7951b589a8abd9046cdf4dc1209e7e2cb8e37191c
7
- data.tar.gz: 78d00714ac67d62c5b398fe9f207632877a1acdf32d4086e57b4a62f977d4de7b8bb4e8cec181ec570e468b3685931c9dd7ce12353513af8648ba61373b69687
6
+ metadata.gz: 2a7af6d0000e89de00ef1235f36ad0667c275d34ef267161cd9674be45b1311a1c3855f5f08a10aa95b65801bd266aa238e8899e5f4966a7ae7fe885876ee7f5
7
+ data.tar.gz: 8939eb2760a0f90a0930426b01c52742ce2e18abfda23c8f9d25898f15149b5faffa1c839e4fce57da5fd629e3e7387fc2c09b16da0483f8a1d89f142df74e81
data/Gemfile.lock CHANGED
@@ -111,6 +111,7 @@ GEM
111
111
  zeitwerk (2.4.2)
112
112
 
113
113
  PLATFORMS
114
+ arm64-darwin-21
114
115
  x86_64-darwin-19
115
116
  x86_64-darwin-21
116
117
 
@@ -131,4 +132,4 @@ DEPENDENCIES
131
132
  ziptz!
132
133
 
133
134
  BUNDLED WITH
134
- 2.3.8
135
+ 2.3.15
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,6 +1,6 @@
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
 
@@ -12,7 +12,7 @@ Get time zone, daylight saving time, and base offset for any US ZIP code.
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.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/lib/ziptz.rb CHANGED
@@ -2,7 +2,11 @@ require 'yaml'
2
2
  require 'zlib'
3
3
 
4
4
  class Ziptz
5
- VERSION = '3.0.9'.freeze
5
+ VERSION = '3.0.10'.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.9
4
+ version: 3.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keith Morrison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-06 00:00:00.000000000 Z
11
+ date: 2022-06-15 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
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