email verify

This commit is contained in:
alan 2015-01-31 15:04:48 +08:00
parent e34e87bb82
commit 48cb0e0450
4 changed files with 14 additions and 5 deletions

View File

@ -20,7 +20,7 @@ gem "builder", "3.0.0"
gem 'acts-as-taggable-on', '2.4.1' gem 'acts-as-taggable-on', '2.4.1'
gem 'spreadsheet' gem 'spreadsheet'
gem 'ruby-ole' gem 'ruby-ole'
#gem 'email_verifier', path: 'lib/email_verifier' gem 'email_verifier', path: 'lib/email_verifier'
group :development do group :development do
gem 'grape-swagger' gem 'grape-swagger'

View File

@ -12,6 +12,13 @@ PATH
coderay (>= 1.0.0) coderay (>= 1.0.0)
erubis (>= 2.6.6) erubis (>= 2.6.6)
PATH
remote: lib/email_verifier
specs:
email_verifier (0.0.7)
dnsruby (>= 1.5)
rails (>= 3.0.0)
PATH PATH
remote: lib/rack-mini-profiler remote: lib/rack-mini-profiler
specs: specs:
@ -91,6 +98,7 @@ GEM
descendants_tracker (0.0.4) descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1) thread_safe (~> 0.3, >= 0.3.1)
diff-lcs (1.2.5) diff-lcs (1.2.5)
dnsruby (1.57.0)
equalizer (0.0.9) equalizer (0.0.9)
erubis (2.7.0) erubis (2.7.0)
execjs (2.2.1) execjs (2.2.1)
@ -315,6 +323,7 @@ DEPENDENCIES
capybara (~> 2.4.1) capybara (~> 2.4.1)
coderay (~> 1.0.6) coderay (~> 1.0.6)
coffee-rails (~> 3.2.1) coffee-rails (~> 3.2.1)
email_verifier!
factory_girl (~> 4.4.0) factory_girl (~> 4.4.0)
faker faker
fastercsv (~> 1.5.0) fastercsv (~> 1.5.0)

View File

@ -188,7 +188,7 @@ class User < Principal
validates_confirmation_of :password, :allow_nil => true validates_confirmation_of :password, :allow_nil => true
validates_inclusion_of :mail_notification, :in => MAIL_NOTIFICATION_OPTIONS.collect(&:first), :allow_blank => true validates_inclusion_of :mail_notification, :in => MAIL_NOTIFICATION_OPTIONS.collect(&:first), :allow_blank => true
validate :validate_password_length validate :validate_password_length
#validates_email_realness_of :mail validates_email_realness_of :mail
before_create :set_mail_notification before_create :set_mail_notification
before_save :update_hashed_password before_save :update_hashed_password
before_destroy :remove_references_before_destroy before_destroy :remove_references_before_destroy

View File

@ -17,9 +17,9 @@ module RedmineApp
# -- all .rb files in that directory are automatically loaded. # -- all .rb files in that directory are automatically loaded.
#verifier if email is real #verifier if email is real
# EmailVerifier.config do |config| EmailVerifier.config do |config|
# config.verifier_email = "lizanle521@126.com" config.verifier_email = "alanlong9278@126.com"
# end end
config.generators do |g| config.generators do |g|
g.test_framework :rspec, g.test_framework :rspec,