phony 2.15.33 → 2.15.34

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: c93d7b46407fd3b8c6f84bde8d87e497d3d789b5
4
- data.tar.gz: 3400bc70848d157c94b1b5dd2461d4b8d53a73cc
3
+ metadata.gz: 2cfea1b2c896c11f99eaf4d577489d7b78bc80e2
4
+ data.tar.gz: c48fb044665be985ee8780bc427e0f6eb36c7b26
5
5
  SHA512:
6
- metadata.gz: b1c2938525bb61b16e5b3c9c73964712fd8c04caaf0410f8bc6cd88da126fa912824d4bbbded842e3d29aa81fda4a512865ac3260b6ee4ff434e9b99959293c2
7
- data.tar.gz: 1aeb1e817f70ce46bc0543a0b23d0644e6e962b5edd85f4faf567729189e9e5a8faf4f956aa82de217f32b10d9aa904bea755612c6b2c870a92020d24298a6d1
6
+ metadata.gz: d7450503afab6cf778a54a50d229860905ac4763a5376a52e6540016ce75301d129986ef6820adef35123d4319a3a7423aa34fce6ba74c348e2c9c34c25206c7
7
+ data.tar.gz: df109cf1ea2f6cd083aa589a8ae8ffe2362968af67583a93c06e842bc7d4f668e3a53227a342e3b532edfc173e3768a28eb55201bce2372396d2514907124e5f
@@ -87,7 +87,7 @@
87
87
  # 98 #Maranhão
88
88
  # 99 #Maranhão
89
89
 
90
- ndcs = /(11|12|13|14|15|16|17|18|19|21|22|24|27|28|31|32|33|34|35|36|37|38|41|42|43|44|45|46|47|48|49|51|52|53|54|55|61|62|63|64|65|66|67|68|69|71|72|73|74|75|77|78|79|81|82|83|84|85|86|87|88|89|91|92|93|94|95|96|97|98|99)\d{8}/
90
+ ndcs = "(11|12|13|14|15|16|17|18|19|21|22|24|27|28|31|32|33|34|35|36|37|38|41|42|43|44|45|46|47|48|49|51|52|53|54|55|61|62|63|64|65|66|67|68|69|71|72|73|74|75|77|78|79|81|82|83|84|85|86|87|88|89|91|92|93|94|95|96|97|98|99)"
91
91
 
92
92
  service = %w{ 100 128 190 191 192 193 194 197 198 199 } # State specific numbers were not added. See http://www.brasil.gov.br/navegue_por/aplicativos/agenda
93
93
 
@@ -96,8 +96,8 @@ special_numbers_4 = %w{ 3003 4003 4004 4020 }
96
96
 
97
97
  Phony.define do
98
98
  country '55',
99
- match(/^(11|12|13|14|15|16|17|18|19|21|22|24|27|28|31|32|33|34|35|37|38|61|62|63|64|65|66|67|68|69|71|73|74|75|77|79|81|82|83|84|85|86|87|88|89|91|92|93|94|95|96|97|98|99)9\d{8}$/) >> split(5,4) |
100
- match(ndcs) >> split(4,4) |
99
+ match(/^#{ndcs}9\d{8}$/) >> split(5,4) |
100
+ match(/^#{ndcs}\d{8}$/) >> split(4,4) |
101
101
  one_of(special_numbers_3_4) >> split(3,4) |
102
102
  one_of(special_numbers_4) >> split(4) |
103
103
  one_of(service) >> split(3) |
@@ -142,8 +142,10 @@ describe 'country descriptions' do
142
142
  it_splits '5531991311234', ['55', '31', '99131', '1234'] # Belo Horizonte's 9th digit
143
143
  it_splits '5571991311234', ['55', '71', '99131', '1234'] # Salvador's 9th digit
144
144
  it_splits '5579991311234', ['55', '79', '99131', '1234'] # Sergipe's 9th digit
145
+ it_splits '5547991311234', ['55', '47', '99131', '1234'] # Santa Catarina's 9th digit
146
+ it_splits '5541991311234', ['55', '41', '99131', '1234'] # Parana's 9th digit
145
147
 
146
- context 'special states with 9 in mobile' do
148
+ context 'mobile numbers' do
147
149
  %w{
148
150
  11 12 13 14 15 16 17 18 19
149
151
  21 22 24 27 28
@@ -152,6 +154,9 @@ describe 'country descriptions' do
152
154
  71 73 74 75 77 79
153
155
  81 82 83 84 85 86 87 88 89
154
156
  91 92 93 94 95 96 97 98 99
157
+ 41 42 43 44 45 46
158
+ 47 48 49
159
+ 51 53 54 55
155
160
  }.each do |state_code|
156
161
  it_splits "55#{state_code}993051123", ['55', state_code, '99305', '1123']
157
162
  end
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.33
4
+ version: 2.15.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Hanke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-21 00:00:00.000000000 Z
11
+ date: 2016-11-11 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