sidekiq-failures 1.0.3 → 1.0.4
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 +4 -4
- data/.gitignore +1 -1
- data/CHANGELOG.md +4 -0
- data/lib/sidekiq/failures/version.rb +1 -1
- data/lib/sidekiq/failures/views/failure.erb +2 -2
- data/sidekiq-failures.gemspec +1 -0
- data/test/web_extension_test.rb +30 -9
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71e370c4485d8ecc481914afd5d8a489c9f2743c1749975dceb536977607230a
|
4
|
+
data.tar.gz: 1a8e989912c378459e478eb9f29c0dd1d53128c126cc135c2bf597375e26ed84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49f99dbee68555a41e53d615e27afa48f5852d0f887fd96891864c89fd86f5d72fe552d9eefa5b22f860502d6bed321c38f5a4fd28ea5c4f1dfeea703c9d17eb
|
7
|
+
data.tar.gz: f59b94960937b9f7d3482c79f79b905015fac87df83bcde5db946023383658138d7226003431a4ece758780f0ad06e7a1b2785258917d19fc5a9278fe6583267
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -6,12 +6,12 @@
|
|
6
6
|
<tr>
|
7
7
|
<th><%= t('ErrorClass') %></th>
|
8
8
|
<td>
|
9
|
-
<code><%= @failure['error_class'] %></code>
|
9
|
+
<code><%= h @failure['error_class'] %></code>
|
10
10
|
</td>
|
11
11
|
</tr>
|
12
12
|
<tr>
|
13
13
|
<th><%= t('ErrorMessage') %></th>
|
14
|
-
<td><%= @failure['error_message'] %></td>
|
14
|
+
<td><%= h @failure['error_message'] %></td>
|
15
15
|
</tr>
|
16
16
|
<% if !@failure['error_backtrace'].nil? %>
|
17
17
|
<tr>
|
data/sidekiq-failures.gemspec
CHANGED
data/test/web_extension_test.rb
CHANGED
@@ -201,17 +201,36 @@ module Sidekiq
|
|
201
201
|
|
202
202
|
describe 'when there is specific failure' do
|
203
203
|
describe 'with unescaped data' do
|
204
|
-
|
205
|
-
|
206
|
-
|
204
|
+
describe 'the index page' do
|
205
|
+
before do
|
206
|
+
create_sample_failure(args: ['<h1>omg</h1>'], error_message: '<p>wow</p>')
|
207
|
+
get '/failures'
|
208
|
+
end
|
209
|
+
|
210
|
+
it 'can escape arguments' do
|
211
|
+
_(last_response.body).must_match(/"<h1>omg</h1>"/)
|
212
|
+
end
|
213
|
+
|
214
|
+
it 'can escape error message' do
|
215
|
+
_(last_response.body).must_match(/ArgumentError: <p>wow</p>/)
|
216
|
+
end
|
207
217
|
end
|
208
218
|
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
219
|
+
describe 'the details page' do
|
220
|
+
before do
|
221
|
+
failure = create_sample_failure(args: ['<h1>omg</h1>'], error_message: '<p>wow</p>')
|
222
|
+
get "/failures/#{failure[:jid]}"
|
223
|
+
end
|
224
|
+
|
225
|
+
it 'can escape arguments' do
|
226
|
+
_(last_response.status).must_equal 200
|
227
|
+
_(last_response.body).must_match(/<th>Error Message<\/th>\n <td><p>wow</p><\/td>/)
|
228
|
+
end
|
229
|
+
|
230
|
+
it 'can escape error message' do
|
231
|
+
_(last_response.status).must_equal 200
|
232
|
+
_(last_response.body).must_match(/<th>Error Message<\/th>\n <td><p>wow</p><\/td>/)
|
233
|
+
end
|
215
234
|
end
|
216
235
|
end
|
217
236
|
|
@@ -259,6 +278,8 @@ module Sidekiq
|
|
259
278
|
c.set("stat:failed", 1)
|
260
279
|
end
|
261
280
|
end
|
281
|
+
|
282
|
+
data
|
262
283
|
end
|
263
284
|
|
264
285
|
def failed_count
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-failures
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcelo Silveira
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
97
111
|
description: Keep track of Sidekiq failed jobs
|
98
112
|
email:
|
99
113
|
- marcelo@mhfs.com.br
|
@@ -146,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
160
|
- !ruby/object:Gem::Version
|
147
161
|
version: '0'
|
148
162
|
requirements: []
|
149
|
-
rubygems_version: 3.3.
|
163
|
+
rubygems_version: 3.0.3.1
|
150
164
|
signing_key:
|
151
165
|
specification_version: 4
|
152
166
|
summary: Keeps track of Sidekiq failed jobs and adds a tab to the Web UI to let you
|