rimless 1.9.0 → 1.10.1

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: 7d000449f6e058356a1826d319f3223dd0d87f0cb6cd0852e31540ebb31bf169
4
+ data.tar.gz: 65983b9773597313a88a07e252d8542bcc8624cf739229f1b84138b75e5d8d33
5
5
  SHA512:
6
- metadata.gz: bb963ba622b3081b053ce1bd6a9f9ccc970a4a8c2c7767f20cf2588f2847ef4026068a7cedaed40fcbaf2d1e1c68f2e98f15813dbe62e2cf350f2ffae2a925e0
7
- data.tar.gz: b2fc0a8f0a64db9c947ca3a413641b95b116b90f0961273b14671017e30c1a7b89ffd40da5982f154b83efdac232e9307307ec9b00538bcff5b0f919793e01af
6
+ metadata.gz: cbb36e7b25d7dd458c86340dbbaede6840fd3553c918d0e8adfc39ef4e91603ed2f45bd957d94f0166a2e5b50fa9e1aca7d8c8c2bf7465a697af8ccc420e9856
7
+ data.tar.gz: 9c4563ce880bcf05cae68c85d6db6b00b07b12674f552e861c823f8feec5b9ae2cb04ecae898c3cbe6c997b0e4905b50817beeaa5f064d32280582dd072f9093
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  * TODO: Replace this bullet point with an actual description of a change.
4
4
 
5
+ ### 1.10.1 (13 January 2025)
6
+
7
+ * Do not eager load the configuration (#47)
8
+
9
+ ### 1.10.0 (11 January 2025)
10
+
11
+ * Switched to Zeitwerk as autoloader (#46)
12
+
5
13
  ### 1.9.0 (3 January 2025)
6
14
 
7
15
  * 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.1'
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,28 @@ 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
+ loader.do_not_eager_load(root_path.join('configuration.rb'))
36
+ loader.do_not_eager_load(root_path.join('consumer_job.rb'))
37
+
38
+ # Finish the auto loader configuration
39
+ loader.setup
42
40
 
43
41
  # Load standalone code
44
42
  require 'rimless/version'
45
43
  require 'rimless/railtie' if defined? Rails
46
44
 
45
+ # Load all initializers of the gem
46
+ Dir[root_path.join('initializers/**/*.rb')].sort.each { |path| require path }
47
+
47
48
  # Include top-level features
48
49
  include Rimless::ConfigurationHandling
49
50
  include Rimless::AvroHelpers
@@ -51,6 +52,6 @@ module Rimless
51
52
  include Rimless::Dependencies
52
53
  include Rimless::Consumer
53
54
 
54
- # Load all initializers of the gem
55
- Dir[root_path.join('initializers/**/*.rb')].sort.each { |path| require path }
55
+ # Make sure to eager load all constants
56
+ loader.eager_load
56
57
  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.1
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-13 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