Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Allow java vm flags to be passed in #9

Closed
wants to merge 4 commits into from

7 participants

@scudco

One of the smaller servers I use yui-compressor on seems to blow up unless I set the -Xmx64M flag. This is just a small commit to allow the initializer to accept :java_opts. So you can do something like:

YUI::JavaScriptCompressor.new(:java_opts => '-Xmx64M')

@wizztjh

is it merged? we are depending on it. #19

@scudco

Almost six months later and no word on this getting merged in :\

@shedd

Any hope of getting this merged in?

@andrew-aladev

facepalm. 1 year old pull request

@argent-smith

Looks like the author doesn't need this anymore.

@stevecrozz-
Collaborator

This would be a welcome addition. Is this repository no longer maintained?

@stevecrozz
Collaborator

I added some commits that should resolve this issue:
9002be3

@stevecrozz stevecrozz closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 2 deletions.
  1. +4 −1 lib/yui/compressor.rb
  2. +0 −1  yui-compressor.gemspec
View
5 lib/yui/compressor.rb
@@ -22,7 +22,10 @@ def self.compressor_type #:nodoc:
def initialize(options = {}) #:nodoc:
@options = self.class.default_options.merge(options)
- @command = [path_to_java, "-jar", path_to_jar_file, *(command_option_for_type + command_options)]
+ java_opts = @options.delete(:java_opts)
+ @command = [path_to_java]
+ @command << java_opts if java_opts
+ @command += ["-jar", path_to_jar_file, *(command_option_for_type + command_options)]
end
def command #:nodoc:
View
1  yui-compressor.gemspec
@@ -7,7 +7,6 @@ Gem::Specification.new do |s|
s.description = "A Ruby interface to YUI Compressor for minifying JavaScript and CSS assets."
s.homepage = "http://github.com/sstephenson/ruby-yui-compressor/"
s.rubyforge_project = "yui"
- s.has_rdoc = true
s.authors = ["Sam Stephenson"]
s.files = Dir["Rakefile", "lib/**/*", "test/**/*"]
s.test_files = Dir["test/*_test.rb"] unless $SAFE > 0
Something went wrong with that request. Please try again.