birdel 3.0.1 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/birdel/rona/rona_actor.rb +7 -20
- data/lib/birdel/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: 0d8dc0e1d0da67142ec9296c5e70777e05d9f8b87d28d6b21756b936b4cc1a84
|
4
|
+
data.tar.gz: d77fbe9c10748d5e0bc2fe9b2742c4d28850284547d5ba7fbe0c9a625e8dffb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ee6adc2be2799c44781375f11a3eecc1aa47624950a1fff35c6b18e3bb07f5ab4bea04d374e3fe35549f13655979393d9fa19a5e4951f75d5d968cd63aba9fe
|
7
|
+
data.tar.gz: 32e59e1b6d4e11e8ca800c0cf29f7185bb35c401a1e2240dfc86ac09f35f278789b9dd230a9506335659ca5833f661795df5b119cb792b2fa345c3afb4d26327
|
@@ -28,28 +28,15 @@ module Birdel
|
|
28
28
|
end
|
29
29
|
if callback
|
30
30
|
res[:callback] = callback
|
31
|
-
|
31
|
+
# first - check if Actor method returned specific resource_id
|
32
|
+
# otherwise - set resource_id from callback if it exists or set false
|
33
|
+
if method_res[:resource_id].present?
|
34
|
+
res[:callback][:resourceId] = method_res[:resource_id]
|
35
|
+
else
|
36
|
+
res[:callback][:resourceId] = callback[:resource_id].present? ? callback[:resource_id] : false
|
37
|
+
end
|
32
38
|
ActionCable.server.broadcast(self.first_stream, res)
|
33
39
|
end
|
34
40
|
end
|
35
|
-
|
36
|
-
def actorDirect(data)
|
37
|
-
inputs = data.fetch("inputs")
|
38
|
-
callback = data.fetch("callback")
|
39
|
-
required_component = data.fetch("required_component")
|
40
|
-
component_name = required_component.split('--').map{|i| i.gsub("-", "_").camelize}.join('::') + '::' + required_component.split('--').last.gsub("-", "_").camelize
|
41
|
-
component = component_name.constantize.new(inputs: inputs)
|
42
|
-
res = {
|
43
|
-
"ok": true,
|
44
|
-
"message": "Actor Direct",
|
45
|
-
"data": {
|
46
|
-
"outputs": inputs,
|
47
|
-
"html": ApplicationController.render(component, layout: false)
|
48
|
-
}
|
49
|
-
}
|
50
|
-
res[:callback] = callback
|
51
|
-
res[:callback][:resourceId] = callback[:resource_id]
|
52
|
-
ActionCable.server.broadcast(self.first_stream, res)
|
53
|
-
end
|
54
41
|
end
|
55
42
|
end
|
data/lib/birdel/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: birdel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Serhii
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Send json messages to your actors and get view_components back! Now you
|
14
14
|
can be sure that your actors are processed correctly.
|