brainiac-zoho 0.0.3 → 0.0.4
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/brainiac/plugins/zoho/version.rb +1 -1
- data/lib/brainiac/plugins/zoho.rb +13 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 22cd0a954af5b03bd350798b00e8e8547fae2daabaed54178b43f5607d71d4f3
|
|
4
|
+
data.tar.gz: 4ffc2de719267392a7fed8850bde5820e58e238c4188cfb9ca49c2e0e92fde0c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cb424ee6d762cbc0d3089d5004f4926a073b737e2b8f6c2947cdf85c63eaa97e0ad541f2b3bcecc1b8cbdedb37696b75c60753e348e3eac4b776ecdf2f8bbf6f
|
|
7
|
+
data.tar.gz: fce78ca5daa2ed35728445f8ed7118b05c7c5b8be1c90c574390cec0376f75991a29827090381bb2e7b9bad63f51179f1b778125e73f47c8c30e028da5c3a563
|
|
@@ -22,6 +22,7 @@ module Brainiac
|
|
|
22
22
|
# @param app [Sinatra::Application] The running Brainiac server
|
|
23
23
|
def register(app)
|
|
24
24
|
Config.load!
|
|
25
|
+
register_agent_lifecycle_hooks!
|
|
25
26
|
setup_routes(app)
|
|
26
27
|
LOG.info "[Zoho] Plugin registered (webhook: /zoho)"
|
|
27
28
|
end
|
|
@@ -49,6 +50,18 @@ module Brainiac
|
|
|
49
50
|
|
|
50
51
|
private
|
|
51
52
|
|
|
53
|
+
def register_agent_lifecycle_hooks!
|
|
54
|
+
Brainiac.on(:agent_added) do |ctx|
|
|
55
|
+
Config.reload!
|
|
56
|
+
LOG.info "[Zoho] Agent added: #{ctx[:display_name]} — config reloaded" if defined?(LOG)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
Brainiac.on(:agent_removed) do |ctx|
|
|
60
|
+
Config.reload!
|
|
61
|
+
LOG.info "[Zoho] Agent removed: #{ctx[:agent_key]} — config reloaded" if defined?(LOG)
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
52
65
|
def setup_routes(app)
|
|
53
66
|
app.post "/zoho" do
|
|
54
67
|
content_type :json
|