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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e67a68693b7532410b02e6469345282864dbb96c
4
- data.tar.gz: 74aceb167acaebadc964395c2f1c35090dae354c
3
+ metadata.gz: fddc5611ea7a76c0566f14ad7fc9957058fb9bc0
4
+ data.tar.gz: 19cc15442cda3506264a34fc384ae343913eaa31
5
5
  SHA512:
6
- metadata.gz: 2b59d32bdfeba6d5ac7648725047c6bb20b91ab6a1c04251dcbbb1f2ce4910ca470b34fb81af1f6ddf2c0708c5ae8fb6761fa413203c618c6509a3385db25c60
7
- data.tar.gz: 1f4764c0fdfd521cc7cf950f3fe56ded3f18f856f4b101ce2670f9bf3250429071d885efa32bc650c609a14fe1f3bdf0c1520b4bb2129955eaea2f59772a509e
6
+ metadata.gz: 2142b4d7f47c25811efaaa88dcd8ee9dd418a8dd7751b0881c52b74184b34872748d755df5cfebe039435e5c8caec0eb32db6feac771dbf3d51bb5e889285811
7
+ data.tar.gz: 8e11226752017ecb1da7ffb7a085aa294e26195e891be9e0c351f4be28bad875c698f3a24df3c0456e3d51a272390a8bf5a8bac47ae4e39a5c7aec9d396931e9
@@ -1,6 +1,11 @@
1
1
  # Changelog
2
+
2
3
  All notable changes to this project will be documented in this file.
3
4
 
5
+ ## 0.0.17
6
+
7
+ - Updates support for Luxembourg postal codes ~ @rivsc
8
+
4
9
  ## 0.0.16
5
10
 
6
11
  - Support for old / new Israel postal codes ~ @EricLarch
@@ -64,7 +64,7 @@ module ValidatesZipcode
64
64
  KW: /\A\d{5}\z/,
65
65
  LA: /\A\d{5}\z/,
66
66
  LB: /\A(\d{4}([ ]?\d{4})?)?\z/,
67
- LU: /\A\d{4}\z/,
67
+ LU: /\A(L\-)?\d{4}\z/,
68
68
  MK: /\A\d{4}\z/,
69
69
  MY: /\A\d{5}\z/,
70
70
  MV: /\A\d{5}\z/,
@@ -1,3 +1,3 @@
1
1
  module ValidatesZipcode
2
- VERSION = "0.0.16"
2
+ VERSION = "0.0.17"
3
3
  end
@@ -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.16
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: 2016-10-08 00:00:00.000000000 Z
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.6.7
143
+ rubygems_version: 2.5.1
144
144
  signing_key:
145
145
  specification_version: 4
146
146
  summary: Localizable zipcode validation for Rails.