active-model-email-validator 1.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -29,7 +29,7 @@ Colophon
29
29
 
30
30
  ### See also
31
31
 
32
- If you like this gem, you may also want to check out [Static Model](http://codyrobbins.com/software/static-model), [Declarative Find](http://codyrobbins.com/software/declarative-find), [Create New](http://codyrobbins.com/software/create-new), [Save Changes To](http://codyrobbins.com/software/save-changes-to), and [HTTP Error](http://codyrobbins.com/software/http-error).
32
+ If you like this gem, you may also want to check out [Static Model](http://codyrobbins.com/software/static-model), [HTTP Error](http://codyrobbins.com/software/http-error), or [Email Test Helpers](http://codyrobbins.com/software/email-test-helpers).
33
33
 
34
34
  ### Tested with
35
35
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'active-model-email-validator'
3
- s.version = '1.0'
3
+ s.version = '1.0.1'
4
4
  s.summary = 'An ActiveModel email validator based on the Mail gem.'
5
5
  s.homepage = 'http://codyrobbins.com/software/active-model-email-validator'
6
6
  s.author = 'Cody Robbins'
@@ -1,5 +1,7 @@
1
1
  # encoding: UTF-8
2
2
 
3
+ require('mail')
4
+
3
5
  # This is a simple ActiveModel validator for email addresses built on top of the [Mail gem](http://rubygems.org/gems/mail). Instead of trying to devise an overly complex custom (and probably incorrect) regular expression to validate email addresses that is compliant with RFC 5321/5322—a difficult task—it instead relies on the Mail gem to parse the address. Since the Mail gem is an actively maintained library for working with email, if it can’t deal with an address it’s probably not worth attempting to send to anyways.
4
6
  #
5
7
  # An additional check is performed to ensure that the domain name in the address has at least two components—that is, a top-level domain and one subdomain. The validator purposefully errs on the side of inclusivity rather than exclusivity: it might allow some invalid email addresses, but it hopefully doesn’t disallow valid addresses.
metadata CHANGED
@@ -1,8 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active-model-email-validator
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: "1.0"
4
+ hash: 21
5
+ prerelease: false
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - 1
10
+ version: 1.0.1
6
11
  platform: ruby
7
12
  authors:
8
13
  - Cody Robbins
@@ -10,7 +15,7 @@ autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
17
 
13
- date: 2011-05-31 00:00:00 -04:00
18
+ date: 2011-06-02 00:00:00 -04:00
14
19
  default_executable:
15
20
  dependencies:
16
21
  - !ruby/object:Gem::Dependency
@@ -21,6 +26,9 @@ dependencies:
21
26
  requirements:
22
27
  - - ">="
23
28
  - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
24
32
  version: "0"
25
33
  type: :runtime
26
34
  version_requirements: *id001
@@ -32,6 +40,9 @@ dependencies:
32
40
  requirements:
33
41
  - - ">="
34
42
  - !ruby/object:Gem::Version
43
+ hash: 3
44
+ segments:
45
+ - 0
35
46
  version: "0"
36
47
  type: :runtime
37
48
  version_requirements: *id002
@@ -54,10 +65,12 @@ has_rdoc: true
54
65
  homepage: http://codyrobbins.com/software/active-model-email-validator
55
66
  licenses: []
56
67
 
57
- post_install_message: "\n\
58
- -------------------------------------------------------------\n\
59
- Follow me on Twitter! http://twitter.com/codyrobbins\n\
60
- -------------------------------------------------------------\n\n"
68
+ post_install_message: |+
69
+
70
+ -------------------------------------------------------------
71
+ Follow me on Twitter! http://twitter.com/codyrobbins
72
+ -------------------------------------------------------------
73
+
61
74
  rdoc_options: []
62
75
 
63
76
  require_paths:
@@ -67,17 +80,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
67
80
  requirements:
68
81
  - - ">="
69
82
  - !ruby/object:Gem::Version
83
+ hash: 3
84
+ segments:
85
+ - 0
70
86
  version: "0"
71
87
  required_rubygems_version: !ruby/object:Gem::Requirement
72
88
  none: false
73
89
  requirements:
74
90
  - - ">="
75
91
  - !ruby/object:Gem::Version
92
+ hash: 3
93
+ segments:
94
+ - 0
76
95
  version: "0"
77
96
  requirements: []
78
97
 
79
98
  rubyforge_project:
80
- rubygems_version: 1.6.2
99
+ rubygems_version: 1.3.7
81
100
  signing_key:
82
101
  specification_version: 3
83
102
  summary: An ActiveModel email validator based on the Mail gem.