phony 1.1.9 → 1.2.0
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.
- data/lib/phony.rb +0 -8
- data/lib/phony/country_codes.rb +6 -4
- metadata +5 -5
data/lib/phony.rb
CHANGED
data/lib/phony/country_codes.rb
CHANGED
@@ -26,14 +26,16 @@ module Phony
|
|
26
26
|
def format_cc_ndc_local format, space, cc, ndc, *parts
|
27
27
|
"#{format_cc_ndc(format, space, cc, ndc)}#{format_local(space, parts)}"
|
28
28
|
end
|
29
|
-
|
29
|
+
# TODO = '' needed? Specs say no.
|
30
|
+
#
|
31
|
+
def format_cc_ndc format, space, cc, ndc = ''
|
30
32
|
format, split_phone_number = case format
|
31
33
|
when nil, :international_absolute, :international, :+
|
32
|
-
[ndc.
|
34
|
+
[ndc.empty? ? '+%s%s' : '+%s%s%s%s', [cc, space, ndc, space]]
|
33
35
|
when :international_relative
|
34
|
-
[ndc.
|
36
|
+
[ndc.empty? ? '00%s%s' : '00%s%s%s%s', [cc, space, ndc, space]]
|
35
37
|
when :national
|
36
|
-
[ndc.
|
38
|
+
[ndc.empty? ? '' : '0%s%s', [ndc, space]]
|
37
39
|
when :local
|
38
40
|
['', []]
|
39
41
|
end
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 1
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 1.
|
7
|
+
- 2
|
8
|
+
- 0
|
9
|
+
version: 1.2.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Florian Hanke
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date:
|
17
|
+
date: 2011-01-01 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|
@@ -62,7 +62,7 @@ files:
|
|
62
62
|
- spec/lib/phony/national_splitters/variable_spec.rb
|
63
63
|
- spec/lib/phony/vanity_spec.rb
|
64
64
|
- spec/lib/phony_spec.rb
|
65
|
-
has_rdoc:
|
65
|
+
has_rdoc: true
|
66
66
|
homepage: http://github.com/floere/phony
|
67
67
|
licenses: []
|
68
68
|
|