diff --git a/Gemfile b/Gemfile index 037c606c8..f59c92077 100644 --- a/Gemfile +++ b/Gemfile @@ -20,7 +20,7 @@ gem "builder", "3.0.0" gem 'acts-as-taggable-on', '2.4.1' gem 'spreadsheet' gem 'ruby-ole' -#gem 'email_verifier', path: 'lib/email_verifier' +gem 'email_verifier', path: 'lib/email_verifier' group :development do gem 'grape-swagger' diff --git a/Gemfile.lock b/Gemfile.lock index 355ca422d..8c5816e13 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -12,6 +12,13 @@ PATH coderay (>= 1.0.0) erubis (>= 2.6.6) +PATH + remote: lib/email_verifier + specs: + email_verifier (0.0.7) + dnsruby (>= 1.5) + rails (>= 3.0.0) + PATH remote: lib/rack-mini-profiler specs: @@ -91,6 +98,7 @@ GEM descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) diff-lcs (1.2.5) + dnsruby (1.57.0) equalizer (0.0.9) erubis (2.7.0) execjs (2.2.1) @@ -315,6 +323,7 @@ DEPENDENCIES capybara (~> 2.4.1) coderay (~> 1.0.6) coffee-rails (~> 3.2.1) + email_verifier! factory_girl (~> 4.4.0) faker fastercsv (~> 1.5.0) diff --git a/app/models/user.rb b/app/models/user.rb index 06f59c764..bef65fe54 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -188,7 +188,7 @@ class User < Principal validates_confirmation_of :password, :allow_nil => true validates_inclusion_of :mail_notification, :in => MAIL_NOTIFICATION_OPTIONS.collect(&:first), :allow_blank => true validate :validate_password_length - #validates_email_realness_of :mail + validates_email_realness_of :mail before_create :set_mail_notification before_save :update_hashed_password before_destroy :remove_references_before_destroy diff --git a/config/application.rb b/config/application.rb index c7f2f3ea5..647675784 100644 --- a/config/application.rb +++ b/config/application.rb @@ -17,9 +17,9 @@ module RedmineApp # -- all .rb files in that directory are automatically loaded. #verifier if email is real - # EmailVerifier.config do |config| - # config.verifier_email = "lizanle521@126.com" - # end + EmailVerifier.config do |config| + config.verifier_email = "alanlong9278@126.com" + end config.generators do |g| g.test_framework :rspec,