phony 2.12.7 → 2.12.8

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: dfff70fbf021c9a1ba0413d60f75aacdb2e10dd1
4
- data.tar.gz: 6724549cc4a17fb3130d9b9dadb2ede2ee35448c
3
+ metadata.gz: 4fa0e706a618d0a9b1a60f0256ad496743c52235
4
+ data.tar.gz: a483882673bc99b4d88b82ffadad0cc7465557b7
5
5
  SHA512:
6
- metadata.gz: eea1e237c7179a3609f79304dbd549040315e1e205846dca9395b997f4fa382492dc31edd28264bcb49f28a30ea135d1435c75d0763100aa7a92756f9608f94f
7
- data.tar.gz: b632de491b41e4558976b6e5f8ed8a2fb17c7dffee542c08952d873fbc80402df480e6d6f33c84b784aa7eebada55850077cffe128c095e93d4789e66b82ba6c
6
+ metadata.gz: fda7a75e5097c61a0df6a60fc254be719e0f2157dbd57c3ce45d96972fd13835773ba2b79e2a52f073a01bd81e4196ae3c8a4b607fe98144f621d615841ac585
7
+ data.tar.gz: ed85fd7b00cd8a7ae12185e272fb483380ece8e52fc32f7c6a7e6432973f0df94e75bafde1d6533cc3546a8e19ff218db332a0bb0ad8a45c4d4f68da7a92ec4c
@@ -264,7 +264,7 @@ service = [ # Not exhaustive.
264
264
  ]
265
265
 
266
266
  Phony.define do
267
- country '39', trunk('0', :normalize => false) |
267
+ country '39', trunk('', :normalize => false) |
268
268
  one_of(*service) >> split(3,3) |
269
269
  one_of(*mobile) >> split(3,4,-1..1) |
270
270
  one_of(*ndcs_2digit) >> split(4,4) |
@@ -118,6 +118,10 @@ describe 'Phony#format' do
118
118
  it 'formats french numbers' do
119
119
  Phony.format('33142278186', :format => :+, :spaces => '').should eql '+33142278186'
120
120
  end
121
+ it 'formats italian numbers' do
122
+ Phony.format('393333337647', :format => :international).should eql '+39 333 333 7647'
123
+ Phony.format('390108480161', :format => :international).should eql '+39 010 8480161'
124
+ end
121
125
  it 'formats austrian numbers' do
122
126
  Phony.format('43198110', :format => :international_relative, :spaces => '').should eql '0043198110'
123
127
  end
@@ -164,6 +168,10 @@ describe 'Phony#format' do
164
168
  end
165
169
  end
166
170
  describe 'national' do
171
+ it 'formats italian numbers' do
172
+ Phony.format('393333337647', :format => :national).should eql '333 333 7647'
173
+ Phony.format('390108480161', :format => :national).should eql '010 8480161'
174
+ end
167
175
  it 'formats swiss numbers' do
168
176
  Phony.format('41443643532', :format => :national).should eql '044 364 35 32'
169
177
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phony
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.12.7
4
+ version: 2.12.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Hanke