Sha256: 087a4b5e2eab991c01a9d8d042215067b27643951e8c67bf0ccaf8cd1606083a

Contents?: true

Size: 1.14 KB

Versions: 25

Compression:

Stored size: 1.14 KB

Contents

module Spider
   
   module Master
      
       def self.app_init
          Spider.home.controller.route 'clients', Spider::Master::ScoutController
       end
       
       def self.scout_plugins
           path = Spider.conf.get('master.scout_plugins_path')
           return [] unless path
           res = []
           Dir.new(path).each do |dir|
               next if dir[0].chr == '.'
               next unless File.directory?(File.join(path, dir))
               res << dir
           end
           res
       end
       
       def self.url_for_server(id)
           id = id.id if id.is_a?(Spider::Model::BaseModel)
           server = Server.new(id)
           "#{self.url}/servers/#{server.id}"
       end
       
       def self.url_for_plugin(id)
           id = id.id if id.is_a?(Spider::Model::BaseModel)
           instance = ScoutPluginInstance.new(id)
           "#{self.url}/servers/#{instance.server.id}/plugins/#{id}"
       end
       
       def self.add_site_type(type)
           @site_types ||= []
           @site_types << type
       end
       
       def self.site_types
           @site_types ||= []
       end
       
   end
    
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
spiderfw-1.0.1 apps/master/master.rb
spiderfw-1.0.0 apps/master/master.rb
spiderfw-0.6.39 apps/master/master.rb
spiderfw-0.6.38 apps/master/master.rb
spiderfw-0.6.37 apps/master/master.rb
spiderfw-0.6.35 apps/master/master.rb
spiderfw-0.6.34 apps/master/master.rb
spiderfw-0.6.33 apps/master/master.rb
spiderfw-0.6.32 apps/master/master.rb
spiderfw-0.6.31 apps/master/master.rb
spiderfw-0.6.30 apps/master/master.rb
spiderfw-0.6.29 apps/master/master.rb
spiderfw-0.6.28 apps/master/master.rb
spiderfw-0.6.27 apps/master/master.rb
spiderfw-0.6.26 apps/master/master.rb
spiderfw-0.6.26.pre1 apps/master/master.rb
spiderfw-0.6.25 apps/master/master.rb
spiderfw-0.6.24 apps/master/master.rb
spiderfw-0.6.23 apps/master/master.rb
spiderfw-0.6.22 apps/master/master.rb