def compress_js(uncompressed)
      if options[:compressor] == 'yui'
        begin
          require "yui/compressor"
        rescue LoadError
          raise "You must install the yui compressor gem to use the compressor\ngem install yui-compressor"
        end
        compressor = ::YUI::JavaScriptCompressor.new
      else
        begin
          require 'closure-compiler'
        rescue LoadError
          raise "You must install the closure compiler gem to use the compressor\ngem install closure-compiler"
        end
        compressor = ::Closure::Compiler.new
      end
      begin
        compressor.compress(uncompressed)
      rescue Exception => e
        logger.error e.message
      end
    end
def compress_js(uncompressed)
      if options[:compressor] == 'yui'
        begin
          require "yui/compressor"
        rescue LoadError
          raise "You must install the yui compressor gem to use the compressor\ngem install yui-compressor"
        end
        compressor = ::YUI::JavaScriptCompressor.new
      else
        begin
          require 'closure-compiler'
        rescue LoadError
          raise "You must install the closure compiler gem to use the compressor\ngem install closure-compiler"
        end
        compressor = ::Closure::Compiler.new
      end
      begin
        compressor.compress(uncompressed)
      rescue Exception => e
        logger.error e.message
      end
    end
Run the uncompressed js through a JS compressor (closure-compiler) by
 default. Setting options[:compressor] == 'yui' will force the YUI JS Compressor