huginn_sinch_status_agent 0.1.11 → 0.1.12
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/huginn_sinch_status_agent/sinch_status_agent.rb +7 -2
- 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: 5c93e25d4186379ed5e9037228ffcc375b0014f37b580fc2a9f1ee637516b09a
|
4
|
+
data.tar.gz: 31fe2f6f7046140d55390f5a51cf7f593eb5d2f76c62d6b2e3806d475f703203
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53f428de6b6f9ff8683110be87ccab6039a7711da27503fcafb0c7f3e5ebf3a881589a49918905442f699003119e5fb6816dc81a5ce2bda90429df43d3fb78d6
|
7
|
+
data.tar.gz: c8d7fcf3929d9f0ca11a6335e3a3be5ae97260956e340f0887b1bf204f84a66dce9a4295c9f30f74dfb15c7172002f7d534fb735077669bc72112d4bf82745ef
|
@@ -12,6 +12,8 @@ module Agents
|
|
12
12
|
|
13
13
|
The `debug` can add verbosity.
|
14
14
|
|
15
|
+
`changes_only` is only used to emit event about a currency's change.
|
16
|
+
|
15
17
|
`expected_receive_period_in_days` is used to determine if the Agent is working. Set it to the maximum number of days
|
16
18
|
that you anticipate passing without this Agent receiving an incoming Event.
|
17
19
|
MD
|
@@ -70,7 +72,6 @@ module Agents
|
|
70
72
|
log "request status : #{code}"
|
71
73
|
|
72
74
|
if interpolated['debug'] == 'true'
|
73
|
-
log "request status : #{code}"
|
74
75
|
log "body"
|
75
76
|
log body
|
76
77
|
end
|
@@ -90,8 +91,12 @@ module Agents
|
|
90
91
|
|
91
92
|
if interpolated['changes_only'] == 'true'
|
92
93
|
if payload != memory['last_status']
|
94
|
+
if memory['last_status'].nil?
|
95
|
+
create_event payload: event
|
96
|
+
elsif !memory['last_status']['status'].nil? and memory['last_status']['status'].present? and payload['status'] != memory['last_status']['status']
|
97
|
+
create_event payload: event
|
98
|
+
end
|
93
99
|
memory['last_status'] = payload
|
94
|
-
create_event payload: event
|
95
100
|
end
|
96
101
|
else
|
97
102
|
create_event payload: event
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: huginn_sinch_status_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicolas Germain
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|