Commit f310f6b
Changed files (1)
lib
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)