exception_notification의 간단한 확장으로 이럴 때 사용할 수 있겠다.
- 좀 더 자세하게 exception log를 남겨두고 싶을 때
- 메일을 보내는 등의 액션은 따로(ex. graylog2 or fluentd) 하고 싶을 때
exception_notification의 간단한 확장으로 이럴 때 사용할 수 있겠다.
# Don't need passwords in test DB to be secure, but we would like 'em to be | |
# fast -- and the stretches mechanism is intended to make passwords | |
# computationally expensive. | |
module Devise | |
module Models | |
module DatabaseAuthenticatable | |
def valid_password?(password) | |
return false if encrypted_password.blank? | |
Devise.secure_compare(password, self.encrypted_password) | |
end |
require 'rubygems' | |
require 'cool.io' | |
require "redis/connection/command_helper" | |
class RedisPubsub < Cool.io::TCPSocket | |
include ::Redis::Connection::CommandHelper | |
event_callback :on_subscribe, :on_unsubscribe, :on_message | |
attr_accessor :args | |
def subscribe(*channels) |
rvm get head | |
rvm reload | |
rvm cleanup all | |
rvm package install readline | |
curl https://raw.github.com/gist/1008945/7532898172cd9f03b4c0d0db145bc2440dcbb2f6/load.patch > /tmp/load.patch | |
curl https://raw.github.com/gist/856296/patch-1.9.2-gc.patch > /tmp/gc.patch | |
rvm install ruby-1.9.2-p180 --patch /tmp/load.patch,/tmp/gc.patch --with-readline-dir=$rvm_path/usr -n patched | |
rvm --create 1.9.2-patched@dev --default |