lib/rom/sql/extensions/active_support_notifications.rb in rom-sql-1.0.0.beta2 vs lib/rom/sql/extensions/active_support_notifications.rb in rom-sql-1.0.0.beta3

- old
+ new

@@ -2,27 +2,16 @@ require 'active_support/notifications' module ROM module SQL module ActiveSupportInstrumentation - if Sequel::MAJOR == 4 && Sequel::MINOR < 35 - def log_yield(sql, args = nil) - ActiveSupport::Notifications.instrument( - 'sql.rom', - sql: sql, - name: instrumentation_name, - binds: args - ) { super } - end - else - def log_connection_yield(sql, _conn, args = nil) - ActiveSupport::Notifications.instrument( - 'sql.rom', - sql: sql, - name: instrumentation_name, - binds: args - ) { super } - end + def log_connection_yield(sql, _conn, args = nil) + ActiveSupport::Notifications.instrument( + 'sql.rom', + sql: sql, + name: instrumentation_name, + binds: args + ) { super } end private def instrumentation_name