validates_zipcode 0.0.20 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +13 -17
- data/.travis.yml +19 -12
- data/Appraisals +11 -9
- data/CHANGELOG.md +5 -0
- data/Gemfile +2 -0
- data/README.md +1 -1
- data/Rakefile +5 -3
- data/gemfiles/rails_3.2.gemfile.lock +18 -18
- data/gemfiles/rails_4.0.gemfile +6 -3
- data/gemfiles/rails_4.0.gemfile.lock +17 -17
- data/gemfiles/rails_4.1.gemfile +5 -3
- data/gemfiles/rails_4.1.gemfile.lock +19 -19
- data/gemfiles/rails_4.2.gemfile.lock +21 -21
- data/gemfiles/rails_5.0.gemfile.lock +21 -21
- data/gemfiles/rails_5.1.gemfile +7 -0
- data/gemfiles/rails_5.1.gemfile.lock +57 -0
- data/gemfiles/rails_5.2.gemfile +7 -0
- data/gemfiles/rails_5.2.gemfile.lock +57 -0
- data/gemfiles/rails_edge.gemfile +5 -3
- data/lib/validates_zipcode/version.rb +1 -1
- data/spec/validates_zipcode_spec.rb +2 -2
- data/validates_zipcode.gemspec +14 -13
- metadata +22 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 774af0458bf2099d4c99b37c4cbdbde4cbfad4e0
|
4
|
+
data.tar.gz: e0d2896a25815df7ab7f33ea7e04de788efa4d48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f52173779ac815ad780312a8ee04d9c3a6b71e6c1739ce9c6083c58aa9f0a686cea6179c5924a5c994144852ce13964247ca2f59325a560a5b0cf57c675a0595
|
7
|
+
data.tar.gz: 0f52e760f690496880c35725608089c29c2e7c6ecde839f5f1906496fcf7f76a14995a9d41475c4a527686dedcfa4d5dfa5328769c8e558bd04a723e0f85066a
|
data/.rubocop.yml
CHANGED
@@ -14,6 +14,7 @@ AllCops:
|
|
14
14
|
# Include common Ruby source files.
|
15
15
|
Include:
|
16
16
|
- '**/*.gemspec'
|
17
|
+
- '**/*.gemfile'
|
17
18
|
- '**/*.podspec'
|
18
19
|
- '**/*.jbuilder'
|
19
20
|
- '**/*.rake'
|
@@ -386,16 +387,6 @@ Layout/EmptyLinesAroundModuleBody:
|
|
386
387
|
- empty_lines
|
387
388
|
- no_empty_lines
|
388
389
|
|
389
|
-
# Checks whether the source file has a utf-8 encoding comment or not
|
390
|
-
# AutoCorrectEncodingComment must match the regex
|
391
|
-
# /#.*coding\s?[:=]\s?(?:UTF|utf)-8/
|
392
|
-
Style/Encoding:
|
393
|
-
EnforcedStyle: when_needed
|
394
|
-
SupportedStyles:
|
395
|
-
- when_needed
|
396
|
-
- always
|
397
|
-
AutoCorrectEncodingComment: '# encoding: utf-8'
|
398
|
-
|
399
390
|
Style/FileName:
|
400
391
|
# File names listed in AllCops:Include are excluded by default. Add extra
|
401
392
|
# excludes here.
|
@@ -475,9 +466,6 @@ Style/HashSyntax:
|
|
475
466
|
# Force hashes that have a symbol value to use hash rockets
|
476
467
|
UseHashRocketsWithSymbolValues: false
|
477
468
|
|
478
|
-
Style/IfUnlessModifier:
|
479
|
-
MaxLineLength: 80
|
480
|
-
|
481
469
|
Layout/IndentationConsistency:
|
482
470
|
# The difference between `rails` and `normal` is that the `rails` style
|
483
471
|
# prescribes that in classes and modules the `protected` and `private`
|
@@ -712,7 +700,18 @@ Layout/TrailingBlankLines:
|
|
712
700
|
- final_newline
|
713
701
|
- final_blank_line
|
714
702
|
|
715
|
-
Style/
|
703
|
+
Style/TrailingCommaInArrayLiteral:
|
704
|
+
# If EnforcedStyleForMultiline is comma, the cop requires a comma after the
|
705
|
+
# last item of a list, but only for lists where each item is on its own line.
|
706
|
+
# If EnforcedStyleForMultiline is consistent_comma, the cop requires a comma
|
707
|
+
# after the last item of a list, for all lists.
|
708
|
+
EnforcedStyleForMultiline: no_comma
|
709
|
+
SupportedStylesForMultiline:
|
710
|
+
- comma
|
711
|
+
- consistent_comma
|
712
|
+
- no_comma
|
713
|
+
|
714
|
+
Style/TrailingCommaInHashLiteral:
|
716
715
|
# If EnforcedStyleForMultiline is comma, the cop requires a comma after the
|
717
716
|
# last item of a list, but only for lists where each item is on its own line.
|
718
717
|
# If EnforcedStyleForMultiline is consistent_comma, the cop requires a comma
|
@@ -782,9 +781,6 @@ Style/VariableName:
|
|
782
781
|
- snake_case
|
783
782
|
- camelCase
|
784
783
|
|
785
|
-
Style/WhileUntilModifier:
|
786
|
-
MaxLineLength: 80
|
787
|
-
|
788
784
|
Style/WordArray:
|
789
785
|
MinSize: 0
|
790
786
|
# The regular expression WordRegex decides what is considered a word.
|
data/.travis.yml
CHANGED
@@ -4,29 +4,36 @@ cache: bundler
|
|
4
4
|
|
5
5
|
script: "bundle exec rake"
|
6
6
|
|
7
|
+
before_install:
|
8
|
+
- gem update --system
|
9
|
+
- gem install bundler
|
10
|
+
|
7
11
|
rvm:
|
8
12
|
- 1.9.3
|
9
|
-
- 2.
|
10
|
-
- 2.
|
11
|
-
- 2.
|
12
|
-
- 2.
|
13
|
-
- 2.3.0
|
13
|
+
- 2.2.10
|
14
|
+
- 2.3.7
|
15
|
+
- 2.4.4
|
16
|
+
- 2.5.1
|
14
17
|
|
15
18
|
gemfile:
|
16
19
|
- gemfiles/rails_3.2.gemfile
|
17
|
-
- gemfiles/rails_4.0.gemfile
|
18
|
-
- gemfiles/rails_4.1.gemfile
|
19
20
|
- gemfiles/rails_4.2.gemfile
|
20
21
|
- gemfiles/rails_5.0.gemfile
|
22
|
+
- gemfiles/rails_5.1.gemfile
|
23
|
+
- gemfiles/rails_5.2.gemfile
|
21
24
|
|
22
25
|
matrix:
|
23
26
|
fast_finish: true
|
24
27
|
exclude:
|
25
28
|
- rvm: 1.9.3
|
26
29
|
gemfile: gemfiles/rails_5.0.gemfile
|
27
|
-
- rvm:
|
28
|
-
gemfile: gemfiles/rails_5.
|
29
|
-
- rvm:
|
30
|
-
gemfile: gemfiles/rails_5.
|
31
|
-
- rvm: 2.2.
|
30
|
+
- rvm: 1.9.3
|
31
|
+
gemfile: gemfiles/rails_5.1.gemfile
|
32
|
+
- rvm: 1.9.3
|
33
|
+
gemfile: gemfiles/rails_5.2.gemfile
|
34
|
+
- rvm: 2.2.10
|
32
35
|
gemfile: gemfiles/rails_5.0.gemfile
|
36
|
+
- rvm: 2.2.10
|
37
|
+
gemfile: gemfiles/rails_5.1.gemfile
|
38
|
+
- rvm: 2.2.10
|
39
|
+
gemfile: gemfiles/rails_5.2.gemfile
|
data/Appraisals
CHANGED
@@ -1,19 +1,21 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
appraise 'rails-3.2' do
|
2
4
|
gem 'activemodel', '~> 3.2.0'
|
3
5
|
end
|
4
6
|
|
5
|
-
appraise
|
6
|
-
gem
|
7
|
+
appraise 'rails-4.2' do
|
8
|
+
gem 'activemodel', '~> 4.2.0'
|
7
9
|
end
|
8
10
|
|
9
|
-
appraise
|
10
|
-
gem
|
11
|
+
appraise 'rails-5.0' do
|
12
|
+
gem 'activemodel', '~> 5.0.0'
|
11
13
|
end
|
12
14
|
|
13
|
-
appraise
|
14
|
-
gem
|
15
|
+
appraise 'rails-5.1' do
|
16
|
+
gem 'activemodel', '~> 5.1.0'
|
15
17
|
end
|
16
18
|
|
17
|
-
appraise
|
18
|
-
gem
|
19
|
+
appraise 'rails-5.2' do
|
20
|
+
gem 'activemodel', '~> 5.2.0'
|
19
21
|
end
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
+
## 0.1.0
|
6
|
+
|
7
|
+
- Dropped support for Rails 4.0 and 4.1 and for older minor Ruby 2 versions. This means those versions or combinations will not be tested, they may still work but will not receive support. This change could potentially break some apps in the future. Also, gem is stable enough to merit a minor version. Hence, 0.1.0 is here.
|
8
|
+
- Added support for Rails 5.1 and 5.2 ~ @Onumis
|
9
|
+
|
5
10
|
## 0.0.20
|
6
11
|
|
7
12
|
- Merge UK and GB regex, using official regex provided by gob.uk ~ @Onumis @dgilperez
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -4,7 +4,7 @@ Adds zipcode / postal code validation support to Rails (ActiveModel), considerin
|
|
4
4
|
|
5
5
|
``ValidatesZipcode`` currently support **259 countries**. Regex data taken from several sources, being the main source the [CLDR](http://unicode.org/cldr/trac/browser/tags/release-27-d05/common/supplemental/postalCodeData.xml) database (release 27, around 159). Any other country's postal code will validate without errors.
|
6
6
|
|
7
|
-
``ValidatesZipcode`` works for Rails 3
|
7
|
+
``ValidatesZipcode`` works for Rails >= 3.2 and Ruby >= 1.9.3.
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
data/Rakefile
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'bundler/gem_tasks'
|
2
4
|
require 'rspec/core/rake_task'
|
3
5
|
|
4
6
|
RSpec::Core::RakeTask.new(:spec)
|
5
7
|
task default: :spec
|
6
8
|
|
7
|
-
desc
|
9
|
+
desc 'Open an irb session preloaded with this library'
|
8
10
|
task :console do
|
9
|
-
sh
|
11
|
+
sh 'irb -Ilib -rvalidates_zipcode'
|
10
12
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
validates_zipcode (0.0
|
4
|
+
validates_zipcode (0.1.0)
|
5
5
|
activemodel (>= 3.2.0)
|
6
6
|
|
7
7
|
GEM
|
@@ -13,29 +13,29 @@ GEM
|
|
13
13
|
activesupport (3.2.22.4)
|
14
14
|
i18n (~> 0.6, >= 0.6.4)
|
15
15
|
multi_json (~> 1.0)
|
16
|
-
appraisal (2.
|
16
|
+
appraisal (2.2.0)
|
17
17
|
bundler
|
18
18
|
rake
|
19
19
|
thor (>= 0.14.0)
|
20
20
|
builder (3.0.4)
|
21
|
-
diff-lcs (1.
|
21
|
+
diff-lcs (1.3)
|
22
22
|
i18n (0.7.0)
|
23
23
|
multi_json (1.12.1)
|
24
|
-
rake (
|
25
|
-
rspec (3.
|
26
|
-
rspec-core (~> 3.
|
27
|
-
rspec-expectations (~> 3.
|
28
|
-
rspec-mocks (~> 3.
|
29
|
-
rspec-core (3.
|
30
|
-
rspec-support (~> 3.
|
31
|
-
rspec-expectations (3.
|
24
|
+
rake (12.2.1)
|
25
|
+
rspec (3.7.0)
|
26
|
+
rspec-core (~> 3.7.0)
|
27
|
+
rspec-expectations (~> 3.7.0)
|
28
|
+
rspec-mocks (~> 3.7.0)
|
29
|
+
rspec-core (3.7.1)
|
30
|
+
rspec-support (~> 3.7.0)
|
31
|
+
rspec-expectations (3.7.0)
|
32
32
|
diff-lcs (>= 1.2.0, < 2.0)
|
33
|
-
rspec-support (~> 3.
|
34
|
-
rspec-mocks (3.
|
33
|
+
rspec-support (~> 3.7.0)
|
34
|
+
rspec-mocks (3.7.0)
|
35
35
|
diff-lcs (>= 1.2.0, < 2.0)
|
36
|
-
rspec-support (~> 3.
|
37
|
-
rspec-support (3.
|
38
|
-
thor (0.
|
36
|
+
rspec-support (~> 3.7.0)
|
37
|
+
rspec-support (3.7.1)
|
38
|
+
thor (0.20.0)
|
39
39
|
|
40
40
|
PLATFORMS
|
41
41
|
ruby
|
@@ -44,9 +44,9 @@ DEPENDENCIES
|
|
44
44
|
activemodel (~> 3.2.0)
|
45
45
|
appraisal
|
46
46
|
bundler (~> 1.6)
|
47
|
-
rake
|
47
|
+
rake (~> 12.2.1)
|
48
48
|
rspec
|
49
49
|
validates_zipcode!
|
50
50
|
|
51
51
|
BUNDLED WITH
|
52
|
-
1.
|
52
|
+
1.16.1
|
data/gemfiles/rails_4.0.gemfile
CHANGED
@@ -1,7 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# This file was generated by Appraisal
|
2
4
|
|
3
|
-
source
|
5
|
+
source 'https://rubygems.org'
|
4
6
|
|
5
|
-
gem
|
7
|
+
gem 'activemodel', '~> 4.0.0'
|
8
|
+
gem 'rake', '12.2.1'
|
6
9
|
|
7
|
-
gemspec :
|
10
|
+
gemspec path: '../'
|
@@ -16,31 +16,31 @@ GEM
|
|
16
16
|
multi_json (~> 1.3)
|
17
17
|
thread_safe (~> 0.1)
|
18
18
|
tzinfo (~> 0.3.37)
|
19
|
-
appraisal (2.
|
19
|
+
appraisal (2.2.0)
|
20
20
|
bundler
|
21
21
|
rake
|
22
22
|
thor (>= 0.14.0)
|
23
23
|
builder (3.1.4)
|
24
|
-
diff-lcs (1.
|
24
|
+
diff-lcs (1.3)
|
25
25
|
i18n (0.7.0)
|
26
26
|
minitest (4.7.5)
|
27
27
|
multi_json (1.12.1)
|
28
|
-
rake (
|
29
|
-
rspec (3.
|
30
|
-
rspec-core (~> 3.
|
31
|
-
rspec-expectations (~> 3.
|
32
|
-
rspec-mocks (~> 3.
|
33
|
-
rspec-core (3.
|
34
|
-
rspec-support (~> 3.
|
35
|
-
rspec-expectations (3.
|
28
|
+
rake (12.3.1)
|
29
|
+
rspec (3.7.0)
|
30
|
+
rspec-core (~> 3.7.0)
|
31
|
+
rspec-expectations (~> 3.7.0)
|
32
|
+
rspec-mocks (~> 3.7.0)
|
33
|
+
rspec-core (3.7.1)
|
34
|
+
rspec-support (~> 3.7.0)
|
35
|
+
rspec-expectations (3.7.0)
|
36
36
|
diff-lcs (>= 1.2.0, < 2.0)
|
37
|
-
rspec-support (~> 3.
|
38
|
-
rspec-mocks (3.
|
37
|
+
rspec-support (~> 3.7.0)
|
38
|
+
rspec-mocks (3.7.0)
|
39
39
|
diff-lcs (>= 1.2.0, < 2.0)
|
40
|
-
rspec-support (~> 3.
|
41
|
-
rspec-support (3.
|
42
|
-
thor (0.
|
43
|
-
thread_safe (0.3.
|
40
|
+
rspec-support (~> 3.7.0)
|
41
|
+
rspec-support (3.7.1)
|
42
|
+
thor (0.20.0)
|
43
|
+
thread_safe (0.3.6)
|
44
44
|
tzinfo (0.3.51)
|
45
45
|
|
46
46
|
PLATFORMS
|
@@ -55,4 +55,4 @@ DEPENDENCIES
|
|
55
55
|
validates_zipcode!
|
56
56
|
|
57
57
|
BUNDLED WITH
|
58
|
-
1.
|
58
|
+
1.16.1
|
data/gemfiles/rails_4.1.gemfile
CHANGED
@@ -16,32 +16,32 @@ GEM
|
|
16
16
|
minitest (~> 5.1)
|
17
17
|
thread_safe (~> 0.1)
|
18
18
|
tzinfo (~> 1.1)
|
19
|
-
appraisal (2.
|
19
|
+
appraisal (2.2.0)
|
20
20
|
bundler
|
21
21
|
rake
|
22
22
|
thor (>= 0.14.0)
|
23
23
|
builder (3.2.2)
|
24
|
-
diff-lcs (1.
|
24
|
+
diff-lcs (1.3)
|
25
25
|
i18n (0.7.0)
|
26
|
-
json (1.8.
|
27
|
-
minitest (5.
|
28
|
-
rake (
|
29
|
-
rspec (3.
|
30
|
-
rspec-core (~> 3.
|
31
|
-
rspec-expectations (~> 3.
|
32
|
-
rspec-mocks (~> 3.
|
33
|
-
rspec-core (3.
|
34
|
-
rspec-support (~> 3.
|
35
|
-
rspec-expectations (3.
|
26
|
+
json (1.8.5)
|
27
|
+
minitest (5.11.3)
|
28
|
+
rake (12.3.1)
|
29
|
+
rspec (3.7.0)
|
30
|
+
rspec-core (~> 3.7.0)
|
31
|
+
rspec-expectations (~> 3.7.0)
|
32
|
+
rspec-mocks (~> 3.7.0)
|
33
|
+
rspec-core (3.7.1)
|
34
|
+
rspec-support (~> 3.7.0)
|
35
|
+
rspec-expectations (3.7.0)
|
36
36
|
diff-lcs (>= 1.2.0, < 2.0)
|
37
|
-
rspec-support (~> 3.
|
38
|
-
rspec-mocks (3.
|
37
|
+
rspec-support (~> 3.7.0)
|
38
|
+
rspec-mocks (3.7.0)
|
39
39
|
diff-lcs (>= 1.2.0, < 2.0)
|
40
|
-
rspec-support (~> 3.
|
41
|
-
rspec-support (3.
|
42
|
-
thor (0.
|
43
|
-
thread_safe (0.3.
|
44
|
-
tzinfo (1.2.
|
40
|
+
rspec-support (~> 3.7.0)
|
41
|
+
rspec-support (3.7.1)
|
42
|
+
thor (0.20.0)
|
43
|
+
thread_safe (0.3.6)
|
44
|
+
tzinfo (1.2.5)
|
45
45
|
thread_safe (~> 0.1)
|
46
46
|
|
47
47
|
PLATFORMS
|
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
validates_zipcode (0.0
|
4
|
+
validates_zipcode (0.1.0)
|
5
5
|
activemodel (>= 3.2.0)
|
6
6
|
|
7
7
|
GEM
|
@@ -16,32 +16,32 @@ GEM
|
|
16
16
|
minitest (~> 5.1)
|
17
17
|
thread_safe (~> 0.3, >= 0.3.4)
|
18
18
|
tzinfo (~> 1.1)
|
19
|
-
appraisal (2.
|
19
|
+
appraisal (2.2.0)
|
20
20
|
bundler
|
21
21
|
rake
|
22
22
|
thor (>= 0.14.0)
|
23
23
|
builder (3.2.2)
|
24
|
-
diff-lcs (1.
|
24
|
+
diff-lcs (1.3)
|
25
25
|
i18n (0.7.0)
|
26
|
-
json (1.8.
|
27
|
-
minitest (5.
|
28
|
-
rake (
|
29
|
-
rspec (3.
|
30
|
-
rspec-core (~> 3.
|
31
|
-
rspec-expectations (~> 3.
|
32
|
-
rspec-mocks (~> 3.
|
33
|
-
rspec-core (3.
|
34
|
-
rspec-support (~> 3.
|
35
|
-
rspec-expectations (3.
|
26
|
+
json (1.8.5)
|
27
|
+
minitest (5.11.3)
|
28
|
+
rake (12.2.1)
|
29
|
+
rspec (3.7.0)
|
30
|
+
rspec-core (~> 3.7.0)
|
31
|
+
rspec-expectations (~> 3.7.0)
|
32
|
+
rspec-mocks (~> 3.7.0)
|
33
|
+
rspec-core (3.7.1)
|
34
|
+
rspec-support (~> 3.7.0)
|
35
|
+
rspec-expectations (3.7.0)
|
36
36
|
diff-lcs (>= 1.2.0, < 2.0)
|
37
|
-
rspec-support (~> 3.
|
38
|
-
rspec-mocks (3.
|
37
|
+
rspec-support (~> 3.7.0)
|
38
|
+
rspec-mocks (3.7.0)
|
39
39
|
diff-lcs (>= 1.2.0, < 2.0)
|
40
|
-
rspec-support (~> 3.
|
41
|
-
rspec-support (3.
|
42
|
-
thor (0.
|
43
|
-
thread_safe (0.3.
|
44
|
-
tzinfo (1.2.
|
40
|
+
rspec-support (~> 3.7.0)
|
41
|
+
rspec-support (3.7.1)
|
42
|
+
thor (0.20.0)
|
43
|
+
thread_safe (0.3.6)
|
44
|
+
tzinfo (1.2.5)
|
45
45
|
thread_safe (~> 0.1)
|
46
46
|
|
47
47
|
PLATFORMS
|
@@ -51,7 +51,7 @@ DEPENDENCIES
|
|
51
51
|
activemodel (~> 4.2.0)
|
52
52
|
appraisal
|
53
53
|
bundler (~> 1.6)
|
54
|
-
rake
|
54
|
+
rake (~> 12.2.1)
|
55
55
|
rspec
|
56
56
|
validates_zipcode!
|
57
57
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
validates_zipcode (0.0
|
4
|
+
validates_zipcode (0.1.0)
|
5
5
|
activemodel (>= 3.2.0)
|
6
6
|
|
7
7
|
GEM
|
@@ -14,31 +14,31 @@ GEM
|
|
14
14
|
i18n (~> 0.7)
|
15
15
|
minitest (~> 5.1)
|
16
16
|
tzinfo (~> 1.1)
|
17
|
-
appraisal (2.
|
17
|
+
appraisal (2.2.0)
|
18
18
|
bundler
|
19
19
|
rake
|
20
20
|
thor (>= 0.14.0)
|
21
|
-
concurrent-ruby (1.0.
|
22
|
-
diff-lcs (1.
|
21
|
+
concurrent-ruby (1.0.5)
|
22
|
+
diff-lcs (1.3)
|
23
23
|
i18n (0.7.0)
|
24
|
-
minitest (5.
|
25
|
-
rake (
|
26
|
-
rspec (3.
|
27
|
-
rspec-core (~> 3.
|
28
|
-
rspec-expectations (~> 3.
|
29
|
-
rspec-mocks (~> 3.
|
30
|
-
rspec-core (3.
|
31
|
-
rspec-support (~> 3.
|
32
|
-
rspec-expectations (3.
|
24
|
+
minitest (5.11.3)
|
25
|
+
rake (12.2.1)
|
26
|
+
rspec (3.7.0)
|
27
|
+
rspec-core (~> 3.7.0)
|
28
|
+
rspec-expectations (~> 3.7.0)
|
29
|
+
rspec-mocks (~> 3.7.0)
|
30
|
+
rspec-core (3.7.1)
|
31
|
+
rspec-support (~> 3.7.0)
|
32
|
+
rspec-expectations (3.7.0)
|
33
33
|
diff-lcs (>= 1.2.0, < 2.0)
|
34
|
-
rspec-support (~> 3.
|
35
|
-
rspec-mocks (3.
|
34
|
+
rspec-support (~> 3.7.0)
|
35
|
+
rspec-mocks (3.7.0)
|
36
36
|
diff-lcs (>= 1.2.0, < 2.0)
|
37
|
-
rspec-support (~> 3.
|
38
|
-
rspec-support (3.
|
39
|
-
thor (0.
|
40
|
-
thread_safe (0.3.
|
41
|
-
tzinfo (1.2.
|
37
|
+
rspec-support (~> 3.7.0)
|
38
|
+
rspec-support (3.7.1)
|
39
|
+
thor (0.20.0)
|
40
|
+
thread_safe (0.3.6)
|
41
|
+
tzinfo (1.2.5)
|
42
42
|
thread_safe (~> 0.1)
|
43
43
|
|
44
44
|
PLATFORMS
|
@@ -48,7 +48,7 @@ DEPENDENCIES
|
|
48
48
|
activemodel (~> 5.0.0)
|
49
49
|
appraisal
|
50
50
|
bundler (~> 1.6)
|
51
|
-
rake
|
51
|
+
rake (~> 12.2.1)
|
52
52
|
rspec
|
53
53
|
validates_zipcode!
|
54
54
|
|
@@ -0,0 +1,57 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
validates_zipcode (0.1.0)
|
5
|
+
activemodel (>= 3.2.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
activemodel (5.1.6)
|
11
|
+
activesupport (= 5.1.6)
|
12
|
+
activesupport (5.1.6)
|
13
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
|
+
i18n (>= 0.7, < 2)
|
15
|
+
minitest (~> 5.1)
|
16
|
+
tzinfo (~> 1.1)
|
17
|
+
appraisal (2.2.0)
|
18
|
+
bundler
|
19
|
+
rake
|
20
|
+
thor (>= 0.14.0)
|
21
|
+
concurrent-ruby (1.0.5)
|
22
|
+
diff-lcs (1.3)
|
23
|
+
i18n (1.0.1)
|
24
|
+
concurrent-ruby (~> 1.0)
|
25
|
+
minitest (5.11.3)
|
26
|
+
rake (12.2.1)
|
27
|
+
rspec (3.7.0)
|
28
|
+
rspec-core (~> 3.7.0)
|
29
|
+
rspec-expectations (~> 3.7.0)
|
30
|
+
rspec-mocks (~> 3.7.0)
|
31
|
+
rspec-core (3.7.1)
|
32
|
+
rspec-support (~> 3.7.0)
|
33
|
+
rspec-expectations (3.7.0)
|
34
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
35
|
+
rspec-support (~> 3.7.0)
|
36
|
+
rspec-mocks (3.7.0)
|
37
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
38
|
+
rspec-support (~> 3.7.0)
|
39
|
+
rspec-support (3.7.1)
|
40
|
+
thor (0.20.0)
|
41
|
+
thread_safe (0.3.6)
|
42
|
+
tzinfo (1.2.5)
|
43
|
+
thread_safe (~> 0.1)
|
44
|
+
|
45
|
+
PLATFORMS
|
46
|
+
ruby
|
47
|
+
|
48
|
+
DEPENDENCIES
|
49
|
+
activemodel (~> 5.1.0)
|
50
|
+
appraisal
|
51
|
+
bundler (~> 1.6)
|
52
|
+
rake (~> 12.2.1)
|
53
|
+
rspec
|
54
|
+
validates_zipcode!
|
55
|
+
|
56
|
+
BUNDLED WITH
|
57
|
+
1.16.1
|
@@ -0,0 +1,57 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
validates_zipcode (0.1.0)
|
5
|
+
activemodel (>= 3.2.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
activemodel (5.2.0)
|
11
|
+
activesupport (= 5.2.0)
|
12
|
+
activesupport (5.2.0)
|
13
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
|
+
i18n (>= 0.7, < 2)
|
15
|
+
minitest (~> 5.1)
|
16
|
+
tzinfo (~> 1.1)
|
17
|
+
appraisal (2.2.0)
|
18
|
+
bundler
|
19
|
+
rake
|
20
|
+
thor (>= 0.14.0)
|
21
|
+
concurrent-ruby (1.0.5)
|
22
|
+
diff-lcs (1.3)
|
23
|
+
i18n (1.0.1)
|
24
|
+
concurrent-ruby (~> 1.0)
|
25
|
+
minitest (5.11.3)
|
26
|
+
rake (12.2.1)
|
27
|
+
rspec (3.7.0)
|
28
|
+
rspec-core (~> 3.7.0)
|
29
|
+
rspec-expectations (~> 3.7.0)
|
30
|
+
rspec-mocks (~> 3.7.0)
|
31
|
+
rspec-core (3.7.1)
|
32
|
+
rspec-support (~> 3.7.0)
|
33
|
+
rspec-expectations (3.7.0)
|
34
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
35
|
+
rspec-support (~> 3.7.0)
|
36
|
+
rspec-mocks (3.7.0)
|
37
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
38
|
+
rspec-support (~> 3.7.0)
|
39
|
+
rspec-support (3.7.1)
|
40
|
+
thor (0.20.0)
|
41
|
+
thread_safe (0.3.6)
|
42
|
+
tzinfo (1.2.5)
|
43
|
+
thread_safe (~> 0.1)
|
44
|
+
|
45
|
+
PLATFORMS
|
46
|
+
ruby
|
47
|
+
|
48
|
+
DEPENDENCIES
|
49
|
+
activemodel (~> 5.2.0)
|
50
|
+
appraisal
|
51
|
+
bundler (~> 1.6)
|
52
|
+
rake (~> 12.2.1)
|
53
|
+
rspec
|
54
|
+
validates_zipcode!
|
55
|
+
|
56
|
+
BUNDLED WITH
|
57
|
+
1.16.1
|
data/gemfiles/rails_edge.gemfile
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# This file was generated by Appraisal
|
2
4
|
|
3
|
-
source
|
5
|
+
source 'https://rubygems.org'
|
4
6
|
|
5
|
-
gem
|
7
|
+
gem 'activemodel', github: 'rails/rails'
|
6
8
|
|
7
|
-
gemspec :
|
9
|
+
gemspec path: '../'
|
@@ -95,7 +95,7 @@ describe ValidatesZipcode, '#validate_each' do
|
|
95
95
|
context 'Ireland' do
|
96
96
|
it 'does not add errors with a valid postcode - old format' do
|
97
97
|
['D02 AF30', 'X91 PK81', 'V94 H2PP', 'D07 R6YE', 'D6W1234',
|
98
|
-
|
98
|
+
'A230984', 'D00AV92', 'Y631FHK', 'A000000', 'D44N4X4'].each do |zipcode|
|
99
99
|
record = build_record(zipcode, 'IE')
|
100
100
|
zipcode_should_be_valid(record)
|
101
101
|
end
|
@@ -263,7 +263,7 @@ describe ValidatesZipcode, '#validate_each' do
|
|
263
263
|
end
|
264
264
|
end
|
265
265
|
|
266
|
-
[
|
266
|
+
%w[UK GB].each do |cc|
|
267
267
|
context cc do
|
268
268
|
it 'validates with a valid zipcode' do
|
269
269
|
[
|
data/validates_zipcode.gemspec
CHANGED
@@ -1,29 +1,30 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
2
3
|
lib = File.expand_path('../lib', __FILE__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
5
|
require 'validates_zipcode/version'
|
5
6
|
|
6
7
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
+
s.name = 'validates_zipcode'
|
8
9
|
s.version = ValidatesZipcode::VERSION
|
9
|
-
s.authors = [
|
10
|
-
s.email = [
|
11
|
-
s.summary =
|
12
|
-
s.description =
|
13
|
-
s.homepage =
|
14
|
-
s.license =
|
10
|
+
s.authors = ['David Gil']
|
11
|
+
s.email = ['dgilperez@gmail.com']
|
12
|
+
s.summary = 'Localizable zipcode validation for Rails.'
|
13
|
+
s.description = 'Adds zipcode validation methods to ActiveModel considering different country zipcode formats.'
|
14
|
+
s.homepage = 'http://github.com/dgilperez/validates_zipcode'
|
15
|
+
s.license = 'MIT'
|
15
16
|
|
16
17
|
s.files = `git ls-files -z`.split("\x0")
|
17
18
|
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
19
|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
19
|
-
s.require_paths = [
|
20
|
+
s.require_paths = ['lib']
|
20
21
|
|
21
22
|
s.required_ruby_version = '>= 1.9.3'
|
22
23
|
|
23
24
|
s.add_dependency 'activemodel', '>= 3.2.0'
|
24
25
|
|
25
|
-
s.add_development_dependency
|
26
|
-
s.add_development_dependency
|
27
|
-
s.add_development_dependency
|
28
|
-
s.add_development_dependency
|
26
|
+
s.add_development_dependency 'appraisal'
|
27
|
+
s.add_development_dependency 'bundler', '~> 1.6'
|
28
|
+
s.add_development_dependency 'rake', '~> 12.2.1'
|
29
|
+
s.add_development_dependency 'rspec'
|
29
30
|
end
|
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.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Gil
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -25,49 +25,49 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 3.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: appraisal
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '1.6'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '1.6'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 12.2.1
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 12.2.1
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
@@ -110,6 +110,10 @@ files:
|
|
110
110
|
- gemfiles/rails_4.2.gemfile.lock
|
111
111
|
- gemfiles/rails_5.0.gemfile
|
112
112
|
- gemfiles/rails_5.0.gemfile.lock
|
113
|
+
- gemfiles/rails_5.1.gemfile
|
114
|
+
- gemfiles/rails_5.1.gemfile.lock
|
115
|
+
- gemfiles/rails_5.2.gemfile
|
116
|
+
- gemfiles/rails_5.2.gemfile.lock
|
113
117
|
- gemfiles/rails_edge.gemfile
|
114
118
|
- lib/validates_zipcode.rb
|
115
119
|
- lib/validates_zipcode/cldr_regex_collection.rb
|