phonelib 0.8.1 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6788d5bcd52e5f525a0405906a60ccb2a8443c0303905344ca37557d5765f51a
4
- data.tar.gz: 22d467bb889ce0e4fcde42cf82d2e9c6a0f5466e923a8acc8416ac805d53c876
3
+ metadata.gz: 8eb5cd500f5cce3041305c589776fd4d87b051faa4df73d5618afef24bd43666
4
+ data.tar.gz: 9eb37b441cac9cc645aa23a4e9e13ae7b38d0dea7ecb6a1996bb277042b10487
5
5
  SHA512:
6
- metadata.gz: 53bfc909baa588bad634aa4ba0a43416471fe372936613f50ddb07a84b961f4ddc69ebec7e0288b526060cef5b350f2d5780fa1d4ae26def0399fe0c2f968973
7
- data.tar.gz: 9671de06ef3f2d6c34284ca988b132098c177627babeee6c40bf8305b4639250f2afb5d3f494f35deac4b3a363437bac35525913490914bd57f15a395a3a88a2
6
+ metadata.gz: c9faebfcc45bf3c91301246b2a6287022fdc4caf4562edd6e205189c16987025f338709fde5c6904af9509dd6d41030e3ec09b4680ccc84378d5fb79d87636ff
7
+ data.tar.gz: fb22853ef3b910fa4f9c6e85aed7156e32a4248e60408b8e4b50a968814f1c4eb61f3ca7b99657bd2aa39c0ebaec5bfd7283c863bd2dcb2bc13b1af9dc3e521a
Binary file
data/data/phone_data.dat CHANGED
Binary file
data/lib/phonelib/core.rb CHANGED
@@ -40,14 +40,14 @@ module Phonelib
40
40
  @@default_country = nil
41
41
 
42
42
  # getter method for default_country variable
43
- # @return [String|nil] Default country set for parsing or nil
43
+ # @return [String,Symbol,Array<String,Symbol>,nil] Default country ISO2 code or codes used for parsing
44
44
  def default_country
45
45
  @@default_country
46
46
  end
47
47
 
48
48
  # setter method for default_country variable
49
- # @param country [String|Symbol] default country ISO2 code used for parsing
50
- # @return [String|nil] Default country set for parsing or nil
49
+ # @param country [String,Symbol,Array<String,Symbol>] Default country ISO2 code or codes used for parsing
50
+ # @return [String,Symbol,Array<String,Symbol>] Default country ISO2 code or codes used for parsing
51
51
  def default_country=(country)
52
52
  @@default_country = country
53
53
  end
@@ -45,6 +45,7 @@ module Phonelib
45
45
  'TA' => 'SH',
46
46
  'TC' => 'US',
47
47
  'TT' => 'US',
48
+ 'UM' => 'US',
48
49
  'VA' => 'IT',
49
50
  'VC' => 'US',
50
51
  'VG' => 'US',
@@ -160,6 +161,7 @@ module Phonelib
160
161
  # some countries missing formats, and are linking them to another countries
161
162
  def process_format_links
162
163
  FORMAT_SHARING.each do |destination, source|
164
+ next unless @data[destination]
163
165
  @data[destination][:formats] ||= []
164
166
  @data[destination][:formats] = @data[destination][:formats] + @data[source][:formats]
165
167
  end
@@ -1,4 +1,4 @@
1
1
  module Phonelib
2
2
  # @private
3
- VERSION = '0.8.1'
3
+ VERSION = '0.8.3'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phonelib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vadim Senderovich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-11 00:00:00.000000000 Z
11
+ date: 2023-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -197,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
197
197
  - !ruby/object:Gem::Version
198
198
  version: '0'
199
199
  requirements: []
200
- rubygems_version: 3.0.8
200
+ rubygems_version: 3.0.9
201
201
  signing_key:
202
202
  specification_version: 4
203
203
  summary: Gem validates phone numbers with Google libphonenumber database