Commit f89a74718a0297c0be5732e829d137f1d118f5f2
Exists in
master
and in
4 other branches
Merge branch 'feature/devise_email_async' of /home/git/repositories/gitlab/gitlabhq
Showing
4 changed files
with
7 additions
and
2 deletions
Show diff stats
Gemfile
@@ -16,6 +16,7 @@ gem "pg", group: :postgres | @@ -16,6 +16,7 @@ gem "pg", group: :postgres | ||
16 | 16 | ||
17 | # Auth | 17 | # Auth |
18 | gem "devise", '~> 2.2' | 18 | gem "devise", '~> 2.2' |
19 | +gem "devise-async" | ||
19 | gem 'omniauth', "~> 1.1.3" | 20 | gem 'omniauth', "~> 1.1.3" |
20 | gem 'omniauth-google-oauth2' | 21 | gem 'omniauth-google-oauth2' |
21 | gem 'omniauth-twitter' | 22 | gem 'omniauth-twitter' |
Gemfile.lock
@@ -106,6 +106,8 @@ GEM | @@ -106,6 +106,8 @@ GEM | ||
106 | orm_adapter (~> 0.1) | 106 | orm_adapter (~> 0.1) |
107 | railties (~> 3.1) | 107 | railties (~> 3.1) |
108 | warden (~> 1.2.1) | 108 | warden (~> 1.2.1) |
109 | + devise-async (0.8.0) | ||
110 | + devise (>= 2.2, < 3.2) | ||
109 | diff-lcs (1.2.4) | 111 | diff-lcs (1.2.4) |
110 | dotenv (0.8.0) | 112 | dotenv (0.8.0) |
111 | email_spec (1.4.0) | 113 | email_spec (1.4.0) |
@@ -564,6 +566,7 @@ DEPENDENCIES | @@ -564,6 +566,7 @@ DEPENDENCIES | ||
564 | d3_rails (~> 3.1.4) | 566 | d3_rails (~> 3.1.4) |
565 | database_cleaner | 567 | database_cleaner |
566 | devise (~> 2.2) | 568 | devise (~> 2.2) |
569 | + devise-async | ||
567 | email_spec | 570 | email_spec |
568 | enumerize | 571 | enumerize |
569 | factory_girl_rails | 572 | factory_girl_rails |
app/models/user.rb
@@ -42,7 +42,7 @@ require 'carrierwave/orm/activerecord' | @@ -42,7 +42,7 @@ require 'carrierwave/orm/activerecord' | ||
42 | require 'file_size_validator' | 42 | require 'file_size_validator' |
43 | 43 | ||
44 | class User < ActiveRecord::Base | 44 | class User < ActiveRecord::Base |
45 | - devise :database_authenticatable, :token_authenticatable, :lockable, | 45 | + devise :database_authenticatable, :token_authenticatable, :lockable, :async, |
46 | :recoverable, :rememberable, :trackable, :validatable, :omniauthable, :registerable | 46 | :recoverable, :rememberable, :trackable, :validatable, :omniauthable, :registerable |
47 | 47 | ||
48 | attr_accessible :email, :password, :password_confirmation, :remember_me, :bio, :name, :username, | 48 | attr_accessible :email, :password, :password_confirmation, :remember_me, :bio, :name, :username, |
@@ -398,4 +398,4 @@ class User < ActiveRecord::Base | @@ -398,4 +398,4 @@ class User < ActiveRecord::Base | ||
398 | 398 | ||
399 | self | 399 | self |
400 | end | 400 | end |
401 | -end | 401 | -end |
402 | +end | ||
402 | \ No newline at end of file | 403 | \ No newline at end of file |
@@ -0,0 +1 @@ | @@ -0,0 +1 @@ | ||
1 | +Devise::Async.backend = :sidekiq |