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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f3acff47990af640d828a95ba79aea6c15e1e16bbe76239fe9ea74ec9f529bfb
4
- data.tar.gz: 948fa2fee5a0a56d12bc18fcc229202c7bfabd010ca35c7b3556bbdbb4be5c87
3
+ metadata.gz: 22cd0a954af5b03bd350798b00e8e8547fae2daabaed54178b43f5607d71d4f3
4
+ data.tar.gz: 4ffc2de719267392a7fed8850bde5820e58e238c4188cfb9ca49c2e0e92fde0c
5
5
  SHA512:
6
- metadata.gz: b179cea2f12b99817495762ad360125915dcd7908500a485310cfeafdf74ff47211d6ef44d5a0af2e419580aaec4e1e6b8f3b40af1484cdbb64d4c66ea32e3e0
7
- data.tar.gz: 68670e1a970f8401105fd0b8ec9af379bd1b72d0038dabdadd8c6a3c8fd8d2540faa33cb8dac645b33102d793cbce674d29ab59cfc6cf3c3c74e832c62ce50df
6
+ metadata.gz: cb424ee6d762cbc0d3089d5004f4926a073b737e2b8f6c2947cdf85c63eaa97e0ad541f2b3bcecc1b8cbdedb37696b75c60753e348e3eac4b776ecdf2f8bbf6f
7
+ data.tar.gz: fce78ca5daa2ed35728445f8ed7118b05c7c5b8be1c90c574390cec0376f75991a29827090381bb2e7b9bad63f51179f1b778125e73f47c8c30e028da5c3a563
@@ -3,7 +3,7 @@
3
3
  module Brainiac
4
4
  module Plugins
5
5
  module Zoho
6
- VERSION = "0.0.3"
6
+ VERSION = "0.0.4"
7
7
  end
8
8
  end
9
9
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brainiac-zoho
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Davis