phony 2.18.1 → 2.18.3
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/lib/phony/countries/germany.rb +2 -1
- data/lib/phony/country.rb +1 -1
- data/spec/functional/plausibility_spec.rb +6 -1
- data/spec/lib/phony/countries_spec.rb +1 -1
- 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: 4f999191cc1bc0a50f69f2330b8b9abacf7c27223460b27b83fa12e7921e38e3
|
|
4
|
+
data.tar.gz: 34262181d5b43964268f916e88e98c989b12265af7cf739e11fc45b5e0a0f293
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a8105b14ad360a98f86c85b9c9ef4e4ab616c749d6aa1ec2d09d732cce8a5cc6c0cc98a005cb7bd82f39da2e6452e48f0a4b3bb677c055b124f872cbd45d0c66
|
|
7
|
+
data.tar.gz: 1ab16b6d15ba9a13cfb0d72b6073b24d3009db8c60282b1d9b44321674d9db6117885e0043c6eaad721eb7bc93de514a05fbcdb59c69b6b8f1ec7c1caeeaeacb
|
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)
|
data/lib/phony/country.rb
CHANGED
|
@@ -251,7 +251,7 @@ describe 'plausibility' do
|
|
|
251
251
|
it_is_correct_for 'Gabonese Republic', :samples => '+241 1 627 739'
|
|
252
252
|
it_is_correct_for 'Gambia', :samples => '+220 989 5148'
|
|
253
253
|
it_is_correct_for 'Germany', :samples => [
|
|
254
|
-
'+49
|
|
254
|
+
'+49 1577 536 8701'
|
|
255
255
|
]
|
|
256
256
|
it_is_correct_for 'Georgia', :samples => ['+995 220 123 45',
|
|
257
257
|
'+995 32 123 4567',
|
|
@@ -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
|
|
@@ -291,7 +291,7 @@ describe 'country descriptions' do
|
|
|
291
291
|
it_splits '49800222340010', ['49', '800', '222', '340010'] # Service number
|
|
292
292
|
|
|
293
293
|
it_splits '4915111231234', ['49', '151', '1123', '1234'] # Mobile number
|
|
294
|
-
it_splits '4915771231234', ['49', '
|
|
294
|
+
it_splits '4915771231234', ['49', '1577', '123', '1234'] # Mobile number
|
|
295
295
|
it_splits '491601234567', ['49', '160', '1234', '567'] # Mobile number
|
|
296
296
|
it_splits '4916312345678', ['49', '163', '1234', '5678'] # Mobile number
|
|
297
297
|
it_splits '4915211231234', ['49', '1521', '123', '1234'] # Mobile number
|
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.3
|
|
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-06-03 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
|