validates_zipcode 0.0.16 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/validates_zipcode/cldr_regex_collection.rb +1 -1
- data/lib/validates_zipcode/version.rb +1 -1
- data/spec/validates_zipcode_spec.rb +16 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fddc5611ea7a76c0566f14ad7fc9957058fb9bc0
|
4
|
+
data.tar.gz: 19cc15442cda3506264a34fc384ae343913eaa31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2142b4d7f47c25811efaaa88dcd8ee9dd418a8dd7751b0881c52b74184b34872748d755df5cfebe039435e5c8caec0eb32db6feac771dbf3d51bb5e889285811
|
7
|
+
data.tar.gz: 8e11226752017ecb1da7ffb7a085aa294e26195e891be9e0c351f4be28bad875c698f3a24df3c0456e3d51a272390a8bf5a8bac47ae4e39a5c7aec9d396931e9
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,22 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe ValidatesZipcode, '#validate_each' do
|
4
|
+
context "Luxembourg" do
|
5
|
+
it 'does not add errors with a valid zipcode' do
|
6
|
+
['L-5635', '5635'].each do |zipcode|
|
7
|
+
record = build_record(zipcode, "LU")
|
8
|
+
zipcode_should_be_valid(record)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'adds errors with an invalid Zipcode' do
|
13
|
+
['124', '12345-12345', 'D0D0D0', 'invalid_zip'].each do |zipcode|
|
14
|
+
record = build_record(zipcode, 'LU')
|
15
|
+
zipcode_should_be_invalid(record, zipcode)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
4
20
|
context "Spain" do
|
5
21
|
it 'does not add errors with a valid zipcode' do
|
6
22
|
record = build_record('93108', "ES")
|
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.0.17
|
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: 2017-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
140
|
version: '0'
|
141
141
|
requirements: []
|
142
142
|
rubyforge_project:
|
143
|
-
rubygems_version: 2.
|
143
|
+
rubygems_version: 2.5.1
|
144
144
|
signing_key:
|
145
145
|
specification_version: 4
|
146
146
|
summary: Localizable zipcode validation for Rails.
|