Commit 49f0fb6d authored by Benjamin Neff's avatar Benjamin Neff Committed by Dennis Schubert

replace silence_assets.rb with quiet_assets gem

parent 47672dcd
......@@ -280,4 +280,7 @@ group :development, :test do
gem "jasmine-jquery-rails", "2.0.3"
gem "rails-assets-jasmine-ajax", "3.1.1", source: "https://rails-assets.org"
gem "sinon-rails", "1.10.3"
# silence assets
gem "quiet_assets", "1.1.0"
end
......@@ -468,6 +468,8 @@ GEM
pry (~> 0.10)
pry-debundle (0.8)
pry
quiet_assets (1.1.0)
railties (>= 3.1, < 5.0)
rack (1.6.1)
rack-cors (0.4.0)
rack-google-analytics (1.2.0)
......@@ -781,6 +783,7 @@ DEPENDENCIES
pry
pry-byebug
pry-debundle
quiet_assets (= 1.1.0)
rack-cors (= 0.4.0)
rack-google-analytics (= 1.2.0)
rack-piwik (= 0.3.0)
......
if Rails.env.development?
Rails.application.assets.logger = Logger.new('/dev/null')
Rails::Rack::Logger.class_eval do
def call_with_quiet_assets(env)
previous_level = Rails.logger.level
Rails.logger.level = Logger::ERROR if env['PATH_INFO'] =~ %r{^/assets/}
call_without_quiet_assets(env)
ensure
Rails.logger.level = previous_level
end
alias_method_chain :call, :quiet_assets
end
end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment