summaryrefslogtreecommitdiff
path: root/lib/tasks/agent.rake
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2015-02-04 22:14:05 -0700
committermo khan <mo@mokhan.ca>2015-02-04 22:14:05 -0700
commit6c1f2fc7e2253381dd3d7bea3295b4f8f8e51ffb (patch)
tree66908a555294804acc9a3933a7b037c9b65d971d /lib/tasks/agent.rake
parent1af4f1858830afb079e912e1be0c46f5c3ce6186 (diff)
add agent scan.
Diffstat (limited to 'lib/tasks/agent.rake')
-rw-r--r--lib/tasks/agent.rake11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/tasks/agent.rake b/lib/tasks/agent.rake
index 9fe156e..d00de1d 100644
--- a/lib/tasks/agent.rake
+++ b/lib/tasks/agent.rake
@@ -1,8 +1,15 @@
namespace :agent do
+ require 'fake_agent'
+
desc "watch all files"
task watch: :environment do
- require 'fake_agent'
agent = FakeAgent.new(Agent.first.id, 'http://localhost:3000')
- agent.run(Dir.pwd)
+ agent.watch(Dir.pwd)
+ end
+
+ desc "scan directory"
+ task scan: :environment do
+ agent = FakeAgent.new(Agent.first.id, 'http://localhost:3000')
+ agent.scan(Dir.pwd)
end
end