loga 2.7.0 → 2.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build-and-test.yml +72 -0
  3. data/.github/workflows/publish-gem.yml +28 -0
  4. data/.rubocop.yml +4 -0
  5. data/.rubocop_todo.yml +206 -0
  6. data/Appraisals +58 -46
  7. data/CHANGELOG.md +10 -0
  8. data/Gemfile +22 -0
  9. data/gemfiles/rails52.gemfile +23 -1
  10. data/gemfiles/rails60.gemfile +22 -0
  11. data/gemfiles/rails61.gemfile +22 -0
  12. data/gemfiles/rails70.gemfile +24 -0
  13. data/gemfiles/rails71.gemfile +35 -0
  14. data/gemfiles/sidekiq51.gemfile +22 -0
  15. data/gemfiles/sidekiq60.gemfile +22 -0
  16. data/gemfiles/sidekiq61.gemfile +22 -0
  17. data/gemfiles/sidekiq62.gemfile +22 -0
  18. data/gemfiles/sidekiq63.gemfile +22 -0
  19. data/gemfiles/sidekiq64.gemfile +22 -0
  20. data/gemfiles/sidekiq65.gemfile +22 -0
  21. data/gemfiles/sidekiq7.gemfile +22 -0
  22. data/gemfiles/sidekiq70.gemfile +22 -0
  23. data/gemfiles/sidekiq71.gemfile +22 -0
  24. data/gemfiles/sinatra14.gemfile +22 -0
  25. data/gemfiles/sinatra2.gemfile +33 -0
  26. data/gemfiles/sinatra3.gemfile +33 -0
  27. data/gemfiles/sinatra4.gemfile +33 -0
  28. data/gemfiles/unit.gemfile +22 -0
  29. data/lib/loga/formatters/gelf_formatter.rb +13 -6
  30. data/lib/loga/railtie.rb +2 -2
  31. data/lib/loga/version.rb +1 -1
  32. data/loga.gemspec +0 -15
  33. data/spec/fixtures/{rails50.rb → rails71.rb} +1 -1
  34. data/spec/integration/rails/action_mailer_spec.rb +2 -0
  35. data/spec/integration/rails/railtie_spec.rb +13 -3
  36. data/spec/integration/rails/request_spec.rb +4 -2
  37. data/spec/integration/sidekiq5_spec.rb +15 -13
  38. data/spec/integration/sidekiq60_spec.rb +3 -3
  39. data/spec/integration/sidekiq61_spec.rb +6 -4
  40. data/spec/integration/sidekiq65_spec.rb +1 -1
  41. data/spec/integration/sinatra_spec.rb +9 -6
  42. data/spec/loga/sidekiq5/job_logger_spec.rb +2 -0
  43. data/spec/loga/sidekiq6/job_logger_spec.rb +3 -1
  44. data/spec/loga/sidekiq7/job_logger_spec.rb +3 -1
  45. data/spec/loga/sidekiq_spec.rb +4 -2
  46. data/spec/spec_helper.rb +6 -3
  47. data/spec/support/gethostname_shared.rb +3 -1
  48. data/spec/support/helpers.rb +2 -0
  49. data/spec/support/request_spec.rb +83 -81
  50. data/spec/support/timecop_shared.rb +3 -1
  51. data/spec/unit/loga/configuration_spec.rb +11 -9
  52. data/spec/unit/loga/event_spec.rb +4 -2
  53. data/spec/unit/loga/formatters/gelf_formatter_spec.rb +38 -13
  54. data/spec/unit/loga/formatters/simple_formatter_spec.rb +7 -5
  55. data/spec/unit/loga/log_subscribers/action_mailer_spec.rb +6 -4
  56. data/spec/unit/loga/parameter_filter_spec.rb +2 -0
  57. data/spec/unit/loga/rack/logger_spec.rb +18 -16
  58. data/spec/unit/loga/rack/request_spec.rb +2 -0
  59. data/spec/unit/loga/service_version_strategies_spec.rb +2 -0
  60. data/spec/unit/loga/utilities_spec.rb +2 -0
  61. data/spec/unit/loga_spec.rb +3 -1
  62. metadata +12 -206
  63. data/.circleci/config.yml +0 -112
  64. data/gemfiles/rails42.gemfile +0 -11
  65. data/gemfiles/rails50.gemfile +0 -11
  66. data/spec/fixtures/rails42.rb +0 -80
@@ -4,6 +4,28 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "sidekiq", "~> 6.0.0"
6
6
 
7
+ group :development do
8
+ gem "appraisal"
9
+ gem "bundler", ">= 1.6"
10
+ gem "byebug"
11
+ gem "guard"
12
+ gem "guard-rspec"
13
+ gem "guard-rubocop"
14
+ gem "pry"
15
+ gem "rack-test"
16
+ gem "rake"
17
+ gem "fakeredis"
18
+ gem "rspec", "~> 3.7"
19
+ gem "rubocop"
20
+ gem "rubocop-rspec"
21
+ gem "timecop"
22
+ gem "psych"
23
+ gem "net-smtp"
24
+ gem "net-pop"
25
+ gem "net-imap"
26
+ gem "bigdecimal"
27
+ end
28
+
7
29
  group :test do
8
30
  gem "simplecov", "~> 0.17.0"
9
31
  end
@@ -4,6 +4,28 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "sidekiq", "~> 6.1.0"
6
6
 
7
+ group :development do
8
+ gem "appraisal"
9
+ gem "bundler", ">= 1.6"
10
+ gem "byebug"
11
+ gem "guard"
12
+ gem "guard-rspec"
13
+ gem "guard-rubocop"
14
+ gem "pry"
15
+ gem "rack-test"
16
+ gem "rake"
17
+ gem "fakeredis"
18
+ gem "rspec", "~> 3.7"
19
+ gem "rubocop"
20
+ gem "rubocop-rspec"
21
+ gem "timecop"
22
+ gem "psych"
23
+ gem "net-smtp"
24
+ gem "net-pop"
25
+ gem "net-imap"
26
+ gem "bigdecimal"
27
+ end
28
+
7
29
  group :test do
8
30
  gem "simplecov", "~> 0.17.0"
9
31
  end
@@ -4,6 +4,28 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "sidekiq", "~> 6.2.0"
6
6
 
7
+ group :development do
8
+ gem "appraisal"
9
+ gem "bundler", ">= 1.6"
10
+ gem "byebug"
11
+ gem "guard"
12
+ gem "guard-rspec"
13
+ gem "guard-rubocop"
14
+ gem "pry"
15
+ gem "rack-test"
16
+ gem "rake"
17
+ gem "fakeredis"
18
+ gem "rspec", "~> 3.7"
19
+ gem "rubocop"
20
+ gem "rubocop-rspec"
21
+ gem "timecop"
22
+ gem "psych"
23
+ gem "net-smtp"
24
+ gem "net-pop"
25
+ gem "net-imap"
26
+ gem "bigdecimal"
27
+ end
28
+
7
29
  group :test do
8
30
  gem "simplecov", "~> 0.17.0"
9
31
  end
@@ -4,6 +4,28 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "sidekiq", "~> 6.3.0"
6
6
 
7
+ group :development do
8
+ gem "appraisal"
9
+ gem "bundler", ">= 1.6"
10
+ gem "byebug"
11
+ gem "guard"
12
+ gem "guard-rspec"
13
+ gem "guard-rubocop"
14
+ gem "pry"
15
+ gem "rack-test"
16
+ gem "rake"
17
+ gem "fakeredis"
18
+ gem "rspec", "~> 3.7"
19
+ gem "rubocop"
20
+ gem "rubocop-rspec"
21
+ gem "timecop"
22
+ gem "psych"
23
+ gem "net-smtp"
24
+ gem "net-pop"
25
+ gem "net-imap"
26
+ gem "bigdecimal"
27
+ end
28
+
7
29
  group :test do
8
30
  gem "simplecov", "~> 0.17.0"
9
31
  end
@@ -4,6 +4,28 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "sidekiq", "~> 6.4.0"
6
6
 
7
+ group :development do
8
+ gem "appraisal"
9
+ gem "bundler", ">= 1.6"
10
+ gem "byebug"
11
+ gem "guard"
12
+ gem "guard-rspec"
13
+ gem "guard-rubocop"
14
+ gem "pry"
15
+ gem "rack-test"
16
+ gem "rake"
17
+ gem "fakeredis"
18
+ gem "rspec", "~> 3.7"
19
+ gem "rubocop"
20
+ gem "rubocop-rspec"
21
+ gem "timecop"
22
+ gem "psych"
23
+ gem "net-smtp"
24
+ gem "net-pop"
25
+ gem "net-imap"
26
+ gem "bigdecimal"
27
+ end
28
+
7
29
  group :test do
8
30
  gem "simplecov", "~> 0.17.0"
9
31
  end
@@ -4,6 +4,28 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "sidekiq", "~> 6.5.0"
6
6
 
7
+ group :development do
8
+ gem "appraisal"
9
+ gem "bundler", ">= 1.6"
10
+ gem "byebug"
11
+ gem "guard"
12
+ gem "guard-rspec"
13
+ gem "guard-rubocop"
14
+ gem "pry"
15
+ gem "rack-test"
16
+ gem "rake"
17
+ gem "fakeredis"
18
+ gem "rspec", "~> 3.7"
19
+ gem "rubocop"
20
+ gem "rubocop-rspec"
21
+ gem "timecop"
22
+ gem "psych"
23
+ gem "net-smtp"
24
+ gem "net-pop"
25
+ gem "net-imap"
26
+ gem "bigdecimal"
27
+ end
28
+
7
29
  group :test do
8
30
  gem "simplecov", "~> 0.17.0"
9
31
  end
@@ -4,6 +4,28 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "sidekiq", "~> 7.0"
6
6
 
7
+ group :development do
8
+ gem "appraisal"
9
+ gem "bundler", ">= 1.6"
10
+ gem "byebug"
11
+ gem "guard"
12
+ gem "guard-rspec"
13
+ gem "guard-rubocop"
14
+ gem "pry"
15
+ gem "rack-test"
16
+ gem "rake"
17
+ gem "fakeredis"
18
+ gem "rspec", "~> 3.7"
19
+ gem "rubocop"
20
+ gem "rubocop-rspec"
21
+ gem "timecop"
22
+ gem "psych"
23
+ gem "net-smtp"
24
+ gem "net-pop"
25
+ gem "net-imap"
26
+ gem "bigdecimal"
27
+ end
28
+
7
29
  group :test do
8
30
  gem "simplecov", "~> 0.17.0"
9
31
  end
@@ -4,6 +4,28 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "sidekiq", "~> 7.0.0"
6
6
 
7
+ group :development do
8
+ gem "appraisal"
9
+ gem "bundler", ">= 1.6"
10
+ gem "byebug"
11
+ gem "guard"
12
+ gem "guard-rspec"
13
+ gem "guard-rubocop"
14
+ gem "pry"
15
+ gem "rack-test"
16
+ gem "rake"
17
+ gem "fakeredis"
18
+ gem "rspec", "~> 3.7"
19
+ gem "rubocop"
20
+ gem "rubocop-rspec"
21
+ gem "timecop"
22
+ gem "psych"
23
+ gem "net-smtp"
24
+ gem "net-pop"
25
+ gem "net-imap"
26
+ gem "bigdecimal"
27
+ end
28
+
7
29
  group :test do
8
30
  gem "simplecov", "~> 0.17.0"
9
31
  end
@@ -4,6 +4,28 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "sidekiq", "~> 7.1.0"
6
6
 
7
+ group :development do
8
+ gem "appraisal"
9
+ gem "bundler", ">= 1.6"
10
+ gem "byebug"
11
+ gem "guard"
12
+ gem "guard-rspec"
13
+ gem "guard-rubocop"
14
+ gem "pry"
15
+ gem "rack-test"
16
+ gem "rake"
17
+ gem "fakeredis"
18
+ gem "rspec", "~> 3.7"
19
+ gem "rubocop"
20
+ gem "rubocop-rspec"
21
+ gem "timecop"
22
+ gem "psych"
23
+ gem "net-smtp"
24
+ gem "net-pop"
25
+ gem "net-imap"
26
+ gem "bigdecimal"
27
+ end
28
+
7
29
  group :test do
8
30
  gem "simplecov", "~> 0.17.0"
9
31
  end
@@ -4,6 +4,28 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "sinatra", "~> 1.4.0"
6
6
 
7
+ group :development do
8
+ gem "appraisal"
9
+ gem "bundler", ">= 1.6"
10
+ gem "byebug"
11
+ gem "guard"
12
+ gem "guard-rspec"
13
+ gem "guard-rubocop"
14
+ gem "pry"
15
+ gem "rack-test"
16
+ gem "rake"
17
+ gem "fakeredis"
18
+ gem "rspec", "~> 3.7"
19
+ gem "rubocop"
20
+ gem "rubocop-rspec"
21
+ gem "timecop"
22
+ gem "psych"
23
+ gem "net-smtp"
24
+ gem "net-pop"
25
+ gem "net-imap"
26
+ gem "bigdecimal"
27
+ end
28
+
7
29
  group :test do
8
30
  gem "simplecov", "~> 0.17.0"
9
31
  end
@@ -0,0 +1,33 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "sinatra", "~> 2.2.4"
6
+
7
+ group :development do
8
+ gem "appraisal"
9
+ gem "bundler", ">= 1.6"
10
+ gem "byebug"
11
+ gem "guard"
12
+ gem "guard-rspec"
13
+ gem "guard-rubocop"
14
+ gem "pry"
15
+ gem "rack-test"
16
+ gem "rake"
17
+ gem "fakeredis"
18
+ gem "rspec", "~> 3.7"
19
+ gem "rubocop"
20
+ gem "rubocop-rspec"
21
+ gem "timecop"
22
+ gem "psych"
23
+ gem "net-smtp"
24
+ gem "net-pop"
25
+ gem "net-imap"
26
+ gem "bigdecimal"
27
+ end
28
+
29
+ group :test do
30
+ gem "simplecov", "~> 0.17.0"
31
+ end
32
+
33
+ gemspec path: "../"
@@ -0,0 +1,33 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "sinatra", "~> 3.2.0"
6
+
7
+ group :development do
8
+ gem "appraisal"
9
+ gem "bundler", ">= 1.6"
10
+ gem "byebug"
11
+ gem "guard"
12
+ gem "guard-rspec"
13
+ gem "guard-rubocop"
14
+ gem "pry"
15
+ gem "rack-test"
16
+ gem "rake"
17
+ gem "fakeredis"
18
+ gem "rspec", "~> 3.7"
19
+ gem "rubocop"
20
+ gem "rubocop-rspec"
21
+ gem "timecop"
22
+ gem "psych"
23
+ gem "net-smtp"
24
+ gem "net-pop"
25
+ gem "net-imap"
26
+ gem "bigdecimal"
27
+ end
28
+
29
+ group :test do
30
+ gem "simplecov", "~> 0.17.0"
31
+ end
32
+
33
+ gemspec path: "../"
@@ -0,0 +1,33 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "sinatra", "~> 4.0.0"
6
+
7
+ group :development do
8
+ gem "appraisal"
9
+ gem "bundler", ">= 1.6"
10
+ gem "byebug"
11
+ gem "guard"
12
+ gem "guard-rspec"
13
+ gem "guard-rubocop"
14
+ gem "pry"
15
+ gem "rack-test"
16
+ gem "rake"
17
+ gem "fakeredis"
18
+ gem "rspec", "~> 3.7"
19
+ gem "rubocop"
20
+ gem "rubocop-rspec"
21
+ gem "timecop"
22
+ gem "psych"
23
+ gem "net-smtp"
24
+ gem "net-pop"
25
+ gem "net-imap"
26
+ gem "bigdecimal"
27
+ end
28
+
29
+ group :test do
30
+ gem "simplecov", "~> 0.17.0"
31
+ end
32
+
33
+ gemspec path: "../"
@@ -2,6 +2,28 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
+ group :development do
6
+ gem "appraisal"
7
+ gem "bundler", ">= 1.6"
8
+ gem "byebug"
9
+ gem "guard"
10
+ gem "guard-rspec"
11
+ gem "guard-rubocop"
12
+ gem "pry"
13
+ gem "rack-test"
14
+ gem "rake"
15
+ gem "fakeredis"
16
+ gem "rspec", "~> 3.7"
17
+ gem "rubocop"
18
+ gem "rubocop-rspec"
19
+ gem "timecop"
20
+ gem "psych"
21
+ gem "net-smtp"
22
+ gem "net-pop"
23
+ gem "net-imap"
24
+ gem "bigdecimal"
25
+ end
26
+
5
27
  group :test do
6
28
  gem "simplecov", "~> 0.17.0"
7
29
  end
@@ -39,12 +39,7 @@ module Loga
39
39
  private
40
40
 
41
41
  def build_event(time, message)
42
- event = case message
43
- when Loga::Event
44
- message
45
- else
46
- Loga::Event.new(message: message)
47
- end
42
+ event = message.is_a?(Loga::Event) ? message : Loga::Event.new(message: message)
48
43
 
49
44
  event.timestamp ||= time
50
45
  # Overwrite sidekiq_context data anything manually specified
@@ -54,6 +49,7 @@ module Loga
54
49
  hash.merge! compute_type(event.type)
55
50
  # Overwrite hash with Loga's additional fields
56
51
  hash.merge! loga_additional_fields
52
+ hash.merge! open_telemetry_fields
57
53
  end
58
54
  event
59
55
  end
@@ -103,6 +99,17 @@ module Loga
103
99
  }
104
100
  end
105
101
 
102
+ def open_telemetry_fields
103
+ return {} unless defined?(::OpenTelemetry::Trace)
104
+
105
+ span = ::OpenTelemetry::Trace.current_span
106
+
107
+ {
108
+ trace_id: span.context.hex_trace_id,
109
+ span_id: span.context.hex_span_id,
110
+ }
111
+ end
112
+
106
113
  def sidekiq_context
107
114
  return {} unless defined?(::Sidekiq::Context)
108
115
 
data/lib/loga/railtie.rb CHANGED
@@ -86,10 +86,10 @@ module Loga
86
86
 
87
87
  private
88
88
 
89
- def render_exception_with_loga(arg, exception)
89
+ def render_exception_with_loga(arg, exception, *args)
90
90
  env = arg.is_a?(ActionDispatch::Request) ? arg.env : arg
91
91
  env['loga.exception'] = exception
92
- render_exception_without_loga(arg, exception)
92
+ render_exception_without_loga(arg, exception, *args)
93
93
  end
94
94
  end
95
95
 
data/lib/loga/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Loga
2
- VERSION = '2.7.0'.freeze
2
+ VERSION = '2.8.1'.freeze
3
3
  end
data/loga.gemspec CHANGED
@@ -20,19 +20,4 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_dependency 'activesupport', '>= 2.3.8'
22
22
  spec.add_dependency 'rack'
23
-
24
- spec.add_development_dependency 'appraisal', '~> 2.4'
25
- spec.add_development_dependency 'bundler', '>= 1.6'
26
- spec.add_development_dependency 'byebug'
27
- spec.add_development_dependency 'guard', '~> 2.13'
28
- spec.add_development_dependency 'guard-rspec', '~> 4.7'
29
- spec.add_development_dependency 'guard-rubocop', '~> 1.2'
30
- spec.add_development_dependency 'pry'
31
- spec.add_development_dependency 'rack-test'
32
- spec.add_development_dependency 'rake'
33
- spec.add_development_dependency 'fakeredis'
34
- spec.add_development_dependency 'rspec', '~> 3.7'
35
- spec.add_development_dependency 'rubocop', '~> 0.57.0'
36
- spec.add_development_dependency 'rubocop-rspec'
37
- spec.add_development_dependency 'timecop'
38
23
  end
@@ -9,7 +9,7 @@ class Dummy < Rails::Application
9
9
  config.eager_load = true
10
10
  config.filter_parameters += [:password]
11
11
  config.secret_key_base = '2624599ca9ab3cf3823626240138a128118a87683bf03ab8f155844c33b3cd8cbbfa3ef5e29db6f5bd182f8bd4776209d9577cfb46ac51bfd232b00ab0136b24'
12
- config.session_store :cookie_store, key: '_rails50_session'
12
+ config.session_store :cookie_store, key: '_rails70_session'
13
13
 
14
14
  config.log_tags = [:uuid, 'TEST_TAG']
15
15
  config.loga = {
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  RSpec.describe Loga::LogSubscribers::ActionMailer, if: Rails.env.production? do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'ostruct'
2
4
 
3
5
  RSpec.describe Loga::Railtie do
@@ -17,7 +19,11 @@ RSpec.describe Loga::Railtie do
17
19
  let(:formatter) { Loga::Formatters::SimpleFormatter }
18
20
 
19
21
  it 'assign Loga logger to Rails logger' do
20
- expect(Loga.logger).to equal(Rails.logger)
22
+ if defined?(ActiveSupport::BroadcastLogger)
23
+ expect(Loga.logger).to be_a(Logger)
24
+ else
25
+ expect(Loga.logger).to equal(Rails.logger)
26
+ end
21
27
  end
22
28
 
23
29
  it 'configures Loga with a simple formatter' do
@@ -29,7 +35,11 @@ RSpec.describe Loga::Railtie do
29
35
  context 'when production', if: Rails.env.production? do
30
36
  describe 'loga_initialize_logger' do
31
37
  it 'assign Loga logger to Rails logger' do
32
- expect(Loga.logger).to equal(Rails.logger)
38
+ if defined?(ActiveSupport::BroadcastLogger)
39
+ expect(Loga.logger).to be_a(Logger)
40
+ else
41
+ expect(Loga.logger).to equal(Rails.logger)
42
+ end
33
43
  end
34
44
 
35
45
  it 'configures Loga with a structured formatter' do
@@ -38,7 +48,7 @@ RSpec.describe Loga::Railtie do
38
48
  end
39
49
 
40
50
  it 'disables colorized logging' do
41
- expect(app.config.colorize_logging).to eq(false)
51
+ expect(app.config.colorize_logging).to be(false)
42
52
  end
43
53
  end
44
54
 
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
- RSpec.describe 'Structured logging with Rails', timecop: true,
4
- if: Rails.env.production? do
5
+ RSpec.describe 'Structured logging with Rails', :timecop,
6
+ if: Rails.env.production? do
5
7
  let(:app) { Rails.application }
6
8
 
7
9
  let(:log_entries) do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
  require 'timecop'
3
5
  require 'fakeredis'
@@ -24,8 +26,8 @@ describe 'Sidekiq client logger' do
24
26
  attr_reader :latest_error, :mutex, :cond
25
27
 
26
28
  def initialize
27
- @mutex = ::Mutex.new
28
- @cond = ::ConditionVariable.new
29
+ @mutex = Mutex.new
30
+ @cond = ConditionVariable.new
29
31
  end
30
32
 
31
33
  def processor_died(_inst, err)
@@ -84,7 +86,7 @@ describe 'Sidekiq client logger' do
84
86
  aggregate_failures do
85
87
  expect(last_element['class']).to eq 'MySidekiqWorker'
86
88
  expect(last_element['args']).to eq ['Bob']
87
- expect(last_element['retry']).to eq true
89
+ expect(last_element['retry']).to be true
88
90
  expect(last_element['queue']).to eq 'default'
89
91
  end
90
92
  end
@@ -107,16 +109,16 @@ describe 'Sidekiq client logger' do
107
109
 
108
110
  aggregate_failures do
109
111
  expect(json_line).to include(
110
- '_queue'=> 'default',
111
- '_retry'=> true,
112
- '_params'=> ['Bob'],
113
- '_class'=> 'MySidekiqWorker',
114
- '_type'=> 'sidekiq',
115
- '_service.name'=> 'hello_world_app',
116
- '_service.version'=> '1.0',
117
- '_tags'=> '',
118
- 'level'=> 6,
119
- 'version'=> '1.1',
112
+ '_queue' => 'default',
113
+ '_retry' => true,
114
+ '_params' => ['Bob'],
115
+ '_class' => 'MySidekiqWorker',
116
+ '_type' => 'sidekiq',
117
+ '_service.name' => 'hello_world_app',
118
+ '_service.version' => '1.0',
119
+ '_tags' => '',
120
+ 'level' => 6,
121
+ 'version' => '1.1',
120
122
  )
121
123
 
122
124
  %w[_created_at _enqueued_at _jid _duration timestamp host].each do |key|
@@ -31,8 +31,8 @@ describe 'Sidekiq client logger' do
31
31
  attr_reader :cond
32
32
 
33
33
  def initialize
34
- @mutex = ::Mutex.new
35
- @cond = ::ConditionVariable.new
34
+ @mutex = Mutex.new
35
+ @cond = ConditionVariable.new
36
36
  end
37
37
 
38
38
  def processor_died(_inst, err)
@@ -103,7 +103,7 @@ describe 'Sidekiq client logger' do
103
103
  aggregate_failures do
104
104
  expect(last_element['class']).to eq 'MySidekiqWorker'
105
105
  expect(last_element['args']).to eq ['Bob']
106
- expect(last_element['retry']).to eq true
106
+ expect(last_element['retry']).to be true
107
107
  expect(last_element['queue']).to eq 'default'
108
108
  end
109
109
  end