validates_zipcode 0.5.0 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +7 -3
- data/Appraisals +4 -0
- data/CHANGELOG.md +11 -0
- data/gemfiles/rails_4.2.gemfile +3 -4
- data/gemfiles/rails_4.2.gemfile.lock +2 -2
- data/gemfiles/rails_5.2.gemfile +3 -4
- data/gemfiles/rails_5.2.gemfile.lock +2 -2
- data/gemfiles/rails_6.1.gemfile +3 -4
- data/gemfiles/rails_6.1.gemfile.lock +2 -2
- data/gemfiles/rails_7.0.gemfile +7 -0
- data/gemfiles/rails_7.0.gemfile.lock +85 -0
- data/gemfiles/rails_edge.gemfile +3 -4
- data/gemfiles/rails_edge.gemfile.lock +2 -2
- data/lib/validates_zipcode/cldr_regex_collection.rb +2 -2
- data/lib/validates_zipcode/formatter.rb +2 -1
- data/lib/validates_zipcode/version.rb +1 -1
- data/spec/spec_helper.rb +10 -6
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9c878568a2af03e823438d845d8a0d628ed03985bb0f418b54a7348c3acc616
|
4
|
+
data.tar.gz: 309f3aa2cd404dad08dae5c80a49b55fef322f195283417adefdf9dd5f269c9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ca4df588c1ad58357a6c55a1cafb213f1cb927381cbfb8689c9039949c4c0f93aace2094a0eb262fa5d5b1cba28cb90920b4730cb1102ef54907b9d97c35016
|
7
|
+
data.tar.gz: b32c12a15baf303f80c111f8018b2edfbe230f6c6fd62224bce776e6d305ab75038fc7e7bf0f926354e3ebe271407961c3e5ba6055580cbc2e4f6abfb9794d66
|
data/.travis.yml
CHANGED
@@ -7,10 +7,10 @@ cache: bundler
|
|
7
7
|
bundler_args: --jobs 3 --retry 3
|
8
8
|
|
9
9
|
before_install:
|
10
|
-
-
|
11
|
-
-
|
10
|
+
- "travis_retry gem update --system"
|
11
|
+
- "travis_retry gem install bundler"
|
12
12
|
|
13
|
-
script:
|
13
|
+
script: "bundle exec rake"
|
14
14
|
|
15
15
|
rvm:
|
16
16
|
- 2.4.9
|
@@ -18,6 +18,7 @@ rvm:
|
|
18
18
|
- 2.6.5
|
19
19
|
- 2.7.2
|
20
20
|
- 3.0.0
|
21
|
+
- 3.1.2
|
21
22
|
- ruby-head
|
22
23
|
- truffleruby
|
23
24
|
|
@@ -25,6 +26,7 @@ gemfile:
|
|
25
26
|
- gemfiles/rails_4.2.gemfile
|
26
27
|
- gemfiles/rails_5.2.gemfile
|
27
28
|
- gemfiles/rails_6.1.gemfile
|
29
|
+
- gemfiles/rails_7.0.gemfile
|
28
30
|
- gemfiles/rails_edge.gemfile
|
29
31
|
|
30
32
|
matrix:
|
@@ -34,6 +36,8 @@ matrix:
|
|
34
36
|
exclude:
|
35
37
|
- rvm: 2.4.9
|
36
38
|
gemfile: gemfiles/rails_6.1.gemfile
|
39
|
+
- rvm: 2.4.9
|
40
|
+
gemfile: gemfiles/rails_7.0.gemfile
|
37
41
|
- rvm: 2.4.9
|
38
42
|
gemfile: gemfiles/rails_edge.gemfile
|
39
43
|
- rvm: 3.0.0
|
data/Appraisals
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,17 @@
|
|
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
|
+
|
12
|
+
## 0.5.1
|
13
|
+
|
14
|
+
- Fixes Mongolia postal codes, thanks to ~ @lucasfcunha
|
15
|
+
|
5
16
|
## 0.5.0
|
6
17
|
|
7
18
|
- Pass `format: true` option to the `validates_zipcode` or the constructor to attempt for format a given code using the (uncomplete) list of formatters by country. This process will happen before the validation takes place, dealing with case sensitive formats and whitespace, amongst others. This option is false by default for backwards compatibility. ~ @chloe-meister
|
data/gemfiles/rails_4.2.gemfile
CHANGED
data/gemfiles/rails_5.2.gemfile
CHANGED
data/gemfiles/rails_6.1.gemfile
CHANGED
@@ -0,0 +1,85 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
validates_zipcode (0.5.2)
|
5
|
+
activemodel (>= 4.2.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
activemodel (7.0.3.1)
|
11
|
+
activesupport (= 7.0.3.1)
|
12
|
+
activesupport (7.0.3.1)
|
13
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
|
+
i18n (>= 1.6, < 2)
|
15
|
+
minitest (>= 5.1)
|
16
|
+
tzinfo (~> 2.0)
|
17
|
+
appraisal (2.4.1)
|
18
|
+
bundler
|
19
|
+
rake
|
20
|
+
thor (>= 0.14.0)
|
21
|
+
ast (2.4.2)
|
22
|
+
concurrent-ruby (1.1.10)
|
23
|
+
diff-lcs (1.5.0)
|
24
|
+
i18n (1.11.0)
|
25
|
+
concurrent-ruby (~> 1.0)
|
26
|
+
json (2.6.2)
|
27
|
+
minitest (5.16.2)
|
28
|
+
parallel (1.22.1)
|
29
|
+
parser (3.1.2.0)
|
30
|
+
ast (~> 2.4.1)
|
31
|
+
rack (2.2.4)
|
32
|
+
rainbow (3.1.1)
|
33
|
+
rake (13.0.6)
|
34
|
+
regexp_parser (2.5.0)
|
35
|
+
rexml (3.2.5)
|
36
|
+
rspec (3.11.0)
|
37
|
+
rspec-core (~> 3.11.0)
|
38
|
+
rspec-expectations (~> 3.11.0)
|
39
|
+
rspec-mocks (~> 3.11.0)
|
40
|
+
rspec-core (3.11.0)
|
41
|
+
rspec-support (~> 3.11.0)
|
42
|
+
rspec-expectations (3.11.0)
|
43
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
44
|
+
rspec-support (~> 3.11.0)
|
45
|
+
rspec-mocks (3.11.1)
|
46
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
47
|
+
rspec-support (~> 3.11.0)
|
48
|
+
rspec-support (3.11.0)
|
49
|
+
rubocop (1.31.2)
|
50
|
+
json (~> 2.3)
|
51
|
+
parallel (~> 1.10)
|
52
|
+
parser (>= 3.1.0.0)
|
53
|
+
rainbow (>= 2.2.2, < 4.0)
|
54
|
+
regexp_parser (>= 1.8, < 3.0)
|
55
|
+
rexml (>= 3.2.5, < 4.0)
|
56
|
+
rubocop-ast (>= 1.18.0, < 2.0)
|
57
|
+
ruby-progressbar (~> 1.7)
|
58
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
59
|
+
rubocop-ast (1.19.1)
|
60
|
+
parser (>= 3.1.1.0)
|
61
|
+
rubocop-rails (2.15.2)
|
62
|
+
activesupport (>= 4.2.0)
|
63
|
+
rack (>= 1.1)
|
64
|
+
rubocop (>= 1.7.0, < 2.0)
|
65
|
+
ruby-progressbar (1.11.0)
|
66
|
+
thor (1.2.1)
|
67
|
+
tzinfo (2.0.4)
|
68
|
+
concurrent-ruby (~> 1.0)
|
69
|
+
unicode-display_width (2.2.0)
|
70
|
+
|
71
|
+
PLATFORMS
|
72
|
+
x86_64-darwin-20
|
73
|
+
|
74
|
+
DEPENDENCIES
|
75
|
+
activemodel (~> 7.0.0)
|
76
|
+
appraisal
|
77
|
+
bundler
|
78
|
+
rake (>= 12.3.3)
|
79
|
+
rspec
|
80
|
+
rubocop
|
81
|
+
rubocop-rails
|
82
|
+
validates_zipcode!
|
83
|
+
|
84
|
+
BUNDLED WITH
|
85
|
+
2.2.22
|
data/gemfiles/rails_edge.gemfile
CHANGED
@@ -1,8 +1,7 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
1
|
# This file was generated by Appraisal
|
3
2
|
|
4
|
-
source
|
3
|
+
source "https://rubygems.org"
|
5
4
|
|
6
|
-
gem
|
5
|
+
gem "activemodel", github: "rails/rails"
|
7
6
|
|
8
|
-
gemspec path:
|
7
|
+
gemspec path: "../"
|
@@ -124,7 +124,7 @@ module ValidatesZipcode
|
|
124
124
|
LR: /\A\d{4}\z/,
|
125
125
|
LS: /\A\d{3}\z/,
|
126
126
|
MG: /\A\d{3}\z/,
|
127
|
-
MN: /\A\d{
|
127
|
+
MN: /\A\d{5}(-?\d{4})?\z/,
|
128
128
|
MP: /\A9695[012]([ \-]\d{4})?\z/,
|
129
129
|
MQ: /\A9[78]2\d{2}\z/,
|
130
130
|
NC: /\A988\d{2}\z/,
|
@@ -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(
|
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/,
|
data/spec/spec_helper.rb
CHANGED
@@ -1763,16 +1763,18 @@ TEST_DATA = {
|
|
1763
1763
|
},
|
1764
1764
|
MN: {
|
1765
1765
|
valid: %w[
|
1766
|
-
|
1767
|
-
|
1768
|
-
|
1769
|
-
|
1766
|
+
12345
|
1767
|
+
41183
|
1768
|
+
64091
|
1769
|
+
83033
|
1770
|
+
12345-6789
|
1771
|
+
41183-2395
|
1770
1772
|
],
|
1771
1773
|
invalid: [
|
1772
1774
|
nil,
|
1773
1775
|
'',
|
1774
1776
|
'invalid_zip',
|
1775
|
-
'
|
1777
|
+
'123456',
|
1776
1778
|
'123456-123456',
|
1777
1779
|
'D0D0D0'
|
1778
1780
|
]
|
@@ -2626,6 +2628,7 @@ TEST_DATA = {
|
|
2626
2628
|
valid: %w[
|
2627
2629
|
BV2722
|
2628
2630
|
XY1234
|
2631
|
+
12345
|
2629
2632
|
],
|
2630
2633
|
invalid: [
|
2631
2634
|
nil,
|
@@ -2633,7 +2636,8 @@ TEST_DATA = {
|
|
2633
2636
|
'invalid_zip',
|
2634
2637
|
'B2722',
|
2635
2638
|
'XY12345',
|
2636
|
-
'XY123'
|
2639
|
+
'XY123',
|
2640
|
+
'123456'
|
2637
2641
|
]
|
2638
2642
|
},
|
2639
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.
|
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:
|
11
|
+
date: 2023-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -134,6 +134,8 @@ files:
|
|
134
134
|
- gemfiles/rails_5.2.gemfile.lock
|
135
135
|
- gemfiles/rails_6.1.gemfile
|
136
136
|
- gemfiles/rails_6.1.gemfile.lock
|
137
|
+
- gemfiles/rails_7.0.gemfile
|
138
|
+
- gemfiles/rails_7.0.gemfile.lock
|
137
139
|
- gemfiles/rails_edge.gemfile
|
138
140
|
- gemfiles/rails_edge.gemfile.lock
|
139
141
|
- lib/validates_zipcode.rb
|
@@ -168,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
170
|
- !ruby/object:Gem::Version
|
169
171
|
version: '0'
|
170
172
|
requirements: []
|
171
|
-
rubygems_version: 3.
|
173
|
+
rubygems_version: 3.3.7
|
172
174
|
signing_key:
|
173
175
|
specification_version: 4
|
174
176
|
summary: Localizable zipcode validation for Rails.
|