app/controllers/application_controller.rb in local_pac-0.1.13 vs app/controllers/application_controller.rb in local_pac-0.2.0
- old
+ new
@@ -2,15 +2,17 @@
require 'haml'
require 'i18n'
require 'i18n/backend/fallbacks'
require 'rack/contrib/locale'
require 'sprockets-helpers'
+require 'sass'
+require 'sinatra'
module LocalPac
module App
class ApplicationController < Sinatra::Base
- set :root, File.expand_path('../../', __FILE__)
+ set :root, ::File.expand_path('../../', __FILE__)
set :haml, :format => :html5
def local_storage
return @local_storage if @local_storage
@@ -58,17 +60,17 @@
set :raise_errors, true
end
configure :test do
use Rack::CommonLogger, LocalPac::NullAccessLogger.new
- set :raise_errors, true
+ set :raise_errors, false
end
configure do
mime_type :proxy_pac_file, 'application/x-ns-proxy-autoconfig'
I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks)
- I18n.load_path = Dir[File.join(settings.root, 'locales', '*.yml')]
+ I18n.load_path = Dir[::File.join(settings.root, 'locales', '*.yml')]
I18n.backend.load_translations
I18n.enforce_available_locales = true
end