phony 2.14.15 → 2.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/phony/countries/belarus.rb +1 -1
- data/lib/phony/trunk_code.rb +7 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5773702ad69699c8cefd3a0001d444b341f44582
|
4
|
+
data.tar.gz: e9550ac45100b93cb5ea04e328f0e7d1b6b45916
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 809eec8aa6c21b477bca405d453303fd3ddb5b32960253c092d0fa107a47ad742b9326a518dab360a04aa50afb1b12c6cd95a7c26f3d2d6acdc4d9f36f4bdf9b
|
7
|
+
data.tar.gz: 55ba7177b59174f902c988ceccd54db3df53c840a325ea6ed0e25dee9464e366ac62adfa7b3d01b35f4c02cdd1daab54ff4502408d5cf757cd2e9c1fea1e3533
|
@@ -114,7 +114,7 @@ ndcs_with_7_subscriber_digits = %w(17 25 29 33 44)
|
|
114
114
|
|
115
115
|
Phony.define do
|
116
116
|
country '375',
|
117
|
-
trunk('
|
117
|
+
trunk('80?') |
|
118
118
|
one_of(ndcs_with_5_subscriber_digits) >> split(5) |
|
119
119
|
one_of(ndcs_with_6_subscriber_digits) >> split(6) |
|
120
120
|
one_of(ndcs_with_7_subscriber_digits) >> split(7) |
|
data/lib/phony/trunk_code.rb
CHANGED
@@ -42,7 +42,13 @@ module Phony
|
|
42
42
|
# Format the trunk code using the spaces given.
|
43
43
|
#
|
44
44
|
def format space, force = nil
|
45
|
-
|
45
|
+
if force || @format
|
46
|
+
if @code.size > 1
|
47
|
+
(@code % space).gsub(/\D/, ' ')
|
48
|
+
else
|
49
|
+
@code
|
50
|
+
end
|
51
|
+
end
|
46
52
|
end
|
47
53
|
|
48
54
|
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.
|
4
|
+
version: 2.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Hanke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-05 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
|