Sha256: 975510b2ba4405c142802800ef54915f3f5486ba096af49858327f50694ffec5
Contents?: true
Size: 1.1 KB
Versions: 13
Compression:
Stored size: 1.1 KB
Contents
module Spider class HomeController < Controller include StaticContent route 'spider/public', Spider.controller, :prepend => 'public/' # route 'spider', Spider.controller def self.route_app(app) #app_path = app.name.gsub('::', '/') app_path = app.route_url route(app_path, app.controller, :ignore_case => true) self.app_routes << [app_path, app.controller] end def self.pub_path Spider.paths[:root]+'/public' end def self.pub_url HTTPMixin.reverse_proxy_mapping('/public') end def self.app_pub_path(app=nil) path = self.pub_path+'/apps' path += '/'+app.short_name if app path end def self.app_routes @app_routes ||= [] end def self.print_app_routes max_length = app_routes.inject(0){ |m, r| m > r[0].length ? m : r[0].length } app_routes.map{ |r| "#{r[0].ljust(max_length+3)} -> #{r[1]}"}.sort.join("\n") end end end
Version data entries
13 entries across 13 versions & 1 rubygems