rails_email_validator 0.1.2 → 0.1.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.
- data/Rakefile +1 -6
- data/VERSION +1 -1
- data/lib/rails_email_validator.rb +2 -2
- data/rails_email_validator.gemspec +3 -3
- data/spec/rails_email_validator_spec.rb +5 -3
- metadata +4 -4
data/Rakefile
CHANGED
@@ -11,18 +11,13 @@ require 'rake'
|
|
11
11
|
|
12
12
|
require 'jeweler'
|
13
13
|
Jeweler::Tasks.new do |gem|
|
14
|
-
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
15
14
|
gem.name = "rails_email_validator"
|
16
15
|
gem.homepage = "http://github.com/phatworx/rails_email_validator"
|
17
16
|
gem.license = "MIT"
|
18
17
|
gem.summary = %Q{an email validator for rails}
|
19
18
|
gem.description = %Q{a class to validate emails. it builded for rails}
|
20
|
-
gem.email = "
|
19
|
+
gem.email = "team@phatworx.de"
|
21
20
|
gem.authors = ["Marco Scholl"]
|
22
|
-
# Include your dependencies below. Runtime dependencies are required when using your gem,
|
23
|
-
# and development dependencies are only needed for development (ie running rake tasks, tests, etc)
|
24
|
-
# gem.add_runtime_dependency 'activemodel', '>= 3.0.0'
|
25
|
-
# gem.add_development_dependency 'rspec', '> 1.2.3'
|
26
21
|
end
|
27
22
|
Jeweler::RubygemsDotOrgTasks.new
|
28
23
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
@@ -57,8 +57,8 @@ class EmailValidator < ActiveModel::EachValidator
|
|
57
57
|
|
58
58
|
if valid
|
59
59
|
# check syntax
|
60
|
-
valid = false unless local_part =~ /\A[
|
61
|
-
valid = false unless domain_part =~ /\A((?:[-a-
|
60
|
+
valid = false unless local_part =~ /\A[a-z0-9!\#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!\#$%&'*+\/=?^_`{|}~-]+)*\Z/
|
61
|
+
valid = false unless domain_part =~ /\A(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\Z/
|
62
62
|
end
|
63
63
|
|
64
64
|
# check mx
|
@@ -5,13 +5,13 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{rails_email_validator}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Marco Scholl"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-03-21}
|
13
13
|
s.description = %q{a class to validate emails. it builded for rails}
|
14
|
-
s.email = %q{
|
14
|
+
s.email = %q{team@phatworx.de}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE.txt",
|
17
17
|
"README.rdoc"
|
@@ -66,8 +66,7 @@ describe EmailValidator do
|
|
66
66
|
'test@sub1.example.net',
|
67
67
|
'test@sub1.example.co.uk',
|
68
68
|
'test@sub2.sub1.example.net',
|
69
|
-
'test@sub2.sub1.example.tttttttt'
|
70
|
-
'test@mexample.net.'
|
69
|
+
'test@sub2.sub1.example.tttttttt'
|
71
70
|
].each do |email|
|
72
71
|
|
73
72
|
@object.email = email
|
@@ -87,7 +86,10 @@ describe EmailValidator do
|
|
87
86
|
'email',
|
88
87
|
'test@localhost',
|
89
88
|
'müller@example.net',
|
90
|
-
'test@example.net..'
|
89
|
+
'test@example.net..',
|
90
|
+
'comma,@example.net',
|
91
|
+
'.dot@example.net',
|
92
|
+
'dot.@example.net',
|
91
93
|
].each do |email|
|
92
94
|
|
93
95
|
@object.email = email
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: rails_email_validator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Marco Scholl
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-03-21 00:00:00 +01:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -91,7 +91,7 @@ dependencies:
|
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: *id007
|
93
93
|
description: a class to validate emails. it builded for rails
|
94
|
-
email:
|
94
|
+
email: team@phatworx.de
|
95
95
|
executables: []
|
96
96
|
|
97
97
|
extensions: []
|
@@ -125,7 +125,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
125
125
|
requirements:
|
126
126
|
- - ">="
|
127
127
|
- !ruby/object:Gem::Version
|
128
|
-
hash:
|
128
|
+
hash: 479234679788608697
|
129
129
|
segments:
|
130
130
|
- 0
|
131
131
|
version: "0"
|