Sha256: a13a5ef493c0edb7c71d4d01f3f7ffa9aa2e754c39d344707154c49e940798e4
Contents?: true
Size: 1.03 KB
Versions: 12
Compression:
Stored size: 1.03 KB
Contents
module Spider module Master 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_servant(id) id = id.id if id.is_a?(Spider::Model::BaseModel) servant = Servant.new(id) "#{self.url}/servants/#{servant.id}" end def self.url_for_plugin(id) id = id.id if id.is_a?(Spider::Model::BaseModel) instance = ScoutPluginInstance.new(id) "#{self.url}/servants/#{instance.servant.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
12 entries across 12 versions & 1 rubygems