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 +4 -4
- data/lib/phony/countries.rb +1 -1
- data/spec/functional/plausibility_spec.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ea6a3fcf311fb539d4de327e4b2a80485c45417dcf79318d3ea083c1f998c60f
|
|
4
|
+
data.tar.gz: 30e543ef23ec7bff7946d062f35ca8341a30f1175b9bb662293268e7c85b8115
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3c16ac5a223f7b39a17d5dee668461eac0542d307789937d23c476b402b51f0c10ca64c460e3778a538c8e550aebf5cf13bc3697d4cd8d5b4957f4a92ff6476b
|
|
7
|
+
data.tar.gz: 445dc30f4055f53f3d1ba3ea5914ca3936941f9a8eaba1a0e4c4d871625ce50e4448fb6d25889d7685549c9f8f0b7202ccda10f7e7ab0bb67e321b205fe188b7
|
data/lib/phony/countries.rb
CHANGED
|
@@ -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(
|
|
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.
|
|
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-
|
|
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
|