phonelib 0.8.1 → 0.8.2

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: ba0b6be5c2a7713ded6c8bbc68a5d12d022b75cbc495bbdcd13cace46ee8467a
4
+ data.tar.gz: 6ad47b7928886d2c3222e072a2b2e73566baffe8462fa6a8ee353b9ff7630bca
5
5
  SHA512:
6
- metadata.gz: 53bfc909baa588bad634aa4ba0a43416471fe372936613f50ddb07a84b961f4ddc69ebec7e0288b526060cef5b350f2d5780fa1d4ae26def0399fe0c2f968973
7
- data.tar.gz: 9671de06ef3f2d6c34284ca988b132098c177627babeee6c40bf8305b4639250f2afb5d3f494f35deac4b3a363437bac35525913490914bd57f15a395a3a88a2
6
+ metadata.gz: 9a9dd8cc0c6b18a192575c169ff213e2bcf762d1a93f4ecc07aad89729a3173e03fe31e86e35ed4e583446410933367ef7ae9a6f365b47a55e75dd1c53b0b521
7
+ data.tar.gz: a468f6781963b983e54e367a0ddb99525ae2f5c1da8ca9b04829c248bf2ffe85705c9f96088eb09a39250cbb616d507288c84e54a27dee11cf42c4bd533dcb7f
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.2'
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.2
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-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake