phony 2.14.4 → 2.14.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/phony/countries.rb +3 -2
- data/spec/functional/plausibility_spec.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c655e25faeff74ae83e8892c9e6537132401012
|
4
|
+
data.tar.gz: ccbc9bc3a07f6c25d93d79c3bc6aa0939576b452
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85a566f1158a602e74f6189bfc5b9fb12d43f1944acccef50af82a15cac3109f131376fbe7f58aabdb287d0ceb2acf657cf1a127e5aab99fcd4013bafeea5f39
|
7
|
+
data.tar.gz: 6dd8b6d75a5c5302fdfe951413699a28ebd7984daf76442160999a5ed85c3f058d78b6cff455302f3766243542cb02cf8e2cae5d88d249456eb4d9b5975e4093
|
data/lib/phony/countries.rb
CHANGED
@@ -624,9 +624,10 @@ Phony.define do
|
|
624
624
|
#
|
625
625
|
country '358',
|
626
626
|
trunk('0') |
|
627
|
+
match(/^([1-3]0)\d+$/) >> split(3,3,0..6) | # Service/subscriber
|
627
628
|
match(/^([6-8]00)\d+$/) >> split(3,3) | # Service
|
628
|
-
match(/^(4\d|50)\d+$/) >> split(3,2,2) | # Mobile
|
629
|
-
one_of('2','3','5','6','8','9') >> split(3,
|
629
|
+
match(/^(4\d|50)\d+$/) >> split(3,2,0..2) | # Mobile
|
630
|
+
one_of('2','3','5','6','8','9') >> split(3,2..4) | # Short NDCs
|
630
631
|
fixed(2) >> split(3,3) # 2-digit NDCs
|
631
632
|
|
632
633
|
# Bulgaria
|
@@ -62,6 +62,15 @@ describe 'plausibility' do
|
|
62
62
|
it_is_correct_for 'Falkland Islands (Malvinas)', :samples => '+500 28494'
|
63
63
|
it_is_correct_for 'Faroe Islands', :samples => '+298 969 597'
|
64
64
|
it_is_correct_for 'Fiji (Republic of)', :samples => '+679 998 2441'
|
65
|
+
it 'is correct for Finland' do
|
66
|
+
Phony.plausible?('+358 50 123 45').should be_true
|
67
|
+
Phony.plausible?('+358 50 123 45 6').should be_true
|
68
|
+
Phony.plausible?('+358 50 123 45 67').should be_true
|
69
|
+
Phony.plausible?('+358 9 123 45').should be_true
|
70
|
+
Phony.plausible?('+358 9 123 456').should be_true
|
71
|
+
Phony.plausible?('+358 9 123 4567').should be_true
|
72
|
+
Phony.plausible?('+358 20 1470 740').should be_true
|
73
|
+
end
|
65
74
|
it_is_correct_for 'French Guiana (French Department of)', :samples => '+594 594 123 456'
|
66
75
|
it_is_correct_for "French Polynesia (Territoire français d'outre-mer)", :samples => '+689 87 27 84 00'
|
67
76
|
it_is_correct_for 'Gabonese Republic', :samples => '+241 1 627 739'
|
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.14.
|
4
|
+
version: 2.14.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Hanke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-18 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
|