phony 2.18.8 → 2.18.9

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,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 52ba5d1bdf3df3934d02b98d0e9cc4cfceb98b40aa1d42b128e6c67aadbe60bd
4
- data.tar.gz: 51e53daf31b85be5d8a403a9e97e019d5b38b76441da664b87704a1046ef5b4b
3
+ metadata.gz: 062a3448529e9cd54a3b989ab0522ee2035821af37c7b194a1b3167bdb8f1693
4
+ data.tar.gz: 6f2b104415be34d29daf0569326a5a7480c6e44f243533e5e0ed51dbe554c699
5
5
  SHA512:
6
- metadata.gz: fff3dc566134933103392fc1f00402d0aa45422cea6e957adb302aca8a01e2a56024257370facc96c23c587ac653b2931259d877c08a659a3aa0a8a90bac56de
7
- data.tar.gz: 79ca7f07001002ec9303a9df0b21c49fd1cd3b67394c6aaa602b0f6c3bd5e5ad48292e5ccc462e7de9b789aa759d7e5b44496783442dba74b9a805523a45100e
6
+ metadata.gz: c1e05a38ac40ddf8b69792071ceaf62fe90a66f79ee0ba6992f6022a4ab88ff5d33d33fa9276612e135231f3554f01eb83f551b5c163e7e2f0faf8e0a52417d0
7
+ data.tar.gz: d2f5667fd4d32a6bd33961eca81928c2140a5383837f4a027203cad67afa34107560ea80291f35fee06fce9a43417f8e4272cc08b436eed6d5036c9f0aa18769
@@ -731,11 +731,12 @@ Phony.define do
731
731
  # Monaco
732
732
  #
733
733
  country '377',
734
- one_of('6') >> split(2,2,2,2) | # mobile
734
+ one_of('6') >> split(2,2,2,2) | # mobile
735
735
  fixed(2) >> split(2,2,2)
736
736
 
737
737
  # San Marino
738
738
  country '378',
739
+ trunk('', :normalize => false) |
739
740
  none >> matched_split(
740
741
  /\A\d{6}\z/ => [3,3],
741
742
  /\A\d+\z/ => [3,3,4]
@@ -23,7 +23,7 @@ describe Phony::Country do
23
23
  end
24
24
 
25
25
  context 'regression' do
26
- describe 'iceland' do
26
+ describe 'Iceland' do
27
27
  let(:country) do
28
28
  national_splitter = Phony::NationalSplitters::None.instance_for
29
29
  local_splitter = Phony::LocalSplitters::Fixed.instance_for [3, 4]
@@ -35,6 +35,14 @@ describe Phony::Country do
35
35
  country.split('112').should == [nil, false, '112']
36
36
  end
37
37
  end
38
+ describe 'San Marino' do
39
+ it 'normalizes correctly' do
40
+ Phony.normalize('+3780549903549').should == '3780549903549'
41
+ end
42
+ xit 'automatically adds the sole NC' do
43
+ Phony.normalize('+378903549').should == '3780549903549'
44
+ end
45
+ end
38
46
  end
39
47
 
40
48
  context "without special cases (with switzerland)" 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.18.8
4
+ version: 2.18.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Hanke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-11 00:00:00.000000000 Z
11
+ date: 2019-11-09 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
@@ -114,8 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  - !ruby/object:Gem::Version
115
115
  version: '0'
116
116
  requirements: []
117
- rubyforge_project:
118
- rubygems_version: 2.7.6
117
+ rubygems_version: 3.0.3
119
118
  signing_key:
120
119
  specification_version: 4
121
120
  summary: Fast international phone number (E164 standard) normalizing, splitting and