yuicompressor 1.2.1 → 1.3.0
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.
- data/README +2 -0
- data/lib/yuicompressor-2.4.8.jar +0 -0
- data/lib/yuicompressor.rb +7 -4
- data/lib/yuicompressor/shell.rb +1 -0
- data/test/css_test.rb +1 -1
- data/test/js_test.rb +1 -1
- data/yuicompressor.gemspec +2 -2
- metadata +40 -49
- data/lib/yuicompressor-2.4.4.jar +0 -0
data/README
CHANGED
@@ -51,6 +51,8 @@ When compressing CSS, the following option is available:
|
|
51
51
|
single line of compressed code. Defaults to no maximum
|
52
52
|
length. If set to 0 each line will be the minimum length
|
53
53
|
possible.
|
54
|
+
:charset Sests the carset in which to read the input file. Passed
|
55
|
+
through to the YUICompressor Java library. Default: utf8
|
54
56
|
|
55
57
|
When compressing JavaScript, these additional options are available:
|
56
58
|
|
Binary file
|
data/lib/yuicompressor.rb
CHANGED
@@ -2,7 +2,7 @@ require 'stringio'
|
|
2
2
|
|
3
3
|
module YUICompressor
|
4
4
|
# The path to the YUI Compressor jar file.
|
5
|
-
JAR_FILE = File.expand_path('../yuicompressor-2.4.
|
5
|
+
JAR_FILE = File.expand_path('../yuicompressor-2.4.8.jar', __FILE__)
|
6
6
|
|
7
7
|
module_function
|
8
8
|
|
@@ -18,6 +18,7 @@ module YUICompressor
|
|
18
18
|
# single line of compressed code. Defaults to no maximum
|
19
19
|
# length. If set to 0 each line will be the minimum length
|
20
20
|
# possible.
|
21
|
+
# +:charset+:: Charset. Default is utf8.
|
21
22
|
def compress_css(stream_or_string, options={}, &block)
|
22
23
|
compress(stream_or_string, options.merge(:type => 'css'), &block)
|
23
24
|
end
|
@@ -35,20 +36,22 @@ module YUICompressor
|
|
35
36
|
# all semicolons in the code. Defaults to +false+.
|
36
37
|
# +:optimize+:: Should be +true+ if the compressor should enable all
|
37
38
|
# micro optimizations. Defaults to +true+.
|
39
|
+
# +:charset+:: Charset. Default is utf8.
|
38
40
|
def compress_js(stream_or_string, options={}, &block)
|
39
41
|
compress(stream_or_string, options.merge(:type => 'js'), &block)
|
40
42
|
end
|
41
43
|
|
42
44
|
def default_css_options #:nodoc:
|
43
|
-
{ :line_break => nil }
|
45
|
+
{ :line_break => nil, :charset => 'utf8' }
|
44
46
|
end
|
45
47
|
|
46
48
|
def default_js_options #:nodoc:
|
47
|
-
|
49
|
+
{ :line_break => nil,
|
50
|
+
:charset => 'utf8',
|
48
51
|
:munge => false,
|
49
52
|
:preserve_semicolons => false,
|
50
53
|
:optimize => true
|
51
|
-
|
54
|
+
}
|
52
55
|
end
|
53
56
|
|
54
57
|
def streamify(stream_or_string) #:nodoc:
|
data/lib/yuicompressor/shell.rb
CHANGED
@@ -13,6 +13,7 @@ module YUICompressor
|
|
13
13
|
args = []
|
14
14
|
args.concat(['--type', options[:type].to_s]) if options[:type]
|
15
15
|
args.concat(['--line-break', options[:line_break].to_s]) if options[:line_break]
|
16
|
+
args.concat(['--charset', options[:charset].to_s]) if options[:charset]
|
16
17
|
|
17
18
|
if options[:type].to_s == 'js'
|
18
19
|
args << '--nomunge' unless options[:munge]
|
data/test/css_test.rb
CHANGED
data/test/js_test.rb
CHANGED
data/yuicompressor.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'yuicompressor'
|
3
|
-
s.version = '1.
|
4
|
-
s.date = '
|
3
|
+
s.version = '1.3.0'
|
4
|
+
s.date = '2014-01-22'
|
5
5
|
|
6
6
|
s.summary = 'A YUI JavaScript and CSS compressor for Ruby and JRuby'
|
7
7
|
s.description = 'A YUI JavaScript and CSS compressor for Ruby and JRuby'
|
metadata
CHANGED
@@ -1,46 +1,42 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: yuicompressor
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 1
|
7
|
-
- 2
|
8
|
-
- 1
|
9
|
-
version: 1.2.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.3.0
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- Michael Jackson
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2014-01-22 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: rake
|
22
|
-
|
23
|
-
|
24
|
-
requirements:
|
25
|
-
- -
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
|
28
|
-
- 0
|
29
|
-
version: "0"
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
30
22
|
type: :development
|
31
|
-
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
32
30
|
description: A YUI JavaScript and CSS compressor for Ruby and JRuby
|
33
31
|
email: mjijackson@gmail.com
|
34
32
|
executables: []
|
35
|
-
|
36
33
|
extensions: []
|
37
|
-
|
38
|
-
extra_rdoc_files:
|
34
|
+
extra_rdoc_files:
|
39
35
|
- README
|
40
|
-
files:
|
36
|
+
files:
|
41
37
|
- lib/yuicompressor/jruby.rb
|
42
38
|
- lib/yuicompressor/shell.rb
|
43
|
-
- lib/yuicompressor-2.4.
|
39
|
+
- lib/yuicompressor-2.4.8.jar
|
44
40
|
- lib/yuicompressor.rb
|
45
41
|
- test/_files/jquery-1.4.2.js
|
46
42
|
- test/_files/test.css
|
@@ -51,41 +47,36 @@ files:
|
|
51
47
|
- yuicompressor.gemspec
|
52
48
|
- Rakefile
|
53
49
|
- README
|
54
|
-
has_rdoc: true
|
55
50
|
homepage: http://github.com/mjijackson/yuicompressor
|
56
51
|
licenses: []
|
57
|
-
|
58
52
|
post_install_message:
|
59
|
-
rdoc_options:
|
53
|
+
rdoc_options:
|
60
54
|
- --line-numbers
|
61
55
|
- --inline-source
|
62
56
|
- --title
|
63
57
|
- YUICompressor
|
64
58
|
- --main
|
65
59
|
- YUICompressor
|
66
|
-
require_paths:
|
60
|
+
require_paths:
|
67
61
|
- lib
|
68
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
requirements:
|
77
|
-
- -
|
78
|
-
- !ruby/object:Gem::Version
|
79
|
-
|
80
|
-
- 0
|
81
|
-
version: "0"
|
62
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
63
|
+
none: false
|
64
|
+
requirements:
|
65
|
+
- - ! '>='
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
|
+
none: false
|
70
|
+
requirements:
|
71
|
+
- - ! '>='
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
82
74
|
requirements: []
|
83
|
-
|
84
75
|
rubyforge_project:
|
85
|
-
rubygems_version: 1.
|
76
|
+
rubygems_version: 1.8.23
|
86
77
|
signing_key:
|
87
78
|
specification_version: 3
|
88
79
|
summary: A YUI JavaScript and CSS compressor for Ruby and JRuby
|
89
|
-
test_files:
|
80
|
+
test_files:
|
90
81
|
- test/css_test.rb
|
91
82
|
- test/js_test.rb
|
data/lib/yuicompressor-2.4.4.jar
DELETED
Binary file
|