summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2015-02-06 15:59:23 -0700
committermo khan <mo@mokhan.ca>2015-02-06 15:59:23 -0700
commita40fcc86d2e2e377d952f4cb295ea12c6908ba22 (patch)
tree6c68a7e1c441a8081e7246ca2fa61f01fe58552a /lib/tasks
parentda5be7628a1942e033e091e38cc7687ecb346b90 (diff)
extract endpoint.
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/agent.rake7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/tasks/agent.rake b/lib/tasks/agent.rake
index 98aa2d5..26d3982 100644
--- a/lib/tasks/agent.rake
+++ b/lib/tasks/agent.rake
@@ -1,21 +1,22 @@
namespace :agent do
require 'fake_agent'
+ ENDPOINT='http://localhost:3000'
desc "watch all files"
task watch: :environment do
- agent = FakeAgent.new(Agent.first.id, 'http://localhost:3000')
+ agent = FakeAgent.new(Agent.first.id, ENDPOINT)
agent.watch(Dir.pwd)
end
desc "scan directory"
task scan: :environment do
- agent = FakeAgent.new(Agent.first.id, 'http://localhost:3000')
+ agent = FakeAgent.new(Agent.first.id, ENDPOINT)
agent.scan(Dir.pwd)
end
desc "scan network traffic"
task nfm: :environment do
- agent = FakeAgent.new(Agent.first.id, 'http://localhost:3000')
+ agent = FakeAgent.new(Agent.first.id, ENDPOINT)
agent.sniff('en1')
end
end