HornsAndHooves-slackiq 1.1.10 → 1.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/slackiq/sidekiq_status.rb +22 -0
- data/lib/slackiq/version.rb +1 -1
- data/lib/slackiq.rb +1 -0
- metadata +2 -2
- data/config/initializers/rspec-sidekiq.rb +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 166eaa1f83adf47643c88007ad176ab5a93ee3ed73a2218d62a613a773d91bf9
|
4
|
+
data.tar.gz: f409938354d0aca863f7cc8a8735829ac86f462af6c5aeeb8754d3511fd0fa76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aad3af2dde472e6a0054d799a83511a622f3376ff92fe4ed21651ff5e9db79460e0aa6f2a8e21f7f746cb7396215daf2ef8b9d86f28f555a1b4a036cffb0aa4b
|
7
|
+
data.tar.gz: 2a2baf228601e3dc5efebcc6989d3127750b76663fe3b8556c4f06bfb503af0f9b5725d92537f4b33e4bafaa90cef7d4ae863fb2b628fb00b234752658827ebf
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# RSpec::Sidekiq::Batch::Status does not support batch failures.
|
2
|
+
# Here, FailureStatus and SuccessStatus circumvent this problem.
|
3
|
+
|
4
|
+
if defined?(RSpec)
|
5
|
+
require 'rspec-sidekiq'
|
6
|
+
|
7
|
+
module RSpec
|
8
|
+
module Sidekiq
|
9
|
+
class FailureStatus < NullStatus
|
10
|
+
def failures
|
11
|
+
1
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
class SuccessStatus < NullStatus
|
16
|
+
def failures
|
17
|
+
0
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/slackiq/version.rb
CHANGED
data/lib/slackiq.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: HornsAndHooves-slackiq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- HornsAndHooves
|
@@ -119,8 +119,8 @@ files:
|
|
119
119
|
- Rakefile
|
120
120
|
- bin/console
|
121
121
|
- bin/setup
|
122
|
-
- config/initializers/rspec-sidekiq.rb
|
123
122
|
- lib/slackiq.rb
|
123
|
+
- lib/slackiq/sidekiq_status.rb
|
124
124
|
- lib/slackiq/time_helper.rb
|
125
125
|
- lib/slackiq/version.rb
|
126
126
|
homepage: https://github.com/HornsAndHooves/slackiq
|
@@ -1,35 +0,0 @@
|
|
1
|
-
# This patch is here because it is impossible to simulate failures with the rspec-sidekiq gem.
|
2
|
-
# failures is a function that will always return 0:
|
3
|
-
# https://github.com/philostler/rspec-sidekiq/blob/2cd15b0fe2b172243e8002c4aefa39696c42d52f/lib/rspec/sidekiq/batch.rb#L42
|
4
|
-
|
5
|
-
require 'rspec/core'
|
6
|
-
|
7
|
-
module Sidekiq
|
8
|
-
class Batch
|
9
|
-
class SuccessStatus; end
|
10
|
-
class FailureStatus; end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
module RSpec
|
15
|
-
module Sidekiq
|
16
|
-
class FailureStatus < NullStatus
|
17
|
-
def failures
|
18
|
-
1
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
class SuccessStatus < NullStatus
|
23
|
-
def failures
|
24
|
-
0
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
RSpec.configure do |config|
|
31
|
-
config.before(:each) do |example|
|
32
|
-
allow(Sidekiq::Batch::SuccessStatus).to receive(:new) { RSpec::Sidekiq::SuccessStatus.new }
|
33
|
-
allow(Sidekiq::Batch::FailureStatus).to receive(:new) { RSpec::Sidekiq::FailureStatus.new }
|
34
|
-
end
|
35
|
-
end
|