jobs_dashboard 0.3.7 → 0.3.9

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: 843f029259ef601e0bdf6ca314a26e70821a6c6f4983491010a914cc1930ea40
4
- data.tar.gz: 6abf1b0962032dd428c90cd674f0d08df4c9b9e18e248df99c9bb827391e1a96
3
+ metadata.gz: 4eb8748fd7c3b6783eaf6858951793640415800d9b9d29fa3ed6c482cf6cff63
4
+ data.tar.gz: cda5086774de04cc25470ff1d12f5129f8effeb142ab8d400f45620d1b1add8f
5
5
  SHA512:
6
- metadata.gz: d98a207aa00690b6e0d9265fe47c61bd9a35d537c9d86a748db565e1323c37f20c958981e38a282bf425d2e81be06234f473e759839dead72a20222359a722f4
7
- data.tar.gz: ceafd83e1b08426f98c41241f001d2a14bd54fbacafb53c581a3157d101fb5c6f95961a8e52a73d86cb781bf78cbbf0776e5c95dca72867337280e84034b7670
6
+ metadata.gz: c4b5050986f6d7e10e19926fe7b5d01e89956dc2bb5027fe1bbce2af7245b51ad8a680486da0e62d72becb76090ee63b7068baff12b326f569872edd41a4521a
7
+ data.tar.gz: 295174d29f0392af404d04fc595d3f5b1333bd44ed9cfd0687d09178e0fa36e1c609708dcc8c5da9f42634cfacb344c1a39a49e6f331300c386854167e32eb42
@@ -13,14 +13,12 @@ jobs:
13
13
  packages: write
14
14
 
15
15
  steps:
16
- - uses: actions/checkout@v3
17
- - name: Set up Ruby 2.6
18
- # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
19
- # change this to (see https://github.com/ruby/setup-ruby#versioning):
20
- # uses: ruby/setup-ruby@v1
21
- uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
16
+ - uses: actions/checkout@v4
17
+
18
+ - name: Set up Ruby
19
+ uses: ruby/setup-ruby@v1
22
20
  with:
23
- ruby-version: 3.1.1
21
+ ruby-version: '3.3'
24
22
 
25
23
  - name: Publish to RubyGems
26
24
  run: |
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [0.3.9] - 2026-06-22
2
+ - Fix Rails 7.2+ compatibility: use `connection_handler.clear_active_connections!`
3
+
4
+ ## [0.3.8] - 2026-06-22
5
+ - Fix Rails 8 compatibility: use `enum :status, { ... }` syntax
6
+
1
7
  ## [0.3.7] - 2025-04-08
2
8
  - Fix rails 7.2 compatibility
3
9
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jobs_dashboard (0.3.7)
4
+ jobs_dashboard (0.3.9)
5
5
  kaminari
6
6
  ransack
7
7
  sidekiq (>= 6.0)
@@ -10,9 +10,9 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actionpack (8.1.2)
14
- actionview (= 8.1.2)
15
- activesupport (= 8.1.2)
13
+ actionpack (8.1.3)
14
+ actionview (= 8.1.3)
15
+ activesupport (= 8.1.3)
16
16
  nokogiri (>= 1.8.5)
17
17
  rack (>= 2.2.4)
18
18
  rack-session (>= 1.0.1)
@@ -20,19 +20,19 @@ GEM
20
20
  rails-dom-testing (~> 2.2)
21
21
  rails-html-sanitizer (~> 1.6)
22
22
  useragent (~> 0.16)
23
- actionview (8.1.2)
24
- activesupport (= 8.1.2)
23
+ actionview (8.1.3)
24
+ activesupport (= 8.1.3)
25
25
  builder (~> 3.1)
26
26
  erubi (~> 1.11)
27
27
  rails-dom-testing (~> 2.2)
28
28
  rails-html-sanitizer (~> 1.6)
29
- activemodel (8.1.2)
30
- activesupport (= 8.1.2)
31
- activerecord (8.1.2)
32
- activemodel (= 8.1.2)
33
- activesupport (= 8.1.2)
29
+ activemodel (8.1.3)
30
+ activesupport (= 8.1.3)
31
+ activerecord (8.1.3)
32
+ activemodel (= 8.1.3)
33
+ activesupport (= 8.1.3)
34
34
  timeout (>= 0.4.0)
35
- activesupport (8.1.2)
35
+ activesupport (8.1.3)
36
36
  base64
37
37
  bigdecimal
38
38
  concurrent-ruby (~> 1.0, >= 1.3.1)
@@ -46,24 +46,25 @@ GEM
46
46
  tzinfo (~> 2.0, >= 2.0.5)
47
47
  uri (>= 0.13.1)
48
48
  base64 (0.3.0)
49
- bigdecimal (4.0.1)
49
+ bigdecimal (4.1.2)
50
50
  builder (3.3.0)
51
- concurrent-ruby (1.3.6)
51
+ concurrent-ruby (1.3.7)
52
52
  connection_pool (3.0.2)
53
53
  crass (1.0.6)
54
54
  date (3.5.1)
55
55
  diff-lcs (1.4.4)
56
56
  drb (2.2.3)
57
- erb (6.0.1)
57
+ erb (6.0.4)
58
58
  erubi (1.13.1)
59
- i18n (1.14.8)
59
+ i18n (1.15.2)
60
60
  concurrent-ruby (~> 1.0)
61
61
  io-console (0.8.2)
62
- irb (1.16.0)
62
+ irb (1.18.0)
63
63
  pp (>= 0.6.0)
64
+ prism (>= 1.3.0)
64
65
  rdoc (>= 4.0.0)
65
66
  reline (>= 0.4.2)
66
- json (2.18.0)
67
+ json (2.19.9)
67
68
  kaminari (1.2.2)
68
69
  activesupport (>= 4.1.0)
69
70
  kaminari-actionview (= 1.2.2)
@@ -77,25 +78,26 @@ GEM
77
78
  kaminari-core (= 1.2.2)
78
79
  kaminari-core (1.2.2)
79
80
  logger (1.7.0)
80
- loofah (2.25.0)
81
+ loofah (2.25.1)
81
82
  crass (~> 1.0.2)
82
83
  nokogiri (>= 1.12.0)
83
84
  mini_portile2 (2.8.9)
84
- minitest (6.0.1)
85
+ minitest (6.0.6)
86
+ drb (~> 2.0)
85
87
  prism (~> 1.5)
86
- nokogiri (1.19.0)
88
+ nokogiri (1.19.4)
87
89
  mini_portile2 (~> 2.8.2)
88
90
  racc (~> 1.4)
89
- pp (0.6.3)
91
+ pp (0.6.4)
90
92
  prettyprint
91
93
  prettyprint (0.2.0)
92
94
  prism (1.9.0)
93
- psych (5.3.1)
95
+ psych (5.4.0)
94
96
  date
95
97
  stringio
96
98
  racc (1.8.1)
97
- rack (3.2.4)
98
- rack-session (2.1.1)
99
+ rack (3.2.6)
100
+ rack-session (2.1.2)
99
101
  base64 (>= 0.1.0)
100
102
  rack (>= 3.0.0)
101
103
  rack-test (2.2.0)
@@ -106,12 +108,12 @@ GEM
106
108
  activesupport (>= 5.0.0)
107
109
  minitest
108
110
  nokogiri (>= 1.6)
109
- rails-html-sanitizer (1.6.2)
110
- loofah (~> 2.21)
111
+ rails-html-sanitizer (1.7.0)
112
+ loofah (~> 2.25)
111
113
  nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
112
- railties (8.1.2)
113
- actionpack (= 8.1.2)
114
- activesupport (= 8.1.2)
114
+ railties (8.1.3)
115
+ actionpack (= 8.1.3)
116
+ activesupport (= 8.1.3)
115
117
  irb (~> 1.13)
116
118
  rackup (>= 1.0.0)
117
119
  rake (>= 12.2)
@@ -123,11 +125,11 @@ GEM
123
125
  activerecord (>= 7.2)
124
126
  activesupport (>= 7.2)
125
127
  i18n
126
- rdoc (7.1.0)
128
+ rdoc (7.2.0)
127
129
  erb
128
130
  psych (>= 4.0.0)
129
131
  tsort
130
- redis-client (0.26.4)
132
+ redis-client (0.30.0)
131
133
  connection_pool
132
134
  reline (0.6.3)
133
135
  io-console (~> 0.5)
@@ -145,12 +147,12 @@ GEM
145
147
  rspec-support (~> 3.10.0)
146
148
  rspec-support (3.10.3)
147
149
  securerandom (0.4.1)
148
- sidekiq (8.1.0)
150
+ sidekiq (8.1.6)
149
151
  connection_pool (>= 3.0.0)
150
152
  json (>= 2.16.0)
151
153
  logger (>= 1.7.0)
152
154
  rack (>= 3.2.0)
153
- redis-client (>= 0.26.0)
155
+ redis-client (>= 0.29.0)
154
156
  slim (5.2.1)
155
157
  temple (~> 0.10.0)
156
158
  tilt (>= 2.1.0)
@@ -162,13 +164,13 @@ GEM
162
164
  temple (0.10.4)
163
165
  thor (1.5.0)
164
166
  tilt (2.7.0)
165
- timeout (0.6.0)
167
+ timeout (0.6.1)
166
168
  tsort (0.2.0)
167
169
  tzinfo (2.0.6)
168
170
  concurrent-ruby (~> 1.0)
169
171
  uri (1.1.1)
170
172
  useragent (0.16.11)
171
- zeitwerk (2.7.4)
173
+ zeitwerk (2.8.2)
172
174
 
173
175
  PLATFORMS
174
176
  ruby
@@ -2,14 +2,20 @@ module JobsDashboard
2
2
  DEFAULT_LOCAL_TIME_ZONE = 'Europe/Paris'
3
3
 
4
4
  class JobLog < ApplicationRecord
5
- enum status: {
5
+ STATUSES = {
6
6
  queued: 'queued',
7
7
  working: 'working',
8
8
  retrying: 'retrying',
9
9
  complete: 'complete',
10
10
  failed: 'failed',
11
11
  interrupted: 'interrupted'
12
- }
12
+ }.freeze
13
+
14
+ if ActiveRecord.version >= Gem::Version.new('7.1')
15
+ enum :status, STATUSES
16
+ else
17
+ enum status: STATUSES
18
+ end
13
19
 
14
20
  if ActiveRecord.version >= Gem::Version.new('7.1')
15
21
  serialize :args, coder: YAML, type: Array
@@ -2,6 +2,14 @@ module JobsDashboard::Storage
2
2
 
3
3
  protected
4
4
 
5
+ def clear_active_connections!
6
+ if ActiveRecord::Base.respond_to?(:clear_active_connections!)
7
+ ActiveRecord::Base.clear_active_connections!
8
+ else
9
+ ActiveRecord::Base.connection_handler.clear_active_connections!
10
+ end
11
+ end
12
+
5
13
  # Stores job log in database
6
14
  # sets last update time
7
15
  # @param [String] id job id
@@ -15,7 +23,7 @@ module JobsDashboard::Storage
15
23
  @job_log.save
16
24
  end
17
25
  ensure
18
- ActiveRecord::Base.clear_active_connections!
26
+ clear_active_connections!
19
27
  end
20
28
  end
21
29
 
@@ -35,7 +43,7 @@ module JobsDashboard::Storage
35
43
  @job_log.save
36
44
  end
37
45
  ensure
38
- ActiveRecord::Base.clear_active_connections!
46
+ clear_active_connections!
39
47
  end
40
48
  end
41
49
 
@@ -47,7 +55,7 @@ module JobsDashboard::Storage
47
55
  @job_log.save
48
56
  end
49
57
  ensure
50
- ActiveRecord::Base.clear_active_connections!
58
+ clear_active_connections!
51
59
  end
52
60
  end
53
61
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JobsDashboard
4
- VERSION = "0.3.7"
4
+ VERSION = "0.3.9"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jobs_dashboard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patryk
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-01-30 00:00:00.000000000 Z
11
+ date: 2026-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq