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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1e2aae8cc56c4c7fa9351c28a7267eea415d794b63fa19c2657c373f0efd96bf
4
- data.tar.gz: c31bd3a5b324599aea77abad643972644c72496f7cd793d0071c381f7d9a8982
3
+ metadata.gz: 10ae9e43546b0fe7f6f1dedac082f72b77144e027b98dcdaa83bf58b3d305fe0
4
+ data.tar.gz: 96afcd6906c7d3c5bfad587d0f2b248d48e0eea4f01ee49fc867a4b0185bfe6b
5
5
  SHA512:
6
- metadata.gz: 9689bb0b5346c05d6c88c4fed6427abd1271405031670b7be215df1b6bdbf1e272cdfc533b35a2d09cf6a7690d9b0801e07409ad82b65a30cbf027c241d04c34
7
- data.tar.gz: 7c0108ec48b45a2ef15d7978307f4f2eb9a5e1c2344c9c68d1547bfe83820fdf1bfc2216f7cfd7b4d1cde4f2998b4d6af017a0f7479021f7c99073c5ac5482d8
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: huginn_sinch_status_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Germain