lib/jammit.rb in ghazel-jammit-0.4.4.1 vs lib/jammit.rb in ghazel-jammit-0.4.4.2
- old
+ new
@@ -124,15 +124,17 @@
@template_namespace = value == true || value.nil? ? DEFAULT_JST_NAMESPACE : value.to_s
end
# The YUI Compressor requires Java > 1.4, and Closure requires Java > 1.6.
def self.check_java_version
+ return true if @checked_java_version
java = @compressor_options[:java] || 'java'
@css_compressor_options[:java] ||= java if @compressor_options[:java]
version = (`#{java} -version 2>&1`)[/\d+\.\d+/]
disable_compression if !version ||
(@javascript_compressor == :closure && version < '1.6') ||
(@javascript_compressor == :yui && version < '1.4')
+ @checked_java_version = true
end
# If we don't have a working Java VM, then disable asset compression and
# complain loudly.
def self.disable_compression