Created
May 7, 2014 08:44
-
-
Save erlend/3f16cac45dd64be5a36f to your computer and use it in GitHub Desktop.
Revisions
-
erlend created this gist
May 7, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ require 'bundler' Bundler.setup :default require 'sinatra/base' require 'sprockets' require './app' map '/assets' do environment = Sprockets::Environment.new environment.append_path 'assets/javascripts' environment.append_path 'assets/stylesheets' environment.append_path 'assets/images' # Load assets from gems $:.each do |path| assets = File.join(path, "..", "vendor", "assets") ["javascripts", "stylesheets", "images"].each do |type| dir = File.join(assets, type) environment.append_path dir if File.directory?(dir) end end run environment end map '/' do run Sinatra::Application end