From cd94062207c96e57d5c4a41c0633ecd646e383eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Wed, 16 Mar 2016 08:58:26 +0100 Subject: [PATCH] Correct for sprockets upgrade --- config/application.rb | 16 ---------------- lib/open_project/themes/theme_finder.rb | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/config/application.rb b/config/application.rb index 6944d36220..3653e1d65a 100644 --- a/config/application.rb +++ b/config/application.rb @@ -127,22 +127,6 @@ module OpenProject # Configure the default encoding used in templates for Ruby 1.9. config.encoding = 'utf-8' - # Whitelist assets to be precompiled. - # - # This is a workaround for an issue where the precompilation process will - # fail on extensionless files (README, LICENSE, etc.) - # See: https://github.com/sstephenson/sprockets/issues/347 - precompile_whitelist = %w( - .html .erb .haml - .png .jpg .gif .jpeg .ico - .eot .otf .svc .woff .ttf - .svg - ) - config.assets.precompile.shift - config.assets.precompile.unshift -> (path) { - (extension = File.extname(path)).present? and extension.in?(precompile_whitelist) - } - # Enable escaping HTML in JSON. config.active_support.escape_html_entities_in_json = true diff --git a/lib/open_project/themes/theme_finder.rb b/lib/open_project/themes/theme_finder.rb index cc3b58f461..9e12765515 100644 --- a/lib/open_project/themes/theme_finder.rb +++ b/lib/open_project/themes/theme_finder.rb @@ -65,7 +65,7 @@ module OpenProject # we need to wrap the call to #stylesheet_manifest in a Proc, # because when this code is executed the theme instance (theme) hasn't had # a chance to override the method yet - Rails.application.config.assets.precompile << -> (path) { + Rails.application.config.assets.precompile << -> (path,*args) { return if theme.abstract? theme.stylesheet_manifest == path