vjt-email_validator 1.5.2 → 1.5.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/email_validator.rb +3 -0
  2. metadata +21 -41
  3. data/rakefile.rb +0 -30
@@ -55,6 +55,9 @@ class EmailValidator < ActiveModel::EachValidator
55
55
 
56
56
  class << self
57
57
  def extract(string)
58
+ if string.respond_to?(:encode)
59
+ string = string.encode('ascii', :undef => :replace)
60
+ end
58
61
  string.scan(Scanner)
59
62
  end
60
63
 
metadata CHANGED
@@ -1,39 +1,28 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: vjt-email_validator
3
- version: !ruby/object:Gem::Version
4
- hash: 7
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.5.4
5
5
  prerelease:
6
- segments:
7
- - 1
8
- - 5
9
- - 2
10
- version: 1.5.2
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Marcello Barnaba
14
9
  - Alex Dunae
15
10
  autorequire:
16
11
  bindir: bin
17
12
  cert_chain: []
18
-
19
- date: 2011-03-03 00:00:00 +01:00
20
- default_executable:
13
+ date: 2011-11-06 00:00:00.000000000 Z
21
14
  dependencies: []
22
-
23
15
  description: ActiveModel::EachValidator to check for valid e-mail addresses
24
16
  email: vjt@openssl.it
25
17
  executables: []
26
-
27
18
  extensions: []
28
-
29
- extra_rdoc_files:
19
+ extra_rdoc_files:
30
20
  - README.rdoc
31
21
  - CHANGELOG.rdoc
32
22
  - MIT-LICENSE
33
- files:
23
+ files:
34
24
  - MIT-LICENSE
35
25
  - init.rb
36
- - rakefile.rb
37
26
  - CHANGELOG.rdoc
38
27
  - README.rdoc
39
28
  - lib/email_validator.rb
@@ -43,42 +32,33 @@ files:
43
32
  - test/test_helper.rb
44
33
  - test/database.yml
45
34
  - test/fixtures/people.yml
46
- has_rdoc: true
47
35
  homepage: http://github.com/vjt/email_validator
48
36
  licenses: []
49
-
50
37
  post_install_message:
51
- rdoc_options:
38
+ rdoc_options:
52
39
  - --title
53
40
  - email_validator
54
- require_paths:
41
+ require_paths:
55
42
  - lib
56
- required_ruby_version: !ruby/object:Gem::Requirement
43
+ required_ruby_version: !ruby/object:Gem::Requirement
57
44
  none: false
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- hash: 3
62
- segments:
63
- - 0
64
- version: "0"
65
- required_rubygems_version: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ! '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ required_rubygems_version: !ruby/object:Gem::Requirement
66
50
  none: false
67
- requirements:
68
- - - ">="
69
- - !ruby/object:Gem::Version
70
- hash: 3
71
- segments:
72
- - 0
73
- version: "0"
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
74
55
  requirements: []
75
-
76
56
  rubyforge_project:
77
- rubygems_version: 1.4.1
57
+ rubygems_version: 1.8.10
78
58
  signing_key:
79
59
  specification_version: 3
80
60
  summary: Validate e-mail addresses against RFC 2822 and RFC 3696.
81
- test_files:
61
+ test_files:
82
62
  - test/email_validator_test.rb
83
63
  - test/fixtures/person.rb
84
64
  - test/schema.rb
@@ -1,30 +0,0 @@
1
- require 'rake'
2
- require 'rake/testtask'
3
- require 'rake/rdoctask'
4
-
5
- require 'pathname'
6
-
7
- desc 'Default: run unit tests.'
8
- task :default => [:clean, :test]
9
-
10
- desc 'Remove the old log file'
11
- task :clean do
12
- Pathname(__FILE__).dirname.join('test', 'debug.log').unlink rescue nil
13
- end
14
-
15
- desc 'Test the email validator.'
16
- Rake::TestTask.new(:test) do |t|
17
- t.libs << 'lib'
18
- t.pattern = 'test/**/*_test.rb'
19
- t.verbose = true
20
- end
21
-
22
- desc 'Generate documentation for the email validator.'
23
- Rake::RDocTask.new(:rdoc) do |rdoc|
24
- rdoc.rdoc_dir = 'rdoc'
25
- rdoc.title = 'email_validator'
26
- rdoc.options << '--line-numbers --inline-source'
27
- rdoc.rdoc_files.include('README')
28
- rdoc.rdoc_files.include('TODO')
29
- rdoc.rdoc_files.include('lib/**/*.rb')
30
- end