spectator-validates_email 0.2.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c91fa1fede6cc1ab4e6152c7239d10512e61f591
4
- data.tar.gz: cdf0e5261af8d7bc7cfc2906017fbe2c728c06ac
2
+ SHA256:
3
+ metadata.gz: 9d6f064b39f786b9f44abf0c7397f10020a10110a61a33cd3a74565e14dde2f9
4
+ data.tar.gz: 0b38b38837bb3c6a61b2ebf53f5e55a48c0790dfaa7becb8312003a3e416c5d7
5
5
  SHA512:
6
- metadata.gz: 799f87dd3b4d0624a30512b03eacaad4314bc025028faf6c753fffd8ace43ea54954912aab39328604ad663b4ff8895938fc0d7701b07b90ca7f9c7b296e8e6e
7
- data.tar.gz: d416c09a2ad6c22cf65b8a2488cb03fce7510e1e549845ac7c250b7e6899e595db9afb1b7ea01a07cba76c86fe82909d8e047ecfba5f384fa828363d0eb138a4
6
+ metadata.gz: d8a1ba060243e5b00c8aea3320fb42afefa967fe343b4cdc00b1bbed28da632b3a793d2981b978f6a53bd482a4dddf990932dfa2c49d5cdb164817a8f944b028
7
+ data.tar.gz: 195838246706f0d5c2a3f7b3240261c8a70879ceff9c15e0c61392c4487ac1f1391c14b1ac57f31fcf63aab0f40c493bbb83f234eeac396d4a6e9f8a2655b0a6
@@ -1,10 +1,7 @@
1
- # Email validation class which uses Rails 3 ActiveModel
1
+ # Email validation class which uses Rails 4 ActiveModel
2
2
  # validation mechanism.
3
3
  #
4
4
  class EmailValidator < ActiveModel::EachValidator
5
- class Encoding
6
- class CompatibilityError < StandardError; end
7
- end if RUBY_VERSION.to_f < 1.9
8
5
 
9
6
  LocalPartSpecialChars = Regexp.escape('!#$%&\'*-/=?+-^_`{|}~')
10
7
  LocalPartUnquoted = '(([[:alnum:]' + LocalPartSpecialChars + ']+[\.\+]+))*[[:alnum:]' + LocalPartSpecialChars + '+]+'
@@ -23,10 +20,10 @@ class EmailValidator < ActiveModel::EachValidator
23
20
  def validate_each(record, attribute, value)
24
21
  if validates_email_format(value)
25
22
  if options[:mx] && !validates_email_domain(value, options[:mx])
26
- record.errors[attribute] << (options[:mx_message] || I18n.t(:mx_invalid, :scope => [:activerecord, :errors, :messages]))
23
+ record.errors.add(attribute, (options[:mx_message] || I18n.t(:mx_invalid, scope: [:activerecord, :errors, :messages])))
27
24
  end
28
25
  else
29
- record.errors[attribute] << (options[:message] || I18n.t(:invalid, :scope => [:activerecord, :errors, :messages]))
26
+ record.errors.add(attribute, (options[:message] || I18n.t(:invalid, scope: [:activerecord, :errors, :messages])))
30
27
  end
31
28
  end
32
29
 
@@ -1,3 +1,3 @@
1
1
  module ValidatesEmail
2
- VERSION = "0.2.0"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spectator-validates_email
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yury Velikanau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-02 00:00:00.000000000 Z
11
+ date: 2019-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 3.0.0
19
+ version: 4.2.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 3.0.0
26
+ version: 4.2.0
27
27
  description: Rails plugin to validate email addresses against RFC 2822 and RFC 3696
28
28
  email:
29
29
  - yury.velikanau@gmail.com
@@ -31,10 +31,10 @@ executables: []
31
31
  extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
+ - MIT-LICENSE
35
+ - lib/validates_email.rb
34
36
  - lib/validates_email/email_validator.rb
35
37
  - lib/validates_email/version.rb
36
- - lib/validates_email.rb
37
- - MIT-LICENSE
38
38
  homepage: http://github.com/spectator/validates_email
39
39
  licenses: []
40
40
  metadata: {}
@@ -44,19 +44,18 @@ require_paths:
44
44
  - lib
45
45
  required_ruby_version: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - '>='
47
+ - - ">="
48
48
  - !ruby/object:Gem::Version
49
49
  version: '0'
50
50
  required_rubygems_version: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: 1.3.6
55
55
  requirements: []
56
56
  rubyforge_project:
57
- rubygems_version: 2.0.0
57
+ rubygems_version: 2.7.6.2
58
58
  signing_key:
59
59
  specification_version: 4
60
60
  summary: Rails plugin to validate email addresses
61
61
  test_files: []
62
- has_rdoc: