summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2015-02-04 23:01:49 -0700
committermo khan <mo@mokhan.ca>2015-02-04 23:01:49 -0700
commitf310f6b62165333c73f3f76d1ea14e201f4c884f (patch)
tree1e0f56b58a83c6f9f43df4acd3e5d2a54244677c /lib
parent5e6e2246203d6894a18447aef22bec39d8736794 (diff)
correct format of cloud query message.
Diffstat (limited to 'lib')
-rw-r--r--lib/fake_agent.rb7
1 files 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)