Updated gem hooks for bushido claimed event

This commit is contained in:
Sean Grove 2011-07-25 19:37:23 -07:00
parent 7b8053241d
commit 9bab872e5b
4 changed files with 22 additions and 7 deletions

View File

@ -78,6 +78,6 @@ group :test do
end
group :production do
gem 'bushido'
gem 'bushido', :git => 'git://github.com/Bushido/bushidogem.git'
end

View File

@ -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

View File

@ -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]

View 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