rails_email_validator 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -7,6 +7,7 @@ source "http://rubygems.org"
7
7
  # Include everything needed to run rake, tests, features, etc.
8
8
  group :development do
9
9
  gem "bundler", "~> 1.0.0"
10
- gem "jeweler", "~> 1.5.1"
10
+ gem "jeweler", "~> 1.5.1"
11
+ gem "cover_me"
11
12
  gem "idn", :git => "git://github.com/mihu/idn.git"
12
13
  end
data/Rakefile CHANGED
@@ -33,6 +33,17 @@ Rake::TestTask.new(:test) do |test|
33
33
  test.verbose = true
34
34
  end
35
35
 
36
+ namespace :cover_me do
37
+ task :report do
38
+ require 'cover_me'
39
+ CoverMe.complete!
40
+ end
41
+ end
42
+
43
+ task :test do
44
+ Rake::Task['cover_me:report'].invoke
45
+ end
46
+
36
47
  task :default => :test
37
48
 
38
49
  require 'rake/rdoctask'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -1,3 +1,5 @@
1
+ # encoding:utf-8
2
+
1
3
  require 'active_model'
2
4
 
3
5
  # Validator for email
@@ -7,6 +9,7 @@ class EmailValidator < ActiveModel::EachValidator
7
9
  options[:validate_mx].nil? or options[:validate_mx] == true
8
10
  end
9
11
 
12
+ # check the options for idn support
10
13
  def allow_idn?
11
14
  options[:allow_idn].nil? or options[:allow_idn] == true
12
15
  end
@@ -21,6 +24,7 @@ class EmailValidator < ActiveModel::EachValidator
21
24
  not mx.nil? and mx.size > 0
22
25
  end
23
26
 
27
+ # convert an unicode domain_part to asccii for validation
24
28
  def convert_idn(domain_part)
25
29
  if allow_idn?
26
30
  # idn suport if available
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rails_email_validator}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
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"]
@@ -47,12 +47,14 @@ Gem::Specification.new do |s|
47
47
  s.add_runtime_dependency(%q<activemodel>, [">= 3.0.0"])
48
48
  s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
49
49
  s.add_development_dependency(%q<jeweler>, ["~> 1.5.1"])
50
+ s.add_development_dependency(%q<cover_me>, [">= 0"])
50
51
  s.add_development_dependency(%q<idn>, [">= 0"])
51
52
  s.add_runtime_dependency(%q<activemodel>, [">= 3.0.0"])
52
53
  else
53
54
  s.add_dependency(%q<activemodel>, [">= 3.0.0"])
54
55
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
55
56
  s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
57
+ s.add_dependency(%q<cover_me>, [">= 0"])
56
58
  s.add_dependency(%q<idn>, [">= 0"])
57
59
  s.add_dependency(%q<activemodel>, [">= 3.0.0"])
58
60
  end
@@ -60,6 +62,7 @@ Gem::Specification.new do |s|
60
62
  s.add_dependency(%q<activemodel>, [">= 3.0.0"])
61
63
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
62
64
  s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
65
+ s.add_dependency(%q<cover_me>, [">= 0"])
63
66
  s.add_dependency(%q<idn>, [">= 0"])
64
67
  s.add_dependency(%q<activemodel>, [">= 3.0.0"])
65
68
  end
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  require 'rubygems'
2
4
  require 'bundler'
3
5
  begin
@@ -7,6 +9,7 @@ rescue Bundler::BundlerError => e
7
9
  $stderr.puts "Run `bundle install` to install missing gems"
8
10
  exit e.status_code
9
11
  end
12
+ require 'cover_me'
10
13
  require 'test/unit'
11
14
 
12
15
  $LOAD_PATH.unshift(File.dirname(__FILE__))
@@ -1,4 +1,4 @@
1
- # encoding:utf-8
1
+ # encoding: utf-8
2
2
 
3
3
  require 'helper'
4
4
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Marco Scholl
@@ -63,7 +63,7 @@ dependencies:
63
63
  prerelease: false
64
64
  version_requirements: *id003
65
65
  - !ruby/object:Gem::Dependency
66
- name: idn
66
+ name: cover_me
67
67
  requirement: &id004 !ruby/object:Gem::Requirement
68
68
  none: false
69
69
  requirements:
@@ -76,8 +76,21 @@ dependencies:
76
76
  prerelease: false
77
77
  version_requirements: *id004
78
78
  - !ruby/object:Gem::Dependency
79
- name: activemodel
79
+ name: idn
80
80
  requirement: &id005 !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ segments:
86
+ - 0
87
+ version: "0"
88
+ type: :development
89
+ prerelease: false
90
+ version_requirements: *id005
91
+ - !ruby/object:Gem::Dependency
92
+ name: activemodel
93
+ requirement: &id006 !ruby/object:Gem::Requirement
81
94
  none: false
82
95
  requirements:
83
96
  - - ">="
@@ -89,7 +102,7 @@ dependencies:
89
102
  version: 3.0.0
90
103
  type: :runtime
91
104
  prerelease: false
92
- version_requirements: *id005
105
+ version_requirements: *id006
93
106
  description: a class to validate emails. it builded for rails
94
107
  email: develop@marco-scholl.de
95
108
  executables: []
@@ -125,7 +138,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
125
138
  requirements:
126
139
  - - ">="
127
140
  - !ruby/object:Gem::Version
128
- hash: -2629671929889912192
141
+ hash: -1658401652489784137
129
142
  segments:
130
143
  - 0
131
144
  version: "0"