pgmq-ruby 0.3.0 → 0.5.0
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 +4 -4
- data/.github/workflows/ci.yml +48 -26
- data/.github/workflows/push.yml +2 -2
- data/.rspec +1 -0
- data/.rubocop.yml +66 -0
- data/.ruby-version +1 -1
- data/.yard-lint.yml +172 -67
- data/CHANGELOG.md +57 -0
- data/CLAUDE.md +310 -0
- data/Gemfile +5 -5
- data/Gemfile.lint +16 -0
- data/Gemfile.lint.lock +120 -0
- data/Gemfile.lock +20 -6
- data/README.md +300 -37
- data/Rakefile +71 -2
- data/docker-compose.yml +2 -2
- data/lib/pgmq/client/consumer.rb +80 -7
- data/lib/pgmq/client/maintenance.rb +37 -6
- data/lib/pgmq/client/message_lifecycle.rb +142 -25
- data/lib/pgmq/client/metrics.rb +2 -2
- data/lib/pgmq/client/multi_queue.rb +9 -9
- data/lib/pgmq/client/producer.rb +72 -27
- data/lib/pgmq/client/queue_management.rb +36 -20
- data/lib/pgmq/client/topics.rb +268 -0
- data/lib/pgmq/client.rb +15 -14
- data/lib/pgmq/connection.rb +11 -11
- data/lib/pgmq/message.rb +11 -9
- data/lib/pgmq/metrics.rb +7 -7
- data/lib/pgmq/queue_metadata.rb +7 -7
- data/lib/pgmq/transaction.rb +4 -17
- data/lib/pgmq/version.rb +1 -1
- data/lib/pgmq.rb +4 -4
- data/package-lock.json +331 -0
- data/package.json +9 -0
- data/pgmq-ruby.gemspec +20 -20
- data/renovate.json +15 -3
- metadata +9 -3
- data/.coditsu/ci.yml +0 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5648229b33f490f7228d7f9b106fb40939632c6effff094d028d9f7dd5fc045a
|
|
4
|
+
data.tar.gz: 7a7d0ae6dd7ee59cf329093f4772e8cd8706e25be0e627defca60f3983e96084
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5da9b67730f7c1b58af6be47c2364092988823b2c536e762ca56cc91bd5f27d2d678aef116373c7f0c62fec5037438f30ae0482979c0df3f9414aa3e5f41987a
|
|
7
|
+
data.tar.gz: 7c892fcc8d30d306670b7dd3fd3a3e3f70f573916b3e6526e0833a59acad85cdd44fcf830fd327ccba6608fe0e30eb072d2adc1bcb287ccc28c388e743cfd19e
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -21,7 +21,7 @@ jobs:
|
|
|
21
21
|
fail-fast: false
|
|
22
22
|
matrix:
|
|
23
23
|
ruby:
|
|
24
|
-
- '
|
|
24
|
+
- '4.0.0'
|
|
25
25
|
- '3.4'
|
|
26
26
|
- '3.3'
|
|
27
27
|
- '3.2'
|
|
@@ -52,7 +52,7 @@ jobs:
|
|
|
52
52
|
- 5433:5432
|
|
53
53
|
|
|
54
54
|
steps:
|
|
55
|
-
- uses: actions/checkout@
|
|
55
|
+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
56
56
|
with:
|
|
57
57
|
fetch-depth: 0
|
|
58
58
|
|
|
@@ -60,11 +60,11 @@ jobs:
|
|
|
60
60
|
run: "[ -e $APT_DEPS ] || sudo apt-get install -y --no-install-recommends postgresql-client"
|
|
61
61
|
|
|
62
62
|
- name: Remove Gemfile.lock for Ruby previews
|
|
63
|
-
if: contains(matrix.ruby, '
|
|
63
|
+
if: contains(matrix.ruby, '4.0')
|
|
64
64
|
run: rm -f Gemfile.lock
|
|
65
65
|
|
|
66
66
|
- name: Set up Ruby
|
|
67
|
-
uses: ruby/setup-ruby@
|
|
67
|
+
uses: ruby/setup-ruby@90be1154f987f4dc0fe0dd0feedac9e473aa4ba8 # v1.286.0
|
|
68
68
|
with:
|
|
69
69
|
ruby-version: ${{ matrix.ruby }}
|
|
70
70
|
bundler-cache: true
|
|
@@ -102,55 +102,77 @@ jobs:
|
|
|
102
102
|
GITHUB_COVERAGE: ${{ matrix.coverage }}
|
|
103
103
|
run: bundle exec rspec
|
|
104
104
|
|
|
105
|
+
- name: Run examples
|
|
106
|
+
env:
|
|
107
|
+
PG_HOST: localhost
|
|
108
|
+
PG_PORT: 5433
|
|
109
|
+
PG_DATABASE: pgmq_test
|
|
110
|
+
PG_USER: postgres
|
|
111
|
+
PG_PASSWORD: postgres
|
|
112
|
+
run: bundle exec rake examples
|
|
113
|
+
|
|
105
114
|
yard-lint:
|
|
106
115
|
timeout-minutes: 5
|
|
107
116
|
runs-on: ubuntu-latest
|
|
108
117
|
strategy:
|
|
109
118
|
fail-fast: false
|
|
119
|
+
env:
|
|
120
|
+
BUNDLE_GEMFILE: Gemfile.lint
|
|
110
121
|
steps:
|
|
111
|
-
- uses: actions/checkout@
|
|
122
|
+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
112
123
|
with:
|
|
113
124
|
fetch-depth: 0
|
|
114
125
|
- name: Set up Ruby
|
|
115
|
-
uses: ruby/setup-ruby@
|
|
126
|
+
uses: ruby/setup-ruby@90be1154f987f4dc0fe0dd0feedac9e473aa4ba8 # v1.286.0
|
|
116
127
|
with:
|
|
117
|
-
ruby-version: '
|
|
128
|
+
ruby-version: '4.0.0'
|
|
118
129
|
bundler-cache: true
|
|
119
130
|
- name: Run yard-lint
|
|
120
131
|
run: bundle exec yard-lint lib/
|
|
121
132
|
|
|
122
|
-
|
|
133
|
+
rubocop:
|
|
123
134
|
timeout-minutes: 5
|
|
124
135
|
runs-on: ubuntu-latest
|
|
125
|
-
|
|
126
|
-
|
|
136
|
+
env:
|
|
137
|
+
BUNDLE_GEMFILE: Gemfile.lint
|
|
127
138
|
steps:
|
|
128
|
-
- uses: actions/checkout@
|
|
139
|
+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
129
140
|
with:
|
|
130
141
|
fetch-depth: 0
|
|
131
|
-
- name:
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
-
|
|
144
|
-
|
|
142
|
+
- name: Set up Ruby
|
|
143
|
+
uses: ruby/setup-ruby@90be1154f987f4dc0fe0dd0feedac9e473aa4ba8 # v1.286.0
|
|
144
|
+
with:
|
|
145
|
+
ruby-version: '4.0.0'
|
|
146
|
+
bundler-cache: true
|
|
147
|
+
- name: Run rubocop
|
|
148
|
+
run: bundle exec rubocop
|
|
149
|
+
|
|
150
|
+
lostconf:
|
|
151
|
+
timeout-minutes: 5
|
|
152
|
+
runs-on: ubuntu-latest
|
|
153
|
+
steps:
|
|
154
|
+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
155
|
+
with:
|
|
156
|
+
fetch-depth: 0
|
|
157
|
+
- name: Set up Node.js
|
|
158
|
+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
|
159
|
+
with:
|
|
160
|
+
node-version: '20'
|
|
161
|
+
cache: 'npm'
|
|
162
|
+
- name: Install dependencies
|
|
163
|
+
run: npm ci
|
|
164
|
+
- name: Run lostconf
|
|
165
|
+
run: npx lostconf --fail-on-stale
|
|
145
166
|
|
|
146
167
|
ci-success:
|
|
147
168
|
name: CI Success
|
|
148
169
|
runs-on: ubuntu-latest
|
|
149
170
|
if: always()
|
|
150
171
|
needs:
|
|
151
|
-
-
|
|
172
|
+
- rubocop
|
|
152
173
|
- specs
|
|
153
174
|
- yard-lint
|
|
175
|
+
- lostconf
|
|
154
176
|
steps:
|
|
155
177
|
- name: Check all jobs passed
|
|
156
178
|
if: |
|
data/.github/workflows/push.yml
CHANGED
|
@@ -19,12 +19,12 @@ jobs:
|
|
|
19
19
|
id-token: write
|
|
20
20
|
|
|
21
21
|
steps:
|
|
22
|
-
- uses: actions/checkout@
|
|
22
|
+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
23
23
|
with:
|
|
24
24
|
fetch-depth: 0
|
|
25
25
|
|
|
26
26
|
- name: Set up Ruby
|
|
27
|
-
uses: ruby/setup-ruby@
|
|
27
|
+
uses: ruby/setup-ruby@90be1154f987f4dc0fe0dd0feedac9e473aa4ba8 # v1.286.0
|
|
28
28
|
with:
|
|
29
29
|
bundler-cache: false
|
|
30
30
|
|
data/.rspec
CHANGED
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
plugins:
|
|
4
|
+
- rubocop-capybara
|
|
5
|
+
- rubocop-factory_bot
|
|
6
|
+
- rubocop-performance
|
|
7
|
+
- rubocop-rspec
|
|
8
|
+
- rubocop-rspec_rails
|
|
9
|
+
|
|
10
|
+
inherit_gem:
|
|
11
|
+
standard: config/base.yml
|
|
12
|
+
standard-performance: config/base.yml
|
|
13
|
+
standard-rspec: config/base.yml
|
|
14
|
+
|
|
15
|
+
AllCops:
|
|
16
|
+
NewCops: enable
|
|
17
|
+
TargetRubyVersion: 3.2
|
|
18
|
+
Include:
|
|
19
|
+
- "**/*.rb"
|
|
20
|
+
- "**/*.gemspec"
|
|
21
|
+
- "**/Gemfile"
|
|
22
|
+
- "**/Rakefile"
|
|
23
|
+
- Gemfile.lint
|
|
24
|
+
|
|
25
|
+
# Disabled departments - not a Rails project, no Capybara/FactoryBot
|
|
26
|
+
Capybara:
|
|
27
|
+
Enabled: false
|
|
28
|
+
|
|
29
|
+
FactoryBot:
|
|
30
|
+
Enabled: false
|
|
31
|
+
|
|
32
|
+
RSpecRails:
|
|
33
|
+
Enabled: false
|
|
34
|
+
|
|
35
|
+
# Layout
|
|
36
|
+
Layout/LineLength:
|
|
37
|
+
Max: 120
|
|
38
|
+
|
|
39
|
+
Layout/SpaceInsideHashLiteralBraces:
|
|
40
|
+
EnforcedStyle: space
|
|
41
|
+
|
|
42
|
+
# RSpec - exclude integration examples (they use ExampleHelper, not RSpec)
|
|
43
|
+
RSpec:
|
|
44
|
+
Exclude:
|
|
45
|
+
- spec/integration/**/*
|
|
46
|
+
|
|
47
|
+
RSpec/ExampleLength:
|
|
48
|
+
Enabled: false
|
|
49
|
+
|
|
50
|
+
RSpec/IndexedLet:
|
|
51
|
+
Enabled: false
|
|
52
|
+
|
|
53
|
+
RSpec/MultipleExpectations:
|
|
54
|
+
Enabled: false
|
|
55
|
+
|
|
56
|
+
RSpec/MultipleMemoizedHelpers:
|
|
57
|
+
Max: 20
|
|
58
|
+
|
|
59
|
+
RSpec/NestedGroups:
|
|
60
|
+
Max: 4
|
|
61
|
+
|
|
62
|
+
RSpec/NoExpectationExample:
|
|
63
|
+
Enabled: false
|
|
64
|
+
|
|
65
|
+
RSpec/SpecFilePathFormat:
|
|
66
|
+
Enabled: false
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
4.0.0
|
data/.yard-lint.yml
CHANGED
|
@@ -3,166 +3,271 @@
|
|
|
3
3
|
|
|
4
4
|
# Global settings for all validators
|
|
5
5
|
AllValidators:
|
|
6
|
-
# YARD command-line options (applied to all validators by default)
|
|
7
6
|
YardOptions:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
# Global file exclusion patterns
|
|
7
|
+
- "--private"
|
|
8
|
+
- "--protected"
|
|
12
9
|
Exclude:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
# Exit code behavior (error, warning, convention, never)
|
|
20
|
-
FailOnSeverity: error
|
|
21
|
-
|
|
22
|
-
# Require 100% documentation coverage
|
|
10
|
+
- .git/**/*
|
|
11
|
+
- vendor/**/*
|
|
12
|
+
- node_modules/**/*
|
|
13
|
+
- spec/**/*
|
|
14
|
+
FailOnSeverity: convention
|
|
23
15
|
RequiredCoverage: 100
|
|
24
16
|
|
|
25
17
|
# Documentation validators
|
|
26
18
|
Documentation/UndocumentedObjects:
|
|
27
|
-
Description:
|
|
19
|
+
Description: Checks for classes, modules, and methods without documentation.
|
|
28
20
|
Enabled: true
|
|
29
21
|
Severity: error
|
|
30
22
|
ExcludedMethods:
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
- initialize/0
|
|
24
|
+
- "/^_/"
|
|
33
25
|
|
|
34
26
|
Documentation/UndocumentedMethodArguments:
|
|
35
|
-
Description:
|
|
27
|
+
Description: Checks for method parameters without @param tags.
|
|
36
28
|
Enabled: true
|
|
37
29
|
Severity: error
|
|
38
30
|
|
|
39
31
|
Documentation/UndocumentedBooleanMethods:
|
|
40
|
-
Description:
|
|
32
|
+
Description: Checks that question mark methods document their boolean return.
|
|
41
33
|
Enabled: true
|
|
42
34
|
Severity: error
|
|
43
35
|
|
|
44
36
|
Documentation/UndocumentedOptions:
|
|
45
|
-
Description:
|
|
37
|
+
Description: Detects methods with options hash parameters but no @option tags.
|
|
46
38
|
Enabled: true
|
|
47
39
|
Severity: error
|
|
48
40
|
|
|
49
41
|
Documentation/MarkdownSyntax:
|
|
50
|
-
Description:
|
|
42
|
+
Description: Detects common markdown syntax errors in documentation.
|
|
51
43
|
Enabled: true
|
|
52
44
|
Severity: error
|
|
53
45
|
|
|
46
|
+
Documentation/EmptyCommentLine:
|
|
47
|
+
Description: Detects empty comment lines at the start or end of documentation blocks.
|
|
48
|
+
Enabled: true
|
|
49
|
+
Severity: convention
|
|
50
|
+
EnabledPatterns:
|
|
51
|
+
Leading: true
|
|
52
|
+
Trailing: true
|
|
53
|
+
|
|
54
|
+
Documentation/BlankLineBeforeDefinition:
|
|
55
|
+
Description: Detects blank lines between YARD documentation and method definition.
|
|
56
|
+
Enabled: true
|
|
57
|
+
Severity: convention
|
|
58
|
+
OrphanedSeverity: convention
|
|
59
|
+
EnabledPatterns:
|
|
60
|
+
SingleBlankLine: true
|
|
61
|
+
OrphanedDocs: true
|
|
62
|
+
|
|
54
63
|
# Tags validators
|
|
55
64
|
Tags/Order:
|
|
56
|
-
Description:
|
|
65
|
+
Description: Enforces consistent ordering of YARD tags.
|
|
57
66
|
Enabled: true
|
|
58
67
|
Severity: error
|
|
59
68
|
EnforcedOrder:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
69
|
+
- param
|
|
70
|
+
- option
|
|
71
|
+
- return
|
|
72
|
+
- raise
|
|
73
|
+
- example
|
|
65
74
|
|
|
66
75
|
Tags/InvalidTypes:
|
|
67
|
-
Description:
|
|
76
|
+
Description: Validates type definitions in @param, @return, @option tags.
|
|
68
77
|
Enabled: true
|
|
69
78
|
Severity: error
|
|
70
79
|
ValidatedTags:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
80
|
+
- param
|
|
81
|
+
- option
|
|
82
|
+
- return
|
|
74
83
|
|
|
75
84
|
Tags/TypeSyntax:
|
|
76
|
-
Description:
|
|
85
|
+
Description: Validates YARD type syntax using YARD parser.
|
|
77
86
|
Enabled: true
|
|
78
87
|
Severity: error
|
|
79
88
|
ValidatedTags:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
89
|
+
- param
|
|
90
|
+
- option
|
|
91
|
+
- return
|
|
92
|
+
- yieldreturn
|
|
84
93
|
|
|
85
94
|
Tags/MeaninglessTag:
|
|
86
|
-
Description:
|
|
95
|
+
Description: Detects @param/@option tags on classes, modules, or constants.
|
|
87
96
|
Enabled: true
|
|
88
97
|
Severity: error
|
|
89
98
|
CheckedTags:
|
|
90
|
-
|
|
91
|
-
|
|
99
|
+
- param
|
|
100
|
+
- option
|
|
92
101
|
InvalidObjectTypes:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
102
|
+
- class
|
|
103
|
+
- module
|
|
104
|
+
- constant
|
|
96
105
|
|
|
97
106
|
Tags/CollectionType:
|
|
98
|
-
Description:
|
|
107
|
+
Description: Validates Hash collection syntax consistency.
|
|
99
108
|
Enabled: true
|
|
100
109
|
Severity: error
|
|
101
|
-
EnforcedStyle: long
|
|
110
|
+
EnforcedStyle: long
|
|
102
111
|
ValidatedTags:
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
112
|
+
- param
|
|
113
|
+
- option
|
|
114
|
+
- return
|
|
115
|
+
- yieldreturn
|
|
107
116
|
|
|
108
117
|
Tags/TagTypePosition:
|
|
109
|
-
Description:
|
|
118
|
+
Description: Validates type annotation position in tags.
|
|
110
119
|
Enabled: true
|
|
111
120
|
Severity: error
|
|
112
121
|
CheckedTags:
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
# EnforcedStyle: 'type_after_name' (YARD standard: @param name [Type])
|
|
116
|
-
# or 'type_first' (@param [Type] name)
|
|
122
|
+
- param
|
|
123
|
+
- option
|
|
117
124
|
EnforcedStyle: type_after_name
|
|
118
125
|
|
|
119
126
|
Tags/ApiTags:
|
|
120
|
-
Description:
|
|
121
|
-
Enabled:
|
|
127
|
+
Description: Enforces @api tags on public objects.
|
|
128
|
+
Enabled: false
|
|
122
129
|
Severity: error
|
|
123
130
|
AllowedApis:
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
131
|
+
- public
|
|
132
|
+
- private
|
|
133
|
+
- internal
|
|
127
134
|
|
|
128
135
|
Tags/OptionTags:
|
|
129
|
-
Description:
|
|
136
|
+
Description: Requires @option tags for methods with options parameters.
|
|
130
137
|
Enabled: true
|
|
131
138
|
Severity: error
|
|
132
139
|
|
|
140
|
+
Tags/ExampleSyntax:
|
|
141
|
+
Description: Validates Ruby syntax in @example tags.
|
|
142
|
+
Enabled: true
|
|
143
|
+
Severity: warning
|
|
144
|
+
|
|
145
|
+
Tags/RedundantParamDescription:
|
|
146
|
+
Description: Detects meaningless parameter descriptions that add no value.
|
|
147
|
+
Enabled: true
|
|
148
|
+
Severity: convention
|
|
149
|
+
CheckedTags:
|
|
150
|
+
- param
|
|
151
|
+
- option
|
|
152
|
+
Articles:
|
|
153
|
+
- The
|
|
154
|
+
- the
|
|
155
|
+
- A
|
|
156
|
+
- a
|
|
157
|
+
- An
|
|
158
|
+
- an
|
|
159
|
+
MaxRedundantWords: 6
|
|
160
|
+
GenericTerms:
|
|
161
|
+
- object
|
|
162
|
+
- instance
|
|
163
|
+
- value
|
|
164
|
+
- data
|
|
165
|
+
- item
|
|
166
|
+
- element
|
|
167
|
+
EnabledPatterns:
|
|
168
|
+
ArticleParam: true
|
|
169
|
+
PossessiveParam: true
|
|
170
|
+
TypeRestatement: true
|
|
171
|
+
ParamToVerb: true
|
|
172
|
+
IdPattern: true
|
|
173
|
+
DirectionalDate: true
|
|
174
|
+
TypeGeneric: true
|
|
175
|
+
|
|
176
|
+
Tags/InformalNotation:
|
|
177
|
+
Description: Detects informal tag notation patterns like "Note:" instead of @note.
|
|
178
|
+
Enabled: true
|
|
179
|
+
Severity: warning
|
|
180
|
+
CaseSensitive: false
|
|
181
|
+
RequireStartOfLine: true
|
|
182
|
+
Patterns:
|
|
183
|
+
Note: "@note"
|
|
184
|
+
Todo: "@todo"
|
|
185
|
+
TODO: "@todo"
|
|
186
|
+
FIXME: "@todo"
|
|
187
|
+
See: "@see"
|
|
188
|
+
See also: "@see"
|
|
189
|
+
Warning: "@deprecated"
|
|
190
|
+
Deprecated: "@deprecated"
|
|
191
|
+
Author: "@author"
|
|
192
|
+
Version: "@version"
|
|
193
|
+
Since: "@since"
|
|
194
|
+
Returns: "@return"
|
|
195
|
+
Raises: "@raise"
|
|
196
|
+
Example: "@example"
|
|
197
|
+
|
|
198
|
+
Tags/NonAsciiType:
|
|
199
|
+
Description: Detects non-ASCII characters in type annotations.
|
|
200
|
+
Enabled: true
|
|
201
|
+
Severity: warning
|
|
202
|
+
ValidatedTags:
|
|
203
|
+
- param
|
|
204
|
+
- option
|
|
205
|
+
- return
|
|
206
|
+
- yieldreturn
|
|
207
|
+
- yieldparam
|
|
208
|
+
|
|
209
|
+
Tags/TagGroupSeparator:
|
|
210
|
+
Description: Enforces blank line separators between different YARD tag groups.
|
|
211
|
+
Enabled: false
|
|
212
|
+
Severity: convention
|
|
213
|
+
TagGroups:
|
|
214
|
+
param:
|
|
215
|
+
- param
|
|
216
|
+
- option
|
|
217
|
+
return:
|
|
218
|
+
- return
|
|
219
|
+
error:
|
|
220
|
+
- raise
|
|
221
|
+
- throws
|
|
222
|
+
example:
|
|
223
|
+
- example
|
|
224
|
+
meta:
|
|
225
|
+
- see
|
|
226
|
+
- note
|
|
227
|
+
- todo
|
|
228
|
+
- deprecated
|
|
229
|
+
- since
|
|
230
|
+
- version
|
|
231
|
+
- api
|
|
232
|
+
yield:
|
|
233
|
+
- yield
|
|
234
|
+
- yieldparam
|
|
235
|
+
- yieldreturn
|
|
236
|
+
RequireAfterDescription: false
|
|
237
|
+
|
|
133
238
|
# Warnings validators - catches YARD parser errors
|
|
134
239
|
Warnings/UnknownTag:
|
|
135
|
-
Description:
|
|
240
|
+
Description: Detects unknown YARD tags.
|
|
136
241
|
Enabled: true
|
|
137
242
|
Severity: error
|
|
138
243
|
|
|
139
244
|
Warnings/UnknownDirective:
|
|
140
|
-
Description:
|
|
245
|
+
Description: Detects unknown YARD directives.
|
|
141
246
|
Enabled: true
|
|
142
247
|
Severity: error
|
|
143
248
|
|
|
144
249
|
Warnings/InvalidTagFormat:
|
|
145
|
-
Description:
|
|
250
|
+
Description: Detects malformed tag syntax.
|
|
146
251
|
Enabled: true
|
|
147
252
|
Severity: error
|
|
148
253
|
|
|
149
254
|
Warnings/InvalidDirectiveFormat:
|
|
150
|
-
Description:
|
|
255
|
+
Description: Detects malformed directive syntax.
|
|
151
256
|
Enabled: true
|
|
152
257
|
Severity: error
|
|
153
258
|
|
|
154
259
|
Warnings/DuplicatedParameterName:
|
|
155
|
-
Description:
|
|
260
|
+
Description: Detects duplicate @param tags.
|
|
156
261
|
Enabled: true
|
|
157
262
|
Severity: error
|
|
158
263
|
|
|
159
264
|
Warnings/UnknownParameterName:
|
|
160
|
-
Description:
|
|
265
|
+
Description: Detects @param tags for non-existent parameters.
|
|
161
266
|
Enabled: true
|
|
162
267
|
Severity: error
|
|
163
268
|
|
|
164
269
|
# Semantic validators
|
|
165
270
|
Semantic/AbstractMethods:
|
|
166
|
-
Description:
|
|
271
|
+
Description: Ensures @abstract methods do not have real implementations.
|
|
167
272
|
Enabled: true
|
|
168
273
|
Severity: error
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,62 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.0 (2026-02-24)
|
|
4
|
+
|
|
5
|
+
### Breaking Changes
|
|
6
|
+
- **[Breaking]** Remove `detach_archive(queue_name)` method. PGMQ 2.0 no longer requires archive table detachment as archive tables are no longer member objects. The server-side function was already a no-op in PGMQ 2.0+.
|
|
7
|
+
- **[Breaking]** Rename `vt_offset:` parameter to `vt:` in `set_vt`, `set_vt_batch`, and `set_vt_multi` methods. The `vt:` parameter now accepts either an integer offset (seconds from now) or an absolute `Time` object for PGMQ v1.11.0+.
|
|
8
|
+
|
|
9
|
+
### PGMQ v1.11.0 Features
|
|
10
|
+
- **[Feature]** Add `last_read_at` field to `PGMQ::Message`. Returns the timestamp of the last read operation for the message, or nil if the message has never been read. This enables tracking when messages were last accessed (PGMQ v1.8.1+).
|
|
11
|
+
- **[Feature]** Add Grouped Round-Robin reading for fair message processing:
|
|
12
|
+
- `read_grouped_rr(queue_name, vt:, qty:)` - Read messages in round-robin order across groups
|
|
13
|
+
- `read_grouped_rr_with_poll(queue_name, vt:, qty:, max_poll_seconds:, poll_interval_ms:)` - With long-polling
|
|
14
|
+
|
|
15
|
+
Messages are grouped by the first key in their JSON payload. This ensures fair processing
|
|
16
|
+
when multiple entities (users, orders, etc.) have messages in the queue, preventing any
|
|
17
|
+
single entity from monopolizing workers.
|
|
18
|
+
- **[Feature]** Add Topic Routing support (AMQP-like patterns). New methods in `PGMQ::Client`:
|
|
19
|
+
- `bind_topic(pattern, queue_name)` - Bind a topic pattern to a queue
|
|
20
|
+
- `unbind_topic(pattern, queue_name)` - Remove a topic binding
|
|
21
|
+
- `produce_topic(routing_key, message, headers:, delay:)` - Send message via routing key
|
|
22
|
+
- `produce_batch_topic(routing_key, messages, headers:, delay:)` - Batch send via routing key
|
|
23
|
+
- `list_topic_bindings(queue_name:)` - List all topic bindings
|
|
24
|
+
- `test_routing(routing_key)` - Test which queues a routing key matches
|
|
25
|
+
- `validate_routing_key(routing_key)` - Validate a routing key
|
|
26
|
+
- `validate_topic_pattern(pattern)` - Validate a topic pattern
|
|
27
|
+
|
|
28
|
+
Topic patterns support wildcards: `*` (single word) and `#` (zero or more words).
|
|
29
|
+
Requires PGMQ v1.11.0+.
|
|
30
|
+
|
|
31
|
+
### Testing
|
|
32
|
+
- **[Feature]** Add Fiber Scheduler integration tests demonstrating compatibility with Ruby's Fiber Scheduler API and the `async` gem for concurrent I/O operations.
|
|
33
|
+
|
|
34
|
+
### Infrastructure
|
|
35
|
+
- **[Fix]** Update docker-compose.yml volume mount for PostgreSQL 18+ compatibility.
|
|
36
|
+
- **[Change]** Replace Coditsu with StandardRB for code linting. This provides faster, more consistent linting using the community Ruby Style Guide.
|
|
37
|
+
|
|
38
|
+
## 0.4.0 (2025-12-26)
|
|
39
|
+
|
|
40
|
+
### Breaking Changes
|
|
41
|
+
- **[Breaking]** Rename `send` to `produce` and `send_batch` to `produce_batch`. This avoids shadowing Ruby's built-in `Object#send` method which caused confusion and required workarounds (e.g., using `__send__`). The new names also align better with the producer/consumer terminology used in message queue systems.
|
|
42
|
+
|
|
43
|
+
### Queue Management
|
|
44
|
+
- [Enhancement] `create`, `create_partitioned`, and `create_unlogged` now return `true` if the queue was newly created, `false` if it already existed. This provides clearer feedback and aligns with the Rust PGMQ client behavior.
|
|
45
|
+
|
|
46
|
+
### Message Operations
|
|
47
|
+
- **[Feature]** Add `headers:` parameter to `produce(queue_name, message, headers:, delay:)` for message metadata (routing, tracing, correlation IDs).
|
|
48
|
+
- **[Feature]** Add `headers:` parameter to `produce_batch(queue_name, messages, headers:, delay:)` for batch message metadata.
|
|
49
|
+
- **[Feature]** Introduce `pop_batch(queue_name, qty)` for atomic batch pop (read + delete) operations.
|
|
50
|
+
- **[Feature]** Introduce `set_vt_batch(queue_name, msg_ids, vt_offset:)` for batch visibility timeout updates.
|
|
51
|
+
- **[Feature]** Introduce `set_vt_multi(updates_hash, vt_offset:)` for updating visibility timeouts across multiple queues atomically.
|
|
52
|
+
|
|
53
|
+
### Notifications
|
|
54
|
+
- **[Feature]** Introduce `enable_notify_insert(queue_name, throttle_interval_ms:)` for PostgreSQL LISTEN/NOTIFY support.
|
|
55
|
+
- **[Feature]** Introduce `disable_notify_insert(queue_name)` to disable notifications.
|
|
56
|
+
|
|
57
|
+
### Compatibility
|
|
58
|
+
- [Enhancement] Add Ruby 4.0.0 support with full CI testing.
|
|
59
|
+
|
|
3
60
|
## 0.3.0 (2025-11-14)
|
|
4
61
|
|
|
5
62
|
Initial release of pgmq-ruby - a low-level Ruby client for PGMQ (PostgreSQL Message Queue).
|