email-validator 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,22 +1,36 @@
1
- ## MAC OS
2
- .DS_Store
1
+ # rcov generated
2
+ coverage
3
3
 
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
4
+ # rdoc generated
5
+ rdoc
7
6
 
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
7
+ # yard generated
8
+ doc
9
+ .yardoc
12
10
 
13
- ## VIM
14
- *.swp
11
+ # bundler
12
+ .bundle
13
+ Gemfile.lock
15
14
 
16
- ## PROJECT::GENERAL
17
- coverage
18
- rdoc
15
+ # jeweler generated
19
16
  pkg
17
+ *.gem
18
+
19
+ # test files
20
+ test/*.log
21
+ test/*.sqlite3
22
+
23
+ # For vim:
24
+ *.swp
25
+
26
+ # For MacOS:
27
+ .DS_Store
28
+
29
+ # git files
30
+ *.orig
20
31
 
21
- ## PROJECT::SPECIFIC
32
+ # rails files
33
+ tmp
34
+ log
35
+ *.log
22
36
  *.sqlite3
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm use ree-1.8.7-2011.03@email-validator --create
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in email-validator.gemspec
4
+ gemspec
data/README.rdoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = email-validator
2
2
 
3
- Description goes here.
3
+ Convenient ActiveRecord Validator to validate valid email address on model.
4
4
 
5
5
  == Note on Patches/Pull Requests
6
6
 
data/Rakefile CHANGED
@@ -1,23 +1,4 @@
1
- require 'rubygems'
2
- require 'rake'
3
-
4
- begin
5
- require 'jeweler'
6
- Jeweler::Tasks.new do |gem|
7
- gem.name = "email-validator"
8
- gem.summary = %Q{validate that email attribute contains valid email}
9
- gem.description = %Q{validate that email attribute contains valid email}
10
- gem.email = "ryan@socialcast.com"
11
- gem.homepage = "http://github.com/wireframe/email-validator"
12
- gem.authors = ["Ryan Sonnek"]
13
- gem.add_runtime_dependency "activerecord", ">= 2.2.3"
14
- gem.add_development_dependency "shoulda", ">= 0"
15
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
16
- end
17
- Jeweler::GemcutterTasks.new
18
- rescue LoadError
19
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
20
- end
1
+ require "bundler/gem_tasks"
21
2
 
22
3
  require 'rake/testtask'
23
4
  Rake::TestTask.new(:test) do |test|
@@ -25,30 +6,4 @@ Rake::TestTask.new(:test) do |test|
25
6
  test.pattern = 'test/**/test_*.rb'
26
7
  test.verbose = true
27
8
  end
28
-
29
- begin
30
- require 'rcov/rcovtask'
31
- Rcov::RcovTask.new do |test|
32
- test.libs << 'test'
33
- test.pattern = 'test/**/test_*.rb'
34
- test.verbose = true
35
- end
36
- rescue LoadError
37
- task :rcov do
38
- abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
39
- end
40
- end
41
-
42
- task :test => :check_dependencies
43
-
44
9
  task :default => :test
45
-
46
- require 'rake/rdoctask'
47
- Rake::RDocTask.new do |rdoc|
48
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
49
-
50
- rdoc.rdoc_dir = 'rdoc'
51
- rdoc.title = "email-validator #{version}"
52
- rdoc.rdoc_files.include('README*')
53
- rdoc.rdoc_files.include('lib/**/*.rb')
54
- end
@@ -1,59 +1,26 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
1
  # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "email-validator/version"
5
4
 
6
5
  Gem::Specification.new do |s|
7
- s.name = %q{email-validator}
8
- s.version = "0.2.1"
6
+ s.name = "email-validator"
7
+ s.version = Email::Validator::VERSION
8
+ s.authors = ["Ryan Sonnek"]
9
+ s.email = ["ryan@socialcast.com"]
10
+ s.homepage = ""
11
+ s.summary = %q{validate that email attribute contains valid email}
12
+ s.description = %q{ActiveRecord validator to validate that email attribute contains valid email}
9
13
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Ryan Sonnek"]
12
- s.date = %q{2010-10-13}
13
- s.description = %q{validate that email attribute contains valid email}
14
- s.email = %q{ryan@socialcast.com}
15
- s.extra_rdoc_files = [
16
- "LICENSE",
17
- "README.rdoc"
18
- ]
19
- s.files = [
20
- ".document",
21
- ".gitignore",
22
- "LICENSE",
23
- "README.rdoc",
24
- "Rakefile",
25
- "VERSION",
26
- "email-validator.gemspec",
27
- "lib/email-validator.rb",
28
- "lib/rfc822.rb",
29
- "test/database.yml",
30
- "test/helper.rb",
31
- "test/test_email-validator.rb"
32
- ]
33
- s.homepage = %q{http://github.com/wireframe/email-validator}
34
- s.rdoc_options = ["--charset=UTF-8"]
35
- s.require_paths = ["lib"]
36
- s.rubygems_version = %q{1.3.7}
37
- s.summary = %q{validate that email attribute contains valid email}
38
- s.test_files = [
39
- "test/helper.rb",
40
- "test/test_email-validator.rb"
41
- ]
14
+ s.rubyforge_project = "email-validator"
42
15
 
43
- if s.respond_to? :specification_version then
44
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
45
- s.specification_version = 3
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
46
20
 
47
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
48
- s.add_runtime_dependency(%q<activerecord>, [">= 2.2.3"])
49
- s.add_development_dependency(%q<shoulda>, [">= 0"])
50
- else
51
- s.add_dependency(%q<activerecord>, [">= 2.2.3"])
52
- s.add_dependency(%q<shoulda>, [">= 0"])
53
- end
54
- else
55
- s.add_dependency(%q<activerecord>, [">= 2.2.3"])
56
- s.add_dependency(%q<shoulda>, [">= 0"])
57
- end
21
+ s.add_runtime_dependency(%q<activerecord>, [">= 2.2.3"])
22
+ s.add_development_dependency(%q<mocha>, ["0.10.0"])
23
+ s.add_development_dependency(%q<shoulda-context>, ["1.0.0"])
24
+ s.add_development_dependency(%q<rake>, ["0.9.2.2"])
25
+ s.add_development_dependency(%q<sqlite3>, ["1.3.4"])
58
26
  end
59
-
@@ -1,6 +1,11 @@
1
+ require 'email-validator/version'
2
+ require 'active_support/concern'
3
+ require 'active_record'
1
4
  require File.join(File.dirname(__FILE__), 'rfc822')
2
5
 
3
6
  module EmailValidator
7
+ extend ActiveSupport::Concern
8
+
4
9
  module ClassMethods
5
10
  include RFC822
6
11
 
@@ -15,4 +20,4 @@ module EmailValidator
15
20
  end
16
21
  end
17
22
 
18
- ActiveRecord::Base.send(:extend, EmailValidator::ClassMethods)
23
+ ActiveRecord::Base.send(:include, EmailValidator)
@@ -0,0 +1,5 @@
1
+ module Email
2
+ module Validator
3
+ VERSION = "0.2.2"
4
+ end
5
+ end
data/test/helper.rb CHANGED
@@ -1,8 +1,5 @@
1
1
  require 'rubygems'
2
- require 'test/unit'
3
- require 'shoulda'
4
- require 'mocha'
5
- require 'active_record'
2
+ require 'bundler/setup'
6
3
 
7
4
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
8
5
  $LOAD_PATH.unshift(File.dirname(__FILE__))
@@ -12,5 +9,7 @@ config = YAML::load(IO.read(File.join(File.dirname(__FILE__), 'database.yml')))
12
9
  # ActiveRecord::Base.logger = Logger.new(File.join(File.dirname(__FILE__), "debug.log"))
13
10
  ActiveRecord::Base.establish_connection(config[ENV['DB'] || 'sqlite'])
14
11
 
12
+ require 'shoulda/context'
13
+ require 'test/unit'
15
14
  class Test::Unit::TestCase
16
15
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: email-validator
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
5
- prerelease: false
4
+ hash: 19
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 1
10
- version: 0.2.1
9
+ - 2
10
+ version: 0.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Sonnek
@@ -15,13 +15,12 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-13 00:00:00 -05:00
19
- default_executable:
18
+ date: 2011-11-28 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: activerecord
23
22
  prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
23
+ version_requirements: &id001 !ruby/object:Gem::Requirement
25
24
  none: false
26
25
  requirements:
27
26
  - - ">="
@@ -32,51 +31,103 @@ dependencies:
32
31
  - 2
33
32
  - 3
34
33
  version: 2.2.3
34
+ requirement: *id001
35
35
  type: :runtime
36
- version_requirements: *id001
37
36
  - !ruby/object:Gem::Dependency
38
- name: shoulda
37
+ name: mocha
39
38
  prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
39
+ version_requirements: &id002 !ruby/object:Gem::Requirement
41
40
  none: false
42
41
  requirements:
43
- - - ">="
42
+ - - "="
43
+ - !ruby/object:Gem::Version
44
+ hash: 55
45
+ segments:
46
+ - 0
47
+ - 10
48
+ - 0
49
+ version: 0.10.0
50
+ requirement: *id002
51
+ type: :development
52
+ - !ruby/object:Gem::Dependency
53
+ name: shoulda-context
54
+ prerelease: false
55
+ version_requirements: &id003 !ruby/object:Gem::Requirement
56
+ none: false
57
+ requirements:
58
+ - - "="
59
+ - !ruby/object:Gem::Version
60
+ hash: 23
61
+ segments:
62
+ - 1
63
+ - 0
64
+ - 0
65
+ version: 1.0.0
66
+ requirement: *id003
67
+ type: :development
68
+ - !ruby/object:Gem::Dependency
69
+ name: rake
70
+ prerelease: false
71
+ version_requirements: &id004 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - "="
44
75
  - !ruby/object:Gem::Version
45
- hash: 3
76
+ hash: 11
46
77
  segments:
47
78
  - 0
48
- version: "0"
79
+ - 9
80
+ - 2
81
+ - 2
82
+ version: 0.9.2.2
83
+ requirement: *id004
84
+ type: :development
85
+ - !ruby/object:Gem::Dependency
86
+ name: sqlite3
87
+ prerelease: false
88
+ version_requirements: &id005 !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - "="
92
+ - !ruby/object:Gem::Version
93
+ hash: 19
94
+ segments:
95
+ - 1
96
+ - 3
97
+ - 4
98
+ version: 1.3.4
99
+ requirement: *id005
49
100
  type: :development
50
- version_requirements: *id002
51
- description: validate that email attribute contains valid email
52
- email: ryan@socialcast.com
101
+ description: ActiveRecord validator to validate that email attribute contains valid email
102
+ email:
103
+ - ryan@socialcast.com
53
104
  executables: []
54
105
 
55
106
  extensions: []
56
107
 
57
- extra_rdoc_files:
58
- - LICENSE
59
- - README.rdoc
108
+ extra_rdoc_files: []
109
+
60
110
  files:
61
111
  - .document
62
112
  - .gitignore
113
+ - .rvmrc
114
+ - Gemfile
63
115
  - LICENSE
64
116
  - README.rdoc
65
117
  - Rakefile
66
- - VERSION
67
118
  - email-validator.gemspec
68
119
  - lib/email-validator.rb
120
+ - lib/email-validator/version.rb
69
121
  - lib/rfc822.rb
70
122
  - test/database.yml
71
123
  - test/helper.rb
72
124
  - test/test_email-validator.rb
73
- has_rdoc: true
74
- homepage: http://github.com/wireframe/email-validator
125
+ homepage: ""
75
126
  licenses: []
76
127
 
77
128
  post_install_message:
78
- rdoc_options:
79
- - --charset=UTF-8
129
+ rdoc_options: []
130
+
80
131
  require_paths:
81
132
  - lib
82
133
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -99,11 +150,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
150
  version: "0"
100
151
  requirements: []
101
152
 
102
- rubyforge_project:
103
- rubygems_version: 1.3.7
153
+ rubyforge_project: email-validator
154
+ rubygems_version: 1.8.5
104
155
  signing_key:
105
156
  specification_version: 3
106
157
  summary: validate that email attribute contains valid email
107
158
  test_files:
159
+ - test/database.yml
108
160
  - test/helper.rb
109
161
  - test/test_email-validator.rb
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.2.1