logcraft-sidekiq 0.99.0.rc

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6d648670cc471f4c05aee55b39161a6b7bf8c4439313bec4d3c26aed998fcc94
4
+ data.tar.gz: fe14f9d62c6586d12a2264b61aa426a82126122f53812c050933a0e375790d75
5
+ SHA512:
6
+ metadata.gz: 63dc9a85c8767ab3f731530f248479f02fe7df4dd1038f00372e42ceb0bd385b5b2ae220dd313d557cbaf1986bb48eb1f7673c5e2d12dc3f443f478e236ddf81
7
+ data.tar.gz: 7b8c924f8550a24a4ccc5f0211b872899390c72e61bdba538be85461637318fc4786dcf34a301d48c334d40b2da34f7e1381a6fb0f5a698e4cdecbf8825059df
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format progress
2
+ --color
3
+ --require spec_helper
data/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.99.0.rc] - 2022-07-18
10
+ ### Added
11
+ - Logcraft::Sidekiq was extracted (and rewritten) from its predecessor: [Ezlog](https://github.com/emartech/ezlog).
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement via https://github.com/zormandi/logcraft-sidekiq. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -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
7
+
8
+ group :test do
9
+ gem 'sidekiq', '~> 6.0'
10
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Zoltan Ormandi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,127 @@
1
+ # Logcraft::Sidekiq
2
+
3
+ [![Build Status](https://github.com/zormandi/logcraft-sidekiq/actions/workflows/main.yml/badge.svg)](https://github.com/zormandi/logcraft-sidekiq/actions/workflows/main.yml)
4
+
5
+ Logcraft::Sidekiq is a structured logging solution for [Sidekiq](https://github.com/mperham/sidekiq), using
6
+ the [Logcraft](https://github.com/zormandi/logcraft) gem.
7
+
8
+ ## Installation
9
+
10
+ ### Rails
11
+
12
+ Add this line to your application's Gemfile:
13
+
14
+ ```ruby
15
+ gem 'logcraft-sidekiq'
16
+ ```
17
+
18
+ ### Non-Rails applications
19
+
20
+ Add this line to your application's Gemfile:
21
+
22
+ ```ruby
23
+ gem 'logcraft-sidekiq'
24
+ ```
25
+
26
+ and call
27
+
28
+ ```ruby
29
+ Logcraft::Sidekiq.initialize
30
+ ```
31
+
32
+ any time during your application's startup.
33
+
34
+ ## Usage
35
+
36
+ ### Structured logging
37
+
38
+ Logcraft::Sidekiq configures the `Sidekiq.logger` to be an instance of a Logcraft logger by the name of `Sidekiq`,
39
+ providing all the structured logging features that Logcraft provides, like logging complex messages, errors, etc.
40
+ The logger uses the same default log level that was configured for Logcraft.
41
+
42
+ ### Job logging
43
+
44
+ Logcraft::Sidekiq logs relevant information about every job run in a compact, structured format.
45
+
46
+ * It emits two log messages per job run; one when the job is started and another one when the job is finished
47
+ (successfully or unsuccessfully).
48
+ * It measures the time it took to execute the job and appends the benchmark information to the final log message.
49
+ * It adds all basic information about the job (worker, queue, JID, BID, tags, created_at, enqueued_at, run_count) to
50
+ the log context so all log messages emitted during the execution of the job will contain this information.
51
+ * It also adds all of the job's parameters (by name) to the log context under the `params` key, which means that all
52
+ log messages emitted during the execution of the job will contain this information as well.
53
+
54
+ ```ruby
55
+ class TestWorker
56
+ include Sidekiq::Worker
57
+
58
+ def perform(customer_id)
59
+ logger.warn 'Customer not found'
60
+ end
61
+ end
62
+
63
+ TestWorker.perform_async 42
64
+
65
+ #=> {"timestamp":"2022-07-17T18:23:36.320+02:00","level":"INFO","logger":"Sidekiq","hostname":"MacbookPro.local","pid":20740,"jid":"aad6c56ece22b115fb91821e","queue":"default","worker":"TestWorker","created_at":"2022-07-17T18:23:35.932+02:00","enqueued_at":"2022-07-17T18:23:35.932+02:00","run_count":1,"tid":"hrg","params":{"customer_id":42},"message":"TestWorker started"}
66
+ #=> {"timestamp":"2022-07-17T18:23:36.320+02:00","level":"WARN","logger":"Sidekiq","hostname":"MacbookPro.local","pid":20740,"jid":"aad6c56ece22b115fb91821e","queue":"default","worker":"TestWorker","created_at":"2022-07-17T18:23:35.932+02:00","enqueued_at":"2022-07-17T18:23:35.932+02:00","run_count":1,"tid":"hrg","params":{"customer_id":42},"message":"Customer not found"}
67
+ #=> {"timestamp":"2022-07-17T18:23:36.324+02:00","level":"INFO","logger":"Sidekiq","hostname":"MacbookPro.local","pid":20740,"jid":"aad6c56ece22b115fb91821e","queue":"default","worker":"TestWorker","created_at":"2022-07-17T18:23:35.932+02:00","enqueued_at":"2022-07-17T18:23:35.932+02:00","run_count":1,"tid":"hrg","params":{"customer_id":42},"duration":4,"duration_sec":0.004,"message":"TestWorker finished"}
68
+ ```
69
+
70
+ ### Error logging
71
+
72
+ Logcraft::Sidekiq sets up an error and death handler for your jobs automatically, replacing the built-in error handler.
73
+ If a job finishes with an error then it is logged at WARN level (assuming it will be retried) and death events are
74
+ logged at ERROR level. Both messages are single line events, containing all relevant information about the error.
75
+
76
+ ### Job-specific log level
77
+
78
+ Sidekiq supports setting a log level per worker but Logcraft::Sidekiq ignores this feature. Supporting it would
79
+ lead to a lot of complexity in the code and frankly, I'm not convinced it's worth it. If you really need and
80
+ use this feature then please reach out to me. In the meantime, the workaround is quite simple:
81
+
82
+ ```ruby
83
+ # Instead of this:
84
+ class TestWorker
85
+ include Sidekiq::Worker
86
+ sidekiq_options log_level: :warn
87
+ end
88
+
89
+ # Do this:
90
+ class TestWorker
91
+ include Sidekiq::Worker
92
+
93
+ def perform
94
+ logger = Logcraft.logger self, :warn
95
+ # ...
96
+ end
97
+ end
98
+ ```
99
+
100
+ ## Development
101
+
102
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can
103
+ also run `bin/console` for an interactive prompt that will allow you to experiment.
104
+
105
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the
106
+ version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version,
107
+ push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
108
+
109
+ ## Contributing
110
+
111
+ Bug reports and pull requests are welcome on GitHub at https://github.com/zormandi/logcraft-sidekiq. This project is
112
+ intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to
113
+ the [code of conduct](https://github.com/zormandi/logcraft-sidekiq/blob/master/CODE_OF_CONDUCT.md).
114
+
115
+ ## Disclaimer
116
+
117
+ Logcraft::Sidekiq is highly opinionated software and does in no way aim or claim to be useful for everyone.
118
+ Use at your own discretion.
119
+
120
+ ## License
121
+
122
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
123
+
124
+ ## Code of Conduct
125
+
126
+ Everyone interacting in the Logcraft::Sidekiq project's codebases, issue trackers, chat rooms and mailing lists is
127
+ expected to follow the [code of conduct](https://github.com/zormandi/logcraft-sidekiq/blob/master/CODE_OF_CONDUCT.md).
@@ -0,0 +1,7 @@
1
+ version: "3"
2
+
3
+ services:
4
+ redis:
5
+ image: redis:6
6
+ ports:
7
+ - "6379:6379"
@@ -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', '~> 6.0.0'
10
+ end
@@ -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', '~> 6.4.0'
10
+ end
@@ -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', '~> 6.5.0'
10
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Logcraft
4
+ module Sidekiq
5
+ class DeathLogger
6
+ include Logcraft::LogContextHelper
7
+
8
+ def call(job, error)
9
+ within_log_context(JobContext.from_job_hash(job)) do
10
+ ::Sidekiq.logger.error error
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Logcraft
4
+ module Sidekiq
5
+ class ErrorLogger
6
+ include Logcraft::LogContextHelper
7
+
8
+ def call(error, context)
9
+ within_log_context(JobContext.from_job_hash(context[:job])) do
10
+ ::Sidekiq.logger.warn error
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Logcraft
4
+ module Sidekiq
5
+ class JobContext
6
+ class << self
7
+ def from_job_hash(job_hash)
8
+ return {} if job_hash.nil?
9
+ basic_info_from(job_hash).merge thread_info,
10
+ params: named_arguments_from(job_hash)
11
+ end
12
+
13
+ private
14
+
15
+ def basic_info_from(job)
16
+ info_hash = {
17
+ jid: job['jid'],
18
+ queue: job['queue'],
19
+ worker: job_class(job),
20
+ created_at: Time.at(job['created_at']).iso8601(3),
21
+ enqueued_at: Time.at(job['enqueued_at']).iso8601(3),
22
+ run_count: (job['retry_count'] || -1) + 2
23
+ }
24
+ info_hash[:bid] = job['bid'] if job['bid']
25
+ info_hash[:tags] = job['tags'] if job['tags']
26
+ info_hash
27
+ end
28
+
29
+ def named_arguments_from(job)
30
+ {}.tap do |arguments|
31
+ params, arg_index = method_parameters_of(job), 0
32
+ params.each do |param_type, param_name|
33
+ if param_type == :rest
34
+ rest_arg_count = job['args'].count - params.count + 1
35
+ arguments[param_name] = job['args'].slice arg_index, rest_arg_count
36
+ arg_index += rest_arg_count
37
+ else
38
+ arguments[param_name] = job['args'][arg_index]
39
+ arg_index += 1
40
+ end
41
+ end
42
+ end
43
+ end
44
+
45
+ def method_parameters_of(job)
46
+ Kernel.const_get(job_class(job)).instance_method(:perform).parameters
47
+ end
48
+
49
+ def job_class(job)
50
+ job['wrapped'] || job['class']
51
+ end
52
+
53
+ def thread_info
54
+ {tid: Thread.current['sidekiq_tid'] || (Thread.current.object_id ^ ::Process.pid).to_s(36)}
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Logcraft
4
+ module Sidekiq
5
+ class JobLogger
6
+ include Logcraft::LogContextHelper
7
+
8
+ def call(job_hash, _queue)
9
+ within_log_context(JobContext.from_job_hash(job_hash)) do
10
+ begin
11
+ logger.info "#{job_hash['class']} started"
12
+ benchmark { yield }
13
+ logger.info message: "#{job_hash['class']} finished"
14
+ rescue Exception
15
+ logger.info message: "#{job_hash['class']} failed"
16
+ raise
17
+ end
18
+ end
19
+ end
20
+
21
+ def prepare(_job_hash, &_block)
22
+ yield
23
+ end
24
+
25
+ private
26
+
27
+ def benchmark
28
+ start_time = ::Process.clock_gettime ::Process::CLOCK_MONOTONIC, :millisecond
29
+ yield
30
+ ensure
31
+ end_time = ::Process.clock_gettime ::Process::CLOCK_MONOTONIC, :millisecond
32
+ add_to_log_context duration: end_time - start_time,
33
+ duration_sec: (end_time - start_time) / 1000.0
34
+ end
35
+
36
+ def logger
37
+ ::Sidekiq.logger
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rails/railtie'
4
+
5
+ module Logcraft
6
+ module Sidekiq
7
+ class Railtie < ::Rails::Railtie
8
+ initializer 'logcraft-sidekiq.initialize' do |app|
9
+ Logcraft::Sidekiq.initialize
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Logcraft
4
+ module Sidekiq
5
+ VERSION = '0.99.0.rc'
6
+ end
7
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'logcraft'
4
+ require 'sidekiq'
5
+
6
+ require_relative 'sidekiq/version'
7
+ require_relative 'sidekiq/railtie' if defined? Rails
8
+
9
+ module Logcraft
10
+ module Sidekiq
11
+ autoload :ErrorLogger, 'logcraft/sidekiq/error_logger'
12
+ autoload :DeathLogger, 'logcraft/sidekiq/death_logger'
13
+ autoload :JobContext, 'logcraft/sidekiq/job_context'
14
+ autoload :JobLogger, 'logcraft/sidekiq/job_logger'
15
+
16
+ def self.initialize
17
+ ::Sidekiq.logger = Logcraft.logger 'Sidekiq'
18
+ ::Sidekiq.configure_server do |config|
19
+ if config.respond_to? :[]=
20
+ config[:job_logger] = JobLogger
21
+ else
22
+ config.options[:job_logger] = JobLogger
23
+ end
24
+ config.error_handlers.delete_if do |handler|
25
+ (defined?(::Sidekiq::ExceptionHandler) && defined?(::Sidekiq::ExceptionHandler::Logger) && handler.is_a?(::Sidekiq::ExceptionHandler::Logger)) ||
26
+ (handler.is_a?(Method) && handler.receiver.name == 'Sidekiq' && handler.name == :default_error_handler)
27
+ end
28
+ config.error_handlers << ErrorLogger.new
29
+ config.death_handlers << DeathLogger.new
30
+ end
31
+ end
32
+ end
33
+ 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"
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
@@ -0,0 +1,6 @@
1
+ module Logcraft
2
+ module Sidekiq
3
+ VERSION: String
4
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
5
+ end
6
+ end
metadata ADDED
@@ -0,0 +1,135 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: logcraft-sidekiq
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.99.0.rc
5
+ platform: ruby
6
+ authors:
7
+ - Zoltan Ormandi
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2022-07-18 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: logcraft
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: sidekiq
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '6.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '6.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '12.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '12.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.0'
83
+ description:
84
+ email:
85
+ - zoltan.ormandi@gmail.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - ".rspec"
91
+ - CHANGELOG.md
92
+ - CODE_OF_CONDUCT.md
93
+ - Gemfile
94
+ - LICENSE.txt
95
+ - README.md
96
+ - docker-compose.yml
97
+ - gemfiles/sidekiq_6.0.gemfile
98
+ - gemfiles/sidekiq_6.4.gemfile
99
+ - gemfiles/sidekiq_6.5.gemfile
100
+ - lib/logcraft/sidekiq.rb
101
+ - lib/logcraft/sidekiq/death_logger.rb
102
+ - lib/logcraft/sidekiq/error_logger.rb
103
+ - lib/logcraft/sidekiq/job_context.rb
104
+ - lib/logcraft/sidekiq/job_logger.rb
105
+ - lib/logcraft/sidekiq/railtie.rb
106
+ - lib/logcraft/sidekiq/version.rb
107
+ - logcraft-sidekiq.gemspec
108
+ - sig/logcraft/sidekiq.rbs
109
+ homepage: https://github.com/zormandi/logcraft-sidekiq
110
+ licenses:
111
+ - MIT
112
+ metadata:
113
+ homepage_uri: https://github.com/zormandi/logcraft-sidekiq
114
+ source_code_uri: https://github.com/zormandi/logcraft-sidekiq
115
+ changelog_uri: https://github.com/zormandi/logcraft-sidekiq/blob/main/CHANGELOG.md
116
+ post_install_message:
117
+ rdoc_options: []
118
+ require_paths:
119
+ - lib
120
+ required_ruby_version: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: 2.6.0
125
+ required_rubygems_version: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - ">"
128
+ - !ruby/object:Gem::Version
129
+ version: 1.3.1
130
+ requirements: []
131
+ rubygems_version: 3.1.6
132
+ signing_key:
133
+ specification_version: 4
134
+ summary: A structured logging solution for Sidekiq, using Logcraft.
135
+ test_files: []