downstream 1.3.0 → 1.4.0

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: 5ceb9c34b8c3146b89ff1a6668ebadc7b4306abdf5b113fca512b1d2fb27cb64
4
- data.tar.gz: 18986657d7665ecd183224025d72ace1013c6ebc3351792863cacca250ff16e7
3
+ metadata.gz: 0770f84f43315d12f61f304600f5bdbb45679de5fc32820a6d599fdab4f0028d
4
+ data.tar.gz: aa877161f770583a778578d165b36e61df405eeecc4522ffe8af212085f5f2d7
5
5
  SHA512:
6
- metadata.gz: 880ea8f11ba29203402f975c523ac695af7befd8c5824a38805d4c48deec84123f0331f354296fe741cfd1341ba29a38c1f6273a4cdb0dccafc312536aa72de1
7
- data.tar.gz: 06faab1f5d2a5d4be4d5a6e82109c197de85e7306f8b6a11d64d304206bf8fe220a3bd1b74dd61a25cb4cf104f1cffae9d5514aea75c60823c6d687e58fe0ac2
6
+ metadata.gz: 7c245ff4501fbd5d1efd3d17958a2784d9cf2ff28037c647a7b25a89f6cafd13c716947f7a0fc94b50c64952e5a175a6117858ef7c94bc339119f01e4bda98b8
7
+ data.tar.gz: 97defc1ff2d152767d833b4be84ac9b9c1202dce8f0e0673c7f5a25af09763b1ff54ea61839e7dfe1c9d16ebb6f45a8efff5d43d87d6494f193387f341b971a1
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  # Downstream
5
5
 
6
- This gem provides a straightforward way to implement communication between Rails Engines using the Publish-Subscribe pattern. The gem allows decreasing decoupling engines with events. An event is a recorded object in the system that reflects an action that the engine performs, and the params that lead to its creation.
6
+ This gem provides a straightforward way to implement communication between Rails Engines using the Publish-Subscribe pattern. The gem allows decreasing the coupling of engines with events. An event is a recorded object in the system that reflects an action that the engine performs, and the params that lead to its creation.
7
7
 
8
8
  The gem inspired by [`active_event_store`](https://github.com/palkan/active_event_store), and initially based on its codebase. Having said that, it does not store in a database all happened events which ensures simplicity and performance.
9
9
 
@@ -17,10 +17,10 @@ module Downstream
17
17
 
18
18
  def pubsub=(value)
19
19
  @pubsub = case value
20
- when String, Symbol
21
- lookup_pubsub(value)
22
- else
23
- value
20
+ when String, Symbol
21
+ lookup_pubsub(value)
22
+ else
23
+ value
24
24
  end
25
25
  end
26
26
 
@@ -19,7 +19,7 @@ module Downstream
19
19
  end
20
20
 
21
21
  def publish(identifier, event)
22
- ActiveSupport::Notifications.publish(identifier, event)
22
+ ActiveSupport::Notifications.instrument(identifier, event)
23
23
  end
24
24
  end
25
25
  end
@@ -16,7 +16,7 @@ module Downstream
16
16
  !!async
17
17
  end
18
18
 
19
- def call(_name, event)
19
+ def call(_name, _start, _finish, _id, event)
20
20
  if async?
21
21
  if callable.is_a?(Proc) || callable.name.nil?
22
22
  raise ArgumentError, "Anonymous subscribers (blocks/procs/lambdas or anonymous modules) cannot be asynchronous"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Downstream
4
- VERSION = "1.3.0"
4
+ VERSION = "1.4.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: downstream
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - merkushin.m.s@gmail.com
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2021-11-02 00:00:00.000000000 Z
12
+ date: 2022-05-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: after_commit_everywhere
@@ -31,14 +31,14 @@ dependencies:
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: '0.5'
34
+ version: '1.0'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: '0.5'
41
+ version: '1.0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rails
44
44
  requirement: !ruby/object:Gem::Requirement
@@ -219,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
219
219
  - !ruby/object:Gem::Version
220
220
  version: '0'
221
221
  requirements: []
222
- rubygems_version: 3.1.2
222
+ rubygems_version: 3.2.32
223
223
  signing_key:
224
224
  specification_version: 4
225
225
  summary: Straightforward way to implement communication between Rails Engines using