telephone_number 1.3.5 → 1.4.0

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
  SHA1:
3
- metadata.gz: 465e9d1d2365a4c4b2659a93fc7cc593897d3eec
4
- data.tar.gz: 01d2dff814f042f27ed493511de0628f81e71a9a
3
+ metadata.gz: ac6f755e7ed1429677cd62bcc91b6aea527ff0e7
4
+ data.tar.gz: 54044235d4b572d8502512d0f3f81ff57b5d56c3
5
5
  SHA512:
6
- metadata.gz: 3cabdd502ed3b6355babd84067bd4f23e483431e1e70b5a6d5e5d413098a4cb3abfb04e2b128943e86bf83ce06e56bef4a6398f8548d74c3e94be44a5d1bcfec
7
- data.tar.gz: 17f504778b774d01e98dbcca1516b72c16d54e8ca823418a93905754d916e82960fb0a617003157051a1ba03aec071bf4d2f9f5adb6b58b93f03663cdd4f0c9a
6
+ metadata.gz: a421d5686401c55ca60ea98c6dcbdd97562bd871d61084ac25a7869235913db2bee176d68a85a3675418fafd8dfb5441697ef0081e48328123360198be143a9c
7
+ data.tar.gz: 30257046baba5a88b7267729bde90cda08914f8a1e81c0ede417e3e1b627041001187d289706ff103ef73cb9ba631164d0ea56bd2513fe98e8479afe4f1301e4
data/.travis.yml CHANGED
@@ -1,10 +1,9 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.3.6
5
4
  - 2.4.3
6
5
  - 2.5.3
7
- - jruby
6
+ - jruby-head
8
7
  before_install: gem install bundler -v 1.13.7
9
8
  env:
10
9
  - JRUBY_OPTS="--debug"
@@ -79,7 +79,7 @@ module TelephoneNumber
79
79
  end
80
80
 
81
81
  def underscore(camel_cased_word)
82
- return camel_cased_word unless camel_cased_word =~ /[A-Z-]|::/
82
+ return camel_cased_word unless camel_cased_word.match?(/[A-Z-]|::/)
83
83
  word = camel_cased_word.to_s.gsub(/::/, '/')
84
84
  word.gsub!(/([A-Z\d]+)([A-Z][a-z])/, '\1_\2')
85
85
  word.gsub!(/([a-z\d])([A-Z])/, '\1_\2')
@@ -24,7 +24,7 @@ module TelephoneNumber
24
24
 
25
25
  def detect_format(number)
26
26
  native_format = formats.detect do |format|
27
- number =~ Regexp.new("^(#{format.leading_digits})") && number =~ Regexp.new("^(#{format.pattern})$")
27
+ Regexp.new("^(#{format.leading_digits})").match?(number) && Regexp.new("^(#{format.pattern})$").match?(number)
28
28
  end
29
29
 
30
30
  return native_format if native_format || main_country_for_code
@@ -36,7 +36,7 @@ module TelephoneNumber
36
36
  path = locale_path.empty? ? geocoding_path(:en) : locale_path
37
37
 
38
38
  path.sort { |a, b| b <=> a }.detect do |path|
39
- normalized_number =~ /^#{File.basename(path, 'dat')}/
39
+ normalized_number.match?(/^#{File.basename(path, 'dat')}/)
40
40
  end
41
41
  end
42
42
 
@@ -31,7 +31,7 @@ module TelephoneNumber
31
31
  def validate
32
32
  return [] unless country
33
33
  country.validations.select do |validation|
34
- normalized_number =~ Regexp.new("^(#{validation.pattern})$")
34
+ normalized_number.match?(Regexp.new("^(#{validation.pattern})$"))
35
35
  end.map(&:name)
36
36
  end
37
37
 
@@ -1,3 +1,3 @@
1
1
  module TelephoneNumber
2
- VERSION = "1.3.5"
2
+ VERSION = "1.4.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telephone_number
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.5
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - MOBI Wireless Management
@@ -606,7 +606,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
606
606
  version: '0'
607
607
  requirements: []
608
608
  rubyforge_project:
609
- rubygems_version: 2.5.2.2
609
+ rubygems_version: 2.6.14
610
610
  signing_key:
611
611
  specification_version: 4
612
612
  summary: Phone number validation