rfc822 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/rfc822.rb +19 -0
  2. metadata +67 -0
data/lib/rfc822.rb ADDED
@@ -0,0 +1,19 @@
1
+ module RFC822
2
+ QTEXT = '[^\\x0d\\x22\\x5c\\x80-\\xff]'
3
+ DTEXT = '[^\\x0d\\x5b-\\x5d\\x80-\\xff]'
4
+ ATOM = '[^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-' +
5
+ '\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+'
6
+ QUOTED_PAIR = '\\x5c[\\x00-\\x7f]'
7
+ DOMAIN_LITERAL = "\\x5b(?:#{DTEXT}|#{QUOTED_PAIR})*\\x5d"
8
+ QUOTED_STRING = "\\x22(?:#{QTEXT}|#{QUOTED_PAIR})*\\x22"
9
+ DOMAIN_REF = ATOM
10
+ SUB_DOMAIN = "(?:#{DOMAIN_REF}|#{DOMAIN_LITERAL})"
11
+ WORD = "(?:#{ATOM}|#{QUOTED_STRING})"
12
+ DOMAIN = "#{SUB_DOMAIN}(?:\\x2e#{SUB_DOMAIN})*"
13
+ LOCAL_PART = "#{WORD}(?:\\x2e#{WORD})*"
14
+ ADDR_SPEC = "#{LOCAL_PART}\\x40#{DOMAIN}"
15
+
16
+ EMAIL_REGEXP_WHOLE = /\A#{ADDR_SPEC}\z/
17
+ EMAIL_REGEXP_PART = /#{ADDR_SPEC}/
18
+ end
19
+
metadata ADDED
@@ -0,0 +1,67 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rfc822
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Marcin Lewandowski
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-07-23 00:00:00 +02:00
19
+ default_executable:
20
+ dependencies: []
21
+
22
+ description: Gem containing just e-mail validation regexp based on RFC
23
+ email: saepia@saepia.net
24
+ executables: []
25
+
26
+ extensions: []
27
+
28
+ extra_rdoc_files: []
29
+
30
+ files:
31
+ - lib/rfc822.rb
32
+ has_rdoc: true
33
+ homepage: http://saepia.net
34
+ licenses: []
35
+
36
+ post_install_message:
37
+ rdoc_options:
38
+ - --charset=UTF-8
39
+ require_paths:
40
+ - lib
41
+ required_ruby_version: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ hash: 3
47
+ segments:
48
+ - 0
49
+ version: "0"
50
+ required_rubygems_version: !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ hash: 3
56
+ segments:
57
+ - 0
58
+ version: "0"
59
+ requirements: []
60
+
61
+ rubyforge_project:
62
+ rubygems_version: 1.3.7
63
+ signing_key:
64
+ specification_version: 3
65
+ summary: Gem containing just e-mail validation regexp based on RFC
66
+ test_files: []
67
+