phony 2.4.1 → 2.4.2
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/malaysia.rb +1 -1
- data/spec/functional/plausibility_spec.rb +1 -1
- data/spec/lib/phony/countries_spec.rb +1 -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
|
+
ZTMzYjYxODI1Y2EwNzY2YTlmZjExNDc5NTA0MGQ2ZTcwZDUxY2I2Zg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
YzgwZjBiZjBmNTE0YTVkMzIzNGM4NzMzMDdkMzg3NTdmZWYwM2FkYQ==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NDlkZjYzYjVkMTJjZGQ3NWIwMWI3Yjg3MDAwNmQ0NDI4N2Y4ZmUxOTk0Njk2
|
10
|
+
M2QyYzg4NTNhNzRmMWI2MzA3NmRkNzE5OWNiZGUxNGY5ZTQ2YmMwODc1MGNm
|
11
|
+
ZDc4YTYxMDY2ZDlmODRkNzVkZmNjMmZmNGE1NjE2NDdjZTE1YTM=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
M2VlZTc0N2FjNjU1NWM1NjQ4ZjhiMmRmODQzN2RlNjFjNDczMDY1MjYxMGYz
|
14
|
+
NGZlNTVhZjE0MzFhNDg3ZmYzZjI1Y2E5NWM5OTc0NjJjMDFiZjQ3YTZlZTE4
|
15
|
+
OTA1YmQ1NzQzNWZkY2E4YTdhZDYyMDIwMjRkMGMzMmE2ZDU0ZTg=
|
@@ -18,7 +18,7 @@ freephone = %w{ 300 700 800 }
|
|
18
18
|
Phony.define do
|
19
19
|
country '60', one_of(freephone) >> split(2,4) | # Freephone, Tollfree, Forwarding
|
20
20
|
# one_of(service) >> none | # Service
|
21
|
-
one_of(mobile) >> split(3,4) | # Mobile
|
21
|
+
one_of(mobile) >> split(3,4..5) | # Mobile
|
22
22
|
one_of(ndcs) >> split(8) | # 1-digit NDCs
|
23
23
|
fixed(2) >> split(8) # 2-digit NDCs (Also, fallback)
|
24
24
|
end
|
@@ -375,7 +375,7 @@ describe 'plausibility' do
|
|
375
375
|
|
376
376
|
it 'is correct for Malaysia' do
|
377
377
|
Phony.plausible?('+60 14 123 1234').should be_true
|
378
|
-
Phony.plausible?('+60
|
378
|
+
Phony.plausible?('+60 11 123 12345').should be_true
|
379
379
|
Phony.plausible?('+60 14 1234 12').should be_false # too short
|
380
380
|
Phony.plausible?('+60 14 1234 12345').should be_false # too long
|
381
381
|
end
|
@@ -400,6 +400,7 @@ describe 'country descriptions' do
|
|
400
400
|
it_splits '60312345678', ['60', '3', '12345678'] # Kuala Lumpur
|
401
401
|
it_splits '60212345678', ['60', '2', '12345678'] # Singapore
|
402
402
|
it_splits '60111231234', ['60', '11', '123', '1234'] # Mobile
|
403
|
+
it_splits '601112312345', ['60', '11', '123', '12345'] # Mobile
|
403
404
|
it_splits '60800121234', ['60', '800', '12', '1234'] # Freephone
|
404
405
|
# it_splits '60112', ['60', '112'] # Service
|
405
406
|
end
|
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.4.
|
4
|
+
version: 2.4.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: 2014-09-
|
11
|
+
date: 2014-09-29 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
|
@@ -60,6 +57,7 @@ files:
|
|
60
57
|
- lib/phony/countries/uruguay.rb
|
61
58
|
- lib/phony/countries/vietnam.rb
|
62
59
|
- lib/phony/countries/zimbabwe.rb
|
60
|
+
- lib/phony/countries.rb
|
63
61
|
- lib/phony/country.rb
|
64
62
|
- lib/phony/country_codes.rb
|
65
63
|
- lib/phony/dsl.rb
|
@@ -74,6 +72,8 @@ files:
|
|
74
72
|
- lib/phony/national_splitters/variable.rb
|
75
73
|
- lib/phony/trunk_code.rb
|
76
74
|
- lib/phony/vanity.rb
|
75
|
+
- lib/phony.rb
|
76
|
+
- README.textile
|
77
77
|
- spec/functional/error_spec.rb
|
78
78
|
- spec/functional/normalize_spec.rb
|
79
79
|
- spec/functional/plausibility_spec.rb
|
@@ -100,17 +100,17 @@ require_paths:
|
|
100
100
|
- lib
|
101
101
|
required_ruby_version: !ruby/object:Gem::Requirement
|
102
102
|
requirements:
|
103
|
-
- -
|
103
|
+
- - ! '>='
|
104
104
|
- !ruby/object:Gem::Version
|
105
105
|
version: '0'
|
106
106
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ! '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
requirements: []
|
112
112
|
rubyforge_project:
|
113
|
-
rubygems_version: 2.
|
113
|
+
rubygems_version: 2.0.3
|
114
114
|
signing_key:
|
115
115
|
specification_version: 4
|
116
116
|
summary: Fast international phone number (E164 standard) normalizing, splitting and
|