lib/gumdrop/server.rb in gumdrop-0.2.7 vs lib/gumdrop/server.rb in gumdrop-0.2.8
- old
+ new
@@ -9,15 +9,20 @@
set :port, Gumdrop.config.port if Gumdrop.config.port
# get '/' do
# redirect '/index.html'
# end
+
+ Gumdrop.run :dry_run=>true
get '/*' do
-
- Gumdrop.run :dry_run=>true if Gumdrop.config.force_reload
-
file_path= get_content_path params[:splat].join('/')
+
+ if Gumdrop.config.force_reload
+ unless %w(.css .js .jpg .jpe .jpeg .gif .ico .png).include? File.extname(file_path).to_s
+ Gumdrop.run :dry_run=>true
+ end
+ end
if Gumdrop.site.has_key? file_path
content= Gumdrop.site[file_path]
if content.useLayout?
content_type :css if content.ext == '.css' # Meh?
\ No newline at end of file