gouda 0.1.14 → 0.1.15

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: 4b7dbd070f109ec3a81132e47984eff02b72c09dc146d2449c5bbf593ff7c5cb
4
- data.tar.gz: e8301084a01fe3affec72450d5ca8c024c0d76c691db489283344062d8ce0466
3
+ metadata.gz: b086c5ff817a22123f1833770b6d16b935742498407ef8fe05861c36e9156f7f
4
+ data.tar.gz: 8ac4b155c718a44c1b781cd2a536983f87d48cee128e13555806e4004944d937
5
5
  SHA512:
6
- metadata.gz: 89e5d0996696714d3c2b6c540f5bb691af2de43bb444c2e88fba5453cc39468fd833a5490e8d0d6864591fa6bf8195b96ec6f075cccdc0c7f657f3495de9819a
7
- data.tar.gz: d2919b151a213163b2d316ee2ef78976057ddbef39b7556cd33b5cff88541d84e6e7db06d250517673759bcd9cf349ddab04c5d5af829184859425758a942328
6
+ metadata.gz: 21e1567d8d6cb270cdf308429afc97d5518dd5868ec2f7a320e1307c068c0b676597243c8b4ad96add49ab3ce8e6cb6ff729bc660f40cace60532cee068b6e3a
7
+ data.tar.gz: 3e585b4f8f26016a7664e7f58230b9ed5a6ffe6d55a08c90296f90643fc6f79bcae93e671425f6077f908c8987f1904486d9a7ebd859783d8be4834c1c28e63f
@@ -1,20 +1,38 @@
1
1
  name: CI
2
2
 
3
3
  on:
4
- - push
4
+ pull_request:
5
+ push:
6
+ branches: [ main ]
5
7
 
6
8
  env:
7
- BUNDLE_PATH: vendor/bundle
8
-
9
+ PGHOST: localhost
10
+ PGUSER: postgres
11
+ PGPASSWORD: postgres
12
+ TESTOPTS: "--fail-fast"
13
+
9
14
  jobs:
10
- test:
11
- name: Tests
12
- runs-on: ubuntu-22.04
13
- if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
14
- strategy:
15
- matrix:
16
- ruby:
17
- - '3.1'
15
+ lint:
16
+ name: "Lint"
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: Checkout code
20
+ uses: actions/checkout@v4
21
+
22
+ # Note: Appraisals for Rails 7 and Rails 8 differ in minimum Ruby version: 3.1.0+ vs 3.2.2+
23
+ # So the version of Ruby to use here is the version that is able to run all Appraisals
24
+ - name: Set up Ruby
25
+ uses: ruby/setup-ruby@v1
26
+ with:
27
+ ruby-version: 3.2.2
28
+ bundler-cache: true
29
+
30
+ - name: Lint code for consistent style
31
+ run: bundle exec standardrb
32
+
33
+ test_rails7:
34
+ name: "Tests (Rails 7)"
35
+ runs-on: ubuntu-latest
18
36
  services:
19
37
  postgres:
20
38
  image: postgres
@@ -23,19 +41,49 @@ jobs:
23
41
  options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
24
42
  ports:
25
43
  - 5432:5432
26
-
44
+ env:
45
+ BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_7.gemfile
27
46
  steps:
28
- - name: Checkout
47
+ - name: Install packages
48
+ run: sudo apt-get update && sudo apt-get install --no-install-recommends -y curl libjemalloc2
49
+
50
+ - name: Checkout code
29
51
  uses: actions/checkout@v4
30
- - name: Setup Ruby
52
+
53
+ - name: Set up Ruby
31
54
  uses: ruby/setup-ruby@v1
32
55
  with:
33
- ruby-version: ${{ matrix.ruby }}
56
+ ruby-version: 3.2.2
34
57
  bundler-cache: true
35
- - name: "Tests and Lint"
58
+
59
+ - name: Run tests
36
60
  run: bundle exec rake
61
+
62
+ test_rails_8:
63
+ name: "Tests (Rails 8)"
64
+ runs-on: ubuntu-latest
65
+ services:
66
+ postgres:
67
+ image: postgres
37
68
  env:
38
- PGHOST: localhost
39
- PGUSER: postgres
40
- PGPASSWORD: postgres
41
- TESTOPTS: "--fail-fast"
69
+ POSTGRES_PASSWORD: postgres
70
+ options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
71
+ ports:
72
+ - 5432:5432
73
+ env:
74
+ BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_8.gemfile
75
+ steps:
76
+ - name: Install packages
77
+ run: sudo apt-get update && sudo apt-get install --no-install-recommends -y curl libjemalloc2
78
+
79
+ - name: Checkout code
80
+ uses: actions/checkout@v4
81
+
82
+ - name: Set up Ruby
83
+ uses: ruby/setup-ruby@v1
84
+ with:
85
+ ruby-version: 3.2.2
86
+ bundler-cache: true
87
+
88
+ - name: Run tests
89
+ run: bundle exec rake
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.3.3
1
+ 3.2.2
data/Appraisals ADDED
@@ -0,0 +1,7 @@
1
+ appraise "rails-7" do
2
+ gem "rails", "< 8.0"
3
+ end
4
+
5
+ appraise "rails-8" do
6
+ gem "rails", ">= 8.0"
7
+ end
data/CHANGELOG.md CHANGED
@@ -1,67 +1,71 @@
1
- ## [Unreleased]
1
+ ## [0.1.15]
2
2
 
3
- ## [0.1.14] - 2024-09-03
3
+ - Enable Rails 8 dependency versions
4
+ - Add CI tests for Rails 7 and Rails 8 going forward, using Appraisal
5
+ - Silence SQL when upserting Scheduler workloads, as it is spammy
6
+
7
+ ## [0.1.14]
4
8
 
5
9
  - Relax `fugit` dependency to allow updates
6
10
 
7
- ## [0.1.13] - 2024-09-03
11
+ ## [0.1.13]
8
12
 
9
13
  - Ensure we won't execute workloads which were scheduled but are no longer present in the cron table entries.
10
14
 
11
- ## [0.1.12] - 2024-07-03
15
+ ## [0.1.12]
12
16
 
13
17
  - When doing polling, suppress DEBUG-level messages. This will stop Gouda spamming the logs with SQL in dev/test environments.
14
18
 
15
- ## [0.1.11] - 2024-07-03
19
+ ## [0.1.11]
16
20
 
17
21
  - Fix: make sure the Gouda logger config does not get used during Rails initialization
18
22
 
19
- ## [0.1.10] - 2024-07-03
23
+ ## [0.1.10]
20
24
 
21
25
  - Fix: remove logger overrides that Gouda should install, as this causes problems for Rails apps hosting Gouda
22
26
 
23
- ## [0.1.9] - 2024-06-26
27
+ ## [0.1.9]
24
28
 
25
29
  - Fix: cleanup_preserved_jobs_before in Gouda::Workload.prune now points to Gouda.config
26
30
 
27
- ## [0.1.8] - 2024-06-21
31
+ ## [0.1.8]
28
32
 
29
33
  - Move some missed instrumentations to Gouda.instrument
30
34
 
31
- ## [0.1.7] - 2024-06-21
35
+ ## [0.1.7]
32
36
 
33
37
  - Separate all instrumentation to use ActiveSupport::Notification
34
38
 
35
- ## [0.1.6] - 2024-06-18
39
+ ## [0.1.6]
36
40
 
37
41
  - Fix: don't upsert workloads twice when starting Gouda.
38
42
  - Add back in Appsignal calls
39
43
 
40
- ## [0.1.5] - 2024-06-18
44
+ ## [0.1.5]
41
45
 
42
46
  - Update documentation
43
47
  - Don't pass on scheduler keys to retries
44
48
 
45
- ## [0.1.4] - 2024-06-14
49
+ ## [0.1.4]
46
50
 
47
51
  - Rescue NoDatabaseError at scheduler update.
48
52
  - Include tests in gem, for sake of easier debugging.
49
53
  - Reduce logging in local test runs.
50
54
  - Bump local ruby version to 3.3.3
51
55
 
52
- ## [0.1.3] - 2024-06-11
56
+ ## [0.1.3]
53
57
 
54
58
  - Allow the Rails app to boot even if there is no database yet
55
59
 
56
- ## [0.1.2] - 2024-06-11
60
+ ## [0.1.2]
57
61
 
58
62
  - Updated readme and method renaming in Scheduler
59
63
 
60
- ## [0.1.1] - 2024-06-10
64
+ ## [0.1.1]
61
65
 
62
66
  - Fix support for older ruby versions until 2.7
63
67
 
64
- ## [0.1.0] - 2024-06-10
68
+ ## [0.1.0]
65
69
 
66
70
  - Initial release
67
71
 
@@ -0,0 +1,10 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "standard", require: false
6
+ gem "rake", "~> 13.0"
7
+ gem "minitest", "~> 5.0"
8
+ gem "rails", "< 8.0"
9
+
10
+ gemspec path: "../"
@@ -0,0 +1,271 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ gouda (0.1.14)
5
+ activejob (>= 7.2.0)
6
+ activerecord (>= 7.2.0)
7
+ activesupport (>= 7.2.0)
8
+ fugit (~> 1.10)
9
+ railties (>= 7.2.0)
10
+
11
+ GEM
12
+ remote: https://rubygems.org/
13
+ specs:
14
+ actioncable (7.2.2.1)
15
+ actionpack (= 7.2.2.1)
16
+ activesupport (= 7.2.2.1)
17
+ nio4r (~> 2.0)
18
+ websocket-driver (>= 0.6.1)
19
+ zeitwerk (~> 2.6)
20
+ actionmailbox (7.2.2.1)
21
+ actionpack (= 7.2.2.1)
22
+ activejob (= 7.2.2.1)
23
+ activerecord (= 7.2.2.1)
24
+ activestorage (= 7.2.2.1)
25
+ activesupport (= 7.2.2.1)
26
+ mail (>= 2.8.0)
27
+ actionmailer (7.2.2.1)
28
+ actionpack (= 7.2.2.1)
29
+ actionview (= 7.2.2.1)
30
+ activejob (= 7.2.2.1)
31
+ activesupport (= 7.2.2.1)
32
+ mail (>= 2.8.0)
33
+ rails-dom-testing (~> 2.2)
34
+ actionpack (7.2.2.1)
35
+ actionview (= 7.2.2.1)
36
+ activesupport (= 7.2.2.1)
37
+ nokogiri (>= 1.8.5)
38
+ racc
39
+ rack (>= 2.2.4, < 3.2)
40
+ rack-session (>= 1.0.1)
41
+ rack-test (>= 0.6.3)
42
+ rails-dom-testing (~> 2.2)
43
+ rails-html-sanitizer (~> 1.6)
44
+ useragent (~> 0.16)
45
+ actiontext (7.2.2.1)
46
+ actionpack (= 7.2.2.1)
47
+ activerecord (= 7.2.2.1)
48
+ activestorage (= 7.2.2.1)
49
+ activesupport (= 7.2.2.1)
50
+ globalid (>= 0.6.0)
51
+ nokogiri (>= 1.8.5)
52
+ actionview (7.2.2.1)
53
+ activesupport (= 7.2.2.1)
54
+ builder (~> 3.1)
55
+ erubi (~> 1.11)
56
+ rails-dom-testing (~> 2.2)
57
+ rails-html-sanitizer (~> 1.6)
58
+ activejob (7.2.2.1)
59
+ activesupport (= 7.2.2.1)
60
+ globalid (>= 0.3.6)
61
+ activemodel (7.2.2.1)
62
+ activesupport (= 7.2.2.1)
63
+ activerecord (7.2.2.1)
64
+ activemodel (= 7.2.2.1)
65
+ activesupport (= 7.2.2.1)
66
+ timeout (>= 0.4.0)
67
+ activestorage (7.2.2.1)
68
+ actionpack (= 7.2.2.1)
69
+ activejob (= 7.2.2.1)
70
+ activerecord (= 7.2.2.1)
71
+ activesupport (= 7.2.2.1)
72
+ marcel (~> 1.0)
73
+ activesupport (7.2.2.1)
74
+ base64
75
+ benchmark (>= 0.3)
76
+ bigdecimal
77
+ concurrent-ruby (~> 1.0, >= 1.3.1)
78
+ connection_pool (>= 2.2.5)
79
+ drb
80
+ i18n (>= 1.6, < 2)
81
+ logger (>= 1.4.2)
82
+ minitest (>= 5.1)
83
+ securerandom (>= 0.3)
84
+ tzinfo (~> 2.0, >= 2.0.5)
85
+ appraisal (2.5.0)
86
+ bundler
87
+ rake
88
+ thor (>= 0.14.0)
89
+ ast (2.4.2)
90
+ base64 (0.2.0)
91
+ benchmark (0.4.0)
92
+ bigdecimal (3.1.9)
93
+ builder (3.3.0)
94
+ coderay (1.1.3)
95
+ concurrent-ruby (1.3.5)
96
+ connection_pool (2.5.0)
97
+ crass (1.0.6)
98
+ date (3.4.1)
99
+ debug (1.10.0)
100
+ irb (~> 1.10)
101
+ reline (>= 0.3.8)
102
+ drb (2.2.1)
103
+ erubi (1.13.1)
104
+ et-orbi (1.2.11)
105
+ tzinfo
106
+ fugit (1.11.1)
107
+ et-orbi (~> 1, >= 1.2.11)
108
+ raabro (~> 1.4)
109
+ globalid (1.2.1)
110
+ activesupport (>= 6.1)
111
+ i18n (1.14.7)
112
+ concurrent-ruby (~> 1.0)
113
+ io-console (0.8.0)
114
+ irb (1.15.1)
115
+ pp (>= 0.6.0)
116
+ rdoc (>= 4.0.0)
117
+ reline (>= 0.4.2)
118
+ json (2.10.1)
119
+ language_server-protocol (3.17.0.4)
120
+ lint_roller (1.1.0)
121
+ logger (1.6.6)
122
+ loofah (2.24.0)
123
+ crass (~> 1.0.2)
124
+ nokogiri (>= 1.12.0)
125
+ mail (2.8.1)
126
+ mini_mime (>= 0.1.1)
127
+ net-imap
128
+ net-pop
129
+ net-smtp
130
+ marcel (1.0.4)
131
+ method_source (1.1.0)
132
+ mini_mime (1.1.5)
133
+ minitest (5.25.4)
134
+ net-imap (0.5.6)
135
+ date
136
+ net-protocol
137
+ net-pop (0.1.2)
138
+ net-protocol
139
+ net-protocol (0.2.2)
140
+ timeout
141
+ net-smtp (0.5.1)
142
+ net-protocol
143
+ nio4r (2.7.4)
144
+ nokogiri (1.18.3-arm64-darwin)
145
+ racc (~> 1.4)
146
+ nokogiri (1.18.3-x86_64-darwin)
147
+ racc (~> 1.4)
148
+ nokogiri (1.18.3-x86_64-linux-gnu)
149
+ racc (~> 1.4)
150
+ parallel (1.26.3)
151
+ parser (3.3.7.1)
152
+ ast (~> 2.4.1)
153
+ racc
154
+ pg (1.5.9)
155
+ pp (0.6.2)
156
+ prettyprint
157
+ prettyprint (0.2.0)
158
+ pry (0.15.2)
159
+ coderay (~> 1.1)
160
+ method_source (~> 1.0)
161
+ psych (5.2.3)
162
+ date
163
+ stringio
164
+ raabro (1.4.0)
165
+ racc (1.8.1)
166
+ rack (3.1.11)
167
+ rack-session (2.1.0)
168
+ base64 (>= 0.1.0)
169
+ rack (>= 3.0.0)
170
+ rack-test (2.2.0)
171
+ rack (>= 1.3)
172
+ rackup (2.2.1)
173
+ rack (>= 3)
174
+ rails (7.2.2.1)
175
+ actioncable (= 7.2.2.1)
176
+ actionmailbox (= 7.2.2.1)
177
+ actionmailer (= 7.2.2.1)
178
+ actionpack (= 7.2.2.1)
179
+ actiontext (= 7.2.2.1)
180
+ actionview (= 7.2.2.1)
181
+ activejob (= 7.2.2.1)
182
+ activemodel (= 7.2.2.1)
183
+ activerecord (= 7.2.2.1)
184
+ activestorage (= 7.2.2.1)
185
+ activesupport (= 7.2.2.1)
186
+ bundler (>= 1.15.0)
187
+ railties (= 7.2.2.1)
188
+ rails-dom-testing (2.2.0)
189
+ activesupport (>= 5.0.0)
190
+ minitest
191
+ nokogiri (>= 1.6)
192
+ rails-html-sanitizer (1.6.2)
193
+ loofah (~> 2.21)
194
+ 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)
195
+ railties (7.2.2.1)
196
+ actionpack (= 7.2.2.1)
197
+ activesupport (= 7.2.2.1)
198
+ irb (~> 1.13)
199
+ rackup (>= 1.0.0)
200
+ rake (>= 12.2)
201
+ thor (~> 1.0, >= 1.2.2)
202
+ zeitwerk (~> 2.6)
203
+ rainbow (3.1.1)
204
+ rake (13.2.1)
205
+ rdoc (6.12.0)
206
+ psych (>= 4.0.0)
207
+ regexp_parser (2.10.0)
208
+ reline (0.6.0)
209
+ io-console (~> 0.5)
210
+ rubocop (1.71.2)
211
+ json (~> 2.3)
212
+ language_server-protocol (>= 3.17.0)
213
+ parallel (~> 1.10)
214
+ parser (>= 3.3.0.2)
215
+ rainbow (>= 2.2.2, < 4.0)
216
+ regexp_parser (>= 2.9.3, < 3.0)
217
+ rubocop-ast (>= 1.38.0, < 2.0)
218
+ ruby-progressbar (~> 1.7)
219
+ unicode-display_width (>= 2.4.0, < 4.0)
220
+ rubocop-ast (1.38.1)
221
+ parser (>= 3.3.1.0)
222
+ rubocop-performance (1.23.1)
223
+ rubocop (>= 1.48.1, < 2.0)
224
+ rubocop-ast (>= 1.31.1, < 2.0)
225
+ ruby-progressbar (1.13.0)
226
+ securerandom (0.4.1)
227
+ standard (1.45.0)
228
+ language_server-protocol (~> 3.17.0.2)
229
+ lint_roller (~> 1.0)
230
+ rubocop (~> 1.71.0)
231
+ standard-custom (~> 1.0.0)
232
+ standard-performance (~> 1.6)
233
+ standard-custom (1.0.2)
234
+ lint_roller (~> 1.0)
235
+ rubocop (~> 1.50)
236
+ standard-performance (1.6.0)
237
+ lint_roller (~> 1.1)
238
+ rubocop-performance (~> 1.23.0)
239
+ stringio (3.1.5)
240
+ thor (1.3.2)
241
+ timeout (0.4.3)
242
+ tzinfo (2.0.6)
243
+ concurrent-ruby (~> 1.0)
244
+ unicode-display_width (3.1.4)
245
+ unicode-emoji (~> 4.0, >= 4.0.4)
246
+ unicode-emoji (4.0.4)
247
+ useragent (0.16.11)
248
+ websocket-driver (0.7.7)
249
+ base64
250
+ websocket-extensions (>= 0.1.0)
251
+ websocket-extensions (0.1.5)
252
+ zeitwerk (2.7.2)
253
+
254
+ PLATFORMS
255
+ arm64-darwin-21
256
+ x86_64-darwin
257
+ x86_64-linux
258
+
259
+ DEPENDENCIES
260
+ appraisal
261
+ debug
262
+ gouda!
263
+ minitest (~> 5.0)
264
+ pg
265
+ pry
266
+ rails (< 8.0)
267
+ rake (~> 13.0)
268
+ standard
269
+
270
+ BUNDLED WITH
271
+ 2.5.11
@@ -0,0 +1,10 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "standard", require: false
6
+ gem "rake", "~> 13.0"
7
+ gem "minitest", "~> 5.0"
8
+ gem "rails", ">= 8.0"
9
+
10
+ gemspec path: "../"
@@ -0,0 +1,272 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ gouda (0.1.14)
5
+ activejob (>= 7.2.0)
6
+ activerecord (>= 7.2.0)
7
+ activesupport (>= 7.2.0)
8
+ fugit (~> 1.10)
9
+ railties (>= 7.2.0)
10
+
11
+ GEM
12
+ remote: https://rubygems.org/
13
+ specs:
14
+ actioncable (8.0.1)
15
+ actionpack (= 8.0.1)
16
+ activesupport (= 8.0.1)
17
+ nio4r (~> 2.0)
18
+ websocket-driver (>= 0.6.1)
19
+ zeitwerk (~> 2.6)
20
+ actionmailbox (8.0.1)
21
+ actionpack (= 8.0.1)
22
+ activejob (= 8.0.1)
23
+ activerecord (= 8.0.1)
24
+ activestorage (= 8.0.1)
25
+ activesupport (= 8.0.1)
26
+ mail (>= 2.8.0)
27
+ actionmailer (8.0.1)
28
+ actionpack (= 8.0.1)
29
+ actionview (= 8.0.1)
30
+ activejob (= 8.0.1)
31
+ activesupport (= 8.0.1)
32
+ mail (>= 2.8.0)
33
+ rails-dom-testing (~> 2.2)
34
+ actionpack (8.0.1)
35
+ actionview (= 8.0.1)
36
+ activesupport (= 8.0.1)
37
+ nokogiri (>= 1.8.5)
38
+ rack (>= 2.2.4)
39
+ rack-session (>= 1.0.1)
40
+ rack-test (>= 0.6.3)
41
+ rails-dom-testing (~> 2.2)
42
+ rails-html-sanitizer (~> 1.6)
43
+ useragent (~> 0.16)
44
+ actiontext (8.0.1)
45
+ actionpack (= 8.0.1)
46
+ activerecord (= 8.0.1)
47
+ activestorage (= 8.0.1)
48
+ activesupport (= 8.0.1)
49
+ globalid (>= 0.6.0)
50
+ nokogiri (>= 1.8.5)
51
+ actionview (8.0.1)
52
+ activesupport (= 8.0.1)
53
+ builder (~> 3.1)
54
+ erubi (~> 1.11)
55
+ rails-dom-testing (~> 2.2)
56
+ rails-html-sanitizer (~> 1.6)
57
+ activejob (8.0.1)
58
+ activesupport (= 8.0.1)
59
+ globalid (>= 0.3.6)
60
+ activemodel (8.0.1)
61
+ activesupport (= 8.0.1)
62
+ activerecord (8.0.1)
63
+ activemodel (= 8.0.1)
64
+ activesupport (= 8.0.1)
65
+ timeout (>= 0.4.0)
66
+ activestorage (8.0.1)
67
+ actionpack (= 8.0.1)
68
+ activejob (= 8.0.1)
69
+ activerecord (= 8.0.1)
70
+ activesupport (= 8.0.1)
71
+ marcel (~> 1.0)
72
+ activesupport (8.0.1)
73
+ base64
74
+ benchmark (>= 0.3)
75
+ bigdecimal
76
+ concurrent-ruby (~> 1.0, >= 1.3.1)
77
+ connection_pool (>= 2.2.5)
78
+ drb
79
+ i18n (>= 1.6, < 2)
80
+ logger (>= 1.4.2)
81
+ minitest (>= 5.1)
82
+ securerandom (>= 0.3)
83
+ tzinfo (~> 2.0, >= 2.0.5)
84
+ uri (>= 0.13.1)
85
+ appraisal (2.5.0)
86
+ bundler
87
+ rake
88
+ thor (>= 0.14.0)
89
+ ast (2.4.2)
90
+ base64 (0.2.0)
91
+ benchmark (0.4.0)
92
+ bigdecimal (3.1.9)
93
+ builder (3.3.0)
94
+ coderay (1.1.3)
95
+ concurrent-ruby (1.3.5)
96
+ connection_pool (2.5.0)
97
+ crass (1.0.6)
98
+ date (3.4.1)
99
+ debug (1.10.0)
100
+ irb (~> 1.10)
101
+ reline (>= 0.3.8)
102
+ drb (2.2.1)
103
+ erubi (1.13.1)
104
+ et-orbi (1.2.11)
105
+ tzinfo
106
+ fugit (1.11.1)
107
+ et-orbi (~> 1, >= 1.2.11)
108
+ raabro (~> 1.4)
109
+ globalid (1.2.1)
110
+ activesupport (>= 6.1)
111
+ i18n (1.14.7)
112
+ concurrent-ruby (~> 1.0)
113
+ io-console (0.8.0)
114
+ irb (1.15.1)
115
+ pp (>= 0.6.0)
116
+ rdoc (>= 4.0.0)
117
+ reline (>= 0.4.2)
118
+ json (2.10.1)
119
+ language_server-protocol (3.17.0.4)
120
+ lint_roller (1.1.0)
121
+ logger (1.6.6)
122
+ loofah (2.24.0)
123
+ crass (~> 1.0.2)
124
+ nokogiri (>= 1.12.0)
125
+ mail (2.8.1)
126
+ mini_mime (>= 0.1.1)
127
+ net-imap
128
+ net-pop
129
+ net-smtp
130
+ marcel (1.0.4)
131
+ method_source (1.1.0)
132
+ mini_mime (1.1.5)
133
+ minitest (5.25.4)
134
+ net-imap (0.5.6)
135
+ date
136
+ net-protocol
137
+ net-pop (0.1.2)
138
+ net-protocol
139
+ net-protocol (0.2.2)
140
+ timeout
141
+ net-smtp (0.5.1)
142
+ net-protocol
143
+ nio4r (2.7.4)
144
+ nokogiri (1.18.3-arm64-darwin)
145
+ racc (~> 1.4)
146
+ nokogiri (1.18.3-x86_64-darwin)
147
+ racc (~> 1.4)
148
+ nokogiri (1.18.3-x86_64-linux-gnu)
149
+ racc (~> 1.4)
150
+ parallel (1.26.3)
151
+ parser (3.3.7.1)
152
+ ast (~> 2.4.1)
153
+ racc
154
+ pg (1.5.9)
155
+ pp (0.6.2)
156
+ prettyprint
157
+ prettyprint (0.2.0)
158
+ pry (0.15.2)
159
+ coderay (~> 1.1)
160
+ method_source (~> 1.0)
161
+ psych (5.2.3)
162
+ date
163
+ stringio
164
+ raabro (1.4.0)
165
+ racc (1.8.1)
166
+ rack (3.1.11)
167
+ rack-session (2.1.0)
168
+ base64 (>= 0.1.0)
169
+ rack (>= 3.0.0)
170
+ rack-test (2.2.0)
171
+ rack (>= 1.3)
172
+ rackup (2.2.1)
173
+ rack (>= 3)
174
+ rails (8.0.1)
175
+ actioncable (= 8.0.1)
176
+ actionmailbox (= 8.0.1)
177
+ actionmailer (= 8.0.1)
178
+ actionpack (= 8.0.1)
179
+ actiontext (= 8.0.1)
180
+ actionview (= 8.0.1)
181
+ activejob (= 8.0.1)
182
+ activemodel (= 8.0.1)
183
+ activerecord (= 8.0.1)
184
+ activestorage (= 8.0.1)
185
+ activesupport (= 8.0.1)
186
+ bundler (>= 1.15.0)
187
+ railties (= 8.0.1)
188
+ rails-dom-testing (2.2.0)
189
+ activesupport (>= 5.0.0)
190
+ minitest
191
+ nokogiri (>= 1.6)
192
+ rails-html-sanitizer (1.6.2)
193
+ loofah (~> 2.21)
194
+ 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)
195
+ railties (8.0.1)
196
+ actionpack (= 8.0.1)
197
+ activesupport (= 8.0.1)
198
+ irb (~> 1.13)
199
+ rackup (>= 1.0.0)
200
+ rake (>= 12.2)
201
+ thor (~> 1.0, >= 1.2.2)
202
+ zeitwerk (~> 2.6)
203
+ rainbow (3.1.1)
204
+ rake (13.2.1)
205
+ rdoc (6.12.0)
206
+ psych (>= 4.0.0)
207
+ regexp_parser (2.10.0)
208
+ reline (0.6.0)
209
+ io-console (~> 0.5)
210
+ rubocop (1.71.2)
211
+ json (~> 2.3)
212
+ language_server-protocol (>= 3.17.0)
213
+ parallel (~> 1.10)
214
+ parser (>= 3.3.0.2)
215
+ rainbow (>= 2.2.2, < 4.0)
216
+ regexp_parser (>= 2.9.3, < 3.0)
217
+ rubocop-ast (>= 1.38.0, < 2.0)
218
+ ruby-progressbar (~> 1.7)
219
+ unicode-display_width (>= 2.4.0, < 4.0)
220
+ rubocop-ast (1.38.1)
221
+ parser (>= 3.3.1.0)
222
+ rubocop-performance (1.23.1)
223
+ rubocop (>= 1.48.1, < 2.0)
224
+ rubocop-ast (>= 1.31.1, < 2.0)
225
+ ruby-progressbar (1.13.0)
226
+ securerandom (0.4.1)
227
+ standard (1.45.0)
228
+ language_server-protocol (~> 3.17.0.2)
229
+ lint_roller (~> 1.0)
230
+ rubocop (~> 1.71.0)
231
+ standard-custom (~> 1.0.0)
232
+ standard-performance (~> 1.6)
233
+ standard-custom (1.0.2)
234
+ lint_roller (~> 1.0)
235
+ rubocop (~> 1.50)
236
+ standard-performance (1.6.0)
237
+ lint_roller (~> 1.1)
238
+ rubocop-performance (~> 1.23.0)
239
+ stringio (3.1.5)
240
+ thor (1.3.2)
241
+ timeout (0.4.3)
242
+ tzinfo (2.0.6)
243
+ concurrent-ruby (~> 1.0)
244
+ unicode-display_width (3.1.4)
245
+ unicode-emoji (~> 4.0, >= 4.0.4)
246
+ unicode-emoji (4.0.4)
247
+ uri (1.0.3)
248
+ useragent (0.16.11)
249
+ websocket-driver (0.7.7)
250
+ base64
251
+ websocket-extensions (>= 0.1.0)
252
+ websocket-extensions (0.1.5)
253
+ zeitwerk (2.7.2)
254
+
255
+ PLATFORMS
256
+ arm64-darwin-21
257
+ x86_64-darwin
258
+ x86_64-linux
259
+
260
+ DEPENDENCIES
261
+ appraisal
262
+ debug
263
+ gouda!
264
+ minitest (~> 5.0)
265
+ pg
266
+ pry
267
+ rails (>= 8.0)
268
+ rake (~> 13.0)
269
+ standard
270
+
271
+ BUNDLED WITH
272
+ 2.5.11
data/gouda.gemspec CHANGED
@@ -7,26 +7,29 @@ Gem::Specification.new do |spec|
7
7
  spec.description = "Job Scheduler for Rails and PostgreSQL"
8
8
  spec.authors = ["Sebastian van Hesteren", "Julik Tarkhanov"]
9
9
  spec.email = ["sebastian@cheddar.me", "me@julik.nl"]
10
- spec.homepage = "https://github.com/cheddar-me/gouda"
11
10
  spec.license = "MIT"
12
- spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
11
+ spec.required_ruby_version = Gem::Requirement.new(">= 3.2.0")
13
12
  spec.require_paths = ["lib"]
14
13
 
14
+ spec.homepage = "https://github.com/cheddar-me/gouda"
15
15
  spec.metadata["homepage_uri"] = spec.homepage
16
16
  spec.metadata["source_code_uri"] = spec.homepage
17
- spec.metadata["changelog_uri"] = "https://github.com/cheddar-me/gouda/CHANGELOG.md"
17
+ spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/main/CHANGELOG.md"
18
18
 
19
19
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
20
20
  `git ls-files -z`.split("\x0")
21
21
  end
22
22
 
23
- spec.add_dependency "activerecord", "~> 7"
24
- spec.add_dependency "activesupport", "~> 7"
25
- spec.add_dependency "railties", "~> 7"
26
- spec.add_dependency "activejob", "~> 7"
23
+ rails_min = ">= 7.2.0"
24
+ spec.add_dependency "activerecord", rails_min
25
+ spec.add_dependency "activesupport", rails_min
26
+ spec.add_dependency "railties", rails_min
27
+ spec.add_dependency "activejob", rails_min
27
28
  spec.add_dependency "fugit", "~> 1.10"
28
29
 
30
+ spec.add_development_dependency "standard"
29
31
  spec.add_development_dependency "pg"
30
32
  spec.add_development_dependency "debug"
31
33
  spec.add_development_dependency "pry"
34
+ spec.add_development_dependency "appraisal"
32
35
  end
@@ -152,20 +152,26 @@ module Gouda::Scheduler
152
152
  #
153
153
  # @return void
154
154
  def self.upsert_workloads_from_entries_list!
155
- table_entries = @cron_table || []
156
-
157
- # Remove any cron keyed workloads which no longer match config-wise.
158
- # We do this to keep things clean (but it is not enough, an extra guard is needed in Workload checkout)
159
- known_keys = table_entries.map(&:scheduler_key).uniq
160
- Gouda::Workload.transaction do
161
- # We do this to keep things a bit clean
162
- Gouda::Workload.where.not(scheduler_key: known_keys).delete_all
163
-
164
- # Insert the next iteration for every "next" entry in the crontab.
165
- active_jobs_to_enqueue = table_entries.filter_map(&:build_active_job)
166
- Gouda.logger.info "#{active_jobs_to_enqueue.size} job(s) to enqueue from the scheduler."
167
- enqjobs = Gouda.enqueue_jobs_via_their_adapters(active_jobs_to_enqueue)
168
- Gouda.logger.info "#{enqjobs.size} scheduled job(s) enqueued."
155
+ # If you have a lot of cron tasks, it will produce a pretty long SQL query when upserting - because
156
+ # we have bulk-insert. This is not very useful to see even in development. It also happens on every
157
+ # app reload or code change - since we want our table to be repopuated when we reload the Rails app.
158
+ # So: silence it here.
159
+ Gouda.suppressing_sql_logs do
160
+ table_entries = @cron_table || []
161
+
162
+ # Remove any cron keyed workloads which no longer match config-wise.
163
+ # We do this to keep things clean (but it is not enough, an extra guard is needed in Workload checkout)
164
+ known_keys = table_entries.map(&:scheduler_key).uniq
165
+ Gouda::Workload.transaction do
166
+ # We do this to keep things a bit clean
167
+ Gouda::Workload.where.not(scheduler_key: known_keys).delete_all
168
+
169
+ # Insert the next iteration for every "next" entry in the crontab.
170
+ active_jobs_to_enqueue = table_entries.filter_map(&:build_active_job)
171
+ Gouda.logger.info "#{active_jobs_to_enqueue.size} job(s) to enqueue from the scheduler."
172
+ enqjobs = Gouda.enqueue_jobs_via_their_adapters(active_jobs_to_enqueue)
173
+ Gouda.logger.info "#{enqjobs.size} scheduled job(s) enqueued."
174
+ end
169
175
  end
170
176
  end
171
177
  end
data/lib/gouda/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gouda
4
- VERSION = "0.1.14"
4
+ VERSION = "0.1.15"
5
5
  end
data/lib/gouda.rb CHANGED
@@ -64,7 +64,7 @@ module Gouda
64
64
  def self.logger
65
65
  # By default, return a logger that sends data nowhere. The `Rails.logger` method
66
66
  # only becomes available later in the Rails lifecycle.
67
- @fallback_gouda_logger ||= ActiveSupport::Logger.new($stdout).tap do |logger|
67
+ @fallback_gouda_logger ||= ActiveSupport::TaggedLogging.new(Logger.new($stdout)).tap do |logger|
68
68
  logger.level = Logger::WARN
69
69
  end
70
70
 
@@ -76,7 +76,8 @@ module Gouda
76
76
  # it is the choice of the user to do so - and we should honor that choice. Same for
77
77
  # the logging level - the Rails logger level must take precendence. Same for logger
78
78
  # broadcasts which get set up, for example, by the Rails console when you start it.
79
- Rails.try(:logger) || ActiveJob::Base.try(:logger) || @fallback_gouda_logger
79
+ logger_to_use = Rails.try(:logger) || ActiveJob::Base.try(:logger) || @fallback_gouda_logger
80
+ logger_to_use.tagged("Gouda") # So that we don't have to manually prefix/tag on every call
80
81
  end
81
82
 
82
83
  def self.suppressing_sql_logs(&)
@@ -86,7 +87,7 @@ module Gouda
86
87
  # in a side-thread inside Puma - the output might be quite annoying. So silence the
87
88
  # logger when we poll, but just to INFO. Omitting DEBUG-level messages gets rid of the SQL.
88
89
  if Gouda::Workload.logger
89
- Gouda::Workload.logger.silence(Logger::INFO, &)
90
+ Gouda::Workload.logger.silence(Logger::DEBUG, &)
90
91
  else
91
92
  # In tests (and at earlier stages of the Rails boot cycle) the global ActiveRecord logger may be nil
92
93
  yield
@@ -24,6 +24,7 @@ class ActiveSupport::TestCase
24
24
  @case_random = Random.new(Minitest.seed)
25
25
  Gouda::Railtie.initializers.each(&:run)
26
26
  Gouda.logger.level = Logger::WARN
27
+ ActiveJob::Base.logger.level = Logger::FATAL # Otherwise ActiveJob logs get printed for failing jobs that are tested
27
28
  end
28
29
 
29
30
  teardown do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gouda
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian van Hesteren
@@ -9,64 +9,64 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-09-18 00:00:00.000000000 Z
12
+ date: 2025-03-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '7'
20
+ version: 7.2.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - "~>"
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: '7'
27
+ version: 7.2.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: activesupport
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - "~>"
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
- version: '7'
34
+ version: 7.2.0
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - "~>"
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
- version: '7'
41
+ version: 7.2.0
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: railties
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - "~>"
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
- version: '7'
48
+ version: 7.2.0
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - "~>"
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: '7'
55
+ version: 7.2.0
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: activejob
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - "~>"
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
- version: '7'
62
+ version: 7.2.0
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - "~>"
67
+ - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: '7'
69
+ version: 7.2.0
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: fugit
72
72
  requirement: !ruby/object:Gem::Requirement
@@ -81,6 +81,20 @@ dependencies:
81
81
  - - "~>"
82
82
  - !ruby/object:Gem::Version
83
83
  version: '1.10'
84
+ - !ruby/object:Gem::Dependency
85
+ name: standard
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
84
98
  - !ruby/object:Gem::Dependency
85
99
  name: pg
86
100
  requirement: !ruby/object:Gem::Requirement
@@ -123,6 +137,20 @@ dependencies:
123
137
  - - ">="
124
138
  - !ruby/object:Gem::Version
125
139
  version: '0'
140
+ - !ruby/object:Gem::Dependency
141
+ name: appraisal
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - ">="
145
+ - !ruby/object:Gem::Version
146
+ version: '0'
147
+ type: :development
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
126
154
  description: Job Scheduler for Rails and PostgreSQL
127
155
  email:
128
156
  - sebastian@cheddar.me
@@ -133,14 +161,18 @@ extra_rdoc_files: []
133
161
  files:
134
162
  - ".github/workflows/ci.yml"
135
163
  - ".gitignore"
136
- - ".rubocop.yml"
137
164
  - ".ruby-version"
138
165
  - ".standard.yml"
166
+ - Appraisals
139
167
  - CHANGELOG.md
140
168
  - Gemfile
141
169
  - LICENSE.txt
142
170
  - README.md
143
171
  - Rakefile
172
+ - gemfiles/rails_7.gemfile
173
+ - gemfiles/rails_7.gemfile.lock
174
+ - gemfiles/rails_8.gemfile
175
+ - gemfiles/rails_8.gemfile.lock
144
176
  - gouda.gemspec
145
177
  - lib/active_job/queue_adapters/gouda_adapter.rb
146
178
  - lib/generators/gouda/install_generator.rb
@@ -173,7 +205,7 @@ licenses:
173
205
  metadata:
174
206
  homepage_uri: https://github.com/cheddar-me/gouda
175
207
  source_code_uri: https://github.com/cheddar-me/gouda
176
- changelog_uri: https://github.com/cheddar-me/gouda/CHANGELOG.md
208
+ changelog_uri: https://github.com/cheddar-me/gouda/blob/main/CHANGELOG.md
177
209
  post_install_message:
178
210
  rdoc_options: []
179
211
  require_paths:
@@ -182,14 +214,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
182
214
  requirements:
183
215
  - - ">="
184
216
  - !ruby/object:Gem::Version
185
- version: 3.1.0
217
+ version: 3.2.0
186
218
  required_rubygems_version: !ruby/object:Gem::Requirement
187
219
  requirements:
188
220
  - - ">="
189
221
  - !ruby/object:Gem::Version
190
222
  version: '0'
191
223
  requirements: []
192
- rubygems_version: 3.5.11
224
+ rubygems_version: 3.4.10
193
225
  signing_key:
194
226
  specification_version: 4
195
227
  summary: Job Scheduler
data/.rubocop.yml DELETED
@@ -1,10 +0,0 @@
1
- require: standard
2
-
3
- AllCops:
4
- TargetRubyVersion: 3.1
5
-
6
- inherit_gem:
7
- standard: config/base.yml
8
-
9
- # Don't define any actual rubocop config here - this file is only used for
10
- # proper editor support, and not used on CI, formatters, nor anywhere else.