phony 2.4.2 → 2.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZTMzYjYxODI1Y2EwNzY2YTlmZjExNDc5NTA0MGQ2ZTcwZDUxY2I2Zg==
4
+ YzAxMjNlYzdlNzVhNjJiN2ExMTFhM2E4MjllN2Y3NThkNjY4NjMxZA==
5
5
  data.tar.gz: !binary |-
6
- YzgwZjBiZjBmNTE0YTVkMzIzNGM4NzMzMDdkMzg3NTdmZWYwM2FkYQ==
6
+ MTViNjMxNTNlY2I1ZTlmZWQ3YWZlNDZmY2JiZDM2NzJmMGUzM2EyYw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NDlkZjYzYjVkMTJjZGQ3NWIwMWI3Yjg3MDAwNmQ0NDI4N2Y4ZmUxOTk0Njk2
10
- M2QyYzg4NTNhNzRmMWI2MzA3NmRkNzE5OWNiZGUxNGY5ZTQ2YmMwODc1MGNm
11
- ZDc4YTYxMDY2ZDlmODRkNzVkZmNjMmZmNGE1NjE2NDdjZTE1YTM=
9
+ ZGE2MDVkYWQ3MTM2MjNkMjYzMjQxYmUzYzIzODc4YTRmODBiNTY1OGRjOWIx
10
+ ZjRiOTIwZjBjZjdmM2I1YzE3YzUyN2EwODMwZDk4N2QwNGU5NDlkNWJiM2Zj
11
+ NTk4NzY0NDgyYjU0N2ExNDg1YTQ5ZDFlZTVlZTQ5NjU3YTQ5MWI=
12
12
  data.tar.gz: !binary |-
13
- M2VlZTc0N2FjNjU1NWM1NjQ4ZjhiMmRmODQzN2RlNjFjNDczMDY1MjYxMGYz
14
- NGZlNTVhZjE0MzFhNDg3ZmYzZjI1Y2E5NWM5OTc0NjJjMDFiZjQ3YTZlZTE4
15
- OTA1YmQ1NzQzNWZkY2E4YTdhZDYyMDIwMjRkMGMzMmE2ZDU0ZTg=
13
+ NDMyNDEyYzQzZDg0ODUwZTAyYjMyN2NlMDkwZGRhZWUzMjg2NTk5NTI4ODky
14
+ NjM1N2I5YmMzMDAyOTI4YThiZDc0ZTAwNTdkNWM1ZjIxYTVjZTA4ZmU2NWZl
15
+ ZDdkMDEyZjgwYWI2ZDBhOGY1MDFkNGViYjFhZjUyYThjNGQ5MDQ=
@@ -54,7 +54,8 @@ service3 = [
54
54
  ]
55
55
 
56
56
  Phony.define do
57
- country '31',
57
+ country '31',
58
+ trunk('0', :normalize => true) |
58
59
  one_of(service) >> split(4,3) |
59
60
  one_of(service3) >> split(4,3) |
60
61
  one_of('6') >> split(2,2,2,2) | # mobile
@@ -260,6 +260,9 @@ describe Phony do
260
260
  it 'should format US numbers with a leading trunk 1' do
261
261
  Phony.format('14159224711', :format => :national).should eql '1415 922 4711'
262
262
  end
263
+ it 'should format Dutch numbers with a trunk code' do
264
+ Phony.format('311012341234', :format => :national).should eql '010 123 41234'
265
+ end
263
266
  end
264
267
  describe 'local' do
265
268
  it 'should format swiss numbers' do
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.4.2
4
+ version: 2.4.3
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-29 00:00:00.000000000 Z
11
+ date: 2014-09-30 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