lib/rango/utils.rb in rango-0.1.0 vs lib/rango/utils.rb in rango-0.1.1

- old
+ new

@@ -1,13 +1,18 @@ # encoding: utf-8 +require "rack" + +# class App +# extend Rango::Utils +# def load_rackup +# super(File.join(File.join(self.root, "config.ru")), "config.ru") +# end +# end module Rango module Utils extend self def load_rackup(path = "config.ru") - fullpath = File.join(Project.root, "config.ru") - Rango.logger.debug("Parsing #{fullpath}") - rackup = File.read(fullpath) - eval("Rack::Builder.new {( #{rackup}\n )}.to_app", nil, fullpath) + eval("Rack::Builder.new {( #{File.read(path)}\n )}.to_app", nil, File.expand_path(path)) end end end \ No newline at end of file