validates_zipcode 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/validates_zipcode/cldr_regex_collection.rb +1 -1
- data/lib/validates_zipcode/version.rb +1 -1
- data/spec/validates_zipcode_spec.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce3428384df1296dc59b3a6cd5d4851627145efc
|
4
|
+
data.tar.gz: 0ee7e5839e662b71527b2189e6b081b04489dd29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48b420457da2ba3c35f5228cb56da96850f8e0f844c7682936e8a8690e280d11593295fd409d0cd68b90e34ed4cb4282a73702cce3411b57e291c546d886207c
|
7
|
+
data.tar.gz: 0d1a4be22635a40aaddbd5549a7d7f1923d8a6dfe5b566eedc70591ab880d7b8a4c3206d1d2d2a0062862b507fbfcb2f9b94de211a13bc3a812f33495c5b94ce
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# ValidatesZipcode [![Build Status](https://secure.travis-ci.org/dgilperez/validates_zipcode.png)](https://travis-ci.org/dgilperez/validates_zipcode) [![Gem Version](https://badge.fury.io/rb/validates_zipcode.svg)](http://badge.fury.io/rb/validates_zipcode)
|
1
|
+
# ValidatesZipcode [![Build Status](https://secure.travis-ci.org/dgilperez/validates_zipcode.png)](https://travis-ci.org/dgilperez/validates_zipcode) [![Code Climate](https://codeclimate.com/github/dgilperez/validates_zipcode/badges/gpa.svg)](https://codeclimate.com/github/dgilperez/validates_zipcode) [![Gem Version](https://badge.fury.io/rb/validates_zipcode.svg)](http://badge.fury.io/rb/validates_zipcode)
|
2
2
|
|
3
3
|
Add zipcode validation support to Rails (ActiveModel), considering different zipcode country formats.
|
4
4
|
|
@@ -95,6 +95,18 @@ describe ValidatesZipcode, '#validate_each' do
|
|
95
95
|
end
|
96
96
|
end
|
97
97
|
|
98
|
+
context 'Serbia' do
|
99
|
+
it 'validates with a valid zipcode' do
|
100
|
+
record = build_record('21000', 'RS')
|
101
|
+
zipcode_should_be_valid(record)
|
102
|
+
end
|
103
|
+
|
104
|
+
it 'does not validate with an invalid zipcode' do
|
105
|
+
record = build_record('2100', 'RS')
|
106
|
+
zipcode_should_be_invalid(record)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
98
110
|
context "unknown country" do
|
99
111
|
it 'does not add errors with a any zipcode' do
|
100
112
|
record = build_record('A1J2Z9', 'ZZ')
|
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.4
|
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: 2015-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|