Commit a40fcc8

mo khan <mo@mokhan.ca>
2015-02-06 22:59:23
extract endpoint.
1 parent da5be76
Changed files (1)
lib
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