iso3166-countries 0.2.0 → 0.2.1

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
  SHA256:
3
- metadata.gz: bf772607ef96550a4e456ecf46054f72d1cb6a4ddfac309bcaeeb9f74ea3aaa0
4
- data.tar.gz: 6fd6d587489ce026068d44cce3a2fdb1d0c7866302c56eadfd09ef53333375f3
3
+ metadata.gz: 7e345856dcddc2715e963991dff3653a71d0476adb6070fae82eaead2e380189
4
+ data.tar.gz: 9b640150b46f8d96e6e33e563b4002c7b919942ba474b4d7038d17f7c1d94f62
5
5
  SHA512:
6
- metadata.gz: 566bd4ea26485099aba48eaeffdcb37919699df5e936d6cd8f63ba496599c5599b35bf24de41838aff4afead4925c78f36d5880ebf6793ad821345af03673383
7
- data.tar.gz: 4705de403670ffa1843aceec38aeaaa2529515b87aba736bbe31f860626d39696f95109baa41f2af0243e2e91fd96632b1d025bcb9d8981124bd93c7268a131b
6
+ metadata.gz: 0531c36256abd4ed7c8bf26c6fe512449ed6234a80e9296a889a5ee1ad1a9ebea9c4fa6eda4295b802e4e5f56565a951896de97b0f93d237f16963e044ad4295
7
+ data.tar.gz: 2d9b71710207555d53bdacdd322fb5a130652ced9f4765a388cddbc2972cf70c21329e65638e8ceb5c22383be94bb37dc01bcae3165a4d6b4ae07ec6895709c4
@@ -10,7 +10,7 @@ jobs:
10
10
  - name: Set up Ruby
11
11
  uses: ruby/setup-ruby@v1
12
12
  with:
13
- ruby-version: 3.0.0
13
+ ruby-version: 3.1.0
14
14
  - name: Run the default task
15
15
  run: |
16
16
  gem install bundler -v 2.2.11
data/data/extended.yml CHANGED
@@ -24,7 +24,7 @@ AT:
24
24
  eu_member: true
25
25
  currency_code: EUR
26
26
  postal_code_format: NNNN
27
- postal_code_regexp: !ruby/regexp '/\A\d{4}\z/'
27
+ postal_code_regexp: \A\d{4}\z
28
28
  AU:
29
29
  currency_code: AUD
30
30
  AW:
@@ -43,14 +43,14 @@ BE:
43
43
  eu_member: true
44
44
  currency_code: EUR
45
45
  postal_code_format: NNNN
46
- postal_code_regexp: !ruby/regexp '/\A\d{4}\z/'
46
+ postal_code_regexp: \A\d{4}\z
47
47
  BF:
48
48
  currency_code: XOF
49
49
  BG:
50
50
  eu_member: true
51
51
  currency_code: BGN
52
52
  postal_code_format: NNNN
53
- postal_code_regexp: !ruby/regexp '/\A\d{4}\z/'
53
+ postal_code_regexp: \A\d{4}\z
54
54
  BH:
55
55
  currency_code: BHD
56
56
  BI:
@@ -119,24 +119,24 @@ CY:
119
119
  eu_member: true
120
120
  currency_code: EUR
121
121
  postal_code_format: NNNN
122
- postal_code_regexp: !ruby/regexp '/\A\d{4}\z/'
122
+ postal_code_regexp: \A\d{4}\z
123
123
  CZ:
124
124
  eu_member: true
125
125
  currency_code: CZK
126
126
  postal_code_format: NNNNN
127
- postal_code_regexp: !ruby/regexp '/\A[1234567]\d{4}\z/'
127
+ postal_code_regexp: \A[1234567]\d{4}\z
128
128
  DE:
129
129
  eu_member: true
130
130
  currency_code: EUR
131
131
  postal_code_format: NNNNN
132
- postal_code_regexp: !ruby/regexp '/\A\d{5}\z/'
132
+ postal_code_regexp: \A\d{5}\z
133
133
  DJ:
134
134
  currency_code: DJF
135
135
  DK:
136
136
  eu_member: true
137
137
  currency_code: DKK
138
138
  postal_code_format: NNNN
139
- postal_code_regexp: !ruby/regexp '/\A\d{4}\z/'
139
+ postal_code_regexp: \A\d{4}\z
140
140
  DM:
141
141
  currency_code: XCD
142
142
  DO:
@@ -149,7 +149,7 @@ EE:
149
149
  eu_member: true
150
150
  currency_code: EUR
151
151
  postal_code_format: NNNNN
152
- postal_code_regexp: !ruby/regexp '/\A\d{5}\z/'
152
+ postal_code_regexp: \A\d{5}\z
153
153
  EG:
154
154
  currency_code: EGP
155
155
  EH:
@@ -160,14 +160,14 @@ ES:
160
160
  eu_member: true
161
161
  currency_code: EUR
162
162
  postal_code_format: NNNNN
163
- postal_code_regexp: !ruby/regexp '/\A\d{5}\z/'
163
+ postal_code_regexp: \A\d{5}\z
164
164
  ET:
165
165
  currency_code: ETB
166
166
  FI:
167
167
  eu_member: true
168
168
  currency_code: EUR
169
169
  postal_code_format: NNNNN
170
- postal_code_regexp: !ruby/regexp '/\A\d{5}\z/'
170
+ postal_code_regexp: \A\d{5}\z
171
171
  FJ:
172
172
  currency_code: FJD
173
173
  FK:
@@ -180,7 +180,7 @@ FR:
180
180
  eu_member: true
181
181
  currency_code: EUR
182
182
  postal_code_format: NNNNN
183
- postal_code_regexp: !ruby/regexp '/\A\d{5}\z/'
183
+ postal_code_regexp: \A\d{5}\z
184
184
  GA:
185
185
  currency_code: XAF
186
186
  GB:
@@ -211,7 +211,7 @@ GR:
211
211
  eu_member: true
212
212
  currency_code: EUR
213
213
  postal_code_format: NNNNN
214
- postal_code_regexp: !ruby/regexp '/\A\d{5}\z/'
214
+ postal_code_regexp: \A\d{5}\z
215
215
  GS:
216
216
  currency_code:
217
217
  GT:
@@ -232,21 +232,21 @@ HR:
232
232
  eu_member: true
233
233
  currency_code: HRK
234
234
  postal_code_format: NNNNN
235
- postal_code_regexp: !ruby/regexp '/\A\d{5}\z/'
235
+ postal_code_regexp: \A\d{5}\z
236
236
  HT:
237
237
  currency_code: HTG
238
238
  HU:
239
239
  eu_member: true
240
240
  currency_code: HUF
241
241
  postal_code_format: NNNN
242
- postal_code_regexp: !ruby/regexp '/\A\d{4}\z/'
242
+ postal_code_regexp: \A\d{4}\z
243
243
  ID:
244
244
  currency_code: IDR
245
245
  IE:
246
246
  eu_member: true
247
247
  currency_code: EUR
248
248
  postal_code_format: ANAnAnAnAnAn
249
- postal_code_regexp: !ruby/regexp '/\A([AC-FHKNPRTV-Y]\d{2}|D6W)[0-9AC-FHKNPRTV-Y]{4}\z/'
249
+ postal_code_regexp: \A([AC-FHKNPRTV-Y]\d{2}|D6W)[0-9AC-FHKNPRTV-Y]{4}\z
250
250
  IL:
251
251
  currency_code: ILS
252
252
  IM:
@@ -265,7 +265,7 @@ IT:
265
265
  eu_member: true
266
266
  currency_code: EUR
267
267
  postal_code_format: NNNNN
268
- postal_code_regexp: !ruby/regexp '/\A\d{5}\z/'
268
+ postal_code_regexp: \A\d{5}\z
269
269
  JE:
270
270
  currency_code: GBP
271
271
  JM:
@@ -314,17 +314,17 @@ LT:
314
314
  eu_member: true
315
315
  currency_code: EUR
316
316
  postal_code_format: NNNNN
317
- postal_code_regexp: !ruby/regexp '/\A\d{5}\z/'
317
+ postal_code_regexp: \A\d{5}\z
318
318
  LU:
319
319
  eu_member: true
320
320
  currency_code: EUR
321
321
  postal_code_format: NNNN
322
- postal_code_regexp: !ruby/regexp '/\A\d{4}\z/'
322
+ postal_code_regexp: \A\d{4}\z
323
323
  LV:
324
324
  eu_member: true
325
325
  currency_code: EUR
326
326
  postal_code_format: NNNN
327
- postal_code_regexp: !ruby/regexp '/\A\d{4}\z/'
327
+ postal_code_regexp: \A\d{4}\z
328
328
  LY:
329
329
  currency_code: LYD
330
330
  MA:
@@ -363,7 +363,7 @@ MT:
363
363
  eu_member: true
364
364
  currency_code: EUR
365
365
  postal_code_format: AAANNNN
366
- postal_code_regexp: !ruby/regexp '/^[A-Z]{3}\d{4}$/'
366
+ postal_code_regexp: ^[A-Z]{3}\d{4}$
367
367
  MU:
368
368
  currency_code: MUR
369
369
  MV:
@@ -392,7 +392,7 @@ NL:
392
392
  eu_member: true
393
393
  currency_code: EUR
394
394
  postal_code_format: "NNNNAA, NNNN AA"
395
- postal_code_regexp: !ruby/regexp '/\A\d{4}\s?[A-Z]{2}\z/'
395
+ postal_code_regexp: \A\d{4}\s?[A-Z]{2}\z
396
396
  'NO':
397
397
  currency_code: NOK
398
398
  NP:
@@ -421,7 +421,7 @@ PL:
421
421
  eu_member: true
422
422
  currency_code: PLN
423
423
  postal_code_format: "NN-NNN, NNNNN"
424
- postal_code_regexp: !ruby/regexp '/\A\d{2}-?\d{3}\z/'
424
+ postal_code_regexp: \A\d{2}-?\d{3}\z
425
425
  PM:
426
426
  currency_code: EUR
427
427
  PN:
@@ -434,7 +434,7 @@ PT:
434
434
  eu_member: true
435
435
  currency_code: EUR
436
436
  postal_code_format: "NNNN-NNN, NNNNNNN"
437
- postal_code_regexp: !ruby/regexp '/\A\d{4}(-?\d{3})?\z/'
437
+ postal_code_regexp: \A\d{4}(-?\d{3})?\z
438
438
  PW:
439
439
  currency_code: USD
440
440
  PY:
@@ -447,7 +447,7 @@ RO:
447
447
  eu_member: true
448
448
  currency_code: RON
449
449
  postal_code_format: NNNNNN
450
- postal_code_regexp: !ruby/regexp '/\A\d{6}\z/'
450
+ postal_code_regexp: \A\d{6}\z
451
451
  RS:
452
452
  currency_code: RSD
453
453
  RU:
@@ -466,7 +466,7 @@ SE:
466
466
  eu_member: true
467
467
  currency_code: SEK
468
468
  postal_code_format: NNNNN
469
- postal_code_regexp: !ruby/regexp '/\A\d{5}\z/'
469
+ postal_code_regexp: \A\d{5}\z
470
470
  SG:
471
471
  currency_code: SGD
472
472
  SH:
@@ -475,14 +475,14 @@ SI:
475
475
  eu_member: true
476
476
  currency_code: EUR
477
477
  postal_code_format: NNNN
478
- postal_code_regexp: !ruby/regexp '/\A\d{4}\z/'
478
+ postal_code_regexp: \A\d{4}\z
479
479
  SJ:
480
480
  currency_code: NOK
481
481
  SK:
482
482
  eu_member: true
483
483
  currency_code: EUR
484
484
  postal_code_format: NNNNN
485
- postal_code_regexp: !ruby/regexp '/\A[089]\d{4}\z/'
485
+ postal_code_regexp: \A[089]\d{4}\z
486
486
  SL:
487
487
  currency_code: SLL
488
488
  SM:
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ISO3166
4
4
  module Countries
5
- VERSION = "0.2.0"
5
+ VERSION = "0.2.1"
6
6
  end
7
7
  end
@@ -75,7 +75,10 @@ module ISO3166
75
75
  end
76
76
 
77
77
  def postal_code_regexp
78
- yml_data["postal_code_regexp"]
78
+ pattern = yml_data["postal_code_regexp"]
79
+ return if pattern.nil?
80
+
81
+ @_postal_code_regexp ||= Regexp.new(pattern)
79
82
  end
80
83
 
81
84
  def yml_data
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iso3166-countries
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ali Ismayilov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-04-06 00:00:00.000000000 Z
11
+ date: 2022-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  - !ruby/object:Gem::Version
73
73
  version: '0'
74
74
  requirements: []
75
- rubygems_version: 3.2.3
75
+ rubygems_version: 3.3.4
76
76
  signing_key:
77
77
  specification_version: 4
78
78
  summary: Ruby access for ISO3166 Country data