rimless 1.13.3 → 2.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 15469907299d11dc2bf6d499fcb44cac236caa2089163a742aafa7b75b160532
4
- data.tar.gz: 12e1fa610ff1b3cf116cfa0ac15b6e425358235d8f5a9de17588cd7dd88b4269
3
+ metadata.gz: d60741a8100159c3924d5e27ccd2d8b5c6f6fc8594bd1b26e9ee722073bf8b53
4
+ data.tar.gz: 651bb8b591272452e2c6a044008d31b7885bbac63af472a2abca9976c069716e
5
5
  SHA512:
6
- metadata.gz: 03befc5e9d2876c6c88351580b7f42be014bdaccf89420f17086112110324d3c0ba995afabbe93206c9ab8cd55e4e2414d0679ab2dd1552a14d62d2489bce58d
7
- data.tar.gz: 69d06e278792f340dfcc82e5d94f70ce3f2a2b3043837a749e49e3d12cc89e4994f353c953da2e0190ca46b09b326b1c8a162ef9c29de14d8989590d114be96a
6
+ metadata.gz: bd2f29e6219fe3afdfa3eaa86478dcd3216c0aacfcd536660d573eae17c4020e21a8cebdb2418108c1767f28f156b4c266042d1fb41485d3bfad9fcf11a69559
7
+ data.tar.gz: acdea15705ea5b79cec433d6f10a2ba577ca87b9cce29da42ca531cb1b1d2a1ec8d58e876a2e4c4233471db759495d8d8bc3a84f6365a682ed63b41e93d19c63
@@ -20,12 +20,12 @@ jobs:
20
20
  steps:
21
21
  - uses: actions/checkout@v4
22
22
 
23
- - name: Install Ruby 2.7
23
+ - name: Install Ruby 3.2
24
24
  uses: ruby/setup-ruby@v1
25
25
  with:
26
- ruby-version: 2.7
26
+ ruby-version: 3.2
27
27
  bundler-cache: true
28
- rubygems: '3.4.22'
28
+ rubygems: '3.6.9'
29
29
 
30
30
  - name: Prepare the virtual environment
31
31
  uses: hausgold/actions/ci@master
@@ -18,8 +18,8 @@ jobs:
18
18
  strategy:
19
19
  fail-fast: false
20
20
  matrix:
21
- ruby: ['2.7', '3.0', '3.1', '3.2', '3.3', '3.4']
22
- rails: ['6.1', '7.1']
21
+ ruby: ['3.2', '3.3', '3.4']
22
+ rails: ['7.1', '7.2', '8.0']
23
23
  env:
24
24
  BUNDLE_GEMFILE: 'gemfiles/rails_${{ matrix.rails }}.gemfile'
25
25
  steps:
@@ -30,7 +30,7 @@ jobs:
30
30
  with:
31
31
  ruby-version: ${{ matrix.ruby }}
32
32
  bundler-cache: true
33
- rubygems: '3.4.22'
33
+ rubygems: '3.6.9'
34
34
 
35
35
  - name: Prepare the virtual environment
36
36
  uses: hausgold/actions/ci@master
data/.rubocop.yml CHANGED
@@ -12,7 +12,7 @@ AllCops:
12
12
  NewCops: enable
13
13
  SuggestExtensions: false
14
14
  DisplayCopNames: true
15
- TargetRubyVersion: 2.7
15
+ TargetRubyVersion: 3.2
16
16
  TargetRailsVersion: 6.1
17
17
  Exclude:
18
18
  - bin/**/*
data/Appraisals CHANGED
@@ -1,11 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- appraise 'rails-6.1' do
4
- gem 'activesupport', '~> 6.1.0'
5
- gem 'railties', '~> 6.1.0'
6
- end
7
-
8
3
  appraise 'rails-7.1' do
9
4
  gem 'activesupport', '~> 7.1.0'
10
5
  gem 'railties', '~> 7.1.0'
11
6
  end
7
+
8
+ appraise 'rails-7.2' do
9
+ gem 'activesupport', '~> 7.2.0'
10
+ gem 'railties', '~> 7.2.0'
11
+ end
12
+
13
+ appraise 'rails-8.0' do
14
+ gem 'activesupport', '~> 8.0.0'
15
+ gem 'railties', '~> 8.0.0'
16
+ end
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  * TODO: Replace this bullet point with an actual description of a change.
4
4
 
5
+ ### 2.0.0 (28 June 2025)
6
+
7
+ * Corrected some RuboCop glitches ([#58](https://github.com/hausgold/rimless/pull/58))
8
+ * Drop Ruby 2 and end of life Rails (<7.1) ([#59](https://github.com/hausgold/rimless/pull/59))
9
+
5
10
  ### 1.13.3 (21 May 2025)
6
11
 
7
12
  * Corrected some RuboCop glitches ([#56](https://github.com/hausgold/rimless/pull/56))
data/Dockerfile CHANGED
@@ -1,8 +1,8 @@
1
- FROM hausgold/ruby:2.7
1
+ FROM hausgold/ruby:3.2
2
2
  LABEL org.opencontainers.image.authors="containers@hausgold.de"
3
3
 
4
4
  # Update system gem
5
- RUN gem update --system '3.4.22'
5
+ RUN gem update --system '3.6.9'
6
6
 
7
7
  # Install system packages and the latest bundler
8
8
  RUN apt-get update -yqqq && \
@@ -11,7 +11,7 @@ RUN apt-get update -yqqq && \
11
11
  ca-certificates \
12
12
  bash-completion inotify-tools && \
13
13
  echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && /usr/sbin/locale-gen && \
14
- gem install bundler -v '~> 2.4.22' --no-document --no-prerelease
14
+ gem install bundler -v '~> 2.6.9' --no-document --no-prerelease
15
15
 
16
16
  # Add new web user
17
17
  RUN mkdir /app && \
data/Gemfile CHANGED
@@ -9,11 +9,11 @@ gemspec
9
9
 
10
10
  # Development dependencies
11
11
  gem 'appraisal', '~> 2.4'
12
- gem 'bundler', '~> 2.3'
13
- gem 'countless', '~> 1.1'
12
+ gem 'bundler', '~> 2.6'
13
+ gem 'countless', '~> 2.0'
14
14
  gem 'factory_bot', '~> 6.2'
15
15
  gem 'guard-rspec', '~> 4.7'
16
- gem 'railties', '>= 6.1'
16
+ gem 'railties', '>= 7.1'
17
17
  gem 'rake', '~> 13.0'
18
18
  gem 'redcarpet', '~> 3.5'
19
19
  gem 'rspec', '~> 3.12'
data/Makefile CHANGED
@@ -117,7 +117,7 @@ test-style: \
117
117
  test-style-ruby:
118
118
  # Run the static code analyzer (rubocop)
119
119
  @$(call run-shell,$(BUNDLE) exec $(RUBOCOP) -a \
120
- || ($(TEST) $$($(RUBY_VERSION)) != '2.7' && true))
120
+ || ($(TEST) $$($(RUBY_VERSION)) != '3.2' && true))
121
121
 
122
122
  clean:
123
123
  # Clean the dependencies
@@ -8,8 +8,8 @@ RUN gem update --system '3.4.22'
8
8
  RUN echo 'deb http://archive.debian.org/debian buster-backports main' \
9
9
  >> /etc/apt/sources.list
10
10
 
11
- # Install nodejs 22
12
- RUN curl -sL https://deb.nodesource.com/setup_22.x | bash -
11
+ # Install nodejs 24
12
+ RUN curl -sL https://deb.nodesource.com/setup_24.x | bash -
13
13
 
14
14
  # Install system packages and the ruby bundless
15
15
  RUN apt-get update -yqqq && \
@@ -1,4 +1,3 @@
1
- version: "3"
2
1
  services:
3
2
  kafka:
4
3
  image: hausgold/kafka:3.9
data/docker-compose.yml CHANGED
@@ -1,4 +1,3 @@
1
- version: "3"
2
1
  services:
3
2
  test:
4
3
  build: .
@@ -3,8 +3,8 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "appraisal", "~> 2.4"
6
- gem "bundler", "~> 2.3"
7
- gem "countless", "~> 1.1"
6
+ gem "bundler", "~> 2.6"
7
+ gem "countless", "~> 2.0"
8
8
  gem "factory_bot", "~> 6.2"
9
9
  gem "guard-rspec", "~> 4.7"
10
10
  gem "railties", "~> 7.1.0"
@@ -0,0 +1,24 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal", "~> 2.4"
6
+ gem "bundler", "~> 2.6"
7
+ gem "countless", "~> 2.0"
8
+ gem "factory_bot", "~> 6.2"
9
+ gem "guard-rspec", "~> 4.7"
10
+ gem "railties", "~> 7.2.0"
11
+ gem "rake", "~> 13.0"
12
+ gem "redcarpet", "~> 3.5"
13
+ gem "rspec", "~> 3.12"
14
+ gem "rubocop"
15
+ gem "rubocop-rails"
16
+ gem "rubocop-rspec"
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", "~> 7.2.0"
23
+
24
+ gemspec path: "../"
@@ -0,0 +1,24 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal", "~> 2.4"
6
+ gem "bundler", "~> 2.6"
7
+ gem "countless", "~> 2.0"
8
+ gem "factory_bot", "~> 6.2"
9
+ gem "guard-rspec", "~> 4.7"
10
+ gem "railties", "~> 8.0.0"
11
+ gem "rake", "~> 13.0"
12
+ gem "redcarpet", "~> 3.5"
13
+ gem "rspec", "~> 3.12"
14
+ gem "rubocop"
15
+ gem "rubocop-rails"
16
+ gem "rubocop-rspec"
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", "~> 8.0.0"
23
+
24
+ gemspec path: "../"
@@ -125,8 +125,8 @@ module Rimless
125
125
  # needed. (eg. to set some ruby-kafka driver default settings, etc)
126
126
  #
127
127
  # @return [Rimless::ConsumerApp] our self for chaining
128
- def configure(&block)
129
- setup(&block)
128
+ def configure(&)
129
+ setup(&)
130
130
  self
131
131
  end
132
132
 
@@ -10,8 +10,8 @@ module Rimless
10
10
  # @param data [String] the Apache Avro blob
11
11
  # @param opts [Hash{Symbol => Mixed}] additional options
12
12
  # @return [Hash{String => Mixed}] the parsed payload
13
- def avro_parse(data, **opts)
14
- Rimless.avro_decode(data, **opts)
13
+ def avro_parse(data, **)
14
+ Rimless.avro_decode(data, **)
15
15
  end
16
16
 
17
17
  # A simple helper to fake a deserialized Apache Kafka message for
@@ -47,8 +47,8 @@ module Rimless
47
47
  #
48
48
  # @yield the given block to capture the messages
49
49
  # @return [Array<Hash{Symbol => Mixed}>] the captured messages
50
- def capture_kafka_messages(&block)
51
- Rimless::RSpec::Matchers::HaveSentKafkaMessage.new(nil).capture(&block)
50
+ def capture_kafka_messages(&)
51
+ Rimless::RSpec::Matchers::HaveSentKafkaMessage.new(nil).capture(&)
52
52
  end
53
53
  end
54
54
  end
@@ -137,14 +137,14 @@ module Rimless
137
137
  # @param proc [Proc] the block to evaluate
138
138
  # @return [Boolean] whenever the check was unsuccessful or not
139
139
  #
140
- # rubocop:disable Naming/PredicateName -- because we just serve
140
+ # rubocop:disable Naming/PredicatePrefix -- because we just serve
141
141
  # the RSpec API here
142
142
  def does_not_match?(proc)
143
143
  set_expected_number(:at_least, 1)
144
144
 
145
145
  !matches?(proc)
146
146
  end
147
- # rubocop:enable Naming/PredicateName
147
+ # rubocop:enable Naming/PredicatePrefix
148
148
 
149
149
  private
150
150
 
@@ -165,6 +165,9 @@ module Rimless
165
165
  # Perform the result set checking of recorded message which were sent.
166
166
  #
167
167
  # @return [Boolean] the answer
168
+ #
169
+ # rubocop:disable Naming/PredicateMethod -- because this method performs
170
+ # an action, not a predicate check (bool is for error signaling)
168
171
  def check
169
172
  @matching, @unmatching = @messages.partition do |message|
170
173
  schema_match?(message) && arguments_match?(message) &&
@@ -179,6 +182,7 @@ module Rimless
179
182
  when :at_least then @expected_number <= @matching_count
180
183
  end
181
184
  end
185
+ # rubocop:enable Naming/PredicateMethod
182
186
 
183
187
  # Check for the expected schema on the given message.
184
188
  #
@@ -295,12 +299,12 @@ module Rimless
295
299
  #
296
300
  # @param schema [String, Symbol, nil] the Apache Avro schema to check
297
301
  #
298
- # rubocop:disable Naming/PredicateName -- because its a RSpec matcher
302
+ # rubocop:disable Naming/PredicatePrefix -- because its a RSpec matcher
299
303
  def have_sent_kafka_message(schema = nil)
300
304
  HaveSentKafkaMessage.new(schema)
301
305
  end
302
306
  alias sent_kafka_message have_sent_kafka_message
303
- # rubocop:enable Naming/PredicateName
307
+ # rubocop:enable Naming/PredicatePrefix
304
308
  end
305
309
  end
306
310
  end
@@ -3,7 +3,7 @@
3
3
  # The gem version details.
4
4
  module Rimless
5
5
  # The version of the +rimless+ gem
6
- VERSION = '1.13.3'
6
+ VERSION = '2.0.0'
7
7
 
8
8
  class << self
9
9
  # Returns the version of gem as a string.
data/lib/rimless.rb CHANGED
@@ -45,7 +45,7 @@ module Rimless
45
45
  require 'rimless/railtie' if defined? Rails
46
46
 
47
47
  # Load all initializers of the gem
48
- Dir[root_path.join('initializers/**/*.rb')].sort.each { |path| require path }
48
+ Dir[root_path.join('initializers/**/*.rb')].each { |path| require path }
49
49
 
50
50
  # Include top-level features
51
51
  include Rimless::ConfigurationHandling
data/rimless.gemspec CHANGED
@@ -33,9 +33,9 @@ Gem::Specification.new do |spec|
33
33
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
34
34
  spec.require_paths = ['lib']
35
35
 
36
- spec.required_ruby_version = '>= 2.7'
36
+ spec.required_ruby_version = '>= 3.2'
37
37
 
38
- spec.add_dependency 'activesupport', '>= 6.1'
38
+ spec.add_dependency 'activesupport', '>= 7.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,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rimless
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.3
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hermann Mayer
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2025-05-21 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: activesupport
@@ -16,14 +15,14 @@ dependencies:
16
15
  requirements:
17
16
  - - ">="
18
17
  - !ruby/object:Gem::Version
19
- version: '6.1'
18
+ version: '7.1'
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - ">="
25
24
  - !ruby/object:Gem::Version
26
- version: '6.1'
25
+ version: '7.1'
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: avro_turf
29
28
  requirement: !ruby/object:Gem::Requirement
@@ -244,6 +243,8 @@ files:
244
243
  - docker-compose.yml
245
244
  - gemfiles/rails_6.1.gemfile
246
245
  - gemfiles/rails_7.1.gemfile
246
+ - gemfiles/rails_7.2.gemfile
247
+ - gemfiles/rails_8.0.gemfile
247
248
  - lib/rimless.rb
248
249
  - lib/rimless/avro_helpers.rb
249
250
  - lib/rimless/avro_utils.rb
@@ -272,7 +273,6 @@ files:
272
273
  - lib/rimless/tasks/templates/karafka.rb
273
274
  - lib/rimless/version.rb
274
275
  - rimless.gemspec
275
- homepage:
276
276
  licenses:
277
277
  - MIT
278
278
  metadata:
@@ -281,7 +281,6 @@ metadata:
281
281
  changelog_uri: https://github.com/hausgold/rimless/blob/master/CHANGELOG.md
282
282
  bug_tracker_uri: https://github.com/hausgold/rimless/issues
283
283
  documentation_uri: https://www.rubydoc.info/gems/rimless
284
- post_install_message:
285
284
  rdoc_options: []
286
285
  require_paths:
287
286
  - lib
@@ -289,15 +288,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
289
288
  requirements:
290
289
  - - ">="
291
290
  - !ruby/object:Gem::Version
292
- version: '2.7'
291
+ version: '3.2'
293
292
  required_rubygems_version: !ruby/object:Gem::Requirement
294
293
  requirements:
295
294
  - - ">="
296
295
  - !ruby/object:Gem::Version
297
296
  version: '0'
298
297
  requirements: []
299
- rubygems_version: 3.4.22
300
- signing_key:
298
+ rubygems_version: 3.6.9
301
299
  specification_version: 4
302
300
  summary: A bundle of opinionated Apache Kafka / Confluent Schema Registry helpers.
303
301
  test_files: []