email_address_validator 0.0.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +24 -0
- data/README.md +0 -1
- data/Rakefile +0 -2
- data/lib/email_address_validator.rb +0 -1
- data/lib/email_address_validator/rfc822-parser.rb +5 -4
- data/lib/email_address_validator/version.rb +1 -1
- metadata +47 -48
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 40a7903f966cc1c88ea370e25ef041484c4d1fa6
|
4
|
+
data.tar.gz: d1f7aeafad963a543d4ad128e2a3b1108ea7cc67
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6f9aa6e4b76be4595fff9ee5c04776bdf7fc6f77bc32ebed9f11167059559252807877c2d32cd6e4f03f87ddcea78a755fa373fd35894f07a424a245ab9fc8c6
|
7
|
+
data.tar.gz: b9092df595f541c160d68558f4f44b41fc48dfe92763a61bce501e5722a9faeb8df8ac31f2b226a5408306995e5de9787aefb750c1c90c73f37def73b846b0ba
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
GEM
|
2
|
+
remote: https://rubygems.org/
|
3
|
+
specs:
|
4
|
+
diff-lcs (1.2.5)
|
5
|
+
rake (10.3.2)
|
6
|
+
rspec (3.1.0)
|
7
|
+
rspec-core (~> 3.1.0)
|
8
|
+
rspec-expectations (~> 3.1.0)
|
9
|
+
rspec-mocks (~> 3.1.0)
|
10
|
+
rspec-core (3.1.7)
|
11
|
+
rspec-support (~> 3.1.0)
|
12
|
+
rspec-expectations (3.1.2)
|
13
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
14
|
+
rspec-support (~> 3.1.0)
|
15
|
+
rspec-mocks (3.1.3)
|
16
|
+
rspec-support (~> 3.1.0)
|
17
|
+
rspec-support (3.1.2)
|
18
|
+
|
19
|
+
PLATFORMS
|
20
|
+
ruby
|
21
|
+
|
22
|
+
DEPENDENCIES
|
23
|
+
rake
|
24
|
+
rspec
|
data/README.md
CHANGED
@@ -43,7 +43,6 @@ A few fun things came up researching this library:
|
|
43
43
|
|
44
44
|
* RFCs 2822/822 do not validate domains properly.
|
45
45
|
* RFCs 2822/822 support groups, multiple labeled lists of addresses such as `MyGroup: "John Higgins" <john@example.net>, mark mark@example.net;`
|
46
|
-
* RFC 822 supports routes, a sequence of mailservers the message is supposed to travel, such as `test@mymailserver@othermailserver.com`
|
47
46
|
* RFCs 2822/822 support double quoted strings as the local part of an address, with crazy chars in them, such as `"my@funky$address"@example.net`
|
48
47
|
* RFCs 2822/822 support phrases before angle bracketed addresses so the entirety of the string `"Test" <test@example.net>` is valid. This is why you probably only want to validate the addr_spec portion.
|
49
48
|
|
data/Rakefile
CHANGED
@@ -2,7 +2,6 @@ module EmailAddressValidator
|
|
2
2
|
# :stopdoc:
|
3
3
|
LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
|
4
4
|
PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
|
5
|
-
VERSION = ::File.read(PATH + 'version.txt').strip
|
6
5
|
# :startdoc:
|
7
6
|
|
8
7
|
# Returns the library path for the module. If any arguments are given,
|
@@ -483,7 +483,8 @@ class EmailAddressValidator::RFC822Parser
|
|
483
483
|
|
484
484
|
# atom = /[^\]\x00-\x20 \x7F\x80-\xFF()<>@,;:\\".\[]+/
|
485
485
|
def _atom
|
486
|
-
|
486
|
+
pattern = /\A(?-mix:[^\]\x00-\x20 \x7F\x80-\xFF()<>@,;:\\".\[]+)/n
|
487
|
+
_tmp = scan(pattern)
|
487
488
|
set_failed_rule :_atom unless _tmp
|
488
489
|
return _tmp
|
489
490
|
end
|
@@ -493,7 +494,7 @@ class EmailAddressValidator::RFC822Parser
|
|
493
494
|
|
494
495
|
_save = self.pos
|
495
496
|
while true # choice
|
496
|
-
_tmp = scan(/\A(?-mix:[^)\\\x0D\x80-\xFF(]+)/)
|
497
|
+
_tmp = scan(/\A(?-mix:[^)\\\x0D\x80-\xFF(]+)/n)
|
497
498
|
break if _tmp
|
498
499
|
self.pos = _save
|
499
500
|
_tmp = apply(:_linear_white_space)
|
@@ -511,7 +512,7 @@ class EmailAddressValidator::RFC822Parser
|
|
511
512
|
|
512
513
|
_save = self.pos
|
513
514
|
while true # choice
|
514
|
-
_tmp = scan(/\A(?-mix:[^\]\\\x0D\x80-\xFF\[]+)/)
|
515
|
+
_tmp = scan(/\A(?-mix:[^\]\\\x0D\x80-\xFF\[]+)/n)
|
515
516
|
break if _tmp
|
516
517
|
self.pos = _save
|
517
518
|
_tmp = apply(:_linear_white_space)
|
@@ -529,7 +530,7 @@ class EmailAddressValidator::RFC822Parser
|
|
529
530
|
|
530
531
|
_save = self.pos
|
531
532
|
while true # choice
|
532
|
-
_tmp = scan(/\A(?-mix:[^"\\\x0D\x80-\xFF]+)/)
|
533
|
+
_tmp = scan(/\A(?-mix:[^"\\\x0D\x80-\xFF]+)/n)
|
533
534
|
break if _tmp
|
534
535
|
self.pos = _save
|
535
536
|
_tmp = apply(:_linear_white_space)
|
metadata
CHANGED
@@ -1,53 +1,56 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: email_address_validator
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 0.0.2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
6
5
|
platform: ruby
|
7
|
-
authors:
|
6
|
+
authors:
|
8
7
|
- Evan Phoenix
|
9
8
|
- Andrew Cholakian
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
dependencies:
|
17
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2015-01-12 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
18
15
|
name: rspec
|
19
|
-
|
20
|
-
|
21
|
-
none: false
|
22
|
-
requirements:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
23
18
|
- - ">="
|
24
|
-
- !ruby/object:Gem::Version
|
19
|
+
- !ruby/object:Gem::Version
|
25
20
|
version: 2.4.0
|
26
21
|
type: :development
|
27
|
-
version_requirements: *id001
|
28
|
-
- !ruby/object:Gem::Dependency
|
29
|
-
name: kpeg
|
30
22
|
prerelease: false
|
31
|
-
|
32
|
-
|
33
|
-
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: 2.4.0
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: kpeg
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
34
32
|
- - ">="
|
35
|
-
- !ruby/object:Gem::Version
|
33
|
+
- !ruby/object:Gem::Version
|
36
34
|
version: 0.7.0
|
37
35
|
type: :development
|
38
|
-
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 0.7.0
|
39
42
|
description: RFC Compliant Email Address Parsing using the KPEG grammars.
|
40
|
-
email:
|
43
|
+
email:
|
41
44
|
- andrew@andrewvc.com
|
42
45
|
executables: []
|
43
|
-
|
44
46
|
extensions: []
|
45
|
-
|
46
|
-
extra_rdoc_files:
|
47
|
+
extra_rdoc_files:
|
47
48
|
- LICENSE
|
48
49
|
- README.md
|
49
|
-
files:
|
50
|
-
- .gitignore
|
50
|
+
files:
|
51
|
+
- ".gitignore"
|
52
|
+
- Gemfile
|
53
|
+
- Gemfile.lock
|
51
54
|
- LICENSE
|
52
55
|
- README.md
|
53
56
|
- Rakefile
|
@@ -62,33 +65,29 @@ files:
|
|
62
65
|
- lib/email_address_validator/version.rb
|
63
66
|
- spec/email_address_validator_spec.rb
|
64
67
|
- spec/spec_helper.rb
|
65
|
-
has_rdoc: true
|
66
68
|
homepage: https://github.com/larb/email_address_validator
|
67
69
|
licenses: []
|
68
|
-
|
70
|
+
metadata: {}
|
69
71
|
post_install_message:
|
70
72
|
rdoc_options: []
|
71
|
-
|
72
|
-
require_paths:
|
73
|
+
require_paths:
|
73
74
|
- lib
|
74
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
75
|
-
|
76
|
-
requirements:
|
75
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
77
|
- - ">="
|
78
|
-
- !ruby/object:Gem::Version
|
79
|
-
version:
|
80
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
|
-
|
82
|
-
requirements:
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0'
|
80
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
83
82
|
- - ">="
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version:
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
86
85
|
requirements: []
|
87
|
-
|
88
86
|
rubyforge_project: email_address_validator
|
89
|
-
rubygems_version:
|
87
|
+
rubygems_version: 2.2.2
|
90
88
|
signing_key:
|
91
|
-
specification_version:
|
89
|
+
specification_version: 4
|
92
90
|
summary: RFC 2822/822 Email Address Parsing.
|
93
|
-
test_files:
|
94
|
-
|
91
|
+
test_files:
|
92
|
+
- spec/email_address_validator_spec.rb
|
93
|
+
- spec/spec_helper.rb
|