phony 2.15.43 → 2.15.44

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6224b3a86d75b35405663ba54e9c4a0df59e3dca
4
- data.tar.gz: 4865b3f594f023a6f5200d01aff512516883ceba
3
+ metadata.gz: 1fa108fb584dd17a81f785d16e15dee13d88df92
4
+ data.tar.gz: a34a89f9767d736726e355dae3e0f5e4bd7226fd
5
5
  SHA512:
6
- metadata.gz: 4aa5c624fd7dad4a7542d9983e04204b97f9d5d23e5188c760d08fc1e3678e92b17865e745c5a60cbe7cea84ab36e55e578e19f27bed1c2e36114f7a52787534
7
- data.tar.gz: 66e69794dc94c5457ab7c66d1234e0fb3aecb50e3bed85548b4087f36711fbaee3e543467e7382fa4bf90db8d6914d72ea85a35a5d30fefe6a513ef19fbcfacc
6
+ metadata.gz: 0ebae7268f7c148285f231f447f174fbda78552d3827b0cb8746e27d2f42ebfaca7c72166b4e4b335d2caf66b002ac0ec2e86fcd6f2b7491058959814580969d
7
+ data.tar.gz: 107b5d6e714356813cade294e5d0cd4fa76414119e3b63eb3fdaf2c980cee5c1473df5f84d8fe8708ddc2bbe7cf327f8a8aa48c2c588ae1036afd9efd7822355
@@ -35,7 +35,6 @@ ndcs = [
35
35
  six_digit_mobile_prefixes = [
36
36
  '10', # Smart
37
37
  '11', # Mobitel
38
- '12', # Mobitel
39
38
  '13', # qb
40
39
  '14', # Mobitel
41
40
  '15', # Smart
@@ -80,6 +79,10 @@ seven_digit_mobile_prefixes = [
80
79
  '97', # Metfone
81
80
  ]
82
81
 
82
+ variable_length_extended_range_mobile_prefixes = [
83
+ '12' # Mobitel
84
+ ]
85
+
83
86
  mobile_prefixes_with_variable_length = [
84
87
  '18' # Seatel
85
88
  ]
@@ -122,6 +125,7 @@ seven_digit_total_double_digit_fixed_line_prefixes = [
122
125
  Phony.define do
123
126
  country '855', trunk('0', :normalize => true) |
124
127
  one_of(mobile_prefixes_with_variable_length) >> matched_split(/^9/ => [3, 4], /^[2-8]/ => [3, 3]) |
128
+ one_of(variable_length_extended_range_mobile_prefixes) >> matched_split(/^1/ => [3, 4], /^[2-8]/ => [3, 3]) |
125
129
  one_of(six_digit_mobile_prefixes) >> matched_split(/^[2-9]/ => [3, 3]) |
126
130
  one_of(six_digit_extended_range_mobile_prefixes) >> matched_split(/^[1-9]/ => [3, 3]) |
127
131
  one_of(seven_digit_mobile_prefixes) >> matched_split(/^[2-9]/ => [3, 4]) |
@@ -14,7 +14,7 @@ Phony.define do
14
14
  one_of(%w(642 643 644 648 649)) >> split(2,2) | # Galcom
15
15
  one_of(%w(33 51 52 54 55 56 57 58 59 68 71 76 78 79 88)) >> split(3,2) |
16
16
  match(/\A(67)\d{5}\z/) >> split(3,2) | # Golis Telecom Somalia
17
- match(/\A(63)\d{7}\z/) >> split(3,4) | # Telesom
17
+ match(/\A(63|90|69|65|61)\d{7}\z/) >> split(3,4) | # Telesom, Golis, Nationlink, Somtel, Hormuud
18
18
  one_of(%w(15 40 42 45 46 60 61 90 91)) >> split(3,3) | # mobile Somafone, Hortel
19
19
  one_of(%w(18)) >> split(3,2) | # Hortel
20
20
  one_of(%w(27 28 29 62 63 87)) >> split(2,2) | # Telcom Somalia, Emir Set
@@ -1187,8 +1187,12 @@ describe 'country descriptions' do
1187
1187
  it_splits '2521601234', %w(252 160 12 34)
1188
1188
  it_splits '25250012345', %w(252 500 123 45)
1189
1189
  it_splits '252671234567', %w(252 67 1234 567)
1190
- it_splits '252634000613', %w(252 63 400 0613)
1191
- it_splits '252634423020', %w(252 63 442 3020)
1190
+ it_splits '252634000613', %w(252 63 400 0613) # Telesom
1191
+ it_splits '252634423020', %w(252 63 442 3020) # Telesom
1192
+ it_splits '252902345678', %w(252 90 234 5678) # Golis
1193
+ it_splits '252692345678', %w(252 69 234 5678) # Nationlink
1194
+ it_splits '252652345678', %w(252 65 234 5678) # Somtel
1195
+ it_splits '252612345678', %w(252 61 234 5678) # Hormuud
1192
1196
  end
1193
1197
  describe 'Suriname (Republic of)' do
1194
1198
  it_splits '597958434', ['597', false, '958', '434']
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.43
4
+ version: 2.15.44
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Hanke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-02 00:00:00.000000000 Z
11
+ date: 2017-05-03 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