sidekiq-failures 1.0.1 → 1.0.2

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: 411bc0eb000e29f27b3d5afd27e39719c693df17ce7b08baace66e42f4b8c402
4
- data.tar.gz: 88174d41395b3953bf089590775e8e34725c4f47109a379727df08c4331ad8d8
3
+ metadata.gz: 19188851daa2c09c4d9fd539cdc5ebf1dba9ef99d8c9ed0e2c9ef3840ed0141e
4
+ data.tar.gz: 16b650f8e29fce5be5b384133914c10bbe95181c963a55cfb0f75f8ddb177091
5
5
  SHA512:
6
- metadata.gz: 90a60cb2e7b0e8dac73aa3cc188d81e4616354ecdc259bb82680fea63cf2e171e19ddb009f21b686ab95fe30fcb9b0090d45335aaaf16c4985d9770e584aa749
7
- data.tar.gz: 76886912d60887ed578b1b9d2e3ac0b4824b0db0087d776f590ef6c2cf060ad543d331848173c4e0c285ce72789c315586a4bbea6ce7f8b777db9ea17a293057
6
+ metadata.gz: 3ed7905bc899029c186d54ea9161b167d6e2477ba4c17da2b19b8f243903f5ae4c1ee2004f17d63b0c57adee458c963c33408724753e37d1442f191b84fe0b3a
7
+ data.tar.gz: 85b87d7dfc6f41e4d4cb1f3b3c0cfcc1f02ed97358c7b0479facc625003ef401bf20669868914715185e242c3bbded6c0262d125e1915ca723304c1629e4adba
@@ -0,0 +1,6 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
@@ -0,0 +1,37 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ ruby: [2.6, 2.7, '3.0', 3.1]
16
+ sidekiq: [4.2, 5.2, 6.2]
17
+ services:
18
+ redis:
19
+ image: redis
20
+ options: >-
21
+ --health-cmd "redis-cli ping"
22
+ --health-interval 10s
23
+ --health-timeout 5s
24
+ --health-retries 5
25
+ ports:
26
+ - 6379:6379
27
+ env:
28
+ SIDEKIQ_VERSION: ~> ${{ matrix.sidekiq }}
29
+ steps:
30
+ - uses: actions/checkout@v3
31
+ - name: Set up Ruby
32
+ uses: ruby/setup-ruby@v1
33
+ with:
34
+ bundler-cache: true # 'bundle install' and cache gems
35
+ ruby-version: ${{ matrix.ruby }}
36
+ - name: Run tests
37
+ run: bundle exec rake
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## Unreleased
2
2
 
3
+ ## 1.0.2
4
+
5
+ * Pass now required argument to Sidekiq's JobRetry.new (#140 @mcasper)
6
+
3
7
  ## 1.0.1
4
8
 
5
9
  * Add license config to the gemspec (#115 @reiz)
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Sidekiq::Failures [![Build Status](https://secure.travis-ci.org/mhfs/sidekiq-failures.png)](http://travis-ci.org/mhfs/sidekiq-failures)
1
+ # Sidekiq::Failures ![Build Status](https://github.com/mhfs/sidekiq-failures/workflows/CI/badge.svg)
2
2
 
3
3
  Keeps track of Sidekiq failed jobs and adds a tab to the Web UI to let you browse
4
4
  them. Makes use of Sidekiq's custom tabs and middleware chain.
@@ -20,6 +20,8 @@ gem 'sidekiq-failures'
20
20
  Simply having the gem in your Gemfile is enough to get you started. Your failed
21
21
  jobs will be visible via a Failures tab in the Web UI.
22
22
 
23
+ If you have not previously used the Web UI, it is a part of the Sidekiq gem. [See Sidekiq's docs about Web UI here.](https://github.com/mperham/sidekiq/wiki/Monitoring#web-ui)
24
+
23
25
  ## Configuring
24
26
 
25
27
  ### Maximum Tracked Failures
@@ -0,0 +1,5 @@
1
+ zh-cn:
2
+ FailedJobs: 失败的任务
3
+ FailedAt: 失败时间
4
+ ResetCounter: 重置计数器
5
+ NoFailedJobsFound: 没有发现失败的任务
@@ -81,7 +81,7 @@ module Sidekiq
81
81
 
82
82
  def retry_middleware
83
83
  @retry_middleware ||=
84
- Sidekiq::Failures.retry_middleware_class.new
84
+ Sidekiq::Failures.retry_middleware_class.new(@config || {})
85
85
  end
86
86
 
87
87
  def default_max_retries
@@ -1,5 +1,5 @@
1
1
  module Sidekiq
2
2
  module Failures
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.2"
4
4
  end
5
5
  end
@@ -81,5 +81,5 @@
81
81
  <% end %>
82
82
  <form action="<%= root_path %>failures/all/reset" method="post">
83
83
  <%= csrf_tag if respond_to?(:csrf_tag) %>
84
- <input class="btn btn-danger btn-xs pull-right" type="submit" name="reset" value="<%= t('Reset Counter') %>" data-confirm="<%= t('AreYouSure') %>" />
84
+ <input class="btn btn-danger btn-xs pull-right" type="submit" name="reset" value="<%= t('ResetCounter') %>" data-confirm="<%= t('AreYouSure') %>" />
85
85
  </form>
@@ -10,8 +10,6 @@ Gem::Specification.new do |gem|
10
10
  gem.license = "MIT"
11
11
 
12
12
  gem.files = `git ls-files`.split($\)
13
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
14
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
15
13
  gem.name = "sidekiq-failures"
16
14
  gem.require_paths = ["lib"]
17
15
  gem.version = Sidekiq::Failures::VERSION
@@ -1,19 +1,72 @@
1
1
  require "test_helper"
2
2
 
3
+ class SidekiqPre6
4
+ def new_processor(boss)
5
+ num_options_calls.times { boss.expect(:options, {:queues => ['default'] }, []) }
6
+ ::Sidekiq::Processor.new(boss)
7
+ end
8
+
9
+ private
10
+
11
+ def num_options_calls
12
+ if Gem::Version.new(Sidekiq::VERSION) >= Gem::Version.new('5.0.3')
13
+ 3
14
+ else
15
+ 2
16
+ end
17
+ end
18
+ end
19
+
20
+ class SidekiqPre63
21
+ def new_processor(boss)
22
+ opts = {
23
+ queues: ['default'],
24
+ }
25
+ opts[:fetch] = Sidekiq::BasicFetch.new(opts)
26
+ ::Sidekiq::Processor.new(boss, opts)
27
+ end
28
+ end
29
+
30
+ class SidekiqPost63
31
+ def new_processor(boss)
32
+ config = Sidekiq
33
+ config[:queues] = ['default']
34
+ config[:fetch] = Sidekiq::BasicFetch.new(config)
35
+ config[:error_handlers] << Sidekiq.method(:default_error_handler)
36
+ ::Sidekiq::Processor.new(config) { |processor, reason = nil| }
37
+ end
38
+ end
39
+
3
40
  module Sidekiq
4
41
  module Failures
5
42
  describe "Middleware" do
43
+ def new_provider
44
+ version = Gem::Version.new(Sidekiq::VERSION)
45
+ if version >= Gem::Version.new('6.4.0')
46
+ SidekiqPost63
47
+ elsif version >= Gem::Version.new('6.0')
48
+ SidekiqPre63
49
+ else
50
+ SidekiqPre6
51
+ end.new
52
+ end
53
+
6
54
  before do
7
55
  $invokes = 0
8
56
  @boss = MiniTest::Mock.new
9
- num_options_calls.times { @boss.expect(:options, {:queues => ['default'] }, []) }
10
- @processor = ::Sidekiq::Processor.new(@boss)
57
+ @provider = new_provider
58
+ @processor = @provider.new_processor(@boss)
59
+
11
60
  Sidekiq.server_middleware {|chain| chain.add Sidekiq::Failures::Middleware }
12
61
  Sidekiq.redis = REDIS
13
62
  Sidekiq.redis { |c| c.flushdb }
14
63
  Sidekiq.instance_eval { @failures_default_mode = nil }
15
64
  end
16
65
 
66
+ after do
67
+ @boss.verify
68
+ end
69
+
17
70
  TestException = Class.new(Exception)
18
71
  ShutdownException = Class.new(Sidekiq::Shutdown)
19
72
 
@@ -42,11 +95,6 @@ module Sidekiq
42
95
 
43
96
  assert_equal 0, failures_count
44
97
 
45
- actor = MiniTest::Mock.new
46
- actor.expect(:processor_done, nil, [@processor])
47
- actor.expect(:real_thread, nil, [nil, nil])
48
- 2.times { @boss.expect(:async, actor, []) }
49
-
50
98
  assert_raises TestException do
51
99
  @processor.process(msg)
52
100
  end
@@ -60,11 +108,6 @@ module Sidekiq
60
108
 
61
109
  assert_equal 0, failures_count
62
110
 
63
- actor = MiniTest::Mock.new
64
- actor.expect(:processor_done, nil, [@processor])
65
- actor.expect(:real_thread, nil, [nil, nil])
66
- 2.times { @boss.expect(:async, actor, []) }
67
-
68
111
  assert_raises TestException do
69
112
  @processor.process(msg)
70
113
  end
@@ -78,12 +121,7 @@ module Sidekiq
78
121
 
79
122
  assert_equal 0, failures_count
80
123
 
81
- actor = MiniTest::Mock.new
82
- actor.expect(:processor_done, nil, [@processor])
83
- actor.expect(:real_thread, nil, [nil, nil])
84
-
85
124
  @processor.process(msg)
86
- @boss.verify
87
125
 
88
126
  assert_equal 0, failures_count
89
127
  assert_equal 1, $invokes
@@ -94,11 +132,6 @@ module Sidekiq
94
132
 
95
133
  assert_equal 0, failures_count
96
134
 
97
- actor = MiniTest::Mock.new
98
- actor.expect(:processor_done, nil, [@processor])
99
- actor.expect(:real_thread, nil, [nil, nil])
100
- 2.times { @boss.expect(:async, actor, []) }
101
-
102
135
  assert_raises TestException do
103
136
  @processor.process(msg)
104
137
  end
@@ -114,11 +147,6 @@ module Sidekiq
114
147
 
115
148
  assert_equal 0, failures_count
116
149
 
117
- actor = MiniTest::Mock.new
118
- actor.expect(:processor_done, nil, [@processor])
119
- actor.expect(:real_thread, nil, [nil, nil])
120
- 2.times { @boss.expect(:async, actor, []) }
121
-
122
150
  assert_raises TestException do
123
151
  @processor.process(msg)
124
152
  end
@@ -133,11 +161,6 @@ module Sidekiq
133
161
 
134
162
  assert_equal 0, failures_count
135
163
 
136
- actor = MiniTest::Mock.new
137
- actor.expect(:processor_done, nil, [@processor])
138
- actor.expect(:real_thread, nil, [nil, nil])
139
- 2.times { @boss.expect(:async, actor, []) }
140
-
141
164
  assert_raises TestException do
142
165
  @processor.process(msg)
143
166
  end
@@ -151,11 +174,6 @@ module Sidekiq
151
174
 
152
175
  assert_equal 0, failures_count
153
176
 
154
- actor = MiniTest::Mock.new
155
- actor.expect(:processor_done, nil, [@processor])
156
- actor.expect(:real_thread, nil, [nil, nil])
157
- 2.times { @boss.expect(:async, actor, []) }
158
-
159
177
  assert_raises TestException do
160
178
  @processor.process(msg)
161
179
  end
@@ -169,11 +187,6 @@ module Sidekiq
169
187
 
170
188
  assert_equal 0, failures_count
171
189
 
172
- actor = MiniTest::Mock.new
173
- actor.expect(:processor_done, nil, [@processor])
174
- actor.expect(:real_thread, nil, [nil, nil])
175
- 2.times { @boss.expect(:async, actor, []) }
176
-
177
190
  assert_raises TestException do
178
191
  @processor.process(msg)
179
192
  end
@@ -189,11 +202,6 @@ module Sidekiq
189
202
 
190
203
  assert_equal 0, failures_count
191
204
 
192
- actor = MiniTest::Mock.new
193
- actor.expect(:processor_done, nil, [@processor])
194
- actor.expect(:real_thread, nil, [nil, nil])
195
- 2.times { @boss.expect(:async, actor, []) }
196
-
197
205
  assert_raises TestException do
198
206
  @processor.process(msg)
199
207
  end
@@ -209,11 +217,6 @@ module Sidekiq
209
217
 
210
218
  assert_equal 0, failures_count
211
219
 
212
- actor = MiniTest::Mock.new
213
- actor.expect(:processor_done, nil, [@processor])
214
- actor.expect(:real_thread, nil, [nil, nil])
215
- 2.times { @boss.expect(:async, actor, []) }
216
-
217
220
  assert_raises TestException do
218
221
  @processor.process(msg)
219
222
  end
@@ -232,17 +235,13 @@ module Sidekiq
232
235
 
233
236
  3.times do
234
237
  boss = MiniTest::Mock.new
235
- num_options_calls.times { boss.expect(:options, {:queues => ['default'] }, []) }
236
- processor = ::Sidekiq::Processor.new(boss)
237
-
238
- actor = MiniTest::Mock.new
239
- actor.expect(:processor_done, nil, [processor])
240
- actor.expect(:real_thread, nil, [nil, nil])
241
- 2.times { boss.expect(:async, actor, []) }
238
+ processor = @provider.new_processor(boss)
242
239
 
243
240
  assert_raises TestException do
244
241
  processor.process(msg)
245
242
  end
243
+
244
+ boss.verify
246
245
  end
247
246
 
248
247
  assert_equal 2, failures_count
@@ -259,11 +258,6 @@ module Sidekiq
259
258
 
260
259
  assert_equal 0, Sidekiq::Failures.count
261
260
 
262
- actor = MiniTest::Mock.new
263
- actor.expect(:processor_done, nil, [@processor])
264
- actor.expect(:real_thread, nil, [nil, nil])
265
- @boss.expect(:async, actor, [])
266
-
267
261
  assert_raises TestException do
268
262
  @processor.process(msg)
269
263
  end
@@ -278,14 +272,6 @@ module Sidekiq
278
272
  def create_work(msg)
279
273
  Sidekiq::BasicFetch::UnitOfWork.new('default', Sidekiq.dump_json(msg))
280
274
  end
281
-
282
- def num_options_calls
283
- if Gem::Version.new(Sidekiq::VERSION) >= Gem::Version.new('5.0.3')
284
- 3
285
- else
286
- 2
287
- end
288
- end
289
275
  end
290
276
  end
291
277
  end
@@ -21,22 +21,22 @@ module Sidekiq
21
21
  it 'can display home with failures tab' do
22
22
  get '/'
23
23
 
24
- last_response.status.must_equal 200
25
- last_response.body.must_match(/Sidekiq/)
26
- last_response.body.must_match(/Failures/)
24
+ _(last_response.status).must_equal 200
25
+ _(last_response.body).must_match(/Sidekiq/)
26
+ _(last_response.body).must_match(/Failures/)
27
27
  end
28
28
 
29
29
  it 'can display failures page without any failures' do
30
30
  get '/failures'
31
- last_response.status.must_equal 200
32
- last_response.body.must_match(/Failed Jobs/)
33
- last_response.body.must_match(/No failed jobs found/)
31
+ _(last_response.status).must_equal 200
32
+ _(last_response.body).must_match(/Failed Jobs/)
33
+ _(last_response.body).must_match(/No failed jobs found/)
34
34
  end
35
35
 
36
36
  it 'has the reset counter form and action' do
37
37
  get '/failures'
38
- last_response.body.must_match(/failures\/all\/reset/)
39
- last_response.body.must_match(/Reset Counter/)
38
+ _(last_response.body).must_match(/failures\/all\/reset/)
39
+ _(last_response.body).must_match(/Reset Counter/)
40
40
  end
41
41
 
42
42
  describe 'when there are failures' do
@@ -46,97 +46,97 @@ module Sidekiq
46
46
  end
47
47
 
48
48
  it 'should be successful' do
49
- last_response.status.must_equal 200
49
+ _(last_response.status).must_equal 200
50
50
  end
51
51
 
52
52
  it 'can display failures page with failures listed' do
53
- last_response.body.must_match(/Failed Jobs/)
54
- last_response.body.must_match(/HardWorker/)
55
- last_response.body.must_match(/ArgumentError/)
56
- last_response.body.wont_match(/No failed jobs found/)
53
+ _(last_response.body).must_match(/Failed Jobs/)
54
+ _(last_response.body).must_match(/HardWorker/)
55
+ _(last_response.body).must_match(/ArgumentError/)
56
+ _(last_response.body).wont_match(/No failed jobs found/)
57
57
  end
58
58
 
59
59
  it 'can reset counter' do
60
60
  assert_equal failed_count, "1"
61
61
 
62
- last_response.body.must_match(/HardWorker/)
62
+ _(last_response.body).must_match(/HardWorker/)
63
63
 
64
64
  post '/failures/all/reset'
65
- last_response.status.must_equal 302
66
- last_response.location.must_match(/failures$/)
65
+ _(last_response.status).must_equal 302
66
+ _(last_response.location).must_match(/failures$/)
67
67
 
68
68
  get '/failures'
69
- last_response.status.must_equal 200
70
- last_response.body.must_match(/HardWorker/)
69
+ _(last_response.status).must_equal 200
70
+ _(last_response.body).must_match(/HardWorker/)
71
71
 
72
72
  assert_equal failed_count, "0"
73
73
  end
74
74
 
75
75
  it 'has the delete all form and action' do
76
- last_response.body.must_match(/failures\/all\/delete/)
77
- last_response.body.must_match(/Delete All/)
76
+ _(last_response.body).must_match(/failures\/all\/delete/)
77
+ _(last_response.body).must_match(/Delete All/)
78
78
  end
79
79
 
80
80
  it 'can delete all failures' do
81
81
  assert_equal failed_count, "1"
82
82
 
83
- last_response.body.must_match(/HardWorker/)
83
+ _(last_response.body).must_match(/HardWorker/)
84
84
 
85
85
  post '/failures/all/delete'
86
- last_response.status.must_equal 302
87
- last_response.location.must_match(/failures$/)
86
+ _(last_response.status).must_equal 302
87
+ _(last_response.location).must_match(/failures$/)
88
88
 
89
89
  get '/failures'
90
- last_response.status.must_equal 200
91
- last_response.body.must_match(/No failed jobs found/)
90
+ _(last_response.status).must_equal 200
91
+ _(last_response.body).must_match(/No failed jobs found/)
92
92
 
93
93
  assert_equal failed_count, "1"
94
94
  end
95
95
 
96
96
  it 'has the retry all form and action' do
97
- last_response.body.must_match(/failures\/all\/retry/)
98
- last_response.body.must_match(/Retry All/)
97
+ _(last_response.body).must_match(/failures\/all\/retry/)
98
+ _(last_response.body).must_match(/Retry All/)
99
99
  end
100
100
 
101
101
  it 'can retry all failures' do
102
102
  assert_equal failed_count, "1"
103
103
 
104
- last_response.body.must_match(/HardWorker/)
104
+ _(last_response.body).must_match(/HardWorker/)
105
105
  post '/failures/all/retry'
106
- last_response.status.must_equal 302
107
- last_response.location.must_match(/failures/)
106
+ _(last_response.status).must_equal 302
107
+ _(last_response.location).must_match(/failures/)
108
108
 
109
109
  get '/failures'
110
- last_response.status.must_equal 200
111
- last_response.body.must_match(/No failed jobs found/)
110
+ _(last_response.status).must_equal 200
111
+ _(last_response.body).must_match(/No failed jobs found/)
112
112
  end
113
113
 
114
114
  it 'can delete failure from the list' do
115
115
  assert_equal failed_count, "1"
116
116
 
117
- last_response.body.must_match(/HardWorker/)
117
+ _(last_response.body).must_match(/HardWorker/)
118
118
 
119
119
  post '/failures', { :key => [failure_score], :delete => 'Delete' }
120
- last_response.status.must_equal 302
121
- last_response.location.must_match(/failures/)
120
+ _(last_response.status).must_equal 302
121
+ _(last_response.location).must_match(/failures/)
122
122
 
123
123
  get '/failures'
124
- last_response.status.must_equal 200
125
- last_response.body.must_match(/No failed jobs found/)
124
+ _(last_response.status).must_equal 200
125
+ _(last_response.body).must_match(/No failed jobs found/)
126
126
  end
127
127
 
128
128
  it 'can retry failure from the list' do
129
129
  assert_equal failed_count, "1"
130
130
 
131
- last_response.body.must_match(/HardWorker/)
131
+ _(last_response.body).must_match(/HardWorker/)
132
132
 
133
133
  post '/failures', { :key => [failure_score], :retry => 'Retry Now' }
134
- last_response.status.must_equal 302
135
- last_response.location.must_match(/failures/)
134
+ _(last_response.status).must_equal 302
135
+ _(last_response.location).must_match(/failures/)
136
136
 
137
137
  get '/failures'
138
- last_response.status.must_equal 200
139
- last_response.body.must_match(/No failed jobs found/)
138
+ _(last_response.status).must_equal 200
139
+ _(last_response.body).must_match(/No failed jobs found/)
140
140
  end
141
141
 
142
142
  it 'can handle failures with nil error_message' do
@@ -144,7 +144,7 @@ module Sidekiq
144
144
 
145
145
  get '/failures'
146
146
 
147
- last_response.status.must_equal 200
147
+ _(last_response.status).must_equal 200
148
148
  end
149
149
  end
150
150
 
@@ -155,38 +155,38 @@ module Sidekiq
155
155
  end
156
156
 
157
157
  it 'should be successful' do
158
- last_response.status.must_equal 200
158
+ _(last_response.status).must_equal 200
159
159
  end
160
160
 
161
161
  it 'can display failure page' do
162
- last_response.body.must_match(/Job/)
163
- last_response.body.must_match(/HardWorker/)
164
- last_response.body.must_match(/ArgumentError/)
165
- last_response.body.must_match(/file1/)
162
+ _(last_response.body).must_match(/Job/)
163
+ _(last_response.body).must_match(/HardWorker/)
164
+ _(last_response.body).must_match(/ArgumentError/)
165
+ _(last_response.body).must_match(/file1/)
166
166
  end
167
167
 
168
168
  it 'can delete failure' do
169
- last_response.body.must_match(/HardWorker/)
169
+ _(last_response.body).must_match(/HardWorker/)
170
170
 
171
171
  post "/failures/#{failure_score}", :delete => 'Delete'
172
- last_response.status.must_equal 302
173
- last_response.location.must_match(/failures/)
172
+ _(last_response.status).must_equal 302
173
+ _(last_response.location).must_match(/failures/)
174
174
 
175
175
  get "/failures/#{failure_score}"
176
- last_response.status.must_equal 302
177
- last_response.location.must_match(/failures/)
176
+ _(last_response.status).must_equal 302
177
+ _(last_response.location).must_match(/failures/)
178
178
  end
179
179
 
180
180
  it 'can retry failure' do
181
- last_response.body.must_match(/HardWorker/)
181
+ _(last_response.body).must_match(/HardWorker/)
182
182
 
183
183
  post "/failures/#{failure_score}", :retry => 'Retry Now'
184
- last_response.status.must_equal 302
185
- last_response.location.must_match(/failures/)
184
+ _(last_response.status).must_equal 302
185
+ _(last_response.location).must_match(/failures/)
186
186
 
187
187
  get "/failures/#{failure_score}"
188
- last_response.status.must_equal 302
189
- last_response.location.must_match(/failures/)
188
+ _(last_response.status).must_equal 302
189
+ _(last_response.location).must_match(/failures/)
190
190
  end
191
191
 
192
192
  if defined? Sidekiq::Pro
@@ -194,7 +194,7 @@ module Sidekiq
194
194
  create_sample_failure
195
195
  post '/filter/failures', substr: 'new'
196
196
 
197
- last_response.status.must_equal 200
197
+ _(last_response.status).must_equal 200
198
198
  end
199
199
  end
200
200
  end
@@ -207,11 +207,11 @@ module Sidekiq
207
207
  end
208
208
 
209
209
  it 'can escape arguments' do
210
- last_response.body.must_match(/&quot;&lt;h1&gt;omg&lt;&#x2F;h1&gt;&quot;/)
210
+ _(last_response.body).must_match(/&quot;&lt;h1&gt;omg&lt;&#x2F;h1&gt;&quot;/)
211
211
  end
212
212
 
213
213
  it 'can escape error message' do
214
- last_response.body.must_match(/ArgumentError: &lt;p&gt;wow&lt;&#x2F;p&gt;/)
214
+ _(last_response.body).must_match(/ArgumentError: &lt;p&gt;wow&lt;&#x2F;p&gt;/)
215
215
  end
216
216
  end
217
217
 
@@ -222,8 +222,8 @@ module Sidekiq
222
222
  end
223
223
 
224
224
  it 'should be successful' do
225
- last_response.status.must_equal 200
226
- last_response.body.wont_match(/No failed jobs found/)
225
+ _(last_response.status).must_equal 200
226
+ _(last_response.body).wont_match(/No failed jobs found/)
227
227
  end
228
228
  end
229
229
 
@@ -234,8 +234,8 @@ module Sidekiq
234
234
  end
235
235
 
236
236
  it 'should be successful' do
237
- last_response.status.must_equal 200
238
- last_response.body.wont_match(/No failed jobs found/)
237
+ _(last_response.status).must_equal 200
238
+ _(last_response.body).wont_match(/No failed jobs found/)
239
239
  end
240
240
  end
241
241
  end
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.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcelo Silveira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-03 00:00:00.000000000 Z
11
+ date: 2022-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq
@@ -101,8 +101,9 @@ executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
+ - ".github/dependabot.yml"
105
+ - ".github/workflows/ci.yml"
104
106
  - ".gitignore"
105
- - ".travis.yml"
106
107
  - CHANGELOG.md
107
108
  - Gemfile
108
109
  - LICENSE
@@ -114,6 +115,7 @@ files:
114
115
  - lib/sidekiq/failures/locales/en.yml
115
116
  - lib/sidekiq/failures/locales/ja.yml
116
117
  - lib/sidekiq/failures/locales/pt-BR.yml
118
+ - lib/sidekiq/failures/locales/zh-cn.yml
117
119
  - lib/sidekiq/failures/middleware.rb
118
120
  - lib/sidekiq/failures/sorted_entry.rb
119
121
  - lib/sidekiq/failures/version.rb
@@ -144,13 +146,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
146
  - !ruby/object:Gem::Version
145
147
  version: '0'
146
148
  requirements: []
147
- rubygems_version: 3.2.3
149
+ rubygems_version: 3.3.7
148
150
  signing_key:
149
151
  specification_version: 4
150
152
  summary: Keeps track of Sidekiq failed jobs and adds a tab to the Web UI to let you
151
153
  browse them. Makes use of Sidekiq's custom tabs and middleware chain.
152
- test_files:
153
- - test/failures_test.rb
154
- - test/middleware_test.rb
155
- - test/test_helper.rb
156
- - test/web_extension_test.rb
154
+ test_files: []
data/.travis.yml DELETED
@@ -1,18 +0,0 @@
1
- language: ruby
2
- sudo: false
3
- cache: bundler
4
- services:
5
- - redis-server
6
- rvm:
7
- - jruby-9.1.6.0
8
- - 2.2.4
9
- - 2.3.0
10
- - 2.4.0
11
- env:
12
- matrix:
13
- - SIDEKIQ_VERSION="~> 4.0"
14
- - SIDEKIQ_VERSION="~> 4.2"
15
- - SIDEKIQ_VERSION="~> 5.0"
16
- matrix:
17
- allow_failures:
18
- - rvm: jruby-9.1.6.0