Permalink
Browse files

support for ripple 1.x

  • Loading branch information...
1 parent 77d1991 commit a6c86405f0b18f5787e4b52535643ea63f2804df Stefan Mees committed Mar 21, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 lib/rpm_contrib/instrumentation/ripple.rb
@@ -11,7 +11,8 @@
end
executes do
- ::Ripple::Callbacks::InstanceMethods.class_eval do
+ (defined?(::Ripple::Callbacks::InstanceMethods) ?
+ ::Ripple::Callbacks::InstanceMethods : ::Ripple::Callbacks).class_eval do
add_method_tracer :valid?, 'Database/Riak/Ripple/valid?'
end
@@ -20,11 +21,12 @@
add_method_tracer :destroy_all, 'Database/Riak/Ripple/destroy_all'
end
- ::Ripple::Document::Persistence::InstanceMethods.class_eval do
+
+ (defined?(::Ripple::Document::Persistence::InstanceMethods) ?
+ ::Ripple::Document::Persistence::InstanceMethods : ::Ripple::Document::Persistence).class_eval do
add_method_tracer :really_save, 'Database/Riak/Ripple/really_save'
add_method_tracer :reload, 'Database/Riak/Ripple/reload'
- add_method_tracer :delete, 'Database/Riak/Ripple/delete'
- add_method_tracer :destroy, 'Database/Riak/Ripple/destroy'
+ add_method_tracer :destroy!, 'Database/Riak/Ripple/destroy'
add_method_tracer :update_attribute, 'Database/Riak/Ripple/update_attribute'
add_method_tracer :update_attributes, 'Database/Riak/Ripple/update_attributes'
end

0 comments on commit a6c8640

Please sign in to comment.