lib/cuboid/rest/server.rb in cuboid-0.0.5 vs lib/cuboid/rest/server.rb in cuboid-0.1.0

- old
+ new

@@ -21,11 +21,11 @@ register service end end register Routes::Instances - register Routes::Dispatcher + register Routes::Agent register Routes::Grid register Routes::Scheduler use Rack::Deflater use Rack::Session::Pool @@ -79,13 +79,13 @@ return if exists? id halt 404, json( "Scan not found for id: #{h id}." ) end - def ensure_dispatcher! - return if dispatcher - halt 501, json( 'No Dispatcher has been set.' ) + def ensure_agent! + return if agent + halt 501, json( 'No Agent has been set.' ) end def ensure_scheduler! return if scheduler halt 501, json( 'No Scheduler has been set.' ) @@ -112,10 +112,10 @@ class <<self include Cuboid::UI::Output def reset @@instances.clear - @@dispatchers.clear + @@agents.clear end def run!( options ) set :username, options[:username] set :password, options[:password]