juan_pelota 2.0.1 → 2.1.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
  SHA1:
3
- metadata.gz: cd27b79a23fdec5d16bbd12b5241ae6331a64d2a
4
- data.tar.gz: 9287f5a33238f68b15e848d7d4b5ed6b8d213dea
3
+ metadata.gz: f5cf1fcaa40e9afedde03fe0777365cfa57edbc9
4
+ data.tar.gz: 1210a5dd9472f4fe071b16054f2afbcbf3796adf
5
5
  SHA512:
6
- metadata.gz: abc44194707cfa4b5126d674236c43e436224df3abf8cba92bae76a800ddd015866e48da86d0cc355613d5d4852c93927f6e6a3be2a22026285a05aa7c8769c3
7
- data.tar.gz: 33060a765de9709e9ecc7c259123793246bdf6c03599ddaa24ff003b51e653053d88045a9258fc366c0af0971d7712436ee9e6e20ffc9ae04d986c191c0d7428
6
+ metadata.gz: 48734ec1a53916df44c9f76eaac7bc71a062b31603514c0b3dc32839f97737effc0d77c0863110d18a75c1a1f2644d9ac0aa2b617390c4de950c2ad472b5c2c8
7
+ data.tar.gz: 35997f62cf30af24bc92b7a00b013ed8d5e7cc60eb29c55dcb49a98bab8877a755f60b2da580e788a67072a607c6f973ed4e0ec7e09b9f11024c297257492663
checksums.yaml.gz.sig CHANGED
@@ -1,5 +1 @@
1
- 9g���2����a/�z��Qa(o5r~���!]���"���Y��{7�ҫ��� �ZK'bBMt#�Yؖ�X
2
- o<�8|G�뜰N'o
3
- *�UP����{�"�W�4-��g��o���RФ̻A(l�c�� B6.ͪ
4
-
5
- TdwzxY��
1
+ ��g~W�b6ޜYF|�I�l��lL"ġypӥ�~�ǘ��FL 6U��-�o~�{9<�w ���s�=�|�˦NL]Ъm�zLz��+�.�V�.@�0V�� x0
data.tar.gz.sig CHANGED
Binary file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JuanPelota
4
- VERSION = '2.0.1'
4
+ VERSION = '2.1.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: juan_pelota
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - thekompanee
@@ -12,39 +12,39 @@ cert_chain:
12
12
  -----BEGIN CERTIFICATE-----
13
13
  MIIDrjCCApagAwIBAgIBATANBgkqhkiG9w0BAQUFADBOMRowGAYDVQQDDBFhY2Nv
14
14
  dW50c19ydWJ5Z2VtczEbMBkGCgmSJomT8ixkARkWC3RoZWtvbXBhbmVlMRMwEQYK
15
- CZImiZPyLGQBGRYDY29tMB4XDTE2MDQyNDAyNTEyM1oXDTE3MDQyNDAyNTEyM1ow
15
+ CZImiZPyLGQBGRYDY29tMB4XDTE3MDgwMjIyNTYzMVoXDTE4MDgwMjIyNTYzMVow
16
16
  TjEaMBgGA1UEAwwRYWNjb3VudHNfcnVieWdlbXMxGzAZBgoJkiaJk/IsZAEZFgt0
17
17
  aGVrb21wYW5lZTETMBEGCgmSJomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEB
18
- BQADggEPADCCAQoCggEBANklzdaVeHtut6LTe/hrl6Krz2Z60InEbNb+TMG43tww
19
- jBpWZrdU/SBkR3EYbTAQv/yGTuMHoVKGK2kDlFvdofW2hX0d14qPyYJUNYt+7VWE
20
- 3UhPSxw1i6MxeU1QwfkIyaN8A5lj0225+rwI/mbplv+lSXPlJEroCQ9EfniZD4jL
21
- URlrHWl/UejcQ32C1IzBwth3+nacrO1197v5nSdozFzQwm4groaggXn9F/WpThu+
22
- MhcE4bfttwEjAfU3zAThyzOFoVPpACP+SwOuyPJSl02+9BiwzeAnFJDfge7+rsd5
23
- 64W/VzBIklEKUZMmxZwr5DwpSXLrknBDtHLABG9Nr3cCAwEAAaOBljCBkzAJBgNV
24
- HRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUP7v0f/qfa0LMrhkzHRI3l10X
25
- LYIwLAYD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==
27
+ BgkqhkiG9w0BAQUFAAOCAQEAekAixhDiCyu4LvqVIEfNkb9DSCsNUQOCgwX2ppj5
28
+ dfOq0yEABaMNGs5QJZUGXwXI5PHfSrsh8yNXUvofB9A5CE/M7z1nqifAYyjBhQse
29
+ trwZaMUUjIkPVYBCBHnIIRV5r3nQaJRJSBejcJ9rZBiPB+Fy8pumpxTQ4iD28bVh
30
+ z3hlqH0da2pJJ8dJpGka9VS5RJMljl4CmPGfp0xBhaP8SiQ0ROudY2hl41CxoM4u
31
+ D+octMUn1lW1R5TY2r8c6lPvU4otU+9/N9CQP/qPfjpfdjndm4AT9WOElnbqouuF
32
+ CI6ZwNuD9jNYJxrNrpdkOUZVPEr6PoPdArhjNQevWG3zbg==
33
33
  -----END CERTIFICATE-----
34
- date: 2017-03-31 00:00:00.000000000 Z
34
+ date: 2017-08-02 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: sidekiq
38
38
  requirement: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - "~>"
40
+ - - ">="
41
41
  - !ruby/object:Gem::Version
42
42
  version: '4.0'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - "~>"
47
+ - - ">="
48
48
  - !ruby/object:Gem::Version
49
49
  version: '4.0'
50
50
  - !ruby/object:Gem::Dependency
@@ -104,7 +104,8 @@ dependencies:
104
104
  - !ruby/object:Gem::Version
105
105
  version: 0.7.1
106
106
  description: ''
107
- email: info@thekompanee.com
107
+ email:
108
+ - info@thekompanee.com
108
109
  executables: []
109
110
  extensions: []
110
111
  extra_rdoc_files: []
@@ -117,12 +118,11 @@ files:
117
118
  - lib/juan_pelota/logger.rb
118
119
  - lib/juan_pelota/middlewares/logging.rb
119
120
  - lib/juan_pelota/version.rb
120
- - spec/juan_pelota/logger_spec.rb
121
- - spec/spec_helper.rb
122
121
  homepage: https://github.com/thekompanee/juan_pelota
123
122
  licenses:
124
123
  - MIT
125
- metadata: {}
124
+ metadata:
125
+ allowed_push_host: https://rubygems.org
126
126
  post_install_message:
127
127
  rdoc_options: []
128
128
  require_paths:
@@ -139,10 +139,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  version: '0'
140
140
  requirements: []
141
141
  rubyforge_project:
142
- rubygems_version: 2.6.11
142
+ rubygems_version: 2.6.8
143
143
  signing_key:
144
144
  specification_version: 4
145
145
  summary: Log Sidekiq messages in JSON format
146
- test_files:
147
- - spec/juan_pelota/logger_spec.rb
148
- - spec/spec_helper.rb
146
+ test_files: []
metadata.gz.sig CHANGED
Binary file
@@ -1,159 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'spec_helper'
4
-
5
- module JuanPelota
6
- describe Logger do
7
-
8
- before(:each) do
9
- Configuration.instance.filtered_workers = 'my_filtered_worker'
10
- end
11
-
12
- it 'takes message as a hash and logs what we want', :time_mock do
13
- json = JuanPelota::Logger.new.call('high',
14
- Time.now.utc,
15
- 'our tests',
16
- 'args' => 'my_args',
17
- 'class' => 'my_worker',
18
- 'run_time' => 100,
19
- 'message' => 'my message',
20
- 'status' => 'my_status')
21
-
22
- json_data = JSON.parse(json)
23
-
24
- expect(json_data).to include(
25
- '@type' => 'sidekiq',
26
- '@timestamp' => '2012-07-26T18:00:00Z',
27
- '@status' => 'my_status',
28
- '@severity' => 'high',
29
- '@run_time' => 100,
30
- '@message' => 'my message',
31
- '@fields' => include(
32
- 'pid' => be_a(Integer),
33
- 'tid' => match(/[a-z0-9]+/),
34
- 'context' => nil,
35
- 'program_name' => 'our tests',
36
- 'worker' => 'my_worker',
37
- 'arguments' => 'my_args',
38
- ),
39
- )
40
- end
41
-
42
- it 'take message as a string and picks up if its a worker that is being queued',
43
- :time_mock do
44
-
45
- json = JuanPelota::Logger.new.call('high',
46
- Time.now.utc,
47
- 'our tests',
48
- 'queueing MyWorkerClass')
49
-
50
- json_data = JSON.parse(json)
51
-
52
- expect(json_data).to include(
53
- '@status' => 'queueing',
54
- '@message' => 'queueing MyWorkerClass',
55
- '@fields' => include(
56
- 'worker' => 'MyWorkerClass',
57
- ),
58
- )
59
- end
60
-
61
- # rubocop:disable Metrics/LineLength, RSpec/ExampleLength
62
- it 'take message as a string and can detect if its a backtrace',
63
- :time_mock do
64
-
65
- backtrace = <<~HEREDOC
66
- /Users/myuser/Projects/foo/bar_baz/app/workers/bar_baz/workers/process_item.rb:50:in `perform'
67
- /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-3.4.1/lib/sidekiq/processor.rb:75:in `execute_job'
68
- /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-3.4.1/lib/sidekiq/processor.rb:52:in `block (2 levels) in process'
69
- /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-3.4.1/lib/sidekiq/middleware/chain.rb:127:in `block in invoke'
70
- /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/honeybadger-2.0.11/lib/honeybadger/plugins/sidekiq.rb:11:in `block in call'
71
- /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/honeybadger-2.0.11/lib/honeybadger/trace.rb:62:in `instrument'
72
- /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/honeybadger-2.0.11/lib/honeybadger/trace.rb:18:in `instrument'
73
- /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/honeybadger-2.0.11/lib/honeybadger/plugins/sidekiq.rb:10:in `call'
74
- /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-3.4.1/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'
75
- /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-unique-jobs-3.0.14/lib/sidekiq_unique_jobs/middleware/server/unique_jobs.rb:16:in `call'
76
- /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-3.4.1/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'
77
- /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-3.4.1/lib/sidekiq/middleware/server/active_record.rb:6:in `call'
78
- /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-3.4.1/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'
79
- /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-3.4.1/lib/sidekiq/middleware/server/retry_jobs.rb:74:in `call'
80
- /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-3.4.1/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'
81
- /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-failures-0.4.4/lib/sidekiq/failures/middleware.rb:9:in `call'
82
- /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-3.4.1/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'
83
- /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-3.4.1/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'
84
- /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-skylight-0.0.4/lib/sidekiq/skylight/server_middleware.rb:8:in `block in call'
85
- /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/skylight-0.6.0/lib/skylight/core.rb:70:in `trace'
86
- HEREDOC
87
-
88
- json = JuanPelota::Logger.new.call('high',
89
- Time.now.utc,
90
- 'our tests',
91
- backtrace)
92
-
93
- json_data = JSON.parse(json)
94
-
95
- expect(json_data).to include(
96
- '@status' => 'dead',
97
- '@message' => [
98
- "/Users/myuser/Projects/foo/bar_baz/app/workers/bar_baz/workers/process_item.rb:50:in `perform'",
99
- "/usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-3.4.1/lib/sidekiq/processor.rb:75:in `execute_job'",
100
- "/usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-3.4.1/lib/sidekiq/processor.rb:52:in `block (2 levels) in process'",
101
- "/usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-3.4.1/lib/sidekiq/middleware/chain.rb:127:in `block in invoke'",
102
- "/usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/honeybadger-2.0.11/lib/honeybadger/plugins/sidekiq.rb:11:in `block in call'",
103
- "/usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/honeybadger-2.0.11/lib/honeybadger/trace.rb:62:in `instrument'",
104
- "/usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/honeybadger-2.0.11/lib/honeybadger/trace.rb:18:in `instrument'",
105
- "/usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/honeybadger-2.0.11/lib/honeybadger/plugins/sidekiq.rb:10:in `call'",
106
- "/usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-3.4.1/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'",
107
- "/usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-unique-jobs-3.0.14/lib/sidekiq_unique_jobs/middleware/server/unique_jobs.rb:16:in `call'",
108
- ],
109
- )
110
- end
111
- # rubocop:enable Metrics/LineLength, RSpec/ExampleLength
112
-
113
- it 'set the status to dead and returns a nil worker if it gets a string without ' \
114
- '"queueing" in the message',
115
- :time_mock do
116
-
117
- json = JuanPelota::Logger.new.call('high',
118
- Time.now.utc,
119
- 'our tests',
120
- 'My Message')
121
-
122
- json_data = JSON.parse(json)
123
-
124
- expect(json_data).to include(
125
- '@status' => 'dead',
126
- '@message' => 'My Message',
127
- '@fields' => include(
128
- 'worker' => nil,
129
- ),
130
- )
131
- end
132
-
133
- it 'set the status to "Exception" if the message is one', :time_mock do
134
- json = JuanPelota::Logger.new.call('high',
135
- Time.now.utc,
136
- 'our tests',
137
- Exception.new)
138
-
139
- json_data = JSON.parse(json)
140
-
141
- expect(json_data).to include(
142
- '@status' => 'exception',
143
- )
144
- end
145
-
146
- it 'sets the status to retry if retry is passed in as key to the message', :time_mock do
147
- json = JuanPelota::Logger.new.call('high',
148
- Time.now.utc,
149
- 'our tests',
150
- 'retry' => true)
151
-
152
- json_data = JSON.parse(json)
153
-
154
- expect(json_data).to include(
155
- '@status' => 'retry',
156
- )
157
- end
158
- end
159
- end
data/spec/spec_helper.rb DELETED
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'rspectacular'
4
- require 'sidekiq'
5
- require 'juan_pelota'