yui-compressor 0.9.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/Rakefile +1 -1
  2. data/lib/yui/compressor.rb +5 -4
  3. metadata +3 -3
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ require "rake/testtask"
6
6
  task :default => :test
7
7
 
8
8
  Rake::TestTask.new do |t|
9
- t.libs << "lib test"
9
+ t.libs += ["lib", "test"]
10
10
  t.test_files = FileList["test/*_test.rb"]
11
11
  t.verbose = true
12
12
  end
@@ -77,12 +77,13 @@ module YUI #:nodoc:
77
77
  private
78
78
  def command_options
79
79
  options.inject([]) do |command_options, (name, argument)|
80
- method = "command_option_for_#{name}"
81
- if private_methods.include?(method)
82
- command_options.concat(send(method, argument))
83
- else
80
+ method = begin
81
+ method(:"command_option_for_#{name}")
82
+ rescue NameError
84
83
  raise OptionError, "undefined option #{name.inspect}"
85
84
  end
85
+
86
+ command_options.concat(method.call(argument))
86
87
  end
87
88
  end
88
89
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yui-compressor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Stephenson
@@ -54,5 +54,5 @@ rubygems_version: 1.3.3
54
54
  signing_key:
55
55
  specification_version: 3
56
56
  summary: JavaScript and CSS minification library
57
- test_files: []
58
-
57
+ test_files:
58
+ - test/compressor_test.rb