Permalink
Browse files

Raise error if compressor is missing

  • Loading branch information...
1 parent a4438a5 commit 3185dedab3842e42da9b90a387363ba1b3399f3b @josh josh committed Oct 11, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/sprockets/compressing.rb
@@ -24,7 +24,7 @@ def css_compressor=(compressor)
return unless compressor
if compressor.is_a?(Symbol)
- compressor = compressors['text/css'][compressor]
+ compressor = compressors['text/css'][compressor] || raise(Error, "unknown compressor: #{compressor}")
end
if compressor.respond_to?(:compress)
@@ -54,7 +54,7 @@ def js_compressor=(compressor)
return unless compressor
if compressor.is_a?(Symbol)
- compressor = compressors['application/javascript'][compressor]
+ compressor = compressors['application/javascript'][compressor] || raise(Error, "unknown compressor: #{compressor}")
end
if compressor.respond_to?(:compress)

0 comments on commit 3185ded

Please sign in to comment.