logcraft-sidekiq 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28452045ea7393df36c7954b72551cce39009acd50519f57e8a2987f6f492d8e
4
- data.tar.gz: 5a9a2e6fd7f3b260bfa2407a546ae10d6bb37924982b7631da5e66be0faea7a7
3
+ metadata.gz: 0e418eca7f621e2b923267d18660dd53d1bd66a744789e52c42be26b08ef88a0
4
+ data.tar.gz: 7e4bcf27f2f0b329e1540294ac6636f229ec676c0167c06d996cf5e4cc356767
5
5
  SHA512:
6
- metadata.gz: f1c1352ba7f9e634c440cfa31b5950da0842d2b3cf3f5e0e2a906fca85ffb5c92c280bbdfc70d9e59b6aa28fe337c2bbace7e30a5a37e34e1ffeea3a443a3046
7
- data.tar.gz: 072b697fa207b85bb91e0c2af585a4e6a1f85310147e314842143ef225688f665d16d60f115b22d3fcaddcb86c17e52323ccac6d39d629cc584abca3a40056bd
6
+ metadata.gz: ec5a733a392e86a7c7a903e7a1fb2ada15db050dccc1e78a8d21d46af3fc8095eae2360108444db87f4908bfd1d11c019832d3cf1876eadc61113e3856bf9921
7
+ data.tar.gz: 6acb7edb71a36a93d6d5fcd6fae09b560715839d096080f989d220af0ac6bc2ee70ef5e54bfd4e93e9aa380bbe2fedb6cb66d5074955470c0c769cf99bcfaf3c
data/CHANGELOG.md CHANGED
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [1.2.0] - 2024-07-24
8
+ ### Added
9
+ - Added support for Sidekiq 7. Thanks to [@wfarr](https://github.com/wfarr) for contributing! ([#4](https://github.com/zormandi/logcraft-sidekiq/pull/4))
10
+
11
+ ### Fixed
12
+ - Eliminated deprecation warning in preparation for Sidekiq 8. Thanks to [@wfarr](https://github.com/wfarr) for contributing! ([#3](https://github.com/zormandi/logcraft-sidekiq/pull/3))
13
+
7
14
  ## [1.1.0] - 2023-08-19
8
15
  ### Added
9
16
  - Added support for Sidekiq 7.
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in logcraft-sidekiq.gemspec
6
+ gemspec path: '..'
7
+
8
+ group :test do
9
+ gem 'sidekiq', '~> 7.3.0'
10
+ end
@@ -5,7 +5,7 @@ module Logcraft
5
5
  class ErrorLogger
6
6
  include Logcraft::LogContextHelper
7
7
 
8
- def call(error, context)
8
+ def call(error, context, _config = nil)
9
9
  within_log_context(JobContext.from_job_hash(context[:job])) do
10
10
  ::Sidekiq.logger.warn error
11
11
  end
@@ -5,8 +5,12 @@ module Logcraft
5
5
  class JobLogger
6
6
  include Logcraft::LogContextHelper
7
7
 
8
- def initialize(logger = ::Sidekiq.logger)
9
- @logger = logger
8
+ def initialize(config_or_logger = ::Sidekiq.logger)
9
+ @logger = if config_or_logger.respond_to? :logger
10
+ config_or_logger.logger
11
+ else
12
+ config_or_logger
13
+ end
10
14
  end
11
15
 
12
16
  def call(job_hash, _queue)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Logcraft
4
4
  module Sidekiq
5
- VERSION = '1.1.0'
5
+ VERSION = '1.2.0'
6
6
  end
7
7
  end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/logcraft/sidekiq/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "logcraft-sidekiq"
7
+ spec.version = Logcraft::Sidekiq::VERSION
8
+ spec.authors = ["Zoltan Ormandi"]
9
+ spec.email = ["zoltan.ormandi@gmail.com"]
10
+
11
+ spec.summary = "A structured logging solution for Sidekiq, using Logcraft."
12
+ spec.homepage = "https://github.com/zormandi/logcraft-sidekiq"
13
+ spec.license = "MIT"
14
+ spec.required_ruby_version = ">= 2.6.0"
15
+
16
+ spec.metadata["homepage_uri"] = spec.homepage
17
+ spec.metadata["source_code_uri"] = "https://github.com/zormandi/logcraft-sidekiq"
18
+ spec.metadata["changelog_uri"] = "https://github.com/zormandi/logcraft-sidekiq/blob/main/CHANGELOG.md"
19
+
20
+ # Specify which files should be added to the gem when it is released.
21
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
23
+ `git ls-files -z`.split("\x0").reject do |f|
24
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor|Rakefile)})
25
+ end
26
+ end
27
+ spec.bindir = "exe"
28
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
29
+ spec.require_paths = ["lib"]
30
+
31
+ spec.add_dependency "logcraft"
32
+ spec.add_dependency "sidekiq", ">= 6.0", "< 8.0"
33
+
34
+ spec.add_development_dependency "bundler", "~> 2.0"
35
+ spec.add_development_dependency "rake", ">= 12.0"
36
+ spec.add_development_dependency "rspec", "~> 3.0"
37
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logcraft-sidekiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zoltan Ormandi
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-19 00:00:00.000000000 Z
11
+ date: 2024-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logcraft
@@ -86,7 +86,7 @@ dependencies:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
88
  version: '3.0'
89
- description:
89
+ description:
90
90
  email:
91
91
  - zoltan.ormandi@gmail.com
92
92
  executables: []
@@ -104,6 +104,7 @@ files:
104
104
  - gemfiles/sidekiq_6.4.gemfile
105
105
  - gemfiles/sidekiq_6.5.gemfile
106
106
  - gemfiles/sidekiq_7.0.gemfile
107
+ - gemfiles/sidekiq_7.3.gemfile
107
108
  - gemfiles/sidekiq_7.latest.gemfile
108
109
  - lib/logcraft/sidekiq.rb
109
110
  - lib/logcraft/sidekiq/death_logger.rb
@@ -112,6 +113,7 @@ files:
112
113
  - lib/logcraft/sidekiq/job_logger.rb
113
114
  - lib/logcraft/sidekiq/railtie.rb
114
115
  - lib/logcraft/sidekiq/version.rb
116
+ - logcraft-sidekiq.gemspec
115
117
  - sig/logcraft/sidekiq.rbs
116
118
  homepage: https://github.com/zormandi/logcraft-sidekiq
117
119
  licenses:
@@ -120,7 +122,7 @@ metadata:
120
122
  homepage_uri: https://github.com/zormandi/logcraft-sidekiq
121
123
  source_code_uri: https://github.com/zormandi/logcraft-sidekiq
122
124
  changelog_uri: https://github.com/zormandi/logcraft-sidekiq/blob/main/CHANGELOG.md
123
- post_install_message:
125
+ post_install_message:
124
126
  rdoc_options: []
125
127
  require_paths:
126
128
  - lib
@@ -135,8 +137,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
137
  - !ruby/object:Gem::Version
136
138
  version: '0'
137
139
  requirements: []
138
- rubygems_version: 3.0.3.1
139
- signing_key:
140
+ rubygems_version: 3.4.10
141
+ signing_key:
140
142
  specification_version: 4
141
143
  summary: A structured logging solution for Sidekiq, using Logcraft.
142
144
  test_files: []