a few more fixes

This commit is contained in:
John Bintz 2012-03-19 17:10:23 -04:00
parent 2be2edb910
commit b6db1384d6
2 changed files with 5 additions and 2 deletions

View File

@ -43,13 +43,13 @@ module Flowerbox::Result
end end
def first_local_stack def first_local_stack
@first_local_stack ||= stack[1..-1].find do |line| @first_local_stack ||= stack.find do |line|
!system_files.any? { |file| line[%r{\(#{file}}] } !system_files.any? { |file| line[%r{\(#{file}}] }
end || stack[1] || '' end || stack[1] || ''
end end
def exception? def exception?
stack[0][%r{^.+Error: }] (stack[0] || '')[%r{^.+Error: }]
end end
end end
end end

View File

@ -2,6 +2,7 @@ require 'sprockets'
require 'sprockets/engines' require 'sprockets/engines'
require 'forwardable' require 'forwardable'
require 'sprockets-vendor_gems' require 'sprockets-vendor_gems'
require 'fileutils'
module Flowerbox module Flowerbox
class SprocketsHandler class SprocketsHandler
@ -39,6 +40,8 @@ module Flowerbox
return @environment if @environment return @environment if @environment
@environment = Sprockets::Environment.new @environment = Sprockets::Environment.new
FileUtils.rm_rf(Flowerbox.cache_dir)
@environment.cache = Sprockets::Cache::FileStore.new(Flowerbox.cache_dir) @environment.cache = Sprockets::Cache::FileStore.new(Flowerbox.cache_dir)
self.class.gem_asset_paths.each { |path| append_path(path) } self.class.gem_asset_paths.each { |path| append_path(path) }