validates_zipcode 0.5.1 → 0.5.2

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: df2a33cb45dafbda679e54e3030fc68c6ed9bd333f1b6333c62fd7f55d19e34a
4
- data.tar.gz: 650da19b279aa781e6cfeb3452b9cef2f534bf8eb07a24b9d3335e803ed0c4e0
3
+ metadata.gz: b9c878568a2af03e823438d845d8a0d628ed03985bb0f418b54a7348c3acc616
4
+ data.tar.gz: 309f3aa2cd404dad08dae5c80a49b55fef322f195283417adefdf9dd5f269c9b
5
5
  SHA512:
6
- metadata.gz: 96c289be91ec67e3bc2ae13627088b35720f61257449fd372b4dbf96decf90a95a5d24b0dff58d599632aee4f2af803f470a9352b94b2c0a0a815daec6b1197c
7
- data.tar.gz: 4ec5b753940e0f7593249ad0090836ee778b170c5da70632069d1eceb14ec523236ced64ec221b13aaad0350e0537a82aa0c602436e9cf4706019b582670e050
6
+ metadata.gz: 5ca4df588c1ad58357a6c55a1cafb213f1cb927381cbfb8689c9039949c4c0f93aace2094a0eb262fa5d5b1cba28cb90920b4730cb1102ef54907b9d97c35016
7
+ data.tar.gz: b32c12a15baf303f80c111f8018b2edfbe230f6c6fd62224bce776e6d305ab75038fc7e7bf0f926354e3ebe271407961c3e5ba6055580cbc2e4f6abfb9794d66
data/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## Unreleased
6
+
7
+ ## 0.5.2
8
+
9
+ - Added support for Puerto Rico, thanks to ~ @tahanson
10
+ - Added support for newer Honduras codes with backwards compatibility ~ @tahanson
11
+
5
12
  ## 0.5.1
6
13
 
7
14
  - Fixes Mongolia postal codes, thanks to ~ @lucasfcunha
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- validates_zipcode (0.5.1)
4
+ validates_zipcode (0.5.2)
5
5
  activemodel (>= 4.2.0)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- validates_zipcode (0.5.1)
4
+ validates_zipcode (0.5.2)
5
5
  activemodel (>= 4.2.0)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- validates_zipcode (0.5.1)
4
+ validates_zipcode (0.5.2)
5
5
  activemodel (>= 4.2.0)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- validates_zipcode (0.5.1)
4
+ validates_zipcode (0.5.2)
5
5
  activemodel (>= 4.2.0)
6
6
 
7
7
  GEM
@@ -14,7 +14,7 @@ GIT
14
14
  PATH
15
15
  remote: ..
16
16
  specs:
17
- validates_zipcode (0.5.1)
17
+ validates_zipcode (0.5.2)
18
18
  activemodel (>= 4.2.0)
19
19
 
20
20
  GEM
@@ -185,7 +185,7 @@ module ValidatesZipcode
185
185
  GI: /\A(GX11[ ]?1AA)\z/i,
186
186
  GR: /\A\d{3}[ ]?\d{2}\z/,
187
187
  GY: /\A([A-Z\d\s]){3,}\z/i,
188
- HN: /\A(([A-Z]){2}|\d{2})\d{4}\z/i,
188
+ HN: /\A([A-Z]{2}|\d{1})\d{4}\z/i,
189
189
  IO: /\A\d{5}\z/,
190
190
  IR: /\A\d{5}\z/,
191
191
  JP: /\A\d{3}\-?\d{4}\z/,
@@ -30,7 +30,8 @@ module ValidatesZipcode
30
30
  digits = z.scan(/\d/)
31
31
  digits.insert(5, '-') if digits.count > 5
32
32
  digits.join
33
- }
33
+ },
34
+ PR: :US
34
35
  }.freeze
35
36
 
36
37
  def initialize(args = {})
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ValidatesZipcode
3
- VERSION = '0.5.1'
3
+ VERSION = '0.5.2'
4
4
  end
data/spec/spec_helper.rb CHANGED
@@ -2628,6 +2628,7 @@ TEST_DATA = {
2628
2628
  valid: %w[
2629
2629
  BV2722
2630
2630
  XY1234
2631
+ 12345
2631
2632
  ],
2632
2633
  invalid: [
2633
2634
  nil,
@@ -2635,7 +2636,8 @@ TEST_DATA = {
2635
2636
  'invalid_zip',
2636
2637
  'B2722',
2637
2638
  'XY12345',
2638
- 'XY123'
2639
+ 'XY123',
2640
+ '123456'
2639
2641
  ]
2640
2642
  },
2641
2643
  IO: {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: validates_zipcode
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Gil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-13 00:00:00.000000000 Z
11
+ date: 2023-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -170,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
170
170
  - !ruby/object:Gem::Version
171
171
  version: '0'
172
172
  requirements: []
173
- rubygems_version: 3.2.22
173
+ rubygems_version: 3.3.7
174
174
  signing_key:
175
175
  specification_version: 4
176
176
  summary: Localizable zipcode validation for Rails.