phone_number_validator 0.7.4 → 0.7.5

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,32 +1,32 @@
1
- Gem::Specification.new do |spec|
2
- spec.name = 'phone_number_validator'
3
- spec.version = '0.7.4'
4
- spec.date = Time.now.strftime("%Y-%m-%d")
5
- spec.summary = 'Validate any US phone number!'
6
- spec.description = <<-EOF
7
- This gem is a United States phone number validator.
8
- This gem uses a complex regular expression that can validate any United States phone number.
9
- EOF
10
- spec.author = 'bag33188'
11
- spec.email = 'bag33188@outlook.com'
12
- spec.files = `git ls-files -z`.split("\x0")
13
- # spec.files = ['phone_number_validator.gemspec', 'Gemfile', 'Rakefile', 'LICENSE', 'README.rdoc']
14
- # spec.files += Dir['lib/**/*'] + Dir['bin/*'] + Dir['doc/**/*']
15
- spec.require_paths = ['lib', 'lib/phone_number_validator', 'doc', 'test', 'bin', '.']
16
- spec.test_files = ['test/test_phone_number_validator.rb']
17
- spec.executables << 'pnv'
18
- spec.homepage = 'https://gitlab.com/bag3318/phone_number_validator'
19
- spec.license = 'MIT'
20
- spec.bindir = 'bin'
21
- spec.extra_rdoc_files = ['README.rdoc']
22
- spec.platform = Gem::Platform::RUBY
23
- spec.required_ruby_version = '>= 2.0.0'
24
- spec.required_rubygems_version = '>= 2.6.0'
25
- spec.post_install_message = "Thanks for installing my phone_number_validator gem!\r\nI hope you will enjoy using it! :)"
26
- spec.requirements << 'A Windows, Mac, or Linux computer with Ruby and RubyGems Installed.'
27
- spec.metadata = {
28
- 'bug_tracker_uri' => 'https://gitlab.com/bag3318/phone_number_validator/issues',
29
- 'source_code_uri' => 'https://gitlab.com/bag3318/phone_number_validator'
30
- }
31
- spec.add_runtime_dependency 'bundler', '~> 1.11', '>= 1.11.2'
32
- end
1
+ Gem::Specification.new do |spec|
2
+ spec.name = 'phone_number_validator'
3
+ spec.version = '0.7.5'
4
+ spec.date = Time.now.strftime("%Y-%m-%d")
5
+ spec.summary = 'Validate any US phone number!'
6
+ spec.description = <<-EOF
7
+ This gem is a United States phone number validator.
8
+ This gem uses a complex regular expression that can validate any United States phone number.
9
+ EOF
10
+ spec.author = 'bag33188'
11
+ spec.email = 'bag33188@outlook.com'
12
+ spec.files = `git ls-files -z`.split("\x0")
13
+ # spec.files = ['phone_number_validator.gemspec', 'Gemfile', 'Rakefile', 'LICENSE', 'README.rdoc']
14
+ # spec.files += Dir['lib/**/*'] + Dir['bin/*'] + Dir['doc/**/*']
15
+ spec.require_paths = ['lib', 'lib/phone_number_validator', 'doc', 'test', 'bin', '.']
16
+ spec.test_files = ['test/test_phone_number_validator.rb']
17
+ spec.executables << 'pnv'
18
+ spec.homepage = 'https://gitlab.com/bag3318/phone_number_validator'
19
+ spec.license = 'MIT'
20
+ spec.bindir = 'bin'
21
+ spec.extra_rdoc_files = ['README.rdoc']
22
+ spec.platform = Gem::Platform::RUBY
23
+ spec.required_ruby_version = '>= 2.0.0'
24
+ spec.required_rubygems_version = '>= 2.6.0'
25
+ spec.post_install_message = "Thanks for installing my phone_number_validator gem!\r\nI hope you will enjoy using it! :)"
26
+ spec.requirements << 'A Windows, Mac, or Linux computer with Ruby and RubyGems Installed.'
27
+ spec.metadata = {
28
+ 'bug_tracker_uri' => 'https://gitlab.com/bag3318/phone_number_validator/issues',
29
+ 'source_code_uri' => 'https://gitlab.com/bag3318/phone_number_validator'
30
+ }
31
+ spec.add_runtime_dependency 'bundler', '~> 1.11', '>= 1.11.2'
32
+ end
@@ -1,31 +1,31 @@
1
- require 'test/unit'
2
- require 'phone_number_validator'
3
-
4
- ##
5
- # This class respresents the testing-unit for this gem app
6
- #
7
- # <b>Inherits from:</b>
8
- # Test::Unit::TestCase
9
- class PhoneNumberValidatorTest < Test::Unit::TestCase
10
-
11
- ##
12
- # This test inputs a valid phone number and expects the output to be <b>true</b>
13
- def test_valid_phone_number
14
- assert_equal true,
15
- PhoneNumberValidator.validate('+1 (949) 355-6244 ext. 198842')
16
- end
17
-
18
- ##
19
- # This test inputs an invalid phone number and expects the output to be <b>false</b>
20
- def test_invalid_phone_number
21
- assert_equal false,
22
- PhoneNumberValidator.validate('94643823637337')
23
- end
24
-
25
- ##
26
- # This test inputs no phone number and expectst the output to be <b>:nil</b>
27
- def test_no_phone_number
28
- assert_equal :nil,
29
- PhoneNumberValidator.validate('')
30
- end
31
- end
1
+ require 'test/unit'
2
+ require 'phone_number_validator'
3
+
4
+ ##
5
+ # This class respresents the testing-unit for this gem app
6
+ #
7
+ # <b>Inherits from:</b>
8
+ # Test::Unit::TestCase
9
+ class PhoneNumberValidatorTest < Test::Unit::TestCase
10
+
11
+ ##
12
+ # This test inputs a valid phone number and expects the output to be <b>true</b>
13
+ def test_valid_phone_number
14
+ assert_equal true,
15
+ PhoneNumberValidator.validate('+1 (949) 355-6244 ext. 198842')
16
+ end
17
+
18
+ ##
19
+ # This test inputs an invalid phone number and expects the output to be <b>false</b>
20
+ def test_invalid_phone_number
21
+ assert_equal false,
22
+ PhoneNumberValidator.validate('94643823637337')
23
+ end
24
+
25
+ ##
26
+ # This test inputs no phone number and expectst the output to be <b>:nil</b>
27
+ def test_no_phone_number
28
+ assert_equal :nil,
29
+ PhoneNumberValidator.validate('')
30
+ end
31
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phone_number_validator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - bag33188
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - A Windows, Mac, or Linux computer with Ruby and RubyGems Installed.
130
130
  rubyforge_project:
131
- rubygems_version: 2.7.6
131
+ rubygems_version: 2.7.8
132
132
  signing_key:
133
133
  specification_version: 4
134
134
  summary: Validate any US phone number!