lib/snapdragon/web_application.rb in snapdragon-0.1.6 vs lib/snapdragon/web_application.rb in snapdragon-0.1.7
- old
+ new
@@ -2,11 +2,11 @@
require 'erb'
module Snapdragon
class WebApplication < Sinatra::Base
set :static, false
- set :root, File.expand_path('.', File.dirname(__FILE__))
+ set :root, ::File.expand_path('.', ::File.dirname(__FILE__))
def initialize(app = nil, suite)
super()
@suite = suite
end
@@ -14,17 +14,17 @@
get "/run" do
erb :run
end
get "/jasmine-core/*" do |path|
- send_file File.expand_path(File.join('../jasmine/lib/jasmine-core', path), File.dirname(__FILE__))
+ send_file ::File.expand_path(::File.join('../jasmine/lib/jasmine-core', path), ::File.dirname(__FILE__))
end
get "/resources/*" do |path|
- send_file File.expand_path(File.join('resources', path), File.dirname(__FILE__))
+ send_file ::File.expand_path(::File.join('resources', path), ::File.dirname(__FILE__))
end
get "/*" do |path|
- send_file File.expand_path(File.join('.', path))
+ send_file ::File.expand_path(::File.join('.', path))
end
end
end