Business intelligence made simple
Only add assets to precompile list for Sprockets
Andrew Kane0ed6d9a58cb4
diff --git a/lib/blazer/engine.rb b/lib/blazer/engine.rbindex 4034d4ff..b9259171 100644--- a/lib/blazer/engine.rb+++ b/lib/blazer/engine.rb@@ -3,22 +3,24 @@ module Blazerisolate_namespace Blazerinitializer "blazer" do |app|- if defined?(Sprockets) && Sprockets::VERSION.to_i >= 4- app.config.assets.precompile += [- "blazer/application.js",- "blazer/application.css",- "blazer/glyphicons-halflings-regular.eot",- "blazer/glyphicons-halflings-regular.svg",- "blazer/glyphicons-halflings-regular.ttf",- "blazer/glyphicons-halflings-regular.woff",- "blazer/glyphicons-halflings-regular.woff2",- "blazer/favicon.png"- ]- else- # use a proc instead of a string- app.config.assets.precompile << proc { |path| path =~ /\Ablazer\/application\.(js|css)\z/ }- app.config.assets.precompile << proc { |path| path =~ /\Ablazer\/.+\.(eot|svg|ttf|woff|woff2)\z/ }- app.config.assets.precompile << proc { |path| path == "blazer/favicon.png" }+ if defined?(Sprockets)+ if Sprockets::VERSION.to_i >= 4+ app.config.assets.precompile += [+ "blazer/application.js",+ "blazer/application.css",+ "blazer/glyphicons-halflings-regular.eot",+ "blazer/glyphicons-halflings-regular.svg",+ "blazer/glyphicons-halflings-regular.ttf",+ "blazer/glyphicons-halflings-regular.woff",+ "blazer/glyphicons-halflings-regular.woff2",+ "blazer/favicon.png"+ ]+ else+ # use a proc instead of a string+ app.config.assets.precompile << proc { |path| path =~ /\Ablazer\/application\.(js|css)\z/ }+ app.config.assets.precompile << proc { |path| path =~ /\Ablazer\/.+\.(eot|svg|ttf|woff|woff2)\z/ }+ app.config.assets.precompile << proc { |path| path == "blazer/favicon.png" }+ endendBlazer.time_zone ||= Blazer.settings["time_zone"] || Time.zone