phony 2.1.3 → 2.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +14 -6
- data/lib/phony/countries/netherlands.rb +6 -2
- data/spec/functional/plausibility_spec.rb +4 -0
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MWEzOThmOTg4NjE5ODMzYzI1Zjg5NWJhYmNkMzY2MjIwMzc5NDkxMQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MzBmODNjNmUxNmQ3ZWUxYjJjYTQ2N2FmMGVkZWEyZTlkYjI5ZGFhMA==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NGZiMDE5NWY0YmNiZDRiYWYxMDNjMTU3ZGEyYWViYTRkNmI1ZmFmODRjODgx
|
10
|
+
MWIwN2M1OTBlY2E1MmU0ZWM1ZTVhZDgxODczNDZjY2IwMTU2YzFkODg3NWUz
|
11
|
+
ZjAxNGJlODg2OWNkNjk2YWVkNDhiOTU4MTQ1ODE3MzQ2MjZjNmU=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZmJjOTI5NzNjODU1YmI2YTdiMjU4ZjhiN2JhNzg2OGY3ZDkyZjNiNTNmNmUz
|
14
|
+
Mzg5N2YyMWNhNmRhYTlmNzM5NDBlYWViZDgyMjg2ZDMzODcwNjM5NTZkN2Y5
|
15
|
+
YzE0MDFkMjVkNDYwNzdjNDcwZDlhYTMzMWQ1OTI2ZDFjMzNhZDE=
|
@@ -43,6 +43,9 @@ service = [
|
|
43
43
|
'87', # Both of the above.
|
44
44
|
'88', # Bedrijfsnummers
|
45
45
|
'91', # Plaatsonafhankelijk netnummer
|
46
|
+
]
|
47
|
+
|
48
|
+
service3 = [
|
46
49
|
'676', # Inbelnummers van Internetproviders
|
47
50
|
'800', # Gratis informatienummers
|
48
51
|
'900', # Betaalde informatienummers
|
@@ -52,8 +55,9 @@ service = [
|
|
52
55
|
|
53
56
|
Phony.define do
|
54
57
|
country '31',
|
55
|
-
one_of(service) >> split(
|
58
|
+
one_of(service) >> split(4,3) |
|
59
|
+
one_of(service3) >> split(3,3) |
|
56
60
|
one_of('6') >> split(2,2,2,2) | # mobile
|
57
61
|
one_of(ndcs) >> split(3,4) | # landline (geographic region)
|
58
62
|
fixed(3) >> split(3,3) # 3 digit ndc
|
59
|
-
end
|
63
|
+
end
|
@@ -151,6 +151,10 @@ describe 'plausibility' do
|
|
151
151
|
Phony.plausible?('+31 20 123 567').should be_false
|
152
152
|
Phony.plausible?('+31 221 123 567').should be_true
|
153
153
|
Phony.plausible?('+31 221 123 56').should be_false
|
154
|
+
Phony.plausible?('+31 880 450 245').should be_true
|
155
|
+
Phony.plausible?('+31 880 450 24').should be_false
|
156
|
+
Phony.plausible?('+31 900 001 002').should be_true
|
157
|
+
Phony.plausible?('+31 900 001 00').should be_false
|
154
158
|
end
|
155
159
|
it 'is correct for Nigerian numbers' do
|
156
160
|
Phony.plausible?('+234 807 766 1234').should be_true
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phony
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.4
|
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-
|
11
|
+
date: 2014-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description: 'Fast international phone number (E164 standard) normalizing, splitting
|
13
|
+
description: ! 'Fast international phone number (E164 standard) normalizing, splitting
|
14
14
|
and formatting. Lots of formatting options: International (+.., 00..), national
|
15
15
|
(0..), and local).'
|
16
16
|
email: florian.hanke+phony@gmail.com
|
@@ -19,9 +19,6 @@ extensions: []
|
|
19
19
|
extra_rdoc_files:
|
20
20
|
- README.textile
|
21
21
|
files:
|
22
|
-
- README.textile
|
23
|
-
- lib/phony.rb
|
24
|
-
- lib/phony/countries.rb
|
25
22
|
- lib/phony/countries/austria.rb
|
26
23
|
- lib/phony/countries/bangladesh.rb
|
27
24
|
- lib/phony/countries/belarus.rb
|
@@ -58,6 +55,7 @@ files:
|
|
58
55
|
- lib/phony/countries/united_kingdom.rb
|
59
56
|
- lib/phony/countries/uruguay.rb
|
60
57
|
- lib/phony/countries/zimbabwe.rb
|
58
|
+
- lib/phony/countries.rb
|
61
59
|
- lib/phony/country.rb
|
62
60
|
- lib/phony/country_codes.rb
|
63
61
|
- lib/phony/dsl.rb
|
@@ -72,6 +70,8 @@ files:
|
|
72
70
|
- lib/phony/national_splitters/variable.rb
|
73
71
|
- lib/phony/trunk_code.rb
|
74
72
|
- lib/phony/vanity.rb
|
73
|
+
- lib/phony.rb
|
74
|
+
- README.textile
|
75
75
|
- spec/functional/normalize_spec.rb
|
76
76
|
- spec/functional/plausibility_spec.rb
|
77
77
|
- spec/lib/phony/countries_spec.rb
|
@@ -97,17 +97,17 @@ require_paths:
|
|
97
97
|
- lib
|
98
98
|
required_ruby_version: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
|
-
- -
|
100
|
+
- - ! '>='
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '0'
|
103
103
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
104
104
|
requirements:
|
105
|
-
- -
|
105
|
+
- - ! '>='
|
106
106
|
- !ruby/object:Gem::Version
|
107
107
|
version: '0'
|
108
108
|
requirements: []
|
109
109
|
rubyforge_project:
|
110
|
-
rubygems_version: 2.
|
110
|
+
rubygems_version: 2.0.3
|
111
111
|
signing_key:
|
112
112
|
specification_version: 4
|
113
113
|
summary: Fast international phone number (E164 standard) normalizing, splitting and
|