update devise_invitable and devise
This commit is contained in:
parent
b7540ba6ab
commit
a46ff394b1
6 changed files with 18 additions and 20 deletions
4
Gemfile
4
Gemfile
|
|
@ -11,8 +11,8 @@ gem 'ohai', '0.5.8', :require => false #Chef dependency
|
||||||
gem 'nokogiri', '1.4.3.1'
|
gem 'nokogiri', '1.4.3.1'
|
||||||
|
|
||||||
#Security
|
#Security
|
||||||
gem 'devise', '1.1.3'
|
gem 'devise', '1.3.1'
|
||||||
gem 'devise_invitable', :git => 'git://github.com/zhitomirskiyi/devise_invitable.git', :branch => '0.3.5'
|
gem 'devise_invitable', '0.5.0'
|
||||||
|
|
||||||
#Authentication
|
#Authentication
|
||||||
gem 'omniauth', '0.1.6'
|
gem 'omniauth', '0.1.6'
|
||||||
|
|
|
||||||
25
Gemfile.lock
25
Gemfile.lock
|
|
@ -50,14 +50,6 @@ GIT
|
||||||
multi_xml (~> 0.2.0)
|
multi_xml (~> 0.2.0)
|
||||||
simple_oauth (~> 0.1.2)
|
simple_oauth (~> 0.1.2)
|
||||||
|
|
||||||
GIT
|
|
||||||
remote: git://github.com/zhitomirskiyi/devise_invitable.git
|
|
||||||
revision: 85abb5fef4ab4f74db818ed3d8104c2f7d24b94e
|
|
||||||
branch: 0.3.5
|
|
||||||
specs:
|
|
||||||
devise_invitable (0.3.5)
|
|
||||||
devise (~> 1.1.0)
|
|
||||||
|
|
||||||
PATH
|
PATH
|
||||||
remote: vendor/gems/jasmine
|
remote: vendor/gems/jasmine
|
||||||
specs:
|
specs:
|
||||||
|
|
@ -166,9 +158,13 @@ GEM
|
||||||
culerity (0.2.15)
|
culerity (0.2.15)
|
||||||
daemons (1.1.2)
|
daemons (1.1.2)
|
||||||
database_cleaner (0.6.0)
|
database_cleaner (0.6.0)
|
||||||
devise (1.1.3)
|
devise (1.3.1)
|
||||||
bcrypt-ruby (~> 2.1.2)
|
bcrypt-ruby (~> 2.1.2)
|
||||||
warden (~> 0.10.7)
|
orm_adapter (~> 0.0.3)
|
||||||
|
warden (~> 1.0.3)
|
||||||
|
devise_invitable (0.5.0)
|
||||||
|
devise (~> 1.3.1)
|
||||||
|
rails (>= 3.0.0, <= 3.2)
|
||||||
diff-lcs (1.1.2)
|
diff-lcs (1.1.2)
|
||||||
erubis (2.6.6)
|
erubis (2.6.6)
|
||||||
abstract (>= 1.0.0)
|
abstract (>= 1.0.0)
|
||||||
|
|
@ -301,6 +297,7 @@ GEM
|
||||||
oa-oauth (= 0.1.6)
|
oa-oauth (= 0.1.6)
|
||||||
oa-openid (= 0.1.6)
|
oa-openid (= 0.1.6)
|
||||||
open4 (1.0.1)
|
open4 (1.0.1)
|
||||||
|
orm_adapter (0.0.5)
|
||||||
polyglot (0.3.1)
|
polyglot (0.3.1)
|
||||||
pyu-ruby-sasl (0.0.3.2)
|
pyu-ruby-sasl (0.0.3.2)
|
||||||
rack (1.2.2)
|
rack (1.2.2)
|
||||||
|
|
@ -391,8 +388,8 @@ GEM
|
||||||
uuidtools (2.1.2)
|
uuidtools (2.1.2)
|
||||||
vegas (0.1.8)
|
vegas (0.1.8)
|
||||||
rack (>= 1.0.0)
|
rack (>= 1.0.0)
|
||||||
warden (0.10.7)
|
warden (1.0.4)
|
||||||
rack (>= 1.0.0)
|
rack (>= 1.0)
|
||||||
webmock (1.6.2)
|
webmock (1.6.2)
|
||||||
addressable (>= 2.2.2)
|
addressable (>= 2.2.2)
|
||||||
crack (>= 0.1.7)
|
crack (>= 0.1.7)
|
||||||
|
|
@ -418,8 +415,8 @@ DEPENDENCIES
|
||||||
cloudfiles (= 1.4.10)
|
cloudfiles (= 1.4.10)
|
||||||
cucumber-rails (= 0.3.2)
|
cucumber-rails (= 0.3.2)
|
||||||
database_cleaner (= 0.6.0)
|
database_cleaner (= 0.6.0)
|
||||||
devise (= 1.1.3)
|
devise (= 1.3.1)
|
||||||
devise_invitable!
|
devise_invitable (= 0.5.0)
|
||||||
em-websocket!
|
em-websocket!
|
||||||
excon (= 0.2.4)
|
excon (= 0.2.4)
|
||||||
factory_girl_rails
|
factory_girl_rails
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,8 @@ class Invitation < ActiveRecord::Base
|
||||||
opts[:from].save!
|
opts[:from].save!
|
||||||
invitee.reload
|
invitee.reload
|
||||||
end
|
end
|
||||||
invitee.invite!(:email => (opts[:service] == 'email'))
|
invitee.skip_invitation = (opts[:service] != 'email')
|
||||||
|
invitee.invite!
|
||||||
log_string = "event=invitation_sent to=#{opts[:identifier]} service=#{opts[:service]} "
|
log_string = "event=invitation_sent to=#{opts[:identifier]} service=#{opts[:service]} "
|
||||||
log_string << "inviter=#{opts[:from].diaspora_handle} inviter_uid=#{opts[:from].id} inviter_created_at_unix=#{opts[:from].created_at.to_i}" if opts[:from]
|
log_string << "inviter=#{opts[:from].diaspora_handle} inviter_uid=#{opts[:from].id} inviter_created_at_unix=#{opts[:from].created_at.to_i}" if opts[:from]
|
||||||
Rails.logger.info(log_string)
|
Rails.logger.info(log_string)
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ en:
|
||||||
account_locked: "Your account has been locked due to an excessive amount of unsuccessful sign in attempts."
|
account_locked: "Your account has been locked due to an excessive amount of unsuccessful sign in attempts."
|
||||||
click_to_unlock: "Click the link below to unlock your account:"
|
click_to_unlock: "Click the link below to unlock your account:"
|
||||||
unlock: "Unlock my account"
|
unlock: "Unlock my account"
|
||||||
invitation:
|
invitation_instructions:
|
||||||
subject: "You've been invited to join Diaspora!"
|
subject: "You've been invited to join Diaspora!"
|
||||||
accept: "Accept invitation"
|
accept: "Accept invitation"
|
||||||
ignore: "If you don't want to accept the invitation, please ignore this email."
|
ignore: "If you don't want to accept the invitation, please ignore this email."
|
||||||
|
|
|
||||||
|
|
@ -225,10 +225,10 @@ describe Invitation do
|
||||||
}.should_not change { @invitee.reload.serialized_private_key }
|
}.should_not change { @invitee.reload.serialized_private_key }
|
||||||
end
|
end
|
||||||
|
|
||||||
it "changes the invitation token" do
|
it "does not change the invitation token" do
|
||||||
old_token = @invitee.invitation_token
|
old_token = @invitee.invitation_token
|
||||||
Invitation.create_invitee(@valid_params)
|
Invitation.create_invitee(@valid_params)
|
||||||
@invitee.reload.invitation_token.should_not == old_token
|
@invitee.reload.invitation_token.should == old_token
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
context 'with an inviter' do
|
context 'with an inviter' do
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue