phony 2.18.1 → 2.18.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: 7ea8c6332f0da9d7ba47dbd4874768b5abd2bead07dcee7ccca38a0dbea2f741
4
- data.tar.gz: 48659b180852ae68bb6ae9a3277ce7403dadb3d16ac31614b73822a14b3985b9
3
+ metadata.gz: ea6a3fcf311fb539d4de327e4b2a80485c45417dcf79318d3ea083c1f998c60f
4
+ data.tar.gz: 30e543ef23ec7bff7946d062f35ca8341a30f1175b9bb662293268e7c85b8115
5
5
  SHA512:
6
- metadata.gz: 29cc75cd083d90e44c3c5b98c1dad659be8160eb4859fa65b8115cbd993fe151022d18e0ac48260945b49af1d9f8fd438b065ed12221b7a9ae287a9cfd737cad
7
- data.tar.gz: b9a1676ae81bf52d122f86cc9f0e5b9333c8668c56322973d80c14d8e56785586ca81eba8daa099122d2664d4ba9adfc7d66143c9bddc33f149b47583b6f4026
6
+ metadata.gz: 3c16ac5a223f7b39a17d5dee668461eac0542d307789937d23c476b402b51f0c10ca64c460e3778a538c8e550aebf5cf13bc3697d4cd8d5b4957f4a92ff6476b
7
+ data.tar.gz: 445dc30f4055f53f3d1ba3ea5914ca3936941f9a8eaba1a0e4c4d871625ce50e4448fb6d25889d7685549c9f8f0b7202ccda10f7e7ab0bb67e321b205fe188b7
@@ -266,7 +266,7 @@ Phony.define do
266
266
  match(/\A(2)\d{10}\z/) >> split(10) |
267
267
  one_of('2') >> split(7) |
268
268
  # mobile
269
- match(/\A(9\d\d)\d{7}\z/) >> split(7) |
269
+ match(/\A([89]\d\d)\d{7}\z/) >> split(7) |
270
270
  match(/\A(9\d\d)\d+\z/) >> split(6) |
271
271
  #
272
272
  fixed(2) >> split(7)
@@ -598,6 +598,11 @@ describe 'plausibility' do
598
598
  Phony.plausible?('+81 120 123 123').should be_truthy
599
599
  Phony.plausible?('+81 800 123 1234').should be_truthy
600
600
  end
601
+
602
+ it 'is correct for Philippine' do
603
+ Phony.plausible?('+63 976 1234567').should be_truthy # mobile phone with area code 9
604
+ Phony.plausible?('+63 876 1234567').should be_truthy # mobile phone with area code 8
605
+ end
601
606
  end
602
607
  end
603
608
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phony
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.18.1
4
+ version: 2.18.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Hanke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-29 00:00:00.000000000 Z
11
+ date: 2019-05-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'Fast international phone number (E164 standard) normalizing, splitting
14
14
  and formatting. Lots of formatting options: International (+.., 00..), national