lib/rails/auth/monitor/middleware.rb in rails-auth-2.0.2 vs lib/rails/auth/monitor/middleware.rb in rails-auth-2.0.3

- old
+ new

@@ -3,10 +3,10 @@ module Monitor # Fires a user-specified callback which reports on authorization success # or failure. Useful for logging or monitoring systems for AuthZ failures class Middleware def initialize(app, callback) - raise TypeError, "expected Proc callback, got #{callback.class}" unless callback.is_a?(Proc) + raise ArgumentError, "callback must respond to :call" unless callback.respond_to?(:call) @app = app @callback = callback end