valid8ors 0.1.0 → 0.1.1
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/lib/valid8ors/email_format.rb +1 -1
- data/test/email_format_test.rb +2 -1
- data/valid8ors.gemspec +1 -1
- metadata +4 -4
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
class EmailFormatValidator < ActiveModel::EachValidator
|
4
4
|
|
5
|
-
EMAIL_PATTERN = /\A[\w\-\+_\.]
|
5
|
+
EMAIL_PATTERN = /\A[\w\-\+_\.]([.]?([\w\-\+_]+)*)?@(?<domain>(?:[\w\-\.]+\.)+[a-z]{2,})\Z/i
|
6
6
|
|
7
7
|
def validate_each(record, attribute, value)
|
8
8
|
if matching = EMAIL_PATTERN.match(value)
|
data/test/email_format_test.rb
CHANGED
@@ -133,7 +133,8 @@ class TestEmailFormatValidator < MiniTest::Unit::TestCase
|
|
133
133
|
'unbracketed-IP@127.0.0.1',
|
134
134
|
'invalid-ip@127.0.0.1.26',
|
135
135
|
'another-invalid-ip@127.0.0.256',
|
136
|
-
'IP-and-port@127.0.0.1:25'
|
136
|
+
'IP-and-port@127.0.0.1:25',
|
137
|
+
'ends.with.dot.@bar.com'
|
137
138
|
]
|
138
139
|
end
|
139
140
|
|
data/valid8ors.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "valid8ors"
|
6
|
-
s.version = "0.1.
|
6
|
+
s.version = "0.1.1"
|
7
7
|
s.authors = ["Axel Vergult", "Vincent Pochet", "Ben Colon"]
|
8
8
|
s.email = ["axel@official.fm", "vincent@official.fm", "ben@official.fm"]
|
9
9
|
s.homepage = ""
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: valid8ors
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-10-
|
14
|
+
date: 2012-10-29 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activemodel
|
@@ -74,7 +74,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
74
74
|
version: '0'
|
75
75
|
segments:
|
76
76
|
- 0
|
77
|
-
hash: -
|
77
|
+
hash: -1699771514207734788
|
78
78
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
79
79
|
none: false
|
80
80
|
requirements:
|
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
83
|
version: '0'
|
84
84
|
segments:
|
85
85
|
- 0
|
86
|
-
hash: -
|
86
|
+
hash: -1699771514207734788
|
87
87
|
requirements: []
|
88
88
|
rubyforge_project:
|
89
89
|
rubygems_version: 1.8.24
|