validates_zipcode 0.5.0 → 0.5.1

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: 214ffb965fb27983b44b38dbac18b42041d665e313862b10e809bf3f598c7698
4
- data.tar.gz: bf2137923c16d09823dfb1fac10c372c2cb0f6f0fbb4c9053b7be5ee38098a2e
3
+ metadata.gz: df2a33cb45dafbda679e54e3030fc68c6ed9bd333f1b6333c62fd7f55d19e34a
4
+ data.tar.gz: 650da19b279aa781e6cfeb3452b9cef2f534bf8eb07a24b9d3335e803ed0c4e0
5
5
  SHA512:
6
- metadata.gz: 40bdbcb70fc0284c0b3f4d1ab3ad626a5f8fe37cd7ef893d5d38ff80961c30bd8736df59752cb4de8367768fa9a57b872a91af09e1376386af33c652b7629cf0
7
- data.tar.gz: b359270f28b23d87c69f8af0646b7ad0e59140e09bd85b4fadb994b8fce94252c40a32b461f46c3d5fa6b16c806a7fd09c040ab37bbc7491b90b055ccf306edf
6
+ metadata.gz: 96c289be91ec67e3bc2ae13627088b35720f61257449fd372b4dbf96decf90a95a5d24b0dff58d599632aee4f2af803f470a9352b94b2c0a0a815daec6b1197c
7
+ data.tar.gz: 4ec5b753940e0f7593249ad0090836ee778b170c5da70632069d1eceb14ec523236ced64ec221b13aaad0350e0537a82aa0c602436e9cf4706019b582670e050
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
- - 'travis_retry gem update --system'
11
- - 'travis_retry gem install bundler'
10
+ - "travis_retry gem update --system"
11
+ - "travis_retry gem install bundler"
12
12
 
13
- script: 'bundle exec rake'
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
@@ -12,6 +12,10 @@ appraise 'rails-6.1' do
12
12
  gem 'activemodel', '~> 6.1.0'
13
13
  end
14
14
 
15
+ appraise 'rails-7.0' do
16
+ gem 'activemodel', '~> 7.0.0'
17
+ end
18
+
15
19
  appraise 'rails_edge' do
16
20
  gem 'activemodel', github: 'rails/rails'
17
21
  end
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## 0.5.1
6
+
7
+ - Fixes Mongolia postal codes, thanks to ~ @lucasfcunha
8
+
5
9
  ## 0.5.0
6
10
 
7
11
  - 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
@@ -1,8 +1,7 @@
1
- # frozen_string_literal: true
2
1
  # This file was generated by Appraisal
3
2
 
4
- source 'https://rubygems.org'
3
+ source "https://rubygems.org"
5
4
 
6
- gem 'activemodel', '~> 4.2.0'
5
+ gem "activemodel", "~> 4.2.0"
7
6
 
8
- gemspec path: '../'
7
+ gemspec path: "../"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- validates_zipcode (0.5.0)
4
+ validates_zipcode (0.5.1)
5
5
  activemodel (>= 4.2.0)
6
6
 
7
7
  GEM
@@ -81,4 +81,4 @@ DEPENDENCIES
81
81
  validates_zipcode!
82
82
 
83
83
  BUNDLED WITH
84
- 2.1.4
84
+ 2.2.22
@@ -1,8 +1,7 @@
1
- # frozen_string_literal: true
2
1
  # This file was generated by Appraisal
3
2
 
4
- source 'https://rubygems.org'
3
+ source "https://rubygems.org"
5
4
 
6
- gem 'activemodel', '~> 5.2.0'
5
+ gem "activemodel", "~> 5.2.0"
7
6
 
8
- gemspec path: '../'
7
+ gemspec path: "../"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- validates_zipcode (0.5.0)
4
+ validates_zipcode (0.5.1)
5
5
  activemodel (>= 4.2.0)
6
6
 
7
7
  GEM
@@ -79,4 +79,4 @@ DEPENDENCIES
79
79
  validates_zipcode!
80
80
 
81
81
  BUNDLED WITH
82
- 2.1.4
82
+ 2.2.22
@@ -1,8 +1,7 @@
1
- # frozen_string_literal: true
2
1
  # This file was generated by Appraisal
3
2
 
4
- source 'https://rubygems.org'
3
+ source "https://rubygems.org"
5
4
 
6
- gem 'activemodel', '~> 6.1.0'
5
+ gem "activemodel", "~> 6.1.0"
7
6
 
8
- gemspec path: '../'
7
+ gemspec path: "../"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- validates_zipcode (0.5.0)
4
+ validates_zipcode (0.5.1)
5
5
  activemodel (>= 4.2.0)
6
6
 
7
7
  GEM
@@ -82,4 +82,4 @@ DEPENDENCIES
82
82
  validates_zipcode!
83
83
 
84
84
  BUNDLED WITH
85
- 2.1.4
85
+ 2.2.22
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activemodel", "~> 7.0.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,85 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ validates_zipcode (0.5.1)
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
@@ -1,8 +1,7 @@
1
- # frozen_string_literal: true
2
1
  # This file was generated by Appraisal
3
2
 
4
- source 'https://rubygems.org'
3
+ source "https://rubygems.org"
5
4
 
6
- gem 'activemodel', github: 'rails/rails'
5
+ gem "activemodel", github: "rails/rails"
7
6
 
8
- gemspec path: '../'
7
+ gemspec path: "../"
@@ -14,7 +14,7 @@ GIT
14
14
  PATH
15
15
  remote: ..
16
16
  specs:
17
- validates_zipcode (0.5.0)
17
+ validates_zipcode (0.5.1)
18
18
  activemodel (>= 4.2.0)
19
19
 
20
20
  GEM
@@ -86,4 +86,4 @@ DEPENDENCIES
86
86
  validates_zipcode!
87
87
 
88
88
  BUNDLED WITH
89
- 2.1.4
89
+ 2.2.22
@@ -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{6}\z/,
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/,
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ValidatesZipcode
3
- VERSION = '0.5.0'
3
+ VERSION = '0.5.1'
4
4
  end
data/spec/spec_helper.rb CHANGED
@@ -1763,16 +1763,18 @@ TEST_DATA = {
1763
1763
  },
1764
1764
  MN: {
1765
1765
  valid: %w[
1766
- 071134
1767
- 025663
1768
- 662612
1769
- 071135
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
- '12345',
1777
+ '123456',
1776
1778
  '123456-123456',
1777
1779
  'D0D0D0'
1778
1780
  ]
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.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Gil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-12 00:00:00.000000000 Z
11
+ date: 2022-07-13 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.0.8
173
+ rubygems_version: 3.2.22
172
174
  signing_key:
173
175
  specification_version: 4
174
176
  summary: Localizable zipcode validation for Rails.