funktor 0.4.6 → 0.4.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/funktor/testing.rb +24 -4
- data/lib/funktor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d94ef31a3eeefcc0da81890f83168ab12d427ed53144bb7b65af723b5b2a39f
|
4
|
+
data.tar.gz: bf7e0c0d492a5561ac7d90b429d594c64d3b6fdadde4abc75b5d937e60561b12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19dc49ea92ff06d03126e50fd2a871fe09b7e2552a8757391b761758772373bd2d99568928f6d967011185a12ba35ecb39d6f8275976fc1cc3c38258f157f4e9
|
7
|
+
data.tar.gz: d7eaf3c888e0a6741999199f56b2203ca3a35f539efab69852c83ef80f69adf46f6efdffe2fb1ce9342e3d09cb57c0732a68ba84376027bd71b5fec89e9e7b19
|
data/Gemfile.lock
CHANGED
data/lib/funktor/testing.rb
CHANGED
@@ -27,7 +27,12 @@ module Funktor
|
|
27
27
|
end
|
28
28
|
class Testing
|
29
29
|
|
30
|
+
# TODO : We probably shouldn't use middleware for this. We should alter the behavior
|
31
|
+
# of the JobPusher in the testing module isntead.
|
30
32
|
def self.inline!(&block)
|
33
|
+
unless block_given?
|
34
|
+
raise "Funktor inline testing mode can only be called in block form."
|
35
|
+
end
|
31
36
|
Funktor.configure_job_pusher do |config|
|
32
37
|
config.job_pusher_middleware do |chain|
|
33
38
|
chain.add Funktor::InlineJobPusherMiddleware
|
@@ -41,12 +46,27 @@ module Funktor
|
|
41
46
|
end
|
42
47
|
end
|
43
48
|
def self.fake!(&block)
|
44
|
-
|
45
|
-
|
46
|
-
|
49
|
+
if block_given?
|
50
|
+
Funktor.configure_job_pusher do |config|
|
51
|
+
config.job_pusher_middleware do |chain|
|
52
|
+
chain.add Funktor::FakeJobPusherMiddleware
|
53
|
+
end
|
54
|
+
end
|
55
|
+
yield
|
56
|
+
Funktor.configure_job_pusher do |config|
|
57
|
+
config.job_pusher_middleware do |chain|
|
58
|
+
chain.remove Funktor::FakeJobPusherMiddleware
|
59
|
+
end
|
60
|
+
end
|
61
|
+
else
|
62
|
+
Funktor.configure_job_pusher do |config|
|
63
|
+
config.job_pusher_middleware do |chain|
|
64
|
+
chain.add Funktor::FakeJobPusherMiddleware
|
65
|
+
end
|
47
66
|
end
|
48
67
|
end
|
49
|
-
|
68
|
+
end
|
69
|
+
def self.disable!
|
50
70
|
Funktor.configure_job_pusher do |config|
|
51
71
|
config.job_pusher_middleware do |chain|
|
52
72
|
chain.remove Funktor::FakeJobPusherMiddleware
|
data/lib/funktor/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: funktor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Green
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-08-
|
11
|
+
date: 2021-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-sqs
|