phony 2.0.1 → 2.0.2
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
|
+
Y2RlOWNmOWMwNDk4YzU1ODgyMmYyMTYzYmQ1MjdlYWU2MzY3MDA5OA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OTc1YjNlM2Y0ZTRhYzFiMjVhZGYzZjEzMDM1NDFmMDVhMjIxYzYzOQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NzQwNjNiYjVmNzMwM2M3YWIxOTU0MTc4MzRiZWMxYWFmYjQ2Y2NkMDdkNTU0
|
10
|
+
N2QyNzIxZGMwZWFiYzNiM2Q5ZDBkMWEwN2U0Y2QxMjY0NjZjZmI2ODc3OGIz
|
11
|
+
NWVkODNkY2NmMDkzOTA2YjA5NzJiZjc2MTYyNTc0NGMzNGZhMGI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Y2VmYmU3MDMzOGNkZGMyNjk2NTgzNjhlMmIzNDBlYWIyMDUzNzNlYzY2NGUz
|
14
|
+
OWJhYTk2ZWQ5Zjk3ODUwYjc0NWRhYTVkYjk2YjlkNjkwY2QwMmJkODViMTli
|
15
|
+
YmJlYTNlMGE4YTA0MWYyYzBlYTA5OGRlMGRlY2I4MmRjMmQ5YTY=
|
@@ -4075,15 +4075,15 @@ service = [
|
|
4075
4075
|
#
|
4076
4076
|
|
4077
4077
|
Phony.define do
|
4078
|
-
country '49',
|
4079
|
-
|
4080
|
-
|
4081
|
-
|
4082
|
-
|
4083
|
-
|
4084
|
-
|
4085
|
-
|
4086
|
-
|
4087
|
-
|
4088
|
-
|
4078
|
+
country '49',
|
4079
|
+
one_of(service) >> split(3,0) |
|
4080
|
+
one_of('176') >> split(3,5) |
|
4081
|
+
one_of('1609') >> split(3,5) |
|
4082
|
+
match(/\A(151[124567]|152[012359]|157[035789]|1590)\d*\z/) >> split(3,4) |
|
4083
|
+
match(/\A(1[57]\d)\d*\z/) >> split(3,4) |
|
4084
|
+
match(/\A(16\d)\d*\z/) >> split(3,5) |
|
4085
|
+
one_of(ndcs2) >> split(3,0..6) |
|
4086
|
+
one_of(ndcs3) >> split(3,0..5) |
|
4087
|
+
one_of(ndcs4) >> split(3,0..4) |
|
4088
|
+
fixed(5) >> split(3,3..3)
|
4089
4089
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
#
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
|
-
describe '
|
5
|
+
describe 'plausibility' do
|
6
6
|
|
7
7
|
describe 'plausible?' do
|
8
8
|
|
@@ -366,6 +366,9 @@ describe 'validations' do
|
|
366
366
|
it_is_correct_for "French Polynesia (Territoire français d'outre-mer)", :samples => '+689 872 784'
|
367
367
|
it_is_correct_for 'Gabonese Republic', :samples => '+241 1 627 739'
|
368
368
|
it_is_correct_for 'Gambia', :samples => '+220 989 5148'
|
369
|
+
it_is_correct_for 'Germany', :samples => [
|
370
|
+
'+4915775368708'
|
371
|
+
]
|
369
372
|
it_is_correct_for 'Georgia', :samples => ['+995 220 123 45',
|
370
373
|
'+995 32 123 4567',
|
371
374
|
'+995 342 123 456',
|
@@ -199,8 +199,9 @@ describe 'country descriptions' do
|
|
199
199
|
it_splits '493434144602', ['49', '34341', '446', '02'] # Geithain
|
200
200
|
it_splits '491805878323', ['49', '180', '587', '8323'] # Service number
|
201
201
|
it_splits '491815878323', ['49', '181', '587', '8323'] # Service number
|
202
|
-
it_splits '
|
203
|
-
it_splits '
|
202
|
+
it_splits '4915111231234', ['49', '1511', '123', '1234'] # Mobile number
|
203
|
+
it_splits '4915211231234', ['49', '1521', '123', '1234'] # Mobile number
|
204
|
+
it_splits '4915771231234', ['49', '1577', '123', '1234'] # Mobile number
|
204
205
|
it_splits '4916312312345', ['49', '163', '123', '12345'] # Mobile number
|
205
206
|
end
|
206
207
|
describe 'Ghana' do
|
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.0.
|
4
|
+
version: 2.0.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: 2013-12-
|
11
|
+
date: 2013-12-16 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
|
@@ -72,6 +72,7 @@ files:
|
|
72
72
|
- lib/phony.rb
|
73
73
|
- README.textile
|
74
74
|
- spec/functional/normalize_spec.rb
|
75
|
+
- spec/functional/plausibility_spec.rb
|
75
76
|
- spec/lib/phony/countries_spec.rb
|
76
77
|
- spec/lib/phony/country_codes_spec.rb
|
77
78
|
- spec/lib/phony/country_spec.rb
|
@@ -83,7 +84,6 @@ files:
|
|
83
84
|
- spec/lib/phony/national_splitters/none_spec.rb
|
84
85
|
- spec/lib/phony/national_splitters/regex_spec.rb
|
85
86
|
- spec/lib/phony/national_splitters/variable_spec.rb
|
86
|
-
- spec/lib/phony/validations_spec.rb
|
87
87
|
- spec/lib/phony/vanity_spec.rb
|
88
88
|
- spec/lib/phony_spec.rb
|
89
89
|
homepage: http://github.com/floere/phony
|
@@ -113,6 +113,7 @@ summary: Fast international phone number (E164 standard) normalizing, splitting
|
|
113
113
|
formatting.
|
114
114
|
test_files:
|
115
115
|
- spec/functional/normalize_spec.rb
|
116
|
+
- spec/functional/plausibility_spec.rb
|
116
117
|
- spec/lib/phony/countries_spec.rb
|
117
118
|
- spec/lib/phony/country_codes_spec.rb
|
118
119
|
- spec/lib/phony/country_spec.rb
|
@@ -124,7 +125,6 @@ test_files:
|
|
124
125
|
- spec/lib/phony/national_splitters/none_spec.rb
|
125
126
|
- spec/lib/phony/national_splitters/regex_spec.rb
|
126
127
|
- spec/lib/phony/national_splitters/variable_spec.rb
|
127
|
-
- spec/lib/phony/validations_spec.rb
|
128
128
|
- spec/lib/phony/vanity_spec.rb
|
129
129
|
- spec/lib/phony_spec.rb
|
130
130
|
has_rdoc: false
|