phony 2.5.0 → 2.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OTY1NzU0ODM4NDg2NDg3MzU3NTFiZDM3MDIxMGIwYzlmMmYwMzgxOQ==
4
+ ZWMxM2MzZDlmZmI3ODE0MGM0YTkyM2YxMDhlZjllMWFmZGVlYjQxOA==
5
5
  data.tar.gz: !binary |-
6
- NWZkYzZjNTM2OTY4MTdlNjQ4Y2UzYzZkNTM2ZjY0ODUyMjdjZjFiNA==
6
+ OTIzOTJkNzZmNjMxYWE0YjI2ZDJjOWNjMjk4MDllMDZkYjg0YWI5Yw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MzkyM2I2MDAwNmQ0ZGMyZTg1MDIzNTM0NjE2ZjYwNjI0YmExNTQ0YzRmYmRk
10
- MWVkMTA4OTdlMDlmYjVhMjJiNDY1N2MyY2QxYWRjZmUyNTY1NDdlNjE1NDMx
11
- NGY4YTVkNzZmZGQ1ODc1ZjE1Mzc1Y2RhNTBlZDlmMmQ4YThmZTg=
9
+ NzEyMTA0MDJlNTVmNGFiYTUzYjU1M2Y1OWNlMGUxYjJiOGFjZTk1NjBhN2Jk
10
+ YmIwNTQ4NDUxNjRkNzMzYmQ0M2JlMDI0NDY4YWIwZmFkNmM3OGY5NTIyNDZk
11
+ MjNkZTFjYjg4ZmU2YTkwOWE4OTYwOWFmOWI0MjI2ZmZlZmFkMzU=
12
12
  data.tar.gz: !binary |-
13
- YjJkMDAzODRlMDk2OWQyOWE0ODI4OGY3ZTYxZWEwZGQwNjU5NTRjNWIzZTMw
14
- NTliYzc2MjFlOTA2NWVmMDA0YjRjZGE5NzgwZThhZDNkMmJkNGExNDljMGFh
15
- MjU3NTE1MGI2MTNlMGQ4YTk5MzcwZDc0MDJlZGEyYjBkNmU5YTg=
13
+ NTJlOTYzNjNjOGIxNzlkMTkzNjA2YjRiZWZlOWVlY2Y1OTNjZmM4NDJlY2Iy
14
+ ZThhYzc3MTExYjQ2YWNlY2I0NzNhOWM5MTZlYmZhZjQxMWUxOWU1MmVkNTMw
15
+ MTM2MDg1NjI2ODMxYWJmNGM5ZTdkNmY2OWUxMzRlMzg2MWJkNDU=
@@ -4079,7 +4079,7 @@ service = [
4079
4079
  #
4080
4080
  Phony.define do
4081
4081
  country '49',
4082
- trunk('0') |
4082
+ trunk('0', normalize: true) |
4083
4083
  one_of(service) >> split(3,0) |
4084
4084
  match(/\A(151[124567]|152[012359]|157[035789]|1590)\d*\z/) >> split(3,4) |
4085
4085
  match(/\A(15\d)\d*\z/) >> split(3,4) |
@@ -16,7 +16,12 @@ describe 'Phony.normalize' do
16
16
  it 'handles the US (without cc) correctly' do
17
17
  Phony.normalize('(310) 555-2121', cc: '1').should == '13105552121'
18
18
  end
19
-
19
+ it 'handles a German number with extra (0)' do
20
+ Phony.normalize('+49 (0) 209 22 33 44 55').should == '4920922334455'
21
+ end
22
+ it 'handles a German number with extra 0' do
23
+ Phony.normalize('+49 0 209 22 33 44 55').should == '4920922334455'
24
+ end
20
25
  end
21
26
 
22
27
  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.5.0
4
+ version: 2.5.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: 2014-09-30 00:00:00.000000000 Z
11
+ date: 2014-10-01 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