delayed_job_groups_plugin 0.10.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f8a1d66a3872e0a8452f31085a5ca8950ed931628560662ac54b583f7ebde064
4
- data.tar.gz: 9dbf96724e95aa1e006abdc3b3a8871aa1d8e868eefcbeb37116756ae0242328
3
+ metadata.gz: 87314d6d90c7d0ebe5944b4707b37a58523711a45c79e1062c4cd507870a214a
4
+ data.tar.gz: 6bc214f6d452e7d58e3cd4dedcd2c5cee03e5468d9263a2c10e70f77067f8647
5
5
  SHA512:
6
- metadata.gz: 389485e1c9ab8df393c72581593b5cc7c7a04630780b3e188a5c77791f43fbabc6d17b31f834d5b410dba984f0aa09c416747dcef13df7022bd5e30e327832ad
7
- data.tar.gz: 9c38ddbb6f738854cd5de47d45d69610f7c5e9d6aa68412afe4b74240950ec4ecfa702c60576645d3044670664071e70bb98d84f81ec4e6687e11b883d653f39
6
+ metadata.gz: 0eabfa621c259b393149d248c6abe5e5b1435f6f7fbdc04a334399b52aaf674ab5a4acd664ac87f0954ddac830618e321564618977fdcd4bfaeb377ebe2c7fc0
7
+ data.tar.gz: 8f78462a1063e4d23092c04469a80718286486afec1f8bb37eb333ef2ea5adb59790a3b8ef2da06e87326ef3ff5ffd1b5ecf9e8af90293350e9cd42a3395d3de
data/CHANGELOG.md CHANGED
@@ -1,7 +1,9 @@
1
1
  # Changelog
2
2
 
3
- ## 0.10.0
3
+ ## 0.10.1
4
+ - Fix Rails 7.1 deprecation warnings
4
5
 
6
+ ## 0.10.0
5
7
  - Add support for Rails 7.1
6
8
 
7
9
  ## 0.9.0
@@ -6,7 +6,12 @@ require 'active_record/version'
6
6
  module Delayed
7
7
  module JobGroups
8
8
  module Compatibility
9
+ ACTIVE_RECORD_VERSION = ::Gem::Version.new(::ActiveRecord::VERSION::STRING).release
10
+ VERSION_7_1 = ::Gem::Version.new('7.1.0')
9
11
 
12
+ def self.rails_7_1_or_greater?
13
+ ACTIVE_RECORD_VERSION >= VERSION_7_1
14
+ end
10
15
  end
11
16
  end
12
17
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative 'yaml_loader'
4
+ require_relative 'compatibility'
4
5
 
5
6
  module Delayed
6
7
  module JobGroups
@@ -8,10 +9,18 @@ module Delayed
8
9
 
9
10
  self.table_name = "#{ActiveRecord::Base.table_name_prefix}delayed_job_groups"
10
11
 
11
- serialize :on_completion_job, Delayed::JobGroups::YamlLoader
12
- serialize :on_completion_job_options, Hash
13
- serialize :on_cancellation_job, Delayed::JobGroups::YamlLoader
14
- serialize :on_cancellation_job_options, Hash
12
+ if Compatibility.rails_7_1_or_greater?
13
+ serialize :on_completion_job, coder: YAML, yaml: { unsafe_load: true }
14
+ serialize :on_completion_job_options, coder: YAML, type: Hash
15
+ serialize :on_cancellation_job, coder: YAML, yaml: { unsafe_load: true }
16
+ serialize :on_cancellation_job_options, coder: YAML, type: Hash
17
+ else
18
+ serialize :on_completion_job, Delayed::JobGroups::YamlLoader
19
+ serialize :on_completion_job_options, Hash
20
+ serialize :on_cancellation_job, Delayed::JobGroups::YamlLoader
21
+ serialize :on_cancellation_job_options, Hash
22
+ end
23
+
15
24
 
16
25
  validates :queueing_complete, :blocked, :failure_cancels_group, inclusion: [true, false]
17
26
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Delayed
4
4
  module JobGroups
5
- VERSION = '0.10.0'
5
+ VERSION = '0.10.1'
6
6
  end
7
7
  end
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # This can be removed when we only support Rails 7.1+ because Rails 7.1 add a serialization
4
+ # option for unsafe YAML loads
3
5
  module Delayed
4
6
  module JobGroups
5
7
  module YamlLoader
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: delayed_job_groups_plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Turkel
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-10-13 00:00:00.000000000 Z
12
+ date: 2023-10-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord