Commit f310f6b

mo khan <mo@mokhan.ca>
2015-02-05 06:01:49
correct format of cloud query message.
1 parent 5e6e224
Changed files (1)
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)