delayed_job_groups_plugin 0.9.0 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 392054f5714a429eb7c2ebdde98483c314ce2cfb75730b245b09b50e7a985b14
4
- data.tar.gz: c91fa4ec6ad52ec7df474b66206d2d6e8f2a605236d9a9172ff7eefe0566a84f
3
+ metadata.gz: 87314d6d90c7d0ebe5944b4707b37a58523711a45c79e1062c4cd507870a214a
4
+ data.tar.gz: 6bc214f6d452e7d58e3cd4dedcd2c5cee03e5468d9263a2c10e70f77067f8647
5
5
  SHA512:
6
- metadata.gz: 18a9acd69ea9789c1633289b2b39cc5fa8a497276eb574397b307294d890aedb90ac8d9537077c36fe28547abf3c514eb8881408a1fda093270c73f5ac80b7f7
7
- data.tar.gz: 0f3d59781205003bc9aa0c50d6a1e34cea7d23a5d5318928187858bb5ed6e64cb3159b659955691016b7b1de4ca345b2bcbaa574ec9bcae06e9d97061208b900
6
+ metadata.gz: 0eabfa621c259b393149d248c6abe5e5b1435f6f7fbdc04a334399b52aaf674ab5a4acd664ac87f0954ddac830618e321564618977fdcd4bfaeb377ebe2c7fc0
7
+ data.tar.gz: 8f78462a1063e4d23092c04469a80718286486afec1f8bb37eb333ef2ea5adb59790a3b8ef2da06e87326ef3ff5ffd1b5ecf9e8af90293350e9cd42a3395d3de
data/.circleci/config.yml CHANGED
@@ -71,6 +71,7 @@ workflows:
71
71
  gemfile:
72
72
  - "gemfiles/rails_6.1.gemfile"
73
73
  - "gemfiles/rails_7.0.gemfile"
74
+ - "gemfiles/rails_7.1.gemfile"
74
75
  ruby_version:
75
76
  - "3.0.6"
76
77
  - "3.1.4"
data/Appraisals CHANGED
@@ -9,3 +9,8 @@ appraise 'rails-7.0' do
9
9
  gem 'activerecord', '~> 7.0.2'
10
10
  gem 'activesupport', '~> 7.0.2'
11
11
  end
12
+
13
+ appraise 'rails-7.1' do
14
+ gem 'activerecord', '~> 7.1.1'
15
+ gem 'activesupport', '~> 7.1.1'
16
+ end
data/CHANGELOG.md CHANGED
@@ -1,61 +1,67 @@
1
1
  # Changelog
2
2
 
3
- ### 0.9.0
3
+ ## 0.10.1
4
+ - Fix Rails 7.1 deprecation warnings
5
+
6
+ ## 0.10.0
7
+ - Add support for Rails 7.1
8
+
9
+ ## 0.9.0
4
10
  - Add a `CompleteStuckJobGroupsJob`, which can be run periodically to close "stuck" job groups
5
11
  - Drop support for Ruby 2.7
6
12
  - Drop support for Rails 6.0
7
13
 
8
- ### 0.8.0
14
+ ## 0.8.0
9
15
  - Drop support for ruby < 2.7
10
16
  - Add support for ruby 3.1
11
17
  - Drop Rails 5.2
12
18
  - Add Rails 7.0
13
19
 
14
- ### 0.7.0
20
+ ## 0.7.0
15
21
  * Add support for ruby 3
16
22
  * Drop support for ruby < 2.6
17
23
 
18
- ### 0.6.2
24
+ ## 0.6.2
19
25
  * Defer including extension until delayed_job_active_record is loaded
20
26
 
21
- ### 0.6.1
27
+ ## 0.6.1
22
28
  * Fix job_group_id `belongs_to` behavior when `config.active_record.belongs_to_required_by_default` is enabled.
23
29
 
24
- ### 0.6.0
30
+ ## 0.6.0
25
31
  * Add support for Rails 6.1.
26
32
 
27
- ### 0.5.0
33
+ ## 0.5.0
28
34
  * Drop support for Ruby 2.3 and 2.4.
29
35
  * Drop support for Rails < 5.2.
30
36
  * Bugfix for rails version in generated migration files
31
37
 
32
- ### 0.4.3
38
+ ## 0.4.3
33
39
  * Bugfix for `on_completion_job` when `failure_cancels_group` is set to false.
34
40
 
35
- ### 0.4.2
41
+ ## 0.4.2
36
42
  * Add support for Rails 6.0.
37
43
 
38
- ### 0.4.1
44
+ ## 0.4.1
39
45
  * Bugfix for `on_completion_job` and `on_cancellation_job` YAML serialization
40
46
 
41
- ### 0.4.0
47
+ ## 0.4.0
42
48
  * Drop support for Ruby 2.0, 2.1 and 2.2.
43
49
  * Add support for Ruby 2.5.
44
50
  * Drop support for Rails < 4.2.
45
51
  * Add support for Rails 5.2
46
52
 
47
- ### 0.3.0
53
+ ## 0.3.0
48
54
  * Drop support for Ruby 1.9 and 2.0.
49
55
 
50
- ### 0.2.0
56
+ ## 0.2.0
51
57
  * Change supported delayed job version
52
58
  * Clean up lifecycle management in plugin
53
59
 
54
- ### 0.1.3
60
+ ## 0.1.3
55
61
  * Change supported rails version.
56
62
 
57
- ### 0.1.2
63
+ ## 0.1.2
58
64
  * Add configuration option to allow failed jobs not to cancel a group.
59
65
 
60
- ### 0.1.1
66
+ ## 0.1.1
61
67
  * Update the run_at for all jobs in a JobGroup when it's unblocked.
@@ -27,14 +27,14 @@ Gem::Specification.new do |spec|
27
27
 
28
28
  spec.required_ruby_version = '>= 3.0'
29
29
 
30
+ spec.add_dependency 'activerecord', '>= 6.1', '< 7.2'
30
31
  spec.add_dependency 'delayed_job', '>= 4.1'
31
- spec.add_dependency 'delayed_job_active_record', '>= 4.1'
32
+ spec.add_dependency 'delayed_job_active_record', '>= 4.1.8'
32
33
 
33
34
  spec.post_install_message = 'See https://github.com/salsify/delayed_job_groups_plugin#installation '\
34
35
  'for upgrade/installation notes.'
35
36
 
36
37
  spec.add_development_dependency 'appraisal'
37
- spec.add_dependency 'activerecord', '>= 6.1', '< 7.1'
38
38
  spec.add_development_dependency 'coveralls_reborn', '>= 0.18.0'
39
39
  spec.add_development_dependency 'database_cleaner', '>= 1.2'
40
40
  spec.add_development_dependency 'factory_bot_rails'
@@ -43,7 +43,7 @@ Gem::Specification.new do |spec|
43
43
  spec.add_development_dependency 'rspec', '~> 3'
44
44
  spec.add_development_dependency 'rspec-its'
45
45
  spec.add_development_dependency 'rspec_junit_formatter'
46
- spec.add_development_dependency 'salsify_rubocop', '~> 1.0.1'
46
+ spec.add_development_dependency 'salsify_rubocop', '~> 1.43.0'
47
47
  spec.add_development_dependency 'simplecov'
48
48
  spec.add_development_dependency 'sqlite3'
49
49
  spec.add_development_dependency 'timecop'
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 7.1.1"
6
+ gem "activesupport", "~> 7.1.1"
7
+
8
+ gemspec path: "../"
@@ -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.9.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.9.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Turkel
@@ -9,24 +9,30 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-09-21 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
- name: delayed_job
15
+ name: activerecord
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '4.1'
20
+ version: '6.1'
21
+ - - "<"
22
+ - !ruby/object:Gem::Version
23
+ version: '7.2'
21
24
  type: :runtime
22
25
  prerelease: false
23
26
  version_requirements: !ruby/object:Gem::Requirement
24
27
  requirements:
25
28
  - - ">="
26
29
  - !ruby/object:Gem::Version
27
- version: '4.1'
30
+ version: '6.1'
31
+ - - "<"
32
+ - !ruby/object:Gem::Version
33
+ version: '7.2'
28
34
  - !ruby/object:Gem::Dependency
29
- name: delayed_job_active_record
35
+ name: delayed_job
30
36
  requirement: !ruby/object:Gem::Requirement
31
37
  requirements:
32
38
  - - ">="
@@ -40,39 +46,33 @@ dependencies:
40
46
  - !ruby/object:Gem::Version
41
47
  version: '4.1'
42
48
  - !ruby/object:Gem::Dependency
43
- name: appraisal
49
+ name: delayed_job_active_record
44
50
  requirement: !ruby/object:Gem::Requirement
45
51
  requirements:
46
52
  - - ">="
47
53
  - !ruby/object:Gem::Version
48
- version: '0'
49
- type: :development
54
+ version: 4.1.8
55
+ type: :runtime
50
56
  prerelease: false
51
57
  version_requirements: !ruby/object:Gem::Requirement
52
58
  requirements:
53
59
  - - ">="
54
60
  - !ruby/object:Gem::Version
55
- version: '0'
61
+ version: 4.1.8
56
62
  - !ruby/object:Gem::Dependency
57
- name: activerecord
63
+ name: appraisal
58
64
  requirement: !ruby/object:Gem::Requirement
59
65
  requirements:
60
66
  - - ">="
61
67
  - !ruby/object:Gem::Version
62
- version: '6.1'
63
- - - "<"
64
- - !ruby/object:Gem::Version
65
- version: '7.1'
66
- type: :runtime
68
+ version: '0'
69
+ type: :development
67
70
  prerelease: false
68
71
  version_requirements: !ruby/object:Gem::Requirement
69
72
  requirements:
70
73
  - - ">="
71
74
  - !ruby/object:Gem::Version
72
- version: '6.1'
73
- - - "<"
74
- - !ruby/object:Gem::Version
75
- version: '7.1'
75
+ version: '0'
76
76
  - !ruby/object:Gem::Dependency
77
77
  name: coveralls_reborn
78
78
  requirement: !ruby/object:Gem::Requirement
@@ -191,14 +191,14 @@ dependencies:
191
191
  requirements:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: 1.0.1
194
+ version: 1.43.0
195
195
  type: :development
196
196
  prerelease: false
197
197
  version_requirements: !ruby/object:Gem::Requirement
198
198
  requirements:
199
199
  - - "~>"
200
200
  - !ruby/object:Gem::Version
201
- version: 1.0.1
201
+ version: 1.43.0
202
202
  - !ruby/object:Gem::Dependency
203
203
  name: simplecov
204
204
  requirement: !ruby/object:Gem::Requirement
@@ -265,6 +265,7 @@ files:
265
265
  - delayed_job_groups.gemspec
266
266
  - gemfiles/rails_6.1.gemfile
267
267
  - gemfiles/rails_7.0.gemfile
268
+ - gemfiles/rails_7.1.gemfile
268
269
  - lib/delayed/job_groups/compatibility.rb
269
270
  - lib/delayed/job_groups/complete_stuck_job_groups_job.rb
270
271
  - lib/delayed/job_groups/job_extensions.rb