From 1af0fffad30f1c4481f1ab0cf4dfc71fe4b5b44f Mon Sep 17 00:00:00 2001 From: Misha Merkushin Date: Tue, 1 Oct 2024 08:03:38 +0300 Subject: [PATCH] fix: railtie loading to prevent calling methods that have not yet been defined (#38) --- CHANGELOG.md | 6 +++++- lib/yabeda.rb | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4177b1..6fad61c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ) ``` +### Fixed + +- Railtie loading to prevent calling methods that have not yet been defined + ## 0.12.0 - 2023-07-28 ### Added @@ -48,7 +52,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Changed -- Adapters now should use method `Yabeda.collect!` instead of manual calling of every collector block. +- Adapters now should use method `Yabeda.collect!` instead of manual calling of every collector block. ## 0.9.0 - 2021-05-07 diff --git a/lib/yabeda.rb b/lib/yabeda.rb index 516f758..11fa50a 100644 --- a/lib/yabeda.rb +++ b/lib/yabeda.rb @@ -8,7 +8,6 @@ require "yabeda/dsl" require "yabeda/tags" require "yabeda/errors" -require "yabeda/railtie" if defined?(Rails) # Extendable framework for collecting and exporting metrics from Ruby apps module Yabeda @@ -148,3 +147,5 @@ def reset! end end end + +require "yabeda/railtie" if defined?(Rails)