karafka 2.0.2 → 2.0.3

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: c2b67a18484b250b65788db213f615b7f1304ab33d6645bceeebdf8025b54bda
4
- data.tar.gz: 27d4ece68701b9f34266ff834c9d0809690e06b108412f68916a39880a7a23f6
3
+ metadata.gz: 16983e52af6623dbbb0b30b6e65d7579fc8795e137c71f25d24f36e248f45248
4
+ data.tar.gz: 66087ddd0ac20272b573f81dbea84e2296919ea1b1813f1fec01b3880ad0e170
5
5
  SHA512:
6
- metadata.gz: 682a0ff35d78e9eb5590bdb32bbc14bf47f18029003286d55d1f6f14425cd3d3ad6e8081a574f3f2146bc95d9ac692e9dc82622065e6dc6f092dc3dbe61652f3
7
- data.tar.gz: 5a4e68ea639b9261172c055e6f22a741735262eb277acd18e465c862ead0242d0287b8872d6add290af0bba681f000a328f4c16d1ee31ca9075fe880552ddf9b
6
+ metadata.gz: 7be4a093508e22c77fc5473cdedcafb2e2eb0338745a58da1a9272e0183ea72b20e631809d4a0f970703a13ed660965d5942593395b288f2db67a4070c3ab472
7
+ data.tar.gz: 64d3d95fbb84eb2bf272e5927a2ffe55c8389e15cc9fb71a12a79d583def6eefbcf13d8986af1464bad83e86a54d111cc682165946298eda5016afcafb41cc3b
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Karafka framework changelog
2
2
 
3
+ ## 2.0.3 (2022-08-09)
4
+ - Update boot info on server startup.
5
+ - Update `karafka info` with more descriptive Ruby version info.
6
+ - Fix issue where when used with Rails in development, log would be too verbose.
7
+ - Fix issue where Zeitwerk with Rails would not load Pro components despite license being present.
8
+
3
9
  ## 2.0.2 (2022-08-07)
4
10
  - Bypass issue with Rails reload in development by releasing the connection (https://github.com/rails/rails/issues/44183).
5
11
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- karafka (2.0.2)
4
+ karafka (2.0.3)
5
5
  karafka-core (>= 2.0.2, < 3.0.0)
6
6
  rdkafka (>= 0.12)
7
7
  thor (>= 0.20)
@@ -35,7 +35,7 @@ module Karafka
35
35
 
36
36
  [
37
37
  "Karafka version: #{Karafka::VERSION}#{postfix}",
38
- "Ruby version: #{RUBY_VERSION}",
38
+ "Ruby version: #{RUBY_DESCRIPTION}",
39
39
  "Rdkafka version: #{::Rdkafka::VERSION}",
40
40
  "Subscription groups count: #{Karafka::App.subscription_groups.size}",
41
41
  "Workers count: #{Karafka::App.config.concurrency}",
@@ -33,11 +33,11 @@ module Karafka
33
33
 
34
34
  if Karafka.pro?
35
35
  Karafka.logger.info(
36
- green('Thank you for investing in the Karafka Pro subscription!')
36
+ green('Thank you for using Karafka Pro!')
37
37
  )
38
38
  else
39
39
  Karafka.logger.info(
40
- red('You like Karafka? Please consider getting a Pro version!')
40
+ red('Upgrade to Karafka Pro for more features and support: https://karafka.io')
41
41
  )
42
42
  end
43
43
  end
@@ -96,7 +96,12 @@ module Karafka
96
96
  #
97
97
  # @param _event [Dry::Events::Event] event details including payload
98
98
  def on_app_running(_event)
99
- info 'Running Karafka server'
99
+ info "Running in #{RUBY_DESCRIPTION}"
100
+ info "Running Karafka #{Karafka::VERSION} server"
101
+
102
+ return if Karafka.pro?
103
+
104
+ info 'See LICENSE and the LGPL-3.0 for licensing details.'
100
105
  end
101
106
 
102
107
  # Logs info that we're going to stop the Karafka server.
@@ -48,9 +48,13 @@ if rails
48
48
  next unless Rails.env.development?
49
49
  next unless ENV.key?('KARAFKA_CLI')
50
50
 
51
+ logger = ActiveSupport::Logger.new($stdout)
52
+ # Inherit the logger level from Rails, otherwise would always run with the debug level
53
+ logger.level = Rails.logger.level
54
+
51
55
  Rails.logger.extend(
52
56
  ActiveSupport::Logger.broadcast(
53
- ActiveSupport::Logger.new($stdout)
57
+ logger
54
58
  )
55
59
  )
56
60
  end
@@ -3,5 +3,5 @@
3
3
  # Main module namespace
4
4
  module Karafka
5
5
  # Current Karafka version
6
- VERSION = '2.0.2'
6
+ VERSION = '2.0.3'
7
7
  end
data/lib/karafka.rb CHANGED
@@ -85,8 +85,16 @@ end
85
85
  loader = Zeitwerk::Loader.for_gem
86
86
  # Do not load Rails extensions by default, this will be handled by Railtie if they are needed
87
87
  loader.ignore(Karafka.gem_root.join('lib/active_job'))
88
- # Do not load pro components, this will be handled by license manager
89
- loader.ignore(Karafka.gem_root.join('lib/karafka/pro'))
88
+
89
+ begin
90
+ require 'karafka-license'
91
+ rescue LoadError
92
+ # Do not load pro components if we cannot load the license
93
+ # This is a preliminary check so autoload works as expected
94
+ # Later on the licenser will make sure to setup all the needed components anyhow
95
+ loader.ignore(Karafka.gem_root.join('lib/karafka/pro'))
96
+ end
97
+
90
98
  # Do not load vendors instrumentation components. Those need to be required manually if needed
91
99
  loader.ignore(Karafka.gem_root.join('lib/karafka/instrumentation/vendors'))
92
100
  loader.setup
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: karafka
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Mensfeld
@@ -34,7 +34,7 @@ cert_chain:
34
34
  R2P11bWoCtr70BsccVrN8jEhzwXngMyI2gVt750Y+dbTu1KgRqZKp/ECe7ZzPzXj
35
35
  pIy9vHxTANKYVyI4qj8OrFdEM5BQNu8oQpL0iQ==
36
36
  -----END CERTIFICATE-----
37
- date: 2022-08-07 00:00:00.000000000 Z
37
+ date: 2022-08-09 00:00:00.000000000 Z
38
38
  dependencies:
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: karafka-core
metadata.gz.sig CHANGED
Binary file