From a24713c71160e474f4c5078612e0fb1927692367 Mon Sep 17 00:00:00 2001 From: will89 Date: Fri, 29 Jan 2021 09:35:24 -0500 Subject: [PATCH] Create release for 0.6.2 (#20) --- CHANGELOG.md | 3 +++ lib/delayed/job_groups/version.rb | 2 +- lib/delayed_job_groups_plugin.rb | 15 ++++++--------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af99245..732e470 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +### 0.6.2 +* Defer including extension until delayed_job_active_record is loaded + ### 0.6.1 * Fix job_group_id `belongs_to` behavior when `config.active_record.belongs_to_required_by_default` is enabled. diff --git a/lib/delayed/job_groups/version.rb b/lib/delayed/job_groups/version.rb index 3c54389..7f26640 100644 --- a/lib/delayed/job_groups/version.rb +++ b/lib/delayed/job_groups/version.rb @@ -2,6 +2,6 @@ module Delayed module JobGroups - VERSION = '0.6.1' + VERSION = '0.6.2' end end diff --git a/lib/delayed_job_groups_plugin.rb b/lib/delayed_job_groups_plugin.rb index 1c69651..acbaa26 100644 --- a/lib/delayed_job_groups_plugin.rb +++ b/lib/delayed_job_groups_plugin.rb @@ -11,15 +11,12 @@ require 'delayed/job_groups/yaml_loader' require 'delayed/job_groups/version' -if defined?(Delayed::Backend::ActiveRecord) - if defined?(Rails::Railtie) - # Postpone initialization to railtie for correct order - require 'delayed/job_groups/railtie' - else - # Do the same as in the railtie - Delayed::Backend::ActiveRecord::Job.include(Delayed::JobGroups::JobExtensions) - end +if defined?(Rails::Railtie) + # Postpone initialization to railtie for correct order + require 'delayed/job_groups/railtie' +else + # Do the same as in the railtie + Delayed::Backend::ActiveRecord::Job.include(Delayed::JobGroups::JobExtensions) end - Delayed::Worker.plugins << Delayed::JobGroups::Plugin