phony 2.11.0 → 2.11.1
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 +2 -1
- data/spec/functional/plausibility_spec.rb +2 -1
- data/spec/lib/phony/countries_spec.rb +1 -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: 233732f4d1bf6ce31b1b1898b2992f1d3b9f4ecf
|
4
|
+
data.tar.gz: 7b168117a199172b6f4a1deda2aec9eecd7f8c5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecfcfb419063cf705ca34c6e52cece232e2b6bcb5c9309fa682358d6899dbe04ab1e6dc3ad357b1e1051875fd5cf21e4d13864f6731d6045fa198a73208e59a7
|
7
|
+
data.tar.gz: 61895d573728dc7af4a9f621a7e70c2551f38b462cec9f98cc3f0ed20824275786a909340d84ac79c6f5f5bcb5e7d525cb6ebeafaa2be17984e459c401ea5304
|
data/lib/phony/countries.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
1
2
|
# All countries, ordered by country code.
|
2
3
|
#
|
3
4
|
# Definitions are in the format:
|
@@ -249,7 +250,7 @@ Phony.define do
|
|
249
250
|
#
|
250
251
|
country '66',
|
251
252
|
trunk('0') |
|
252
|
-
match(/\A(
|
253
|
+
match(/\A([89]\d\d)\d+\z/) >> split(3,3) | # mobile
|
253
254
|
one_of('2') >> split(3,4) | # Bangkok
|
254
255
|
fixed(2) >> split(3,3) # Rest
|
255
256
|
|
@@ -840,7 +840,8 @@ describe 'plausibility' do
|
|
840
840
|
'+992 474 456 123']
|
841
841
|
it_is_correct_for 'Thailand', :samples => ['+6621231234',
|
842
842
|
'+6636123123',
|
843
|
-
'+66851234567'
|
843
|
+
'+66851234567',
|
844
|
+
'+66921234567']
|
844
845
|
it_is_correct_for 'Togolese Republic', :samples => '+228 1234 5678'
|
845
846
|
it_is_correct_for 'Tokelau', :samples => '+690 3 291'
|
846
847
|
it_is_correct_for 'Tonga (Kingdom of)', :samples => ['+676 20 123',
|
@@ -568,6 +568,7 @@ describe 'country descriptions' do
|
|
568
568
|
it_splits '6621231234', ['66', '2', '123', '1234'] # Bangkok
|
569
569
|
it_splits '6636123123', ['66', '36', '123', '123'] # Lop Buri
|
570
570
|
it_splits '66851234567', ['66', '851', '234', '567'] # Lop Buri
|
571
|
+
it_splits '66921234567', ['66', '921', '234', '567'] # mobile
|
571
572
|
end
|
572
573
|
describe 'Tunesia' do
|
573
574
|
it_splits '21611231234', ['216', '1', '123', '1234'] # Ariana
|
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.11.
|
4
|
+
version: 2.11.1
|
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-02-
|
11
|
+
date: 2015-02-27 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
|