From f310f6b62165333c73f3f76d1ea14e201f4c884f Mon Sep 17 00:00:00 2001 From: mo khan Date: Wed, 4 Feb 2015 23:01:49 -0700 Subject: correct format of cloud query message. --- lib/fake_agent.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/fake_agent.rb b/lib/fake_agent.rb index 675df10..e0e4f7f 100644 --- a/lib/fake_agent.rb +++ b/lib/fake_agent.rb @@ -20,11 +20,14 @@ class FakeAgent end def scan(directory) - Dir["**/**/*"].each do |file| + Dir["Rakefile"].each do |file| next unless File.file?(file) url = "#{endpoint}/agents/#{id}/files/#{fingerprint_for(file)}" body = { - path: File.expand_path(file) + name: 'lookup', + data: { + path: File.expand_path(file) + } } response = Typhoeus.get(url, body: body) body = JSON.parse(response.body) -- cgit v1.2.3