Skip to content

Instantly share code, notes, and snippets.

@famulus
Created February 19, 2013 22:32
Show Gist options
  • Save famulus/4990793 to your computer and use it in GitHub Desktop.
Save famulus/4990793 to your computer and use it in GitHub Desktop.
get '/*' do
@settings = JSON.parse(File.read(settings_path))
file_path = File.join(File.dirname(@settings['promo_src']),params[:splat] )
puts "OKOK:#{file_path}"
if File.exists?(file_path)
data = File.open(file_path, 'rb') { |f| f.read }
return [200,{"Content-type" => "text/css"},data]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment