From adc4857d58d8215478e24e4cf09c33626a63ce2a Mon Sep 17 00:00:00 2001 From: Oleg Antonyan Date: Mon, 25 Dec 2023 17:13:52 +0100 Subject: [PATCH] Fix Ruby 3.3 deprecation warning Ruby 3.3 [moved][] the `observer` library into a bundled gem, which means we must declare it as an explicit depedency going forward. [moved]: https://www.ruby-lang.org/en/news/2023/12/25/ruby-3-3-0-released/ --- Gemfile.lock | 2 ++ factory_bot.gemspec | 1 + 2 files changed, 3 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index 5524ac93..0af025d9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,6 +3,7 @@ PATH specs: factory_bot (6.4.2) activesupport (>= 5.0.0) + observer GEM remote: https://rubygems.org/ @@ -73,6 +74,7 @@ GEM middleware (0.1.0) minitest (5.14.3) multi_test (0.1.2) + observer (0.1.2) parallel (1.22.1) parser (3.1.2.1) ast (~> 2.4.1) diff --git a/factory_bot.gemspec b/factory_bot.gemspec index aedc4f4b..e6123150 100644 --- a/factory_bot.gemspec +++ b/factory_bot.gemspec @@ -27,6 +27,7 @@ Gem::Specification.new do |s| } s.add_dependency("activesupport", ">= 5.0.0") + s.add_dependency("observer") if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.3') s.add_development_dependency("activerecord") s.add_development_dependency("appraisal")