htmlcompressor 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG +2 -0
- data/README.md +8 -2
- data/lib/htmlcompressor/compressor.rb +1 -1
- data/lib/htmlcompressor/version.rb +1 -1
- data/test/resources/html/testCompressJavaScriptClosureResult.html +1 -1
- data/test/resources/html/testCompressJavaScriptYuiResult.html +1 -1
- metadata +17 -33
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6a42bf9b016097f11b30a077ea1a4dcd1aa27910
|
4
|
+
data.tar.gz: d3a5fa18ac4b6f14b8404affdb9c4ffce4ab7fde
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 273c064fef6bff5af96aedc4d25697d3780973c4bf2b198f0584a8e3755614b07e68e05c6895265447c6f41bc6da6be2b24dfeeb71cba9115f7e373e8210e856
|
7
|
+
data.tar.gz: a5f2dad4e8bdb618f18eac053c68ad1d395f6db10d77807a0c81401e31ea9eabf11608888d8d6d4f11990c8efb68d850a8b402961185fa69389fe7b35a089106
|
data/CHANGELOG
CHANGED
data/README.md
CHANGED
@@ -45,12 +45,18 @@ options = {
|
|
45
45
|
}
|
46
46
|
```
|
47
47
|
|
48
|
-
Using rack middleware is as easy as:
|
48
|
+
Using rack middleware (in rails) is as easy as:
|
49
49
|
|
50
50
|
```ruby
|
51
51
|
config.middleware.use HtmlCompressor::Rack, options
|
52
52
|
```
|
53
53
|
|
54
|
+
And in sinatra:
|
55
|
+
|
56
|
+
```ruby
|
57
|
+
use HtmlCompressor::Rack, options
|
58
|
+
```
|
59
|
+
|
54
60
|
The middleware uses a little more aggressive options by default:
|
55
61
|
|
56
62
|
```ruby
|
@@ -132,7 +138,7 @@ gem 'yui-compressor'
|
|
132
138
|
options = {
|
133
139
|
:compress_javascript => true,
|
134
140
|
:javascript_compressor => :yui,
|
135
|
-
:compress_css => true
|
141
|
+
:compress_css => true,
|
136
142
|
:css_compressor => :yui
|
137
143
|
}
|
138
144
|
```
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<script type="text/javascript">var a=0,a=a+1;alert(a);</script><script
|
1
|
+
<script type="text/javascript">var a=0,a=a+1;alert(a);</script><script>/*<![CDATA[*/var a=0,a=a+1;alert(a);/*]]>*/</script><pre>
|
2
2
|
<script>
|
3
3
|
var i = 0; //comment
|
4
4
|
i = i + 1;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<script type="text/javascript">var i=0;i=i+1;alert(i);</script><script
|
1
|
+
<script type="text/javascript">var i=0;i=i+1;alert(i);</script><script>/*<![CDATA[*/var i=0;i=i+1;alert(i);/*]]>*/</script><pre>
|
2
2
|
<script>
|
3
3
|
var i = 0; //comment
|
4
4
|
i = i + 1;
|
metadata
CHANGED
@@ -1,78 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: htmlcompressor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.3.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Paolo Chiodi
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2015-
|
11
|
+
date: 2015-09-09 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: yui-compressor
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- - ~>
|
17
|
+
- - "~>"
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0.9'
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- - ~>
|
24
|
+
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0.9'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: closure-compiler
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- - ~>
|
31
|
+
- - "~>"
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '1.1'
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- - ~>
|
38
|
+
- - "~>"
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '1.1'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rake
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - ">="
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - ">="
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: minitest
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- - ~>
|
59
|
+
- - "~>"
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '5.0'
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- - ~>
|
66
|
+
- - "~>"
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: '5.0'
|
78
69
|
description: Put your html on a diet
|
@@ -82,8 +73,8 @@ executables: []
|
|
82
73
|
extensions: []
|
83
74
|
extra_rdoc_files: []
|
84
75
|
files:
|
85
|
-
- .gitignore
|
86
|
-
- .travis.yml
|
76
|
+
- ".gitignore"
|
77
|
+
- ".travis.yml"
|
87
78
|
- CHANGELOG
|
88
79
|
- Gemfile
|
89
80
|
- LICENSE
|
@@ -223,33 +214,26 @@ files:
|
|
223
214
|
- test/test_helper.rb
|
224
215
|
homepage: ''
|
225
216
|
licenses: []
|
217
|
+
metadata: {}
|
226
218
|
post_install_message:
|
227
219
|
rdoc_options: []
|
228
220
|
require_paths:
|
229
221
|
- lib
|
230
222
|
required_ruby_version: !ruby/object:Gem::Requirement
|
231
|
-
none: false
|
232
223
|
requirements:
|
233
|
-
- -
|
224
|
+
- - ">="
|
234
225
|
- !ruby/object:Gem::Version
|
235
226
|
version: '0'
|
236
|
-
segments:
|
237
|
-
- 0
|
238
|
-
hash: 472079073096694576
|
239
227
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
240
|
-
none: false
|
241
228
|
requirements:
|
242
|
-
- -
|
229
|
+
- - ">="
|
243
230
|
- !ruby/object:Gem::Version
|
244
231
|
version: '0'
|
245
|
-
segments:
|
246
|
-
- 0
|
247
|
-
hash: 472079073096694576
|
248
232
|
requirements: []
|
249
233
|
rubyforge_project:
|
250
|
-
rubygems_version:
|
234
|
+
rubygems_version: 2.4.5
|
251
235
|
signing_key:
|
252
|
-
specification_version:
|
236
|
+
specification_version: 4
|
253
237
|
summary: htmlcompressor provides a class and a rack middleware to minify html pages
|
254
238
|
test_files:
|
255
239
|
- test/compressor_closure_test.rb
|