huginn_netlify_status_agent 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d80deb05ae4081d6994f47acf1664c34d64364cfb47d5ba93bb535dcddc6564
4
- data.tar.gz: d6359c3286a6bb5f1e6808289b59753229b337a58c7a8219db93bff8b5754ca9
3
+ metadata.gz: e24159895b4a17f75bc5a7429562f75614ceed2e32da4a4c0d9e52ce3da8f34f
4
+ data.tar.gz: d7ec7c18ff500e5ae1f8566ef91b5d065b86e3321ad443d5e2a9940facc4955a
5
5
  SHA512:
6
- metadata.gz: cd8c8144a877e8b940360b8373a5a58ceff8112bc72c2b93a1aa11e32d203e619349e6681e04f503d37ca13304673d1193fca601e1c4d7c8483bddbcf449e275
7
- data.tar.gz: 95a6b5c46975c5abde6d5b629cb29f7ce302262b0d4384d6c471d562149518203e6e37a92706dab52afb8790da5d7588917f5b9886288f4df9259b3a2af04eb2
6
+ metadata.gz: 0da55ec0ce2dfb27cbfe44907fa02523243bd2586427923a53b20e795a46a887bc5dcb8101c1931baa0cb7f0cae3cd4ddb768c6e1c8ead60b080f7314fe3f5f3
7
+ data.tar.gz: 38a89eafadef56b39d9240befe5cf80e0205e9aa5e80e90cc93023afeed6ebd0dc5ece0a2bd5ea7288ea955373dcaf5e11ba419948a48dca1bb16a2aa60eaf4e
@@ -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
@@ -36,6 +38,7 @@ module Agents
36
38
  }
37
39
  end
38
40
 
41
+ form_configurable :debug, type: :boolean
39
42
  form_configurable :expected_receive_period_in_days, type: :string
40
43
  form_configurable :changes_only, type: :boolean
41
44
 
@@ -69,7 +72,6 @@ module Agents
69
72
  log "request status : #{code}"
70
73
 
71
74
  if interpolated['debug'] == 'true'
72
- log "request status : #{code}"
73
75
  log "body"
74
76
  log body
75
77
  end
@@ -89,8 +91,12 @@ module Agents
89
91
 
90
92
  if interpolated['changes_only'] == 'true'
91
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
92
99
  memory['last_status'] = payload
93
- create_event payload: event
94
100
  end
95
101
  else
96
102
  create_event payload: event
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: huginn_netlify_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