html_uglifier 0.1.0 → 0.1.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.
- checksums.yaml +4 -4
- data/lib/html_uglifier/version.rb +1 -1
- data/lib/html_uglifier.rb +3 -3
- data/temp/.gitkeep +0 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fe81e53f7d2450dc9956840400f1e76ba5b51a97
|
|
4
|
+
data.tar.gz: 6423f0208d6b1f3a3a5278e51525b8394627a8c9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 12bd82d015ffe1109b65b650298be7177ad0336b1b2a2de8c9d4e3b75818e00c141117acbe7f4b44b3b190892546660bb7008b8f2cd9a7ff976c0d007b06e8fe
|
|
7
|
+
data.tar.gz: 9a4cca32bc5ace0625d811317cc35d22837e6be083d5e46c75598a104d5d468f38d4d64077c8e6aa9c84831f78bf439ca3b1af873dd14f34d34fd71271cf67f9
|
data/lib/html_uglifier.rb
CHANGED
|
@@ -6,9 +6,9 @@ module HtmlUglifier
|
|
|
6
6
|
end
|
|
7
7
|
|
|
8
8
|
def compress(html)
|
|
9
|
-
|
|
10
|
-
File.open(
|
|
11
|
-
`java -jar #{path @compressor} --type html --compress-js --compress-css #{path
|
|
9
|
+
temp_file = File.join(File.dirname(__FILE__), '..', 'temp', 'temp.html')
|
|
10
|
+
File.open(temp_file, 'w') { |f| f.write(html) }
|
|
11
|
+
`java -jar #{path @compressor} --type html --compress-js --compress-css #{path temp_file}; rm #{path temp_file}`
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
def compress_file(input_file, output_file)
|
data/temp/.gitkeep
ADDED
|
File without changes
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: html_uglifier
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Endri Gjiri
|
|
@@ -53,6 +53,7 @@ files:
|
|
|
53
53
|
- html_uglifier.gemspec
|
|
54
54
|
- lib/html_uglifier.rb
|
|
55
55
|
- lib/html_uglifier/version.rb
|
|
56
|
+
- temp/.gitkeep
|
|
56
57
|
- vendor/htmlcompressor-1.5.3.jar
|
|
57
58
|
- vendor/yuicompressor-2.4.6.jar
|
|
58
59
|
homepage: ''
|