lib/gumdrop/server.rb in gumdrop-0.7.5 vs lib/gumdrop/server.rb in gumdrop-0.8.0

- old
+ new

@@ -3,21 +3,21 @@ require 'sinatra/base' require 'logger' module Gumdrop - STATIC_ASSETS= %w(.jpg .jpe .jpeg .gif .ico .png) + STATIC_ASSETS= %w(.jpg .jpe .jpeg .gif .ico .png .swf) class Server < Sinatra::Base - site_file= Gumdrop.fetch_site_file - unless site_file.nil? - site= Site.new site_file + site= Gumdrop.fetch_site + + unless site.nil? site.rescan() set :port, site.config.server_port if site.config.server_port if site.config.proxy_enabled - require 'gumdrop/proxy_handler' + require 'gumdrop/support/proxy_handler' get '/-proxy/*' do handle_proxy(params, env) end post '/-proxy/*' do handle_proxy(params, env) end put '/-proxy/*' do handle_proxy(params, env) end delete '/-proxy/*' do handle_proxy(params, env) end patch '/-proxy/*' do handle_proxy(params, env) end \ No newline at end of file