simple_email_validation 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/simple_email_validation.rb +2 -2
- data/lib/simple_email_validation/version.rb +1 -1
- data/simple_email_validation.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc84028cc0ec5843b4ae5173cabc0c85b1385a91
|
4
|
+
data.tar.gz: 30617b28a99102e5b597c89c667ee77102417ed6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3575e688e9b90ab0bc092650a44e75764e89eee006ee8211fac0d44878fd6f9d21fecb5631359eb6a08c36fe31df29490115a1915d1b7eadc17576983f34226
|
7
|
+
data.tar.gz: cab1fda194977724bc7bd7843cdfde02a6059225c8736c8a4e5c8f93ab1d23106b2f9cf26995f6cc7ca205788b3a1b5c2ffc848913f26aab45be7f0068b1a6ae
|
data/README.md
CHANGED
@@ -3,13 +3,13 @@ class EmailValidator < ActiveModel::EachValidator
|
|
3
3
|
|
4
4
|
class << self
|
5
5
|
def valid?(email)
|
6
|
-
email.match(REG_EXP)
|
6
|
+
!!(email.match(REG_EXP))
|
7
7
|
end
|
8
8
|
end
|
9
9
|
|
10
10
|
def validate_each(record, attribute, value)
|
11
11
|
unless self.class.valid?(value)
|
12
|
-
record.errors.add(attribute, options[:
|
12
|
+
record.errors.add(attribute, options[:message])
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
22
|
spec.add_development_dependency "bundler", "~> 1.12"
|
23
|
+
spec.add_development_dependency "pry-byebug", "~> 3.0"
|
23
24
|
spec.add_development_dependency "rake", "~> 10.0"
|
24
25
|
spec.add_development_dependency "rspec", "~> 3.0"
|
25
26
|
spec.add_runtime_dependency "activemodel"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_email_validation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ryosuke-endo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.12'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pry-byebug
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rake
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|