yuicompressor 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -94,7 +94,7 @@ CSS compression:
94
94
  }
95
95
  CODE
96
96
  YUICompressor.compress_css(css)
97
- => "div.main{background-position:0 0;}h1#title{color:#FFF;}"
97
+ => "div.main{background-position:0 0}h1#title{color:#fff}"
98
98
 
99
99
  CSS compression with every statement on a separate line:
100
100
 
@@ -108,7 +108,7 @@ CSS compression with every statement on a separate line:
108
108
  }
109
109
  CODE
110
110
  YUICompressor.compress_css(css, :line_break => 0)
111
- => "div.main{background-position:0 0;}\nh1#title{color:#FFF;}"
111
+ => "div.main{background-position:0 0}\nh1#title{color:#fff}"
112
112
 
113
113
  Including in another module:
114
114
 
@@ -7,10 +7,10 @@ module YUICompressor
7
7
 
8
8
  require JAR_FILE
9
9
 
10
- import java.io.InputStreamReader
11
- import java.io.OutputStreamWriter
12
- import com.yahoo.platform.yui.compressor.JavaScriptCompressor
13
- import com.yahoo.platform.yui.compressor.CssCompressor
10
+ java_import java.io.InputStreamReader
11
+ java_import java.io.OutputStreamWriter
12
+ java_import com.yahoo.platform.yui.compressor.JavaScriptCompressor
13
+ java_import com.yahoo.platform.yui.compressor.CssCompressor
14
14
 
15
15
  class ErrorReporter #:nodoc:
16
16
  def error(message, source_name, line, line_source, line_offset)
@@ -43,14 +43,12 @@ module YUICompressor
43
43
  args
44
44
  end
45
45
 
46
- # Compresses the given +stream_or_string+ of code using the given +options+.
47
- # When using this method directly, at least the +:type+ option must be
48
- # specified, and should be one of <tt>"css"</tt> or <tt>"js"</tt>. See
49
- # YUICompressor#compress_css and YUICompressor#compress_js for details about
50
- # which options are acceptable for each type of compressor.
51
- #
52
- # If a block is given, it will receive the IO output object. Otherwise the
53
- # output will be returned as a string.
46
+ # Returns a compressed version of the given +stream_or_string+ of code using
47
+ # the given +options+. When using this method directly, at least the
48
+ # <tt>:type</tt> option must be specified, and should be one of <tt>"css"</tt>
49
+ # or <tt>"js"</tt>. See YUICompressor#compress_css and
50
+ # YUICompressor#compress_js for details about which options are acceptable for
51
+ # each type of compressor.
54
52
  def compress(stream_or_string, options={})
55
53
  raise ArgumentError, 'Option :type required' unless options.key?(:type)
56
54
 
@@ -23,19 +23,17 @@ module YUICompressor
23
23
  args
24
24
  end
25
25
 
26
- # Compresses the given +stream_or_string+ of code using the given +options+.
27
- # When using this method directly, at least the +:type+ option must be
28
- # specified, and should be one of <tt>"css"</tt> or <tt>"js"</tt>. See
29
- # YUICompressor#compress_css and YUICompressor#compress_js for details about
30
- # which options are acceptable for each type of compressor.
26
+ # Returns a compressed version of the given +stream_or_string+ of code using
27
+ # the given +options+. When using this method directly, at least the
28
+ # <tt>:type</tt> option must be specified, and should be one of <tt>"css"</tt>
29
+ # or <tt>"js"</tt>. See YUICompressor#compress_css and
30
+ # YUICompressor#compress_js for details about which options are acceptable for
31
+ # each type of compressor.
31
32
  #
32
33
  # In addition to the standard options, this method also accepts a
33
34
  # <tt>:java</tt> option that can be used to specify the location of the Java
34
- # binary. This option will default to using <tt>"java"</tt> unless otherwise
35
- # specified.
36
- #
37
- # If a block is given, it will receive the IO output object. Otherwise the
38
- # output will be returned as a string.
35
+ # executable. This option will default to using <tt>"java"</tt> unless
36
+ # otherwise specified.
39
37
  def compress(stream_or_string, options={})
40
38
  raise ArgumentError, 'Option :type required' unless options.key?(:type)
41
39
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'yuicompressor'
3
- s.version = '1.2.0'
3
+ s.version = '1.2.1'
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
@@ -3,32 +3,32 @@ name: yuicompressor
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
- - 1
7
- - 2
8
- - 0
9
- version: 1.2.0
6
+ - 1
7
+ - 2
8
+ - 1
9
+ version: 1.2.1
10
10
  platform: ruby
11
11
  authors:
12
- - Michael Jackson
12
+ - Michael Jackson
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-08-04 00:00:00 -06:00
17
+ date: 2010-08-04 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: rake
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
- version: "0"
30
- type: :development
31
- version_requirements: *id001
20
+ - !ruby/object:Gem::Dependency
21
+ name: rake
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ version: "0"
30
+ type: :development
31
+ version_requirements: *id001
32
32
  description: A YUI JavaScript and CSS compressor for Ruby and JRuby
33
33
  email: mjijackson@gmail.com
34
34
  executables: []
@@ -36,49 +36,49 @@ executables: []
36
36
  extensions: []
37
37
 
38
38
  extra_rdoc_files:
39
- - README
39
+ - README
40
40
  files:
41
- - lib/yuicompressor-2.4.4.jar
42
- - lib/yuicompressor.rb
43
- - lib/yuicompressor/jruby.rb
44
- - lib/yuicompressor/shell.rb
45
- - test/css_test.rb
46
- - test/helper.rb
47
- - test/js_test.rb
48
- - test/_files/jquery-1.4.2.js
49
- - test/_files/test.css
50
- - test/_files/test.js
51
- - yuicompressor.gemspec
52
- - Rakefile
53
- - README
41
+ - lib/yuicompressor/jruby.rb
42
+ - lib/yuicompressor/shell.rb
43
+ - lib/yuicompressor-2.4.4.jar
44
+ - lib/yuicompressor.rb
45
+ - test/_files/jquery-1.4.2.js
46
+ - test/_files/test.css
47
+ - test/_files/test.js
48
+ - test/css_test.rb
49
+ - test/helper.rb
50
+ - test/js_test.rb
51
+ - yuicompressor.gemspec
52
+ - Rakefile
53
+ - README
54
54
  has_rdoc: true
55
55
  homepage: http://github.com/mjijackson/yuicompressor
56
56
  licenses: []
57
57
 
58
58
  post_install_message:
59
59
  rdoc_options:
60
- - --line-numbers
61
- - --inline-source
62
- - --title
63
- - YUICompressor
64
- - --main
65
- - YUICompressor
60
+ - --line-numbers
61
+ - --inline-source
62
+ - --title
63
+ - YUICompressor
64
+ - --main
65
+ - YUICompressor
66
66
  require_paths:
67
- - lib
67
+ - lib
68
68
  required_ruby_version: !ruby/object:Gem::Requirement
69
69
  requirements:
70
- - - ">="
71
- - !ruby/object:Gem::Version
72
- segments:
73
- - 0
74
- version: "0"
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ segments:
73
+ - 0
74
+ version: "0"
75
75
  required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  requirements:
77
- - - ">="
78
- - !ruby/object:Gem::Version
79
- segments:
80
- - 0
81
- version: "0"
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ segments:
80
+ - 0
81
+ version: "0"
82
82
  requirements: []
83
83
 
84
84
  rubyforge_project:
@@ -87,5 +87,5 @@ signing_key:
87
87
  specification_version: 3
88
88
  summary: A YUI JavaScript and CSS compressor for Ruby and JRuby
89
89
  test_files:
90
- - test/css_test.rb
91
- - test/js_test.rb
90
+ - test/css_test.rb
91
+ - test/js_test.rb