rimless 1.9.0 → 1.10.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: 74c4d44bc25c970876e55e49dc0844f81478c14b604edb51e1ccdea419805f44
4
- data.tar.gz: f916e1f620a66c863d324e252f7343ab2f05d73642664910995b9300b6044d48
3
+ metadata.gz: de979febab99ce6dfef68a6e74f31153431030bdb4f74c95d6a5405ba834390b
4
+ data.tar.gz: b19aabf3263bcef2191635da4a288a4e1260557409a45b0bfb9704dc105e2246
5
5
  SHA512:
6
- metadata.gz: bb963ba622b3081b053ce1bd6a9f9ccc970a4a8c2c7767f20cf2588f2847ef4026068a7cedaed40fcbaf2d1e1c68f2e98f15813dbe62e2cf350f2ffae2a925e0
7
- data.tar.gz: b2fc0a8f0a64db9c947ca3a413641b95b116b90f0961273b14671017e30c1a7b89ffd40da5982f154b83efdac232e9307307ec9b00538bcff5b0f919793e01af
6
+ metadata.gz: 5423dd559bbad4a9bf8b0a564acbea9521fd340d3af6b2e0eb8eb4680b960b68175bf744428ba07d4cbb3a24f27d508f9d6b653088b19fb96d5cc63796807f0d
7
+ data.tar.gz: c1c760ee3339a7cff79ceb102d1db3ecb472f21b719991d6e15276d1d5fbfb9b1788814c7af593d7d46ad8fb1681cb2a0d91b31871b6351d11fa0b78f7dead64
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  * TODO: Replace this bullet point with an actual description of a change.
4
4
 
5
+ ### 1.10.0 (11 January 2025)
6
+
7
+ * Switched to Zeitwerk as autoloader (#46)
8
+
5
9
  ### 1.9.0 (3 January 2025)
6
10
 
7
11
  * Raised minimum supported Ruby/Rails version to 2.7/6.1 (#45)
@@ -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.9.0'
6
+ VERSION = '1.10.0'
7
7
 
8
8
  class << self
9
9
  # Returns the version of gem as a string.
data/lib/rimless.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'zeitwerk'
3
4
  require 'active_support'
4
5
  require 'active_support/concern'
5
6
  require 'active_support/configurable'
@@ -22,28 +23,26 @@ module Rimless
22
23
  # Configure the relative gem code base location
23
24
  root_path = Pathname.new("#{__dir__}/rimless")
24
25
 
25
- # Top level elements
26
- autoload :Configuration, 'rimless/configuration'
27
- autoload :ConfigurationHandling, 'rimless/configuration_handling'
28
- autoload :AvroHelpers, 'rimless/avro_helpers'
29
- autoload :AvroUtils, 'rimless/avro_utils'
30
- autoload :KafkaHelpers, 'rimless/kafka_helpers'
31
- autoload :Dependencies, 'rimless/dependencies'
32
- autoload :BaseConsumer, 'rimless/base_consumer'
33
- autoload :Consumer, 'rimless/consumer'
34
- autoload :ConsumerJob, 'rimless/consumer_job'
35
-
36
- # All Karafka-framework related components
37
- module Karafka
38
- autoload :Base64Interchanger, 'rimless/karafka/base64_interchanger'
39
- autoload :PassthroughMapper, 'rimless/karafka/passthrough_mapper'
40
- autoload :AvroDeserializer, 'rimless/karafka/avro_deserializer'
41
- end
26
+ # Setup a Zeitwerk autoloader instance and configure it
27
+ loader = Zeitwerk::Loader.for_gem
28
+
29
+ # Do not auto load some parts of the gem
30
+ loader.ignore(root_path.join('compatibility*'))
31
+ loader.ignore(root_path.join('initializers*'))
32
+ loader.ignore(root_path.join('tasks*'))
33
+ loader.ignore(root_path.join('railtie.rb'))
34
+ loader.ignore(root_path.join('rspec*'))
35
+
36
+ # Finish the auto loader configuration
37
+ loader.setup
42
38
 
43
39
  # Load standalone code
44
40
  require 'rimless/version'
45
41
  require 'rimless/railtie' if defined? Rails
46
42
 
43
+ # Load all initializers of the gem
44
+ Dir[root_path.join('initializers/**/*.rb')].sort.each { |path| require path }
45
+
47
46
  # Include top-level features
48
47
  include Rimless::ConfigurationHandling
49
48
  include Rimless::AvroHelpers
@@ -51,6 +50,6 @@ module Rimless
51
50
  include Rimless::Dependencies
52
51
  include Rimless::Consumer
53
52
 
54
- # Load all initializers of the gem
55
- Dir[root_path.join('initializers/**/*.rb')].sort.each { |path| require path }
53
+ # Make sure to eager load all SDK constants
54
+ loader.eager_load
56
55
  end
data/rimless.gemspec CHANGED
@@ -45,4 +45,5 @@ Gem::Specification.new do |spec|
45
45
  spec.add_dependency 'sparsify', '~> 1.1'
46
46
  spec.add_dependency 'waterdrop', '~> 1.4'
47
47
  spec.add_dependency 'webmock', '~> 3.18'
48
+ spec.add_dependency 'zeitwerk', '~> 2.6'
48
49
  end
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.9.0
4
+ version: 1.10.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: 2025-01-03 00:00:00.000000000 Z
11
+ date: 2025-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -156,6 +156,20 @@ dependencies:
156
156
  - - "~>"
157
157
  - !ruby/object:Gem::Version
158
158
  version: '3.18'
159
+ - !ruby/object:Gem::Dependency
160
+ name: zeitwerk
161
+ requirement: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - "~>"
164
+ - !ruby/object:Gem::Version
165
+ version: '2.6'
166
+ type: :runtime
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - "~>"
171
+ - !ruby/object:Gem::Version
172
+ version: '2.6'
159
173
  description: A bundle of opinionated Apache Kafka / Confluent Schema Registry helpers.
160
174
  email:
161
175
  - hermann.mayer92@gmail.com