-
-
Save bsingr/1125108 to your computer and use it in GitHub Desktop.
Revisions
-
jejacks0n created this gist
May 25, 2011 .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,31 @@ # For Rails 3.1 asset packaging / sprockets support # 1. Create a /config/evergreen.rb file and put these contents in it # 2. Adjust the paths below (the provided ones are generic) require ::File.expand_path('../application', __FILE__) module Evergreen class << self def application_with_additions(suite) app = application_without_additions(suite) app.map "/assets" do assets = Rails.application.config.assets paths = %W{app/assets/javascripts lib/assets/javascripts vendor/assets/javascripts}.map{ |p| File.join(suite.root, p) } if assets.enabled require 'sprockets' sprockets = Sprockets::Environment.new(suite.root) sprockets.static_root = File.join(suite.root, 'public', assets.prefix) sprockets.paths.concat paths sprockets.js_compressor = nil # is compression useful in specs? run sprockets end end app end alias_method :application_without_additions, :application alias_method :application, :application_with_additions end end