summaryrefslogtreecommitdiff
path: root/lib/fake_agent.rb
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2015-02-04 22:15:57 -0700
committermo khan <mo@mokhan.ca>2015-02-04 22:15:57 -0700
commitfe98744802e9a029c9656c66bdfa34c551ac0ca2 (patch)
tree3a2301b03257838ff89feedc43053d8389b3ec1f /lib/fake_agent.rb
parent6c1f2fc7e2253381dd3d7bea3295b4f8f8e51ffb (diff)
include path to file in disposition query.
Diffstat (limited to 'lib/fake_agent.rb')
-rw-r--r--lib/fake_agent.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/fake_agent.rb b/lib/fake_agent.rb
index ac9f5bf..8146582 100644
--- a/lib/fake_agent.rb
+++ b/lib/fake_agent.rb
@@ -21,7 +21,10 @@ class FakeAgent
Dir["**/**/*"].each do |file|
next unless File.file?(file)
url = "#{endpoint}/agents/#{id}/files/#{fingerprint_for(file)}"
- response = Typhoeus.get(url)
+ body = {
+ path: File.expand_path(file)
+ }
+ response = Typhoeus.get(url, body: body)
body = JSON.parse(response.body)
puts body.inspect
case body["state"]