phone_number_validator 0.4.8 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/doc/README_rdoc.html CHANGED
@@ -1,159 +1,159 @@
1
- <!DOCTYPE html>
2
-
3
- <html>
4
- <head>
5
- <meta charset="UTF-8">
6
-
7
- <title>README - Phone Number Validator</title>
8
-
9
- <script type="text/javascript">
10
- var rdoc_rel_prefix = "./";
11
- var index_rel_prefix = "./";
12
- </script>
13
-
14
- <script src="./js/jquery.js"></script>
15
- <script src="./js/darkfish.js"></script>
16
-
17
- <link href="./css/fonts.css" rel="stylesheet">
18
- <link href="./css/rdoc.css" rel="stylesheet">
19
-
20
-
21
-
22
- <body id="top" role="document" class="file">
23
- <nav role="navigation">
24
- <div id="project-navigation">
25
- <div id="home-section" role="region" title="Quick navigation" class="nav-section">
26
- <h2>
27
- <a href="./index.html" rel="home">Home</a>
28
- </h2>
29
-
30
- <div id="table-of-contents-navigation">
31
- <a href="./table_of_contents.html#pages">Pages</a>
32
- <a href="./table_of_contents.html#classes">Classes</a>
33
- <a href="./table_of_contents.html#methods">Methods</a>
34
- </div>
35
- </div>
36
-
37
- <div id="search-section" role="search" class="project-section initially-hidden">
38
- <form action="#" method="get" accept-charset="utf-8">
39
- <div id="search-field-wrapper">
40
- <input id="search-field" role="combobox" aria-label="Search"
41
- aria-autocomplete="list" aria-controls="search-results"
42
- type="text" name="search" placeholder="Search" spellcheck="false"
43
- title="Type to search, Up and Down to navigate, Enter to load">
44
- </div>
45
-
46
- <ul id="search-results" aria-label="Search Results"
47
- aria-busy="false" aria-expanded="false"
48
- aria-atomic="false" class="initially-hidden"></ul>
49
- </form>
50
- </div>
51
-
52
- </div>
53
-
54
-
55
- <div class="nav-section">
56
- <h3>Table of Contents</h3>
57
-
58
- <ul class="link-list" role="directory">
59
- <li><a href="#label-Phone+Number+Validator">Phone Number Validator</a>
60
- <li><a href="#label-About">About</a>
61
- <li><a href="#label-Regular+Expression">Regular Expression</a>
62
- <li><a href="#label-Installing">Installing</a>
63
- <li><a href="#label-Install+Required+Gems-2FDependencies">Install Required Gems/Dependencies</a>
64
- <li><a href="#label-Updateing+Required+Gems-2FDependencies">Updateing Required Gems/Dependencies</a>
65
- <li><a href="#label-Uninstalling">Uninstalling</a>
66
- <li><a href="#label-Testing">Testing</a>
67
- <li><a href="#label-Usage">Usage</a>
68
- <li><a href="#label-In+command+line">In command line</a>
69
- <li><a href="#label-In+Ruby+code">In Ruby code</a>
70
- <li><a href="#label-Output">Output</a>
71
- </ul>
72
- </div>
73
-
74
-
75
- <div id="project-metadata">
76
- <div id="fileindex-section" class="nav-section">
77
- <h3>Pages</h3>
78
-
79
- <ul class="link-list">
80
-
81
- <li><a href="./README_rdoc.html">README</a>
82
-
83
- </ul>
84
- </div>
85
-
86
- </div>
87
- </nav>
88
-
89
- <main role="main" aria-label="Page README.rdoc">
90
-
91
- <h1 id="label-Phone+Number+Validator">Phone Number Validator<span><a href="#label-Phone+Number+Validator">&para;</a> <a href="#top">&uarr;</a></span></h1>
92
-
93
- <h2 id="label-About">About<span><a href="#label-About">&para;</a> <a href="#top">&uarr;</a></span></h2>
94
-
95
- <p>This app is a US phone number-validating RubyGem.</p>
96
-
97
- <p>It uses a complex regular expression to validate any United States phone
98
- number.</p>
99
-
100
- <h3 id="label-Regular+Expression">Regular Expression<span><a href="#label-Regular+Expression">&para;</a> <a href="#top">&uarr;</a></span></h3>
101
-
102
- <p>This gem uses the following regular expression:</p>
103
-
104
- <pre class="ruby"><span class="ruby-comment"># US Phone Numbers</span>
105
- <span class="ruby-regexp">/^(?:(?:[2-9]11)|(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})(?:\s*(?:\x20+|#|x\.?|ext\.?|extension)\s*(\d+))?)$/i</span>
106
- <span class="ruby-comment"># Regex Flags: i (ignore case)</span>
107
- </pre>
108
-
109
- <h2 id="label-Installing">Installing<span><a href="#label-Installing">&para;</a> <a href="#top">&uarr;</a></span></h2>
110
-
111
- <pre>$ gem install phone_number_validator</pre>
112
-
113
- <h3 id="label-Install+Required+Gems-2FDependencies">Install Required Gems/Dependencies<span><a href="#label-Install+Required+Gems-2FDependencies">&para;</a> <a href="#top">&uarr;</a></span></h3>
114
-
115
- <pre>$ bundle install</pre>
116
-
117
- <h3 id="label-Updateing+Required+Gems-2FDependencies">Updateing Required Gems/Dependencies<span><a href="#label-Updateing+Required+Gems-2FDependencies">&para;</a> <a href="#top">&uarr;</a></span></h3>
118
-
119
- <pre>$ bundle update</pre>
120
-
121
- <h2 id="label-Uninstalling">Uninstalling<span><a href="#label-Uninstalling">&para;</a> <a href="#top">&uarr;</a></span></h2>
122
-
123
- <pre>$ gem uninstall phone_number_validator</pre>
124
-
125
- <h2 id="label-Testing">Testing<span><a href="#label-Testing">&para;</a> <a href="#top">&uarr;</a></span></h2>
126
-
127
- <pre>$ rake test</pre>
128
-
129
- <h2 id="label-Usage">Usage<span><a href="#label-Usage">&para;</a> <a href="#top">&uarr;</a></span></h2>
130
-
131
- <h3 id="label-In+command+line">In command line<span><a href="#label-In+command+line">&para;</a> <a href="#top">&uarr;</a></span></h3>
132
-
133
- <pre>$ pnv &quot;+1 (949) 355-6244 ext. 198842&quot;
134
- =&gt; &quot;+1 (949) 355-6244 ext. 198842&quot; is a valid phone number.
135
- =&gt; true</pre>
136
-
137
- <h3 id="label-In+Ruby+code">In Ruby code<span><a href="#label-In+Ruby+code">&para;</a> <a href="#top">&uarr;</a></span></h3>
138
-
139
- <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;phone_number_validator&#39;</span>
140
-
141
- <span class="ruby-identifier">check_phone_number</span> = <span class="ruby-constant">PhoneNumberValidator</span>.<span class="ruby-identifier">validate_phone_number</span>(<span class="ruby-string">&#39;+1 (949) 355-6244 ext. 198842&#39;</span>)
142
-
143
- <span class="ruby-identifier">print</span> <span class="ruby-identifier">check_phone_number</span>
144
- </pre>
145
-
146
- <h4 id="label-Output">Output<span><a href="#label-Output">&para;</a> <a href="#top">&uarr;</a></span></h4>
147
-
148
- <pre>=&gt; &quot;+1 (949) 355-6244 ext. 198842&quot; is a valid phone number.
149
- =&gt; true</pre>
150
- </main>
151
-
152
-
153
-
154
- <footer id="validator-badges" role="contentinfo">
155
- <p><a href="https://validator.w3.org/check/referer">Validate</a>
156
- <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.0.4.
157
- <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
158
- </footer>
159
-
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>README - Phone Number Validator</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "./";
11
+ var index_rel_prefix = "./";
12
+ </script>
13
+
14
+ <script src="./js/jquery.js"></script>
15
+ <script src="./js/darkfish.js"></script>
16
+
17
+ <link href="./css/fonts.css" rel="stylesheet">
18
+ <link href="./css/rdoc.css" rel="stylesheet">
19
+
20
+
21
+
22
+ <body id="top" role="document" class="file">
23
+ <nav role="navigation">
24
+ <div id="project-navigation">
25
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
26
+ <h2>
27
+ <a href="./index.html" rel="home">Home</a>
28
+ </h2>
29
+
30
+ <div id="table-of-contents-navigation">
31
+ <a href="./table_of_contents.html#pages">Pages</a>
32
+ <a href="./table_of_contents.html#classes">Classes</a>
33
+ <a href="./table_of_contents.html#methods">Methods</a>
34
+ </div>
35
+ </div>
36
+
37
+ <div id="search-section" role="search" class="project-section initially-hidden">
38
+ <form action="#" method="get" accept-charset="utf-8">
39
+ <div id="search-field-wrapper">
40
+ <input id="search-field" role="combobox" aria-label="Search"
41
+ aria-autocomplete="list" aria-controls="search-results"
42
+ type="text" name="search" placeholder="Search" spellcheck="false"
43
+ title="Type to search, Up and Down to navigate, Enter to load">
44
+ </div>
45
+
46
+ <ul id="search-results" aria-label="Search Results"
47
+ aria-busy="false" aria-expanded="false"
48
+ aria-atomic="false" class="initially-hidden"></ul>
49
+ </form>
50
+ </div>
51
+
52
+ </div>
53
+
54
+
55
+ <div class="nav-section">
56
+ <h3>Table of Contents</h3>
57
+
58
+ <ul class="link-list" role="directory">
59
+ <li><a href="#label-Phone+Number+Validator">Phone Number Validator</a>
60
+ <li><a href="#label-About">About</a>
61
+ <li><a href="#label-Regular+Expression">Regular Expression</a>
62
+ <li><a href="#label-Installing">Installing</a>
63
+ <li><a href="#label-Install+Required+Gems-2FDependencies">Install Required Gems/Dependencies</a>
64
+ <li><a href="#label-Updateing+Required+Gems-2FDependencies">Updateing Required Gems/Dependencies</a>
65
+ <li><a href="#label-Uninstalling">Uninstalling</a>
66
+ <li><a href="#label-Testing">Testing</a>
67
+ <li><a href="#label-Usage">Usage</a>
68
+ <li><a href="#label-In+command+line">In command line</a>
69
+ <li><a href="#label-In+Ruby+code">In Ruby code</a>
70
+ <li><a href="#label-Output">Output</a>
71
+ </ul>
72
+ </div>
73
+
74
+
75
+ <div id="project-metadata">
76
+ <div id="fileindex-section" class="nav-section">
77
+ <h3>Pages</h3>
78
+
79
+ <ul class="link-list">
80
+
81
+ <li><a href="./README_rdoc.html">README</a>
82
+
83
+ </ul>
84
+ </div>
85
+
86
+ </div>
87
+ </nav>
88
+
89
+ <main role="main" aria-label="Page README.rdoc">
90
+
91
+ <h1 id="label-Phone+Number+Validator">Phone Number Validator<span><a href="#label-Phone+Number+Validator">&para;</a> <a href="#top">&uarr;</a></span></h1>
92
+
93
+ <h2 id="label-About">About<span><a href="#label-About">&para;</a> <a href="#top">&uarr;</a></span></h2>
94
+
95
+ <p>This app is a US phone number-validating RubyGem.</p>
96
+
97
+ <p>It uses a complex regular expression to validate any United States phone
98
+ number.</p>
99
+
100
+ <h3 id="label-Regular+Expression">Regular Expression<span><a href="#label-Regular+Expression">&para;</a> <a href="#top">&uarr;</a></span></h3>
101
+
102
+ <p>This gem uses the following regular expression:</p>
103
+
104
+ <pre class="ruby"><span class="ruby-comment"># US Phone Numbers</span>
105
+ <span class="ruby-regexp">/^(?:(?:[2-9]11)|(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})(?:\s*(?:\x20+|#|x\.?|ext\.?|extension)\s*(\d+))?)$/i</span>
106
+ <span class="ruby-comment"># Regex Flags: i (ignore case)</span>
107
+ </pre>
108
+
109
+ <h2 id="label-Installing">Installing<span><a href="#label-Installing">&para;</a> <a href="#top">&uarr;</a></span></h2>
110
+
111
+ <pre>$ gem install phone_number_validator</pre>
112
+
113
+ <h3 id="label-Install+Required+Gems-2FDependencies">Install Required Gems/Dependencies<span><a href="#label-Install+Required+Gems-2FDependencies">&para;</a> <a href="#top">&uarr;</a></span></h3>
114
+
115
+ <pre>$ bundle install</pre>
116
+
117
+ <h3 id="label-Updateing+Required+Gems-2FDependencies">Updateing Required Gems/Dependencies<span><a href="#label-Updateing+Required+Gems-2FDependencies">&para;</a> <a href="#top">&uarr;</a></span></h3>
118
+
119
+ <pre>$ bundle update</pre>
120
+
121
+ <h2 id="label-Uninstalling">Uninstalling<span><a href="#label-Uninstalling">&para;</a> <a href="#top">&uarr;</a></span></h2>
122
+
123
+ <pre>$ gem uninstall phone_number_validator</pre>
124
+
125
+ <h2 id="label-Testing">Testing<span><a href="#label-Testing">&para;</a> <a href="#top">&uarr;</a></span></h2>
126
+
127
+ <pre>$ rake test</pre>
128
+
129
+ <h2 id="label-Usage">Usage<span><a href="#label-Usage">&para;</a> <a href="#top">&uarr;</a></span></h2>
130
+
131
+ <h3 id="label-In+command+line">In command line<span><a href="#label-In+command+line">&para;</a> <a href="#top">&uarr;</a></span></h3>
132
+
133
+ <pre>$ pnv &quot;+1 (949) 355-6244 ext. 198842&quot;
134
+ =&gt; &quot;+1 (949) 355-6244 ext. 198842&quot; is a valid phone number.
135
+ =&gt; true</pre>
136
+
137
+ <h3 id="label-In+Ruby+code">In Ruby code<span><a href="#label-In+Ruby+code">&para;</a> <a href="#top">&uarr;</a></span></h3>
138
+
139
+ <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;phone_number_validator&#39;</span>
140
+
141
+ <span class="ruby-identifier">check_phone_number</span> = <span class="ruby-constant">PhoneNumberValidator</span>.<span class="ruby-identifier">validate_phone_number</span>(<span class="ruby-string">&#39;+1 (949) 355-6244 ext. 198842&#39;</span>)
142
+
143
+ <span class="ruby-identifier">print</span> <span class="ruby-identifier">check_phone_number</span>
144
+ </pre>
145
+
146
+ <h4 id="label-Output">Output<span><a href="#label-Output">&para;</a> <a href="#top">&uarr;</a></span></h4>
147
+
148
+ <pre>=&gt; &quot;+1 (949) 355-6244 ext. 198842&quot; is a valid phone number.
149
+ =&gt; true</pre>
150
+ </main>
151
+
152
+
153
+
154
+ <footer id="validator-badges" role="contentinfo">
155
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
156
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.0.1.
157
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
158
+ </footer>
159
+
data/doc/created.rid CHANGED
@@ -1,6 +1,6 @@
1
- Thu, 22 Nov 2018 18:38:24 -0800
2
- README.rdoc Thu, 22 Nov 2018 15:39:38 -0800
3
- lib/phone_number_validator.rb Thu, 22 Nov 2018 15:39:38 -0800
4
- lib/phone_number_validator/validator.rb Thu, 22 Nov 2018 16:06:23 -0800
5
- test/test_phone_number_validator.rb Thu, 22 Nov 2018 15:39:38 -0800
6
- bin/pnv Thu, 22 Nov 2018 18:37:51 -0800
1
+ Fri, 23 Nov 2018 12:23:54 -0800
2
+ README.rdoc Fri, 23 Nov 2018 12:20:43 -0800
3
+ lib/phone_number_validator.rb Fri, 23 Nov 2018 12:20:43 -0800
4
+ lib/phone_number_validator/validator.rb Fri, 23 Nov 2018 12:23:19 -0800
5
+ test/test_phone_number_validator.rb Fri, 23 Nov 2018 12:22:46 -0800
6
+ bin/pnv Fri, 23 Nov 2018 12:20:43 -0800