phonelib 0.8.3 → 0.8.4

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: 8eb5cd500f5cce3041305c589776fd4d87b051faa4df73d5618afef24bd43666
4
- data.tar.gz: 9eb37b441cac9cc645aa23a4e9e13ae7b38d0dea7ecb6a1996bb277042b10487
3
+ metadata.gz: cc68ad6683a9dbc13f88b825e589c1836a31e83b8f67c6e71d54afac44d0fceb
4
+ data.tar.gz: 39ed9dfdc4bf02a8850c18068be4e24407141734718a71e8fa4779f0f1c4ff17
5
5
  SHA512:
6
- metadata.gz: c9faebfcc45bf3c91301246b2a6287022fdc4caf4562edd6e205189c16987025f338709fde5c6904af9509dd6d41030e3ec09b4680ccc84378d5fb79d87636ff
7
- data.tar.gz: fb22853ef3b910fa4f9c6e85aed7156e32a4248e60408b8e4b50a968814f1c4eb61f3ca7b99657bd2aa39c0ebaec5bfd7283c863bd2dcb2bc13b1af9dc3e521a
6
+ metadata.gz: 21e94b4cd849e0116189ef7b232dd2d6949b02b9e6e295dfe463272b035669a062d90902e7f4aa6c98001c05dfa2c803f9e83320fe1b32e16f654d88305c62ca
7
+ data.tar.gz: f05c697263e31b17a6946ac9fda9c52780fa2aaef23b4031ba7eced4b34b5d576a581dbeacda334d962cb64cd46edebc1aa1c0e5fbcdf9661ccc7d0f28448dbd
Binary file
data/data/phone_data.dat CHANGED
Binary file
@@ -5,7 +5,7 @@ module Phonelib
5
5
  # @param formatted [Boolean] whether to return numbers only or formatted
6
6
  # @return [String] formatted national number
7
7
  def national(formatted = true)
8
- return @national_number unless valid?
8
+ return @national_number unless possible?
9
9
  format_match, format_string = formatting_data
10
10
 
11
11
  if format_match
@@ -52,7 +52,7 @@ module Phonelib
52
52
  def international(formatted = true, prefix = '+')
53
53
  prefix = formatted if formatted.is_a?(String)
54
54
  return nil if sanitized.empty?
55
- return "#{prefix}#{country_prefix_or_not}#{sanitized}" unless valid?
55
+ return "#{prefix}#{country_prefix_or_not}#{sanitized}" unless possible?
56
56
  return "#{prefix}#{data_country_code}#{@national_number}" unless formatted
57
57
 
58
58
  fmt = @data[country][:format]
@@ -1,4 +1,4 @@
1
1
  module Phonelib
2
2
  # @private
3
- VERSION = '0.8.3'
3
+ VERSION = '0.8.4'
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.3
4
+ version: 0.8.4
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-08-19 00:00:00.000000000 Z
11
+ date: 2023-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake