summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
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)