phony 2.2.10 → 2.2.11
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,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Mzg0YzBiZDUwYmNmNzMzODZhZTZlMjVmY2ZkMzE1MmIzYjc1YmFkMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NWZjMWZjYTE4OTczY2FkYTQzMWQwZDVhYjFlZmI0OTQyNWI4NzY2MA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODg4MTY0OTMzNjdlYWE4NWFhYWMwYWExMDY4M2JiM2ZjYzQ3MDBkZGIwZDhk
|
10
|
+
ZDRlOWQ1M2EzMzhkODhhZWUxNWM0NmJhNTY2YzE1ZWU1ZWYxMWEyYTE0MmI3
|
11
|
+
YjIwZjY3OTU2NTIwOGNmYTI1ZGRmZjRhZDMyMGJlY2QzODQ3NDQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Y2Y2ZGEwZDg0NTM0YzVjNjY2NDc0NjlhZTUwYzYyYmRmNjljNzg1ZWM0ZTA3
|
14
|
+
MTliY2NiNmM0NGMxYmM1NTBiYzVkOTM1Zjc2NjQyNTdmOTdhZWZjMDU5OGJh
|
15
|
+
YTI0ODEzYjEyOGNkYjVmOTEzMjZmZGFmOGI2ZTRhZWJlOThjNWU=
|
@@ -27,13 +27,11 @@ Phony.define do
|
|
27
27
|
one_of('178') >> matched_split( # satellite
|
28
28
|
/\A\d{3}\z/ => [3],
|
29
29
|
/\A\d+\z/ => [3,2]) |
|
30
|
-
|
30
|
+
one_of(%w(870)) >> split(3,2) | # satellite
|
31
|
+
match(/\A(81\d|82\d|84\d|85\d|86\d|87\d|88\d)\d+\z/) >> matched_split( # mobile
|
31
32
|
/\A\d{6}\z/ => [3,3],
|
32
33
|
/\A\d{7}\z/ => [3,4],
|
33
34
|
/\A\d+\z/ => [4,4]) |
|
34
|
-
match(/\A(82\d|83\d)\d+\z/) >> split(3,3) | # mobile
|
35
|
-
one_of(%w(870)) >> split(3,2) | # satellite
|
36
|
-
one_of(%w(877 878)) >> split(3,3) | # mobile
|
37
35
|
one_of(%w(9)) >> matched_split( # geographic
|
38
36
|
/\A\d{7}\z/ => [4,3],
|
39
37
|
/\A\d+\z/ => [3,3,3]) |
|
@@ -506,8 +506,10 @@ describe 'plausibility' do
|
|
506
506
|
['+62 810 123 456', '+62 810 123 4567', '+62 810 1234 5678'],
|
507
507
|
['+62 815 123 456', '+62 815 123 4567', '+62 815 1234 5678'],
|
508
508
|
'+62 820 123 456',
|
509
|
+
['+62 823 123 456', '+62 823 123 4567', '+62 823 1234 5678'],
|
509
510
|
'+62 870 123 45',
|
510
|
-
'+62 877 123 456',
|
511
|
+
['+62 877 123 456', '+62 877 123 4567', '+62 877 1234 5678'],
|
512
|
+
['+62 878 123 456', '+62 878 123 4567', '+62 878 1234 5678'],
|
511
513
|
['+62 881 123 456', '+62 881 123 4567', '+62 881 1234 5678'],
|
512
514
|
'+62 9 1234 567',
|
513
515
|
'+62 9 123 456 789']
|
@@ -284,6 +284,8 @@ describe 'country descriptions' do
|
|
284
284
|
it_splits '6281012345678', %w(62 810 1234 5678)
|
285
285
|
it_splits '628151234567', %w(62 815 123 4567)
|
286
286
|
it_splits '62820123456', %w(62 820 123 456)
|
287
|
+
it_splits '628231234567', %w(62 823 123 4567)
|
288
|
+
it_splits '6282312345678', %w(62 823 1234 5678)
|
287
289
|
it_splits '6287012345', %w(62 870 123 45)
|
288
290
|
it_splits '62877123456', %w(62 877 123 456)
|
289
291
|
it_splits '62881123456', %w(62 881 123 456)
|
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.2.
|
4
|
+
version: 2.2.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Hanke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-23 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
|