rimless 1.7.7 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +2 -2
- data/.rubocop.yml +1 -1
- data/Appraisals +0 -5
- data/CHANGELOG.md +42 -31
- data/Gemfile +2 -4
- data/doc/kafka-playground/docker-compose.yml +2 -2
- data/gemfiles/rails_6.1.gemfile +1 -1
- data/gemfiles/rails_7.1.gemfile +1 -1
- data/lib/rimless/consumer.rb +13 -2
- data/lib/rimless/kafka_helpers.rb +10 -1
- data/lib/rimless/version.rb +1 -1
- data/rimless.gemspec +1 -1
- metadata +4 -5
- data/gemfiles/rails_5.2.gemfile +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74c4d44bc25c970876e55e49dc0844f81478c14b604edb51e1ccdea419805f44
|
4
|
+
data.tar.gz: f916e1f620a66c863d324e252f7343ab2f05d73642664910995b9300b6044d48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb963ba622b3081b053ce1bd6a9f9ccc970a4a8c2c7767f20cf2588f2847ef4026068a7cedaed40fcbaf2d1e1c68f2e98f15813dbe62e2cf350f2ffae2a925e0
|
7
|
+
data.tar.gz: b2fc0a8f0a64db9c947ca3a413641b95b116b90f0961273b14671017e30c1a7b89ffd40da5982f154b83efdac232e9307307ec9b00538bcff5b0f919793e01af
|
data/.github/workflows/test.yml
CHANGED
data/.rubocop.yml
CHANGED
data/Appraisals
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,41 +2,52 @@
|
|
2
2
|
|
3
3
|
* TODO: Replace this bullet point with an actual description of a change.
|
4
4
|
|
5
|
-
### 1.
|
5
|
+
### 1.9.0 (3 January 2025)
|
6
|
+
|
7
|
+
* Raised minimum supported Ruby/Rails version to 2.7/6.1 (#45)
|
8
|
+
|
9
|
+
### 1.8.0 (14 November 2024)
|
10
|
+
|
11
|
+
* Added support for custom topic names via the `full_name:` keyword argument on
|
12
|
+
the consumer routing table (#44)
|
13
|
+
* Added support to pass a block to the routing table
|
14
|
+
(`Rimless.consumer.topics`) to add custom topic configurations (#44)
|
15
|
+
|
16
|
+
### 1.7.7 (19 September 2024)
|
6
17
|
|
7
18
|
* Corrected the Sidekiq interchanger decoding, which is caused by an upstream
|
8
19
|
update of the karafka-sidekiq-backend gem (#43)
|
9
20
|
|
10
|
-
### 1.7.6
|
21
|
+
### 1.7.6 (19 September 2024)
|
11
22
|
|
12
23
|
* Added a monkey-patch for the constellation Karafka 1.4 and Thor 1.3,
|
13
24
|
on Ruby >=2.7 (#42)
|
14
25
|
|
15
|
-
### 1.7.5
|
26
|
+
### 1.7.5 (15 August 2024)
|
16
27
|
|
17
28
|
* Just a retag of 1.7.1
|
18
29
|
|
19
|
-
### 1.7.4
|
30
|
+
### 1.7.4 (15 August 2024)
|
20
31
|
|
21
32
|
* Just a retag of 1.7.1
|
22
33
|
|
23
|
-
### 1.7.3
|
34
|
+
### 1.7.3 (15 August 2024)
|
24
35
|
|
25
36
|
* Just a retag of 1.7.1
|
26
37
|
|
27
|
-
### 1.7.2
|
38
|
+
### 1.7.2 (9 August 2024)
|
28
39
|
|
29
40
|
* Just a retag of 1.7.1
|
30
41
|
|
31
|
-
### 1.7.1
|
42
|
+
### 1.7.1 (9 August 2024)
|
32
43
|
|
33
44
|
* Added API docs building to continuous integration (#41)
|
34
45
|
|
35
|
-
### 1.7.0
|
46
|
+
### 1.7.0 (8 July 2024)
|
36
47
|
|
37
48
|
* Added CI tests for Rails 6.1 and 7.1 (#39)
|
38
49
|
|
39
|
-
### 1.6.0
|
50
|
+
### 1.6.0 (3 July 2024)
|
40
51
|
|
41
52
|
* Dropped support for Ruby <2.7 (#38)
|
42
53
|
* Moved the schema file validation into the retry block for parallel execution
|
@@ -44,34 +55,34 @@
|
|
44
55
|
* Updated the [Kafka Playground](./doc/kafka-playground) to the latest
|
45
56
|
Apache Kafka (3.7) and Schema Registry (7.6) versions (#35)
|
46
57
|
|
47
|
-
### 1.5.1
|
58
|
+
### 1.5.1 (26 April 2024)
|
48
59
|
|
49
60
|
* Added a retry to write compiled schema files as this may fail on parallel
|
50
61
|
execution (#33)
|
51
62
|
|
52
|
-
### 1.5.0
|
63
|
+
### 1.5.0 (4 December 2023)
|
53
64
|
|
54
65
|
* Do not extend the `Rimless.logger` to write to stdout by default when running
|
55
66
|
in the `development` environment - this generates duplicated messages when
|
56
67
|
the configured logger already writes to stdout. A new configuration was added
|
57
68
|
`Rimless.configuration.extend_dev_logger = false` was added (#32)
|
58
69
|
|
59
|
-
### 1.4.2
|
70
|
+
### 1.4.2 (12 July 2023)
|
60
71
|
|
61
72
|
* Reverted to use `yield_self` instead of `then` in order to support Ruby 2.5
|
62
73
|
as advertised (broken since #19, 1.3.0) (#31)
|
63
74
|
|
64
|
-
### 1.4.1
|
75
|
+
### 1.4.1 (5 July 2023)
|
65
76
|
|
66
77
|
* Moved the development dependencies from the gemspec to the Gemfile (#29)
|
67
78
|
* Pinned Karafka gem <1.4.15 in order to suppress the
|
68
79
|
`I_ACCEPT_CRITICAL_ERRORS_IN_KARAFKA_1_4=true` agony (#30)
|
69
80
|
|
70
|
-
### 1.4.0
|
81
|
+
### 1.4.0 (24 February 2023)
|
71
82
|
|
72
83
|
* Added support for Gem release automation
|
73
84
|
|
74
|
-
### 1.3.0
|
85
|
+
### 1.3.0 (18 January 2023)
|
75
86
|
|
76
87
|
* Bundler >= 2.3 is from now on required as minimal version (#19)
|
77
88
|
* Dropped support for Ruby < 2.5 (#19)
|
@@ -79,49 +90,49 @@
|
|
79
90
|
* Updated all development/runtime gems to their latest
|
80
91
|
Ruby 2.5 compatible version (#19)
|
81
92
|
|
82
|
-
### 1.2.0
|
93
|
+
### 1.2.0 (4 October 2021)
|
83
94
|
|
84
95
|
* Added a `capture_kafka_messages` helper for RSpec (#12)
|
85
96
|
|
86
|
-
### 1.1.1
|
97
|
+
### 1.1.1 (12 May 2021)
|
87
98
|
|
88
99
|
* Corrected the GNU Make release target
|
89
100
|
|
90
|
-
### 1.1.0
|
101
|
+
### 1.1.0 (23 October 2020)
|
91
102
|
|
92
103
|
* Added support for Karafka `~> 1.4.0` and set is as minimum dependency version
|
93
104
|
(#10)
|
94
105
|
|
95
|
-
### 1.0.4
|
106
|
+
### 1.0.4 (14 August 2020)
|
96
107
|
|
97
108
|
* Mocked WaterDrop producers in the rimless rspec helper so that tests
|
98
109
|
won't actually talk to Kafka (#9)
|
99
110
|
|
100
|
-
### 1.0.3
|
111
|
+
### 1.0.3 (14 May 2020)
|
101
112
|
|
102
113
|
* Corrected broken stats when no consumer is yet defined (#8)
|
103
114
|
|
104
|
-
### 1.0.2
|
115
|
+
### 1.0.2 (11 March 2020)
|
105
116
|
|
106
117
|
* Only load the statistics rake task when Rails is available and the
|
107
118
|
environment is development (instead of not production, this may cause issues
|
108
119
|
for +canary+ or +stage+ Rails environments)
|
109
120
|
|
110
|
-
### 1.0.1
|
121
|
+
### 1.0.1 (11 March 2020)
|
111
122
|
|
112
123
|
* Added the missing +Karafka::Testing::RSpec::Helpers+ include to the
|
113
124
|
RSpec configuration
|
114
125
|
|
115
|
-
### 1.0.0
|
126
|
+
### 1.0.0 (11 March 2020)
|
116
127
|
|
117
128
|
* Dropped support for Ruby 2.3/2.4 and added support for Rails 6.0 (#6)
|
118
129
|
* Implemented a simple opinionated Kafka consumer setup (#7)
|
119
130
|
|
120
|
-
### 0.3.0
|
131
|
+
### 0.3.0 (8 November 2019)
|
121
132
|
|
122
133
|
* Upgraded the avro_turf gem (`~> 0.11.0`) (#5)
|
123
134
|
|
124
|
-
### 0.2.1
|
135
|
+
### 0.2.1 (13 August 2019)
|
125
136
|
|
126
137
|
* Added support for the
|
127
138
|
[parallel_tests](https://github.com/grosser/parallel_tests) gem and
|
@@ -129,7 +140,7 @@
|
|
129
140
|
thread. This fixes all race conditions which slow down or break user test
|
130
141
|
suites.
|
131
142
|
|
132
|
-
### 0.2.0
|
143
|
+
### 0.2.0 (5 June 2019)
|
133
144
|
|
134
145
|
* Added the `Rimless.encode` (`.avro_encode`) and `Rimless.decode`
|
135
146
|
(`.avro_decode`) helpers/shortcuts to simplify the interaction with the
|
@@ -148,29 +159,29 @@
|
|
148
159
|
of the compiled schema directory caused previously file read errors when a
|
149
160
|
parallel process started a recompilation.
|
150
161
|
|
151
|
-
### 0.1.4
|
162
|
+
### 0.1.4 (17 April 2019)
|
152
163
|
|
153
164
|
* Reconfigure (reset) the AvroTurf instance on tests to avoid caching issues
|
154
165
|
(on failed tests the message decoding was not working which results in
|
155
166
|
unrelated errors, instead of showing the actual test failure)
|
156
167
|
|
157
|
-
### 0.1.3
|
168
|
+
### 0.1.3 (16 April 2019)
|
158
169
|
|
159
170
|
* Check for unset and empty values while configuring dependencies
|
160
171
|
|
161
|
-
### 0.1.2
|
172
|
+
### 0.1.2 (16 April 2019)
|
162
173
|
|
163
174
|
* Skip the configuration of the AvroTurf gem in case no schema registry URL is
|
164
175
|
configured, this allows the smooth run of Rails asset precompilations without
|
165
176
|
full environment configurations (eg. on CI)
|
166
177
|
|
167
|
-
### 0.1.1
|
178
|
+
### 0.1.1 (16 April 2019)
|
168
179
|
|
169
180
|
* Skip the configuration of the WaterDrop gem in case no brokers are
|
170
181
|
configured, this allows the smooth run of Rails asset precompilations without
|
171
182
|
full environment configurations (eg. on CI)
|
172
183
|
|
173
|
-
### 0.1.0
|
184
|
+
### 0.1.0 (16 April 2019)
|
174
185
|
|
175
186
|
* The first release with support for simple Apache Avro message producing on
|
176
187
|
Apache Kafka/Confluent Schema Registry
|
data/Gemfile
CHANGED
@@ -11,11 +11,9 @@ gemspec
|
|
11
11
|
gem 'appraisal', '~> 2.4'
|
12
12
|
gem 'bundler', '~> 2.3'
|
13
13
|
gem 'countless', '~> 1.1'
|
14
|
-
|
15
|
-
# https://github.com/thoughtbot/factory_bot/issues/1614 is solved.
|
16
|
-
gem 'factory_bot', '~> 6.2', '< 6.4.5'
|
14
|
+
gem 'factory_bot', '~> 6.2'
|
17
15
|
gem 'guard-rspec', '~> 4.7'
|
18
|
-
gem 'railties', '>=
|
16
|
+
gem 'railties', '>= 6.1'
|
19
17
|
gem 'rake', '~> 13.0'
|
20
18
|
gem 'redcarpet', '~> 3.5'
|
21
19
|
gem 'rspec', '~> 3.12'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
version: "3"
|
2
2
|
services:
|
3
3
|
kafka:
|
4
|
-
image: hausgold/kafka:3.
|
4
|
+
image: hausgold/kafka:3.9
|
5
5
|
network_mode: bridge
|
6
6
|
environment:
|
7
7
|
MDNS_HOSTNAME: kafka.playground.local
|
@@ -20,7 +20,7 @@ services:
|
|
20
20
|
hard: 100000
|
21
21
|
|
22
22
|
schema-registry:
|
23
|
-
image: hausgold/schema-registry:7.
|
23
|
+
image: hausgold/schema-registry:7.8
|
24
24
|
network_mode: bridge
|
25
25
|
environment:
|
26
26
|
MDNS_HOSTNAME: schema-registry.playground.local
|
data/gemfiles/rails_6.1.gemfile
CHANGED
@@ -5,7 +5,7 @@ source "https://rubygems.org"
|
|
5
5
|
gem "appraisal", "~> 2.4"
|
6
6
|
gem "bundler", "~> 2.3"
|
7
7
|
gem "countless", "~> 1.1"
|
8
|
-
gem "factory_bot", "~> 6.2"
|
8
|
+
gem "factory_bot", "~> 6.2"
|
9
9
|
gem "guard-rspec", "~> 4.7"
|
10
10
|
gem "railties", "~> 6.1.0"
|
11
11
|
gem "rake", "~> 13.0"
|
data/gemfiles/rails_7.1.gemfile
CHANGED
@@ -5,7 +5,7 @@ source "https://rubygems.org"
|
|
5
5
|
gem "appraisal", "~> 2.4"
|
6
6
|
gem "bundler", "~> 2.3"
|
7
7
|
gem "countless", "~> 1.1"
|
8
|
-
gem "factory_bot", "~> 6.2"
|
8
|
+
gem "factory_bot", "~> 6.2"
|
9
9
|
gem "guard-rspec", "~> 4.7"
|
10
10
|
gem "railties", "~> 7.1.0"
|
11
11
|
gem "rake", "~> 13.0"
|
data/lib/rimless/consumer.rb
CHANGED
@@ -126,12 +126,23 @@ module Rimless
|
|
126
126
|
# topics({ app: :test_app, name: :admins } => YourConsumer)
|
127
127
|
# topics({ app: :test_app, names: %i[users admins] } => YourConsumer)
|
128
128
|
#
|
129
|
+
# Examples:
|
130
|
+
#
|
131
|
+
# topics do
|
132
|
+
# topic('name') do
|
133
|
+
# consumer CustomConsumer
|
134
|
+
# end
|
135
|
+
# end
|
136
|
+
#
|
129
137
|
# @param topics [Hash{Hash => Class}] the topic to consumer mapping
|
138
|
+
# @yield the given block on the routing table
|
130
139
|
#
|
131
140
|
# rubocop:disable Metrics/MethodLength because of the Karafka DSL
|
132
|
-
def topics(topics)
|
141
|
+
def topics(topics = [], &block)
|
133
142
|
consumer_groups.draw do
|
134
|
-
consumer_group
|
143
|
+
consumer_group(Rimless.configuration.client_id) do
|
144
|
+
instance_exec(&block) if block_given?
|
145
|
+
|
135
146
|
topics.each do |topic_parts, dest_consumer|
|
136
147
|
Rimless.consumer.topic_names(topic_parts).each do |topic_name|
|
137
148
|
topic(topic_name) do
|
@@ -19,14 +19,21 @@ module Rimless
|
|
19
19
|
# Rimless.topic(:users, app: 'test-api')
|
20
20
|
# @example Mix and match
|
21
21
|
# Rimless.topic(name: 'test', app: :fancy_app)
|
22
|
+
# @example Full name - use as is
|
23
|
+
# Rimless.topic(full_name: 'my.custom.topic.name')
|
22
24
|
#
|
23
|
-
# rubocop:disable Metrics/
|
25
|
+
# rubocop:disable Metrics/MethodLength because of the usage flexibility
|
26
|
+
# rubocop:disable Metrics/AbcSize dito
|
24
27
|
# rubocop:disable Metrics/CyclomaticComplexity dito
|
28
|
+
# rubocop:disable Metrics/PerceivedComplexity dito
|
25
29
|
def topic(*args)
|
26
30
|
opts = args.last
|
27
31
|
name = args.first if [String, Symbol].member?(args.first.class)
|
28
32
|
|
29
33
|
if opts.is_a?(Hash)
|
34
|
+
# When we got a full name, we use it as is
|
35
|
+
return opts[:full_name] if opts.key? :full_name
|
36
|
+
|
30
37
|
name = opts[:name] if opts.key?(:name)
|
31
38
|
app = opts[:app] if opts.key?(:app)
|
32
39
|
end
|
@@ -38,8 +45,10 @@ module Rimless
|
|
38
45
|
|
39
46
|
"#{Rimless.topic_prefix(app)}#{name}".tr('_', '-')
|
40
47
|
end
|
48
|
+
# rubocop:enable Metrics/MethodLength
|
41
49
|
# rubocop:enable Metrics/AbcSize
|
42
50
|
# rubocop:enable Metrics/CyclomaticComplexity
|
51
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
43
52
|
|
44
53
|
# Send a single message to Apache Kafka. The data is encoded according to
|
45
54
|
# the given Apache Avro schema. The destination Kafka topic may be a
|
data/lib/rimless/version.rb
CHANGED
data/rimless.gemspec
CHANGED
@@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
|
|
35
35
|
|
36
36
|
spec.required_ruby_version = '>= 2.7'
|
37
37
|
|
38
|
-
spec.add_dependency 'activesupport', '>=
|
38
|
+
spec.add_dependency 'activesupport', '>= 6.1'
|
39
39
|
spec.add_dependency 'avro_turf', '~> 0.11.0'
|
40
40
|
spec.add_dependency 'karafka', '~> 1.4', '< 1.4.15'
|
41
41
|
spec.add_dependency 'karafka-sidekiq-backend', '~> 1.4'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rimless
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hermann Mayer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '6.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '6.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: avro_turf
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -214,7 +214,6 @@ files:
|
|
214
214
|
- doc/kafka-playground/docker-compose.yml
|
215
215
|
- doc/kafka-playground/examples/rimless-produce
|
216
216
|
- docker-compose.yml
|
217
|
-
- gemfiles/rails_5.2.gemfile
|
218
217
|
- gemfiles/rails_6.1.gemfile
|
219
218
|
- gemfiles/rails_7.1.gemfile
|
220
219
|
- lib/rimless.rb
|
data/gemfiles/rails_5.2.gemfile
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "appraisal", "~> 2.4"
|
6
|
-
gem "bundler", "~> 2.3"
|
7
|
-
gem "countless", "~> 1.1"
|
8
|
-
gem "factory_bot", "~> 6.2", "< 6.4.5"
|
9
|
-
gem "guard-rspec", "~> 4.7"
|
10
|
-
gem "railties", "~> 5.2.0"
|
11
|
-
gem "rake", "~> 13.0"
|
12
|
-
gem "redcarpet", "~> 3.5"
|
13
|
-
gem "rspec", "~> 3.12"
|
14
|
-
gem "rubocop", "~> 1.28"
|
15
|
-
gem "rubocop-rails", "~> 2.14"
|
16
|
-
gem "rubocop-rspec", "~> 2.10"
|
17
|
-
gem "simplecov", ">= 0.22"
|
18
|
-
gem "timecop", ">= 0.9.6"
|
19
|
-
gem "vcr", "~> 6.0"
|
20
|
-
gem "yard", ">= 0.9.28"
|
21
|
-
gem "yard-activesupport-concern", ">= 0.0.1"
|
22
|
-
gem "activesupport", "~> 5.2.0"
|
23
|
-
|
24
|
-
gemspec path: "../"
|