circuitry 3.1.1 → 3.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +10 -0
- data/lib/circuitry/config/publisher_settings.rb +6 -0
- data/lib/circuitry/config/shared_settings.rb +0 -6
- data/lib/circuitry/config/subscriber_settings.rb +11 -0
- data/lib/circuitry/middleware/entries/flush.rb +16 -0
- data/lib/circuitry/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bc47aba6103b9002f8ebb2bf01d117f70886734
|
4
|
+
data.tar.gz: 196235821765465563e4024ca84ffdd7c1073840
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec1fd3a9ec9a9439017ccb71ce08910de261630ca1b7e49cbe309271260cebf2fde55e6a232ab57e63e9567594440f657fc2ff29e52d46cd92ce2f55d916670a
|
7
|
+
data.tar.gz: 9e401d50cfbc1c3a3f17219410f6b88da1653e7ce850969bafef5784d321c3274df29c5642df5ec7e9eb6f7bbc9da7da5058693601ba839f5dcf05ddcd11e3f9
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -555,6 +555,16 @@ your middleware:
|
|
555
555
|
* `#clear`: Removes all middleware classes from the chain.
|
556
556
|
* `middleware.clear`
|
557
557
|
|
558
|
+
### Default Subscriber Middleware:
|
559
|
+
|
560
|
+
* `Circuitry::Middleware::Entries::Flush`: ensures any pending async publishes are run after a
|
561
|
+
message is received. Useful for publishes that happen as a result of processing received
|
562
|
+
messages.
|
563
|
+
|
564
|
+
### Default Publisher Middleware:
|
565
|
+
|
566
|
+
None.
|
567
|
+
|
558
568
|
## Testing
|
559
569
|
|
560
570
|
Circuitry provides a simple option for testing publishing and subscribing without actually hitting
|
@@ -16,12 +16,6 @@ module Circuitry
|
|
16
16
|
base.attribute :async_strategy, Symbol, default: ->(_page, _att) { :fork }
|
17
17
|
end
|
18
18
|
|
19
|
-
def middleware
|
20
|
-
@_middleware ||= Middleware::Chain.new
|
21
|
-
yield @_middleware if block_given?
|
22
|
-
@_middleware
|
23
|
-
end
|
24
|
-
|
25
19
|
def aws_options
|
26
20
|
{
|
27
21
|
access_key_id: access_key,
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'virtus'
|
2
2
|
require 'circuitry/config/shared_settings'
|
3
|
+
require 'circuitry/middleware/entries/flush'
|
3
4
|
|
4
5
|
module Circuitry
|
5
6
|
module Config
|
@@ -27,6 +28,16 @@ module Circuitry
|
|
27
28
|
raise ConfigError, "invalid lock strategy \"#{value.inspect}\""
|
28
29
|
end
|
29
30
|
end
|
31
|
+
|
32
|
+
def middleware
|
33
|
+
@middleware ||= Middleware::Chain.new do |middleware|
|
34
|
+
middleware.add Middleware::Entries::Flush
|
35
|
+
end
|
36
|
+
|
37
|
+
yield @middleware if block_given?
|
38
|
+
|
39
|
+
@middleware
|
40
|
+
end
|
30
41
|
end
|
31
42
|
end
|
32
43
|
end
|
data/lib/circuitry/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: circuitry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Huggins
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-03-
|
12
|
+
date: 2016-03-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk
|
@@ -258,6 +258,7 @@ files:
|
|
258
258
|
- lib/circuitry/locks/redis.rb
|
259
259
|
- lib/circuitry/message.rb
|
260
260
|
- lib/circuitry/middleware/chain.rb
|
261
|
+
- lib/circuitry/middleware/entries/flush.rb
|
261
262
|
- lib/circuitry/middleware/entry.rb
|
262
263
|
- lib/circuitry/processor.rb
|
263
264
|
- lib/circuitry/processors/batcher.rb
|