phone_number_validator 0.9.2 → 0.9.3
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.
- checksums.yaml +5 -5
- data/.gitignore +26 -26
- data/Gemfile +6 -6
- data/LICENSE +21 -21
- data/README.rdoc +66 -66
- data/Rakefile +26 -26
- data/bin/pnv +18 -18
- data/doc/PhoneNumberValidator.html +161 -161
- data/doc/PhoneNumberValidator/Validator.html +228 -225
- data/doc/PhoneNumberValidatorTest.html +236 -234
- data/doc/README_rdoc.html +171 -171
- data/doc/created.rid +6 -6
- data/doc/css/fonts.css +6 -6
- data/doc/index.html +164 -165
- data/doc/js/darkfish.js +7 -7
- data/doc/js/navigation.js +4 -3
- data/doc/js/navigation.js.gz +0 -0
- data/doc/js/search_index.js +1 -1
- data/doc/js/search_index.js.gz +0 -0
- data/doc/js/searcher.js +0 -1
- data/doc/js/searcher.js.gz +0 -0
- data/doc/table_of_contents.html +104 -134
- data/lib/phone_number_validator.rb +18 -18
- data/lib/phone_number_validator/validator.rb +33 -33
- data/phone_number_validator.gemspec +36 -34
- data/test/test_phone_number_validator.rb +31 -31
- metadata +43 -2
@@ -1,31 +1,31 @@
|
|
1
|
-
require 'test/unit'
|
2
|
-
require 'phone_number_validator'
|
3
|
-
|
4
|
-
##
|
5
|
-
# This class represents 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 (987) 654-3210 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 expects 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 represents 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 (987) 654-3210 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 expects 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.9.
|
4
|
+
version: 0.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bag33188
|
@@ -30,6 +30,46 @@ dependencies:
|
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 1.11.2
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: rake
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '11.2'
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 11.2.2
|
43
|
+
type: :development
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '11.2'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 11.2.2
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: rdoc
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - "~>"
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '6.0'
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 6.0.4
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '6.0'
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: 6.0.4
|
33
73
|
description: " This gem is a United States phone number validator.\n This gem
|
34
74
|
uses a complex regular expression that can validate any United States phone number.
|
35
75
|
\n Check out the documentation under the links section.\n"
|
@@ -128,7 +168,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
168
|
version: 2.0.0
|
129
169
|
requirements:
|
130
170
|
- A Windows, Mac, or Linux computer with Ruby and RubyGems Installed.
|
131
|
-
|
171
|
+
rubyforge_project:
|
172
|
+
rubygems_version: 2.5.2
|
132
173
|
signing_key:
|
133
174
|
specification_version: 4
|
134
175
|
summary: Validate any US phone number!
|