diff --git a/README.textile b/README.textile index 92e82e8..621d857 100644 --- a/README.textile +++ b/README.textile @@ -2,7 +2,7 @@ h1. The Closure Compiler (as a Ruby Gem) The *closure-compiler* gem is a svelte wrapper around the "Google Closure Compiler":http://code.google.com/closure/compiler/ for JavaScript compression. -Latest Version: *"1.1.2":http://gemcutter.org/gems/closure-compiler* +Latest Version: *"1.1.3":http://gemcutter.org/gems/closure-compiler* The Closure Compiler's *2011-08-11* JAR-file is included with the gem. diff --git a/closure-compiler.gemspec b/closure-compiler.gemspec index 0abc3ad..fb018fc 100644 --- a/closure-compiler.gemspec +++ b/closure-compiler.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = 'closure-compiler' - s.version = '1.1.2' # Keep version in sync with closure-compiler.rb + s.version = '1.1.3' # Keep version in sync with closure-compiler.rb s.date = '2011-08-12' s.homepage = "http://github.com/documentcloud/closure-compiler/" diff --git a/lib/closure-compiler-20110322.jar b/lib/closure-compiler-20110322.jar new file mode 100755 index 0000000..65e6d09 Binary files /dev/null and b/lib/closure-compiler-20110322.jar differ diff --git a/lib/closure-compiler.rb b/lib/closure-compiler.rb index 7a290fa..1db7a01 100644 --- a/lib/closure-compiler.rb +++ b/lib/closure-compiler.rb @@ -1,6 +1,6 @@ module Closure - VERSION = "1.1.2" + VERSION = "1.1.3" COMPILER_VERSION = "20110811" diff --git a/lib/closure/compiler.rb b/lib/closure/compiler.rb index 6812137..aa0badd 100644 --- a/lib/closure/compiler.rb +++ b/lib/closure/compiler.rb @@ -9,12 +9,14 @@ class Error < StandardError; end # The Closure::Compiler is a basic wrapper around the actual JAR. There's not # much to see here. class Compiler + + DEFAULT_OPTIONS = {:warning_level => 'QUIET'} # When you create a Compiler, pass in the flags and options. def initialize(options={}) @java = options.delete(:java) || JAVA_COMMAND @jar = options.delete(:jar_file) || COMPILER_JAR - @options = serialize_options(options) + @options = serialize_options(DEFAULT_OPTIONS.merge(options)) end # Can compile a JavaScript string or open IO object. Returns the compiled