|
|
@@ -37,12 +37,12 @@ module Agents
|
37
|
37
|
end
|
38
|
38
|
|
39
|
39
|
def working?
|
40
|
|
- event_created_within?(interpolated[:expected_update_period_in_days]) && !received_event_without_error?
|
|
40
|
+ event_created_within?(interpolated['expected_update_period_in_days']) && !received_event_without_error?
|
41
|
41
|
end
|
42
|
42
|
|
43
|
43
|
def check
|
44
|
|
- api = DropboxAPI.new(interpolated[:access_token])
|
45
|
|
- current_contents = api.dir(interpolated[:dir_to_watch])
|
|
44
|
+ api = DropboxAPI.new(interpolated['access_token'])
|
|
45
|
+ current_contents = api.dir(interpolated['dir_to_watch'])
|
46
|
46
|
diff = DropboxDirDiff.new(previous_contents, current_contents)
|
47
|
47
|
create_event(payload: diff.to_hash) unless previous_contents.nil? || diff.empty?
|
48
|
48
|
|