lib/datadog/appsec/contrib/rails/patcher.rb in ddtrace-1.12.1 vs lib/datadog/appsec/contrib/rails/patcher.rb in ddtrace-1.13.0

- old
+ new

@@ -31,23 +31,23 @@ Integration.version end def patch Gateway::Watcher.watch - patch_before_intialize - patch_after_intialize + patch_before_initialize + patch_after_initialize Patcher.instance_variable_set(:@patched, true) end - def patch_before_intialize + def patch_before_initialize ::ActiveSupport.on_load(:before_initialize) do - Datadog::AppSec::Contrib::Rails::Patcher.before_intialize(self) + Datadog::AppSec::Contrib::Rails::Patcher.before_initialize(self) end end - def before_intialize(app) + def before_initialize(app) BEFORE_INITIALIZE_ONLY_ONCE_PER_APP[app].run do # Middleware must be added before the application is initialized. # Otherwise the middleware stack will be frozen. # Sometimes we don't want to activate middleware e.g. OpenTracing, etc. add_middleware(app) if Datadog.configuration.tracing[:rails][:middleware] @@ -132,16 +132,16 @@ def inspect_middlewares(app) Datadog.logger.debug { 'Rails middlewares: ' << app.middleware.map(&:inspect).inspect } end - def patch_after_intialize + def patch_after_initialize ::ActiveSupport.on_load(:after_initialize) do - Datadog::AppSec::Contrib::Rails::Patcher.after_intialize(self) + Datadog::AppSec::Contrib::Rails::Patcher.after_initialize(self) end end - def after_intialize(app) + def after_initialize(app) AFTER_INITIALIZE_ONLY_ONCE_PER_APP[app].run do # Finish configuring the tracer after the application is initialized. # We need to wait for some things, like application name, middleware stack, etc. setup_security inspect_middlewares(app)