lib/embork/borkfile.rb in embork-0.0.6 vs lib/embork/borkfile.rb in embork-0.0.7
- old
+ new
@@ -35,11 +35,11 @@
class DSL
include Attributes
SUPPORTED_FRAMEWORKS = %w(bootstrap compass)
- SUPPORTED_COMPRESSORS = %w(closure_compiler uglifier)
+ SUPPORTED_COMPRESSORS = %w(closure_compiler uglify)
def initialize(environment, logger)
Embork.env = @environment = environment.to_sym
@asset_paths = []
@helpers = []
@@ -121,10 +121,12 @@
files = [ files ] unless files.kind_of? Array
@html.concat files
end
def compress_with(compressor)
- if SUPPORTED_COMPRESSORS.include? compressor.to_s
+ if compressor.class == Symbol && SUPPORTED_COMPRESSORS.include?(compressor.to_s)
+ @compressor = compressor
+ elsif compressor.class != String
@compressor = compressor
else
@logger.critical 'Compressor "%s" is not currently supported by embork.' % compressor.to_s
@logger.unknown ''
exit 1