phony 2.12.13 → 2.12.14
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 +4 -4
- data/lib/phony/countries.rb +2 -2
- data/spec/lib/phony/countries_spec.rb +4 -4
- 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: 143ff12241c9fcb474766cc5f9a3d283b021bf83
|
4
|
+
data.tar.gz: e630fcd79e29b65ae18e3f8dce3d9e982100de1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 593fd0b05780350428a7080d2a2f1cb0bff339f4f565a66ccd451a6a7238ba8c094ce864947b4bee4a1f59f7b972bd1e5ec11204af8b2cec1f8da05dc98d420b
|
7
|
+
data.tar.gz: 64c49a926c21d00741428206fa91d15cbd90d435afcb885120e8d42351153b179ff18a361c583a2d36dc2af0d6d3c0b1a77c547ecf469ad87ad7a60393f59ee3
|
data/lib/phony/countries.rb
CHANGED
@@ -95,8 +95,8 @@ Phony.define do
|
|
95
95
|
#
|
96
96
|
country '32', trunk('0') |
|
97
97
|
match(/^(70|800|90\d)\d+$/) >> split(3,3) | # Service
|
98
|
-
match(/^(468)\d{6}$/) >> split(
|
99
|
-
match(/^(4[789]\d)\d{6}$/) >> split(
|
98
|
+
match(/^(468)\d{6}$/) >> split(2,2,2) | # Mobile (Telenet)
|
99
|
+
match(/^(4[789]\d)\d{6}$/) >> split(2,2,2) | # Mobile
|
100
100
|
one_of('2','3','4','9') >> split(3,2,2) | # Short NDCs
|
101
101
|
fixed(2) >> split(2,2,2) # 2-digit NDCs
|
102
102
|
|
@@ -85,14 +85,14 @@ describe 'country descriptions' do
|
|
85
85
|
|
86
86
|
describe 'Belgium' do
|
87
87
|
it_splits '3235551212', ['32', '3', '555', '12', '12'] # Antwerpen
|
88
|
-
it_splits '3250551212', ['32', '50', '55', '12', '12']
|
88
|
+
it_splits '3250551212', ['32', '50', '55', '12', '12'] # Brugge
|
89
89
|
it_splits '3225551212', ['32', '2', '555', '12', '12'] # Brussels
|
90
90
|
it_splits '3295551914', ['32', '9', '555', '19', '14'] # Gent
|
91
91
|
it_splits '3245551414', ['32', '4', '555', '14', '14'] # Liège
|
92
92
|
it_splits '3216473200', ['32', '16', '47', '32', '00'] # Leuven
|
93
|
-
it_splits '32475279584', ['32', '475', '
|
94
|
-
it_splits '32468279584', ['32', '468', '
|
95
|
-
it_splits '3270123123', ['32', '70', '123', '123']
|
93
|
+
it_splits '32475279584', ['32', '475', '27', '95', '84'] # mobile
|
94
|
+
it_splits '32468279584', ['32', '468', '27', '95', '84'] # mobile (Telenet)
|
95
|
+
it_splits '3270123123', ['32', '70', '123', '123'] # Bus Service?
|
96
96
|
end
|
97
97
|
|
98
98
|
describe 'Belize' 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.12.
|
4
|
+
version: 2.12.14
|
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-
|
11
|
+
date: 2015-05-09 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
|