yuicompressor 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -38,20 +38,20 @@ class CSSTest < Test::Unit::TestCase
38
38
 
39
39
  def test_default_options
40
40
  assert_equal (<<'CODE').chomp, compress_css(CODE)
41
- .a-class{background-color:red;background-position:0 0;}div#an-id{color:#FFF;}
41
+ .a-class{background-color:red;background-position:0 0}div#an-id{color:#fff}
42
42
  CODE
43
43
  end
44
44
 
45
45
  def test_line_break_option
46
46
  assert_equal (<<'CODE').chomp, compress_css(CODE, :line_break => 0)
47
- .a-class{background-color:red;background-position:0 0;}
48
- div#an-id{color:#FFF;}
47
+ .a-class{background-color:red;background-position:0 0}
48
+ div#an-id{color:#fff}
49
49
  CODE
50
50
  end
51
51
 
52
52
  def test_stream
53
53
  assert_equal (<<'CODE').chomp, compress_css(File.new(FILE, 'r'))
54
- .a-class{background-color:red;background-position:0 0;}div#an-id{color:#FFF;}
54
+ .a-class{background-color:red;background-position:0 0}div#an-id{color:#fff}
55
55
  CODE
56
56
  end
57
57
  end
@@ -77,16 +77,13 @@ var Foo={a:1};Foo.bar=(function(baz){if(false){doSomething();}else{for(var index
77
77
  CODE
78
78
  end
79
79
 
80
- def test_errors
81
- assert_raise RuntimeError do
82
- # Should trigger a compilation error.
83
- compress_js('var a = function(){;')
84
- end
85
- end
86
-
87
80
  def test_stream
88
81
  assert_equal (<<'CODE').chomp, compress_js(File.new(FILE, 'r'))
89
82
  var Foo={a:1};Foo.bar=(function(baz){if(false){doSomething()}else{for(var index=0;index<baz.length;index++){doSomething(baz[index])}}})("hello");
90
83
  CODE
91
84
  end
85
+
86
+ def test_large_stream
87
+ assert compress_js(File.new(File.expand_path('../_files/jquery-1.4.2.js', __FILE__), 'r'))
88
+ end
92
89
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'yuicompressor'
3
- s.version = '1.1.1'
3
+ s.version = '1.2.0'
4
4
  s.date = '2010-08-04'
5
5
 
6
6
  s.summary = 'A YUI JavaScript and CSS compressor for Ruby and JRuby'
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 1
7
- - 1
8
- - 1
9
- version: 1.1.1
7
+ - 2
8
+ - 0
9
+ version: 1.2.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Michael Jackson
@@ -38,13 +38,14 @@ extensions: []
38
38
  extra_rdoc_files:
39
39
  - README
40
40
  files:
41
- - lib/yuicompressor-2.4.2.jar
41
+ - lib/yuicompressor-2.4.4.jar
42
42
  - lib/yuicompressor.rb
43
43
  - lib/yuicompressor/jruby.rb
44
44
  - lib/yuicompressor/shell.rb
45
45
  - test/css_test.rb
46
46
  - test/helper.rb
47
47
  - test/js_test.rb
48
+ - test/_files/jquery-1.4.2.js
48
49
  - test/_files/test.css
49
50
  - test/_files/test.js
50
51
  - yuicompressor.gemspec