huginn_sinch_status_agent 0.1.10 → 0.1.11
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 +8 -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: 10ae9e43546b0fe7f6f1dedac082f72b77144e027b98dcdaa83bf58b3d305fe0
|
4
|
+
data.tar.gz: 96afcd6906c7d3c5bfad587d0f2b248d48e0eea4f01ee49fc867a4b0185bfe6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74df29ec328d858a1e3f58f5c78632490cac981fd51abd1f8a40f293d08f9091041a6712eb06ebe702f7c9372456ef4076905c5bfb619993d871caac21c2e43c
|
7
|
+
data.tar.gz: 1ec1ad34f6a9afac0934dce83fb0c605a27b7743989d9067522852e4277cf407da5e9d155fded026219c1d463c2e865754262a2e4564489b95474a729b4f8dfa
|
@@ -10,6 +10,8 @@ module Agents
|
|
10
10
|
The Sinch agent fetches Sinch status.
|
11
11
|
I added this agent because with website agent, when indicator is empty for "all ok status", no event was created.
|
12
12
|
|
13
|
+
The `debug` can add verbosity.
|
14
|
+
|
13
15
|
`expected_receive_period_in_days` is used to determine if the Agent is working. Set it to the maximum number of days
|
14
16
|
that you anticipate passing without this Agent receiving an incoming Event.
|
15
17
|
MD
|
@@ -28,11 +30,13 @@ module Agents
|
|
28
30
|
|
29
31
|
def default_options
|
30
32
|
{
|
33
|
+
'debug' => 'false',
|
31
34
|
'expected_receive_period_in_days' => '2',
|
32
35
|
'changes_only' => 'true'
|
33
36
|
}
|
34
37
|
end
|
35
38
|
|
39
|
+
form_configurable :debug, type: :boolean
|
36
40
|
form_configurable :expected_receive_period_in_days, type: :string
|
37
41
|
form_configurable :changes_only, type: :boolean
|
38
42
|
|
@@ -42,6 +46,10 @@ module Agents
|
|
42
46
|
errors.add(:base, "if provided, changes_only must be true or false")
|
43
47
|
end
|
44
48
|
|
49
|
+
if options.has_key?('debug') && boolify(options['debug']).nil?
|
50
|
+
errors.add(:base, "if provided, debug must be true or false")
|
51
|
+
end
|
52
|
+
|
45
53
|
unless options['expected_receive_period_in_days'].present? && options['expected_receive_period_in_days'].to_i > 0
|
46
54
|
errors.add(:base, "Please provide 'expected_receive_period_in_days' to indicate how many days can pass before this Agent is considered to be not working")
|
47
55
|
end
|