validates_zipcode 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28749acf8368d0467f685cee92bb54476c3b49ebe5b4bd95c347ee9f3ba28bcd
4
- data.tar.gz: 724fc6dace5e4d37f81ad0183c373533e938fe8c2f67ded5b4ba31626ef55c2e
3
+ metadata.gz: efbbd512c20b7660b85913ef836d65599ef4dae905bc8ee75db47f38d0e56fe0
4
+ data.tar.gz: 44a6e8854d5da2ba59700392508912b8e1527277b96cbbbad5055df5f1e06f4d
5
5
  SHA512:
6
- metadata.gz: d11fe3c378ec82922b225758b5dccc5616c84fea88a46cdec2bd13cbedc8d730565b4e616cd9e727d92dec62cddf362c505c503e23dcb88f8c5293db20634dc0
7
- data.tar.gz: de90359182f4c55a9e188160a6d4f2035b3808e76472529ec300a4aa6d2a5ab844596a303001126c6b22069dd5c5507f40b4795edb2f7fc8625a84cec6d81d96
6
+ metadata.gz: 87fd34a69803910b4a0ccc6793fa240373ebe204efc4dc69eba4d75a8cf0858ff2170efabe8e8d082f74a569604a7a2e7781921362d277db9ab2a9d2505b5e61
7
+ data.tar.gz: ec114161c1e3fa3a53623bdf909e25f6301f5c358a6cd33d3cddb64b981eac841a0834109c13fd037eead3e5dc4e2dbd6eb5dcd12f612302a5e7754c2f2b5275
@@ -2,6 +2,10 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## 0.2.2
6
+
7
+ - Fixes LT postal code format ~ @tmeckhoff
8
+
5
9
  ## 0.2.1
6
10
 
7
11
  - Fixes NI postal code format ~ Daniel Olivares
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- validates_zipcode (0.2.1)
4
+ validates_zipcode (0.2.2)
5
5
  activemodel (>= 3.2.0)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- validates_zipcode (0.2.1)
4
+ validates_zipcode (0.2.2)
5
5
  activemodel (>= 3.2.0)
6
6
 
7
7
  GEM
@@ -14,7 +14,7 @@ GIT
14
14
  PATH
15
15
  remote: ..
16
16
  specs:
17
- validates_zipcode (0.2.1)
17
+ validates_zipcode (0.2.2)
18
18
  activemodel (>= 3.2.0)
19
19
 
20
20
  GEM
@@ -196,7 +196,7 @@ module ValidatesZipcode
196
196
  LI: /\A\d{4}\z/,
197
197
  LV: /\A([a-zA-Z]|\d){3,8}\z/,
198
198
  LY: /\A\d{5}\z/,
199
- LT: /\A([a-zA-Z]){2}(-)\d{4,5}\z/,
199
+ LT: /\A(LT-)?\d{5}\z/,
200
200
  LC: /\A([a-zA-Z\d\s]){3,}\z/,
201
201
  MC: /\A\d{5}\z/,
202
202
  MD: /\A(([a-zA-Z]){2})(|\s)\d{4}\z/,
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ValidatesZipcode
3
- VERSION = '0.2.1'
3
+ VERSION = '0.2.2'
4
4
  end
@@ -139,15 +139,19 @@ describe ValidatesZipcode, '#validate_each' do
139
139
 
140
140
  context 'Lithuania' do
141
141
  it 'validates with a valid zipcode' do
142
- record = build_record('LT-0110', 'LT')
143
- zipcode_should_be_valid(record)
144
142
  record = build_record('LT-00110', 'LT')
145
143
  zipcode_should_be_valid(record)
144
+ record = build_record('00110', 'LT')
145
+ zipcode_should_be_valid(record)
146
146
  end
147
147
 
148
148
  it 'does not validate with an invalid zipcode' do
149
- record = build_record('21006', 'LT')
150
- zipcode_should_be_invalid(record, '21006')
149
+ record = build_record('2100', 'LT')
150
+ zipcode_should_be_invalid(record, '2100')
151
+ record = build_record('LT-2100', 'LT')
152
+ zipcode_should_be_invalid(record, 'LT-2100')
153
+ record = build_record('LT21006', 'LT')
154
+ zipcode_should_be_invalid(record, 'LT21006')
151
155
  end
152
156
  end
153
157
 
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.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Gil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-14 00:00:00.000000000 Z
11
+ date: 2019-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel