phony 2.15.7 → 2.15.8
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 +5 -1
- data/spec/functional/plausibility_spec.rb +3 -0
- data/spec/lib/phony/countries_spec.rb +7 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee76321853eca12d88755e3880d84945f876b6f7
|
4
|
+
data.tar.gz: 86738587dbd54bd9ffd296d2035a97e38d8c470d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1d2689b3724c36e4e47b80f7a2428edb07fb839a61a12ea24ce0a6982c327fd1efa15e17fa1073594e8da2bbf65cfbea70e0e326a86af30bc4ba70d6f671e5d
|
7
|
+
data.tar.gz: 187b822cfb0ad642d5333b680273b2f4c0a33fd24617261f7dcddcd8b7d8e7b21e3e1b58f48b37dd4fb64746092308f8f655fd92a7c6c035e7147defcb8161d9
|
data/lib/phony/countries.rb
CHANGED
@@ -707,7 +707,11 @@ Phony.define do
|
|
707
707
|
|
708
708
|
country '387', trunk('0') | fixed(2) >> split(3,2,2) # Bosnia and Herzegovina
|
709
709
|
country '388', trunk('0') | fixed(2) >> split(3,2,2) # Group of countries, shared code
|
710
|
-
|
710
|
+
|
711
|
+
# The Former Yugoslav Republic of Macedonia
|
712
|
+
country '389',
|
713
|
+
trunk('0') |
|
714
|
+
one_of('2','3','4','5','6','7','8') >> split(3,4)
|
711
715
|
|
712
716
|
country '420', fixed(3) >> split(3,3) # Czech Republic
|
713
717
|
|
@@ -134,6 +134,9 @@ describe 'plausibility' do
|
|
134
134
|
Phony.plausible?('+231 4 123 456').should be_true
|
135
135
|
Phony.plausible?('+231 77 123 4567').should be_true
|
136
136
|
end
|
137
|
+
it_is_correct_for 'Macedonia', :samples => ['+389 2 123 4567',
|
138
|
+
'+389 7 124 3456',
|
139
|
+
'+389 7 234 5678']
|
137
140
|
it_is_correct_for 'Madagascar', :samples => ['+261 20 012 345 678',
|
138
141
|
'+261 20 124 3456',
|
139
142
|
'+261 512 345 678']
|
@@ -423,6 +423,13 @@ describe 'country descriptions' do
|
|
423
423
|
it_splits '352370431', ['352', '37', '04', '31']
|
424
424
|
it_splits '35227855', ['352', '27', '85', '5']
|
425
425
|
end
|
426
|
+
describe 'Macedonia' do
|
427
|
+
it_splits '38921234567', ['389', '2', '123', '4567'] # Skopje
|
428
|
+
it_splits '38931234567', ['389', '3', '123', '4567'] # Eastern Macedonia
|
429
|
+
it_splits '38941234567', ['389', '4', '123', '4567'] # Western Macedonia
|
430
|
+
it_splits '38951234567', ['389', '5', '123', '4567'] # Premium
|
431
|
+
it_splits '38971234567', ['389', '7', '123', '4567'] # Mobile
|
432
|
+
end
|
426
433
|
describe 'Malaysia' do
|
427
434
|
it_splits '6082123456', ['60', '82', '123456'] # Kuching
|
428
435
|
it_splits '60312345678', ['60', '3', '12345678'] # Kuala Lumpur
|
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.15.
|
4
|
+
version: 2.15.8
|
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-11-04 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
|
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
111
|
rubyforge_project:
|
112
|
-
rubygems_version: 2.
|
112
|
+
rubygems_version: 2.5.0
|
113
113
|
signing_key:
|
114
114
|
specification_version: 4
|
115
115
|
summary: Fast international phone number (E164 standard) normalizing, splitting and
|