sidekiq-logstash 2.0.0 → 2.0.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: f1986944d83eef688f7d35ab06cf9dfdb613c51a41cb8f33143ef85fc972be25
4
- data.tar.gz: d6480ae4134cb68185ac9c6334c36e6ed9d92e3c0684b760a7064be6f6cdf909
3
+ metadata.gz: 601ba193456b4d27b5ea6458e7fcddd106b66c00625034cd0e1d32d8dcd6208c
4
+ data.tar.gz: 7062a09bb4781feab169b361748335a3c5871f10d67dd7f6a34eb895bd77818d
5
5
  SHA512:
6
- metadata.gz: b9f8ade62f6abdb3fda0e2b33d617545b127f8b3f7ffa24501669ba76d05c8c9b3ccf461fd33360896421b9f2becebc914b82bc4681f9382ec2a52b373533844
7
- data.tar.gz: 9ecfa6afc056cb0b0281eb971bd3e74ceefc71efc9d493b91fa0f901b1f5d2490429d47155301377e1b0d2fece87765821949f27b617f28805383f1b1111aab8
6
+ metadata.gz: 015ebbb8c4014677d5b39b2d944bc3ebb067b830dcf9e967a7e5c5e6998da028c6e3a75fac92089d936ccb7d2bdc9860aacbb4e3dae61e7fb8b64f1d98264bf1
7
+ data.tar.gz: f373b9c2e388188f22996dbb9ad938a04ebdbab114e61aa9815f57985898b5a136f6ba71b65081b6c95bd542a53e31a0afbd6b3de7d63921d5d1f5ea868a1c31
@@ -16,11 +16,10 @@ jobs:
16
16
 
17
17
  steps:
18
18
  - uses: actions/checkout@v2
19
- - uses: actions/setup-ruby@v1
19
+ - uses: ruby/setup-ruby@v1
20
20
  with:
21
- ruby-version: 2.7.x
22
- - name: Install dependencies
23
- run: bundle install
21
+ ruby-version: 2.7
22
+ bundler-cache: true
24
23
  - name: Run rubocop
25
24
  run: bundle exec rubocop --format progress
26
25
  build:
@@ -28,14 +27,13 @@ jobs:
28
27
  runs-on: ubuntu-latest
29
28
  strategy:
30
29
  matrix:
31
- ruby: ['2.5.x', '2.6.x', '2.7.x']
30
+ ruby: ['2.6', '2.7', '3.0', '3.1']
32
31
 
33
32
  steps:
34
33
  - uses: actions/checkout@v2
35
- - uses: actions/setup-ruby@v1
34
+ - uses: ruby/setup-ruby@v1
36
35
  with:
37
36
  ruby-version: ${{ matrix.ruby }}
38
- - name: Install dependencies
39
- run: bundle install
37
+ bundler-cache: true
40
38
  - name: Run tests
41
39
  run: bundle exec rake
data/Gemfile CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
- # Specify your gem's dependencies in sidekiq-logstash.gemspec
6
-
7
5
  gemspec
6
+
7
+ gem 'rubocop-rake'
8
+ gem 'rubocop-rspec'
@@ -63,7 +63,7 @@ module Sidekiq
63
63
  parents.push(key) if deep_regexps
64
64
  if regexps.any? { |r| key =~ r }
65
65
  value = FILTERED
66
- elsif deep_regexps && (joined = parents.join('.')) && deep_regexps.any? { |r| joined =~ r }
66
+ elsif deep_regexps && (joined = parents.join('.')) && deep_regexps.any? { |r| joined =~ r } # rubocop:disable Lint/DuplicateBranch
67
67
  value = FILTERED
68
68
  elsif value.is_a?(Hash)
69
69
  value = call(value, parents)
@@ -71,15 +71,15 @@ module Sidekiq
71
71
  value = value.map { |v| v.is_a?(Hash) ? call(v, parents) : v }
72
72
  elsif blocks.any?
73
73
  key = begin
74
- key.dup
75
- rescue StandardError
76
- key
77
- end
74
+ key.dup
75
+ rescue StandardError
76
+ key
77
+ end
78
78
  value = begin
79
- value.dup
80
- rescue StandardError
81
- value
82
- end
79
+ value.dup
80
+ rescue StandardError
81
+ value
82
+ end
83
83
  blocks.each { |b| b.call(key, value) }
84
84
  end
85
85
  parents.pop if deep_regexps
@@ -49,6 +49,8 @@ module Sidekiq
49
49
 
50
50
  payload['message'] += ": fail: #{payload['duration']} sec"
51
51
  payload['job_status'] = 'fail'
52
+
53
+ exc = exc.cause || exc if exc.is_a? Sidekiq::JobRetry::Handled
52
54
  payload['error_message'] = exc.message
53
55
  payload['error'] = exc.class
54
56
  payload['error_backtrace'] = %('#{exc.backtrace.join("\n")}')
@@ -128,7 +130,7 @@ module Sidekiq
128
130
  def deep_stringify!(args)
129
131
  case args
130
132
  when Hash
131
- Hash[args.map { |key, value| [deep_stringify!(key), deep_stringify!(value)] }]
133
+ args.map { |key, value| [deep_stringify!(key), deep_stringify!(value)] }.to_h
132
134
  when Array
133
135
  args.map! { |val| deep_stringify!(val) }
134
136
  else
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sidekiq
4
4
  module Logstash
5
- VERSION = '2.0.0'
5
+ VERSION = '2.0.1'
6
6
  end
7
7
  end
@@ -18,8 +18,6 @@ Gem::Specification.new do |spec|
18
18
  spec.license = 'MIT'
19
19
 
20
20
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
21
- spec.bindir = 'exe'
22
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
21
  spec.require_paths = ['lib']
24
22
  spec.required_ruby_version = '>= 2.5.0'
25
23
 
@@ -31,4 +29,5 @@ Gem::Specification.new do |spec|
31
29
  spec.add_development_dependency 'rspec', '~> 3.0'
32
30
  spec.add_development_dependency 'rspec-json_expectations', '~> 2.1.0'
33
31
  spec.add_development_dependency 'rubocop-performance', '~> 1.5'
32
+ spec.metadata['rubygems_mfa_required'] = 'true'
34
33
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-logstash
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mattia Giuffrida
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-25 00:00:00.000000000 Z
11
+ date: 2022-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logstash-event
@@ -117,7 +117,7 @@ dependencies:
117
117
  description: 'Sidekiq::Logstash turns your Sidekiq log into an organised, aggregated,
118
118
  JSON-syntax log ready to be sent to a logstash server.
119
119
 
120
- '
120
+ '
121
121
  email:
122
122
  - giuffrida.mattia@gmail.com
123
123
  executables: []
@@ -149,7 +149,8 @@ files:
149
149
  homepage: https://github.com/iMacTia/sidekiq-logstash
150
150
  licenses:
151
151
  - MIT
152
- metadata: {}
152
+ metadata:
153
+ rubygems_mfa_required: 'true'
153
154
  post_install_message:
154
155
  rdoc_options: []
155
156
  require_paths:
@@ -165,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
166
  - !ruby/object:Gem::Version
166
167
  version: '0'
167
168
  requirements: []
168
- rubygems_version: 3.1.2
169
+ rubygems_version: 3.1.6
169
170
  signing_key:
170
171
  specification_version: 4
171
172
  summary: Logstash plugin for Sidekiq