Updated gem hooks for bushido claimed event
This commit is contained in:
parent
7b8053241d
commit
9bab872e5b
2
Gemfile
2
Gemfile
@ -78,6 +78,6 @@ group :test do
|
||||
end
|
||||
|
||||
group :production do
|
||||
gem 'bushido'
|
||||
gem 'bushido', :git => 'git://github.com/Bushido/bushidogem.git'
|
||||
end
|
||||
|
||||
|
16
Gemfile.lock
16
Gemfile.lock
@ -1,3 +1,13 @@
|
||||
GIT
|
||||
remote: git://github.com/Bushido/bushidogem.git
|
||||
revision: 42dee66bb6a89d6e65e2b474289d37b0790a9913
|
||||
specs:
|
||||
bushido (0.0.30)
|
||||
highline (>= 1.6.1)
|
||||
json (>= 1.4.6)
|
||||
orm_adapter (~> 0.0.3)
|
||||
rest-client (>= 1.6.1)
|
||||
|
||||
GIT
|
||||
remote: git://github.com/Bushido/devise_cas_authenticatable.git
|
||||
revision: 0e5a949fba02629b4ee18a59c0ff410cea523829
|
||||
@ -67,10 +77,6 @@ GEM
|
||||
bson (1.3.1)
|
||||
bson_ext (1.3.1)
|
||||
builder (2.1.2)
|
||||
bushido (0.0.30)
|
||||
highline (>= 1.6.1)
|
||||
json (>= 1.4.6)
|
||||
rest-client (>= 1.6.1)
|
||||
cancan (1.6.5)
|
||||
capybara (1.0.0)
|
||||
mime-types (>= 1.16)
|
||||
@ -296,7 +302,7 @@ DEPENDENCIES
|
||||
actionmailer-with-request
|
||||
autotest
|
||||
bson_ext (~> 1.3.0)
|
||||
bushido
|
||||
bushido!
|
||||
bushido_stub!
|
||||
cancan
|
||||
capybara
|
||||
|
@ -26,6 +26,8 @@ module Locomotive
|
||||
end
|
||||
|
||||
def enable_bushido!
|
||||
require './lib/locomotive/hosting/bushido/hooks'
|
||||
|
||||
self.config.domain = ENV['APP_TLD'] unless self.config.multi_sites?
|
||||
|
||||
self.config.devise_modules = [:cas_authenticatable, :rememberable, :trackable]
|
||||
@ -134,4 +136,4 @@ module Locomotive
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
7
lib/locomotive/hosting/bushido/hooks.rb
Normal file
7
lib/locomotive/hosting/bushido/hooks.rb
Normal file
@ -0,0 +1,7 @@
|
||||
Bushido::Hooks.listen("app.claimed") do |data|
|
||||
puts "Saving #{account.inspect} with incoming data #{data.inspect}"
|
||||
|
||||
account = Account.first
|
||||
account.email = data["email"]
|
||||
account.save
|
||||
end
|
Loading…
Reference in New Issue
Block a user