countries_data 1.0.0 → 1.1.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.
@@ -1,4 +1,4 @@
1
- require_relative './collection'
1
+ require_relative 'collection'
2
2
 
3
3
  module CountriesData
4
4
  class PhoneValidator
@@ -33,15 +33,13 @@ module CountriesData
33
33
 
34
34
  def min_length
35
35
  countries
36
- .map(&:phone_min_length)
37
- .compact
36
+ .filter_map(&:phone_min_length)
38
37
  .min || 0
39
38
  end
40
39
 
41
40
  def max_length
42
41
  countries
43
- .map(&:phone_max_length)
44
- .compact
42
+ .filter_map(&:phone_max_length)
45
43
  .max || Float::INFINITY
46
44
  end
47
45
 
@@ -1,3 +1,3 @@
1
1
  module CountriesData
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.1.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: countries_data
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel de la Torre
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-21 00:00:00.000000000 Z
11
+ date: 2024-03-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description:
14
- email:
13
+ description:
14
+ email:
15
15
  executables: []
16
16
  extensions: []
17
17
  extra_rdoc_files: []
@@ -30,7 +30,7 @@ metadata:
30
30
  homepage_uri: https://github.com/zenfi/countries-data
31
31
  source_code_uri: https://github.com/zenfi/countries-data
32
32
  changelog_uri: https://github.com/zenfi/countries-data/CHANGELOG.md
33
- post_install_message:
33
+ post_install_message:
34
34
  rdoc_options: []
35
35
  require_paths:
36
36
  - lib
@@ -38,15 +38,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - ">="
40
40
  - !ruby/object:Gem::Version
41
- version: '2.6'
41
+ version: 3.3.0
42
42
  required_rubygems_version: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0'
47
47
  requirements: []
48
- rubygems_version: 3.0.3.1
49
- signing_key:
48
+ rubygems_version: 3.5.3
49
+ signing_key:
50
50
  specification_version: 4
51
51
  summary: Contains useful information about all of the countries
52
52
  test_files: []