sidekiq_middlewares 0.2.0 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/LICENSE.txt +7 -0
- data/lib/sidekiq_middlewares/benchmarker.rb +1 -0
- data/lib/sidekiq_middlewares/error_logger.rb +17 -0
- data/lib/sidekiq_middlewares/version.rb +1 -1
- data/lib/sidekiq_middlewares.rb +1 -0
- data/repo-info.json +7 -0
- data/sidekiq_middlewares.gemspec +4 -3
- metadata +20 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 76a44d5eaaad25aa3f0f7ac601ada137e11199a471819911429ef08bb8018405
|
4
|
+
data.tar.gz: 77f5537c2b2c34b77aac153046b9f08a84090fce4f6f0dd6b6920f757cc5eb8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67f7e4b7df6cd2aada701e9b5bdec7857281fda536a6b12e78ff9020c74565a622969da52ecd43a713b2f3eebb33b38f40165a13de19af0e5616dbabbd9e4a4c
|
7
|
+
data.tar.gz: 94184b0adfe69cf527835457d68db4b80f95f813b52bec5a4cff285d0abb4a28c076d4aca30a243ba0330cb0d0e10c8ee66aa42a7ae4171f2ed42ffbd38fa161
|
data/.gitignore
CHANGED
data/LICENSE.txt
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
Copyright © 2018 Emarsys
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
4
|
+
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
6
|
+
|
7
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module SidekiqMiddlewares
|
2
|
+
class ErrorLogger
|
3
|
+
def initialize(opts = {})
|
4
|
+
@logger = opts[:logger] || raise(ArgumentError, 'missing keyword: logger')
|
5
|
+
@formatter = opts[:formatter] || proc { |message| message }
|
6
|
+
end
|
7
|
+
|
8
|
+
def call(*_args)
|
9
|
+
begin
|
10
|
+
yield
|
11
|
+
rescue => ex
|
12
|
+
@logger.error(@formatter.call(ex))
|
13
|
+
raise
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/sidekiq_middlewares.rb
CHANGED
data/repo-info.json
ADDED
data/sidekiq_middlewares.gemspec
CHANGED
@@ -9,6 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.version = SidekiqMiddlewares::VERSION
|
10
10
|
spec.authors = ['Emarsys Smart Insight Team']
|
11
11
|
spec.email = ['smart-insight-dev@emarsys.com']
|
12
|
+
spec.license = 'MIT'
|
12
13
|
|
13
14
|
spec.summary = 'Commonly reused Sidekiq Middlewares such as Benchmarker'
|
14
15
|
spec.description = 'Commonly reused Sidekiq Middlewares such as Benchmarker'
|
@@ -22,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
22
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
24
|
spec.require_paths = ['lib']
|
24
25
|
|
25
|
-
spec.add_development_dependency 'bundler'
|
26
|
-
spec.add_development_dependency 'rake'
|
27
|
-
spec.add_development_dependency 'rspec'
|
26
|
+
spec.add_development_dependency 'bundler'
|
27
|
+
spec.add_development_dependency 'rake'
|
28
|
+
spec.add_development_dependency 'rspec'
|
28
29
|
end
|
metadata
CHANGED
@@ -1,57 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq_middlewares
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emarsys Smart Insight Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0'
|
55
55
|
description: Commonly reused Sidekiq Middlewares such as Benchmarker
|
56
56
|
email:
|
57
57
|
- smart-insight-dev@emarsys.com
|
@@ -64,17 +64,21 @@ files:
|
|
64
64
|
- ".travis.yml"
|
65
65
|
- CODE_OF_CONDUCT.md
|
66
66
|
- Gemfile
|
67
|
+
- LICENSE.txt
|
67
68
|
- README.md
|
68
69
|
- Rakefile
|
69
70
|
- bin/console
|
70
71
|
- bin/setup
|
71
72
|
- lib/sidekiq_middlewares.rb
|
72
73
|
- lib/sidekiq_middlewares/benchmarker.rb
|
74
|
+
- lib/sidekiq_middlewares/error_logger.rb
|
73
75
|
- lib/sidekiq_middlewares/mdc_cleaner.rb
|
74
76
|
- lib/sidekiq_middlewares/version.rb
|
77
|
+
- repo-info.json
|
75
78
|
- sidekiq_middlewares.gemspec
|
76
79
|
homepage: https://github.com/emartech/sidekiq_middlewares
|
77
|
-
licenses:
|
80
|
+
licenses:
|
81
|
+
- MIT
|
78
82
|
metadata: {}
|
79
83
|
post_install_message:
|
80
84
|
rdoc_options: []
|
@@ -91,8 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
95
|
- !ruby/object:Gem::Version
|
92
96
|
version: '0'
|
93
97
|
requirements: []
|
94
|
-
|
95
|
-
rubygems_version: 2.6.13
|
98
|
+
rubygems_version: 3.1.6
|
96
99
|
signing_key:
|
97
100
|
specification_version: 4
|
98
101
|
summary: Commonly reused Sidekiq Middlewares such as Benchmarker
|