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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2b52b8aebfd053be349fb4bf517f30908874523541aa34380b8230e0ab751ee6
4
- data.tar.gz: f45a7c2e393b276177b7448ac2c81c26544df86bad74e2072204344ab6657568
3
+ metadata.gz: 8d94ef31a3eeefcc0da81890f83168ab12d427ed53144bb7b65af723b5b2a39f
4
+ data.tar.gz: bf7e0c0d492a5561ac7d90b429d594c64d3b6fdadde4abc75b5d937e60561b12
5
5
  SHA512:
6
- metadata.gz: b6dbb4af9b010e874381f52f9628552b5dff28dd04317fc095a3a96b87e408abec0daaf7484dffb9e3a853ba9b5c84c4fbe6e02d7812fd3cabcbd0f576cd3d8e
7
- data.tar.gz: d60a90c49f27bdf9fd8f7f3abcc43a3405887410a4551c1e0dd58952623f5f2294cb07a672e7b7f8eaf56c8b0c8b5ee10e5ddeec6ebb0d7dbc4bc64b06a62ee8
6
+ metadata.gz: 19dc49ea92ff06d03126e50fd2a871fe09b7e2552a8757391b761758772373bd2d99568928f6d967011185a12ba35ecb39d6f8275976fc1cc3c38258f157f4e9
7
+ data.tar.gz: d7eaf3c888e0a6741999199f56b2203ca3a35f539efab69852c83ef80f69adf46f6efdffe2fb1ce9342e3d09cb57c0732a68ba84376027bd71b5fec89e9e7b19
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- funktor (0.4.6)
4
+ funktor (0.4.7)
5
5
  activesupport
6
6
  aws-sdk-sqs (~> 1.37)
7
7
  thor
@@ -97,4 +97,4 @@ DEPENDENCIES
97
97
  webmock
98
98
 
99
99
  BUNDLED WITH
100
- 2.2.24
100
+ 2.2.25
@@ -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
- Funktor.configure_job_pusher do |config|
45
- config.job_pusher_middleware do |chain|
46
- chain.add Funktor::FakeJobPusherMiddleware
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
- yield
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
@@ -1,3 +1,3 @@
1
1
  module Funktor
2
- VERSION = "0.4.6"
2
+ VERSION = "0.4.7"
3
3
  end
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.6
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-02 00:00:00.000000000 Z
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