jekyll-minify-html 1.0.0 → 1.0.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 +8 -8
- data/CHANGELOG.md +11 -0
- data/jekyll-minify-html.gemspec +1 -1
- data/lib/jekyll-minify-html/version.rb +1 -1
- data/test/_config.yml +2 -0
- data/test/jekyll-0.12/Gemfile +10 -0
- data/test/jekyll-0.12/expected/compressed.html +7 -0
- data/test/jekyll-0.12/expected/uncompressed.html +61 -0
- data/test/{Gemfile → jekyll-1.0/Gemfile} +4 -1
- data/test/{expected → jekyll-1.0/expected}/compressed.html +0 -0
- data/test/{expected → jekyll-1.0/expected}/uncompressed.html +0 -0
- data/test/site/index.html +2 -56
- data/test/test.rb +38 -18
- metadata +19 -14
- data/test/_production.yml +0 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTM5ODJlYzRiNWU0YmMyMzg2MDUzY2QzOTE3YTkwMTI1MDcwZDI1Zg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTMxMzIyOWJiMzVkOGY1MjQ1YWYzNDg3MDU1MDBmZWYxYTk5YjYzZg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTJlNzU1MjJiNDliZTFjZDc1YjA4NzIzZTYwOWY1MTA0YjVhOGM2ZTVmNjc3
|
10
|
+
YzdjMzRmNzUwM2JhYjgyYmYwMmM0Y2JiM2QzZDU3NDM5YjkwNDgxMDYyMzM5
|
11
|
+
Y2EzMmU4NDIyZmQ3ZTk5YWRkMDE5OTc3NzhiMWIzNzliYzgxYmQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Y2Q1ODA5ZGMyMzk4OGQzNWRiNTM4MjY2Yzg5M2YxZDVmNDQzZjU1N2Y3YzAy
|
14
|
+
YTYyZWJmZGZlNWU2YzkzMjJkNTQ5NGM0NjhiZTkyMjhlZjIzNzNlN2M4ZTRk
|
15
|
+
YTFmZDQ4YzM4MWRkMjg5MTMzZTM5M2MyM2NmYzU2OGI4M2ExZGQ=
|
data/CHANGELOG.md
ADDED
data/jekyll-minify-html.gemspec
CHANGED
@@ -21,6 +21,6 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.3"
|
22
22
|
spec.add_development_dependency "rake"
|
23
23
|
|
24
|
-
spec.add_runtime_dependency "jekyll", "
|
24
|
+
spec.add_runtime_dependency "jekyll", ">= 0.12"
|
25
25
|
spec.add_runtime_dependency "html_press", "~> 0.8.2"
|
26
26
|
end
|
data/test/_config.yml
CHANGED
@@ -0,0 +1,7 @@
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><title>Your New Jekyll Site</title><meta name="viewport" content="width=device-width"><link rel="stylesheet" href="/css/syntax.css"><link rel="stylesheet" href="/css/main.css"></head><body><div class="site"><div class="header"><h1 class="title"><a href="/">Your New Jekyll Site</a></h1> <a class="extra" href="/">home</a></div><h1>Test</h1><div> Here's some stuff to compress</div><div class="highlight"><pre><code class="text">Here's a code block.
|
2
|
+
Don't compress this!
|
3
|
+
|
4
|
+
^ empty line suckas!
|
5
|
+
What are you going to do about it?
|
6
|
+
I'm a code block!
|
7
|
+
</code></pre></div><p>OK.</p><p>This is probably good enough.</p><p>Peace out.</p><div class="footer"><div class="contact"><p> Your Name<br/> What You Are<br/> you@example.com</p></div><div class="contact"><p> <a href="https://github.com/yourusername">github.com/yourusername</a><br/> <a href="https://twitter.com/yourusername">twitter.com/yourusername</a><br/></p></div></div></div></body></html>
|
@@ -0,0 +1,61 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
6
|
+
<title>Your New Jekyll Site</title>
|
7
|
+
<meta name="viewport" content="width=device-width">
|
8
|
+
|
9
|
+
<!-- syntax highlighting CSS -->
|
10
|
+
<link rel="stylesheet" href="/css/syntax.css">
|
11
|
+
|
12
|
+
<!-- Custom CSS -->
|
13
|
+
<link rel="stylesheet" href="/css/main.css">
|
14
|
+
|
15
|
+
</head>
|
16
|
+
<body>
|
17
|
+
|
18
|
+
<div class="site">
|
19
|
+
<div class="header">
|
20
|
+
<h1 class="title"><a href="/">Your New Jekyll Site</a></h1>
|
21
|
+
<a class="extra" href="/">home</a>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<h1>Test</h1>
|
25
|
+
|
26
|
+
<div> Here's some stuff to
|
27
|
+
|
28
|
+
compress</div>
|
29
|
+
<div class="highlight"><pre><code class="text">Here's a code block.
|
30
|
+
Don't compress this!
|
31
|
+
|
32
|
+
^ empty line suckas!
|
33
|
+
What are you going to do about it?
|
34
|
+
I'm a code block!
|
35
|
+
</code></pre></div>
|
36
|
+
<p>OK.</p>
|
37
|
+
|
38
|
+
<p>This is probably good enough.</p>
|
39
|
+
|
40
|
+
<p>Peace out.</p>
|
41
|
+
|
42
|
+
|
43
|
+
<div class="footer">
|
44
|
+
<div class="contact">
|
45
|
+
<p>
|
46
|
+
Your Name<br />
|
47
|
+
What You Are<br />
|
48
|
+
you@example.com
|
49
|
+
</p>
|
50
|
+
</div>
|
51
|
+
<div class="contact">
|
52
|
+
<p>
|
53
|
+
<a href="https://github.com/yourusername">github.com/yourusername</a><br />
|
54
|
+
<a href="https://twitter.com/yourusername">twitter.com/yourusername</a><br />
|
55
|
+
</p>
|
56
|
+
</div>
|
57
|
+
</div>
|
58
|
+
</div>
|
59
|
+
|
60
|
+
</body>
|
61
|
+
</html>
|
@@ -2,6 +2,9 @@ source 'https://rubygems.org'
|
|
2
2
|
|
3
3
|
# Specify your gem's dependencies in jekyll-markdown-block.gemspec
|
4
4
|
group :jekyll_plugins do
|
5
|
-
gem "jekyll-minify-html", path: "
|
5
|
+
gem "jekyll-minify-html", path: "../../"
|
6
6
|
end
|
7
7
|
|
8
|
+
gem "colorator"
|
9
|
+
gem "redcarpet"
|
10
|
+
gem "jekyll", "~> 1.0.0"
|
File without changes
|
File without changes
|
data/test/site/index.html
CHANGED
@@ -1,61 +1,7 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8">
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
6
|
-
<title>Your New Jekyll Site</title>
|
7
|
-
<meta name="viewport" content="width=device-width">
|
8
|
-
|
9
|
-
<!-- syntax highlighting CSS -->
|
10
|
-
<link rel="stylesheet" href="/css/syntax.css">
|
11
|
-
|
12
|
-
<!-- Custom CSS -->
|
13
|
-
<link rel="stylesheet" href="/css/main.css">
|
14
|
-
|
15
|
-
</head>
|
16
|
-
<body>
|
17
|
-
|
18
|
-
<div class="site">
|
19
|
-
<div class="header">
|
20
|
-
<h1 class="title"><a href="/">Your New Jekyll Site</a></h1>
|
21
|
-
<a class="extra" href="/">home</a>
|
22
|
-
</div>
|
23
|
-
|
24
|
-
<h1>Test</h1>
|
25
|
-
|
26
|
-
<div> Here's some stuff to
|
27
|
-
|
28
|
-
compress</div>
|
29
|
-
<div class="highlight"><pre><code class="text language-text" data-lang="text">Here's a code block.
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><title>Your New Jekyll Site</title><meta name="viewport" content="width=device-width"><link rel="stylesheet" href="/css/syntax.css"><link rel="stylesheet" href="/css/main.css"></head><body><div class="site"><div class="header"><h1 class="title"><a href="/">Your New Jekyll Site</a></h1> <a class="extra" href="/">home</a></div><h1>Test</h1><div> Here's some stuff to compress</div><div class="highlight"><pre><code class="text">Here's a code block.
|
30
2
|
Don't compress this!
|
31
3
|
|
32
4
|
^ empty line suckas!
|
33
5
|
What are you going to do about it?
|
34
6
|
I'm a code block!
|
35
|
-
</code></pre></div>
|
36
|
-
<p>OK.</p>
|
37
|
-
|
38
|
-
<p>This is probably good enough.</p>
|
39
|
-
|
40
|
-
<p>Peace out.</p>
|
41
|
-
|
42
|
-
|
43
|
-
<div class="footer">
|
44
|
-
<div class="contact">
|
45
|
-
<p>
|
46
|
-
Your Name<br />
|
47
|
-
What You Are<br />
|
48
|
-
you@example.com
|
49
|
-
</p>
|
50
|
-
</div>
|
51
|
-
<div class="contact">
|
52
|
-
<p>
|
53
|
-
<a href="https://github.com/yourusername">github.com/yourusername</a><br />
|
54
|
-
<a href="https://twitter.com/yourusername">twitter.com/yourusername</a><br />
|
55
|
-
</p>
|
56
|
-
</div>
|
57
|
-
</div>
|
58
|
-
</div>
|
59
|
-
|
60
|
-
</body>
|
61
|
-
</html>
|
7
|
+
</code></pre></div><p>OK.</p><p>This is probably good enough.</p><p>Peace out.</p><div class="footer"><div class="contact"><p> Your Name<br/> What You Are<br/> you@example.com</p></div><div class="contact"><p> <a href="https://github.com/yourusername">github.com/yourusername</a><br/> <a href="https://twitter.com/yourusername">twitter.com/yourusername</a><br/></p></div></div></div></body></html>
|
data/test/test.rb
CHANGED
@@ -1,29 +1,49 @@
|
|
1
1
|
require 'colorator'
|
2
2
|
|
3
|
-
has_failed
|
4
|
-
|
5
|
-
|
3
|
+
has_failed = false
|
4
|
+
config = File.read("_config.yml")
|
5
|
+
config_prod = "#{config}env: production"
|
6
|
+
|
7
|
+
def test(type, version)
|
8
|
+
build(version)
|
9
|
+
if diff = diff_file(type, version)
|
10
|
+
puts "Jekyll #{version}: Failed #{type}".red
|
11
|
+
puts diff
|
12
|
+
has_failed = true
|
13
|
+
else
|
14
|
+
puts "Jekyll #{version}: Passed #{type}".green
|
15
|
+
end
|
16
|
+
end
|
6
17
|
|
7
|
-
|
18
|
+
def build(version)
|
19
|
+
ENV['BUNDLE_GEMFILE'] = "jekyll-#{version}/Gemfile"
|
20
|
+
build = "rm -rf site && bundle exec jekyll"
|
21
|
+
build += " build --trace" if version === "1.0"
|
22
|
+
`#{build}`
|
23
|
+
end
|
8
24
|
|
9
|
-
|
25
|
+
def diff_file(file, version)
|
26
|
+
diff = `diff jekyll-#{version}/expected/#{file}.html site/index.html`
|
27
|
+
if diff.size > 0
|
28
|
+
diff
|
29
|
+
else
|
30
|
+
false
|
31
|
+
end
|
32
|
+
end
|
10
33
|
|
11
|
-
|
34
|
+
test('uncompressed', "1.0")
|
35
|
+
test('uncompressed', "0.12")
|
12
36
|
|
13
|
-
|
14
|
-
|
15
|
-
else
|
16
|
-
puts "Compression failed".red
|
17
|
-
puts compressed_diff
|
18
|
-
has_failed = true
|
37
|
+
File.open("_config.yml", "w") do |f|
|
38
|
+
f.write(config_prod)
|
19
39
|
end
|
20
40
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
41
|
+
test('compressed', "1.0")
|
42
|
+
test('compressed', "0.12")
|
43
|
+
|
44
|
+
# Reset original config without compression enabled
|
45
|
+
File.open("_config.yml", "w") do |f|
|
46
|
+
f.write(config)
|
27
47
|
end
|
28
48
|
|
29
49
|
abort if has_failed
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-minify-html
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Mathis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: jekyll
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ! '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0.12'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ! '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0.12'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: html_press
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -75,6 +75,7 @@ extra_rdoc_files: []
|
|
75
75
|
files:
|
76
76
|
- .gitignore
|
77
77
|
- .travis.yml
|
78
|
+
- CHANGELOG.md
|
78
79
|
- Gemfile
|
79
80
|
- LICENSE.txt
|
80
81
|
- README.md
|
@@ -83,11 +84,13 @@ files:
|
|
83
84
|
- lib/jekyll-minify-html.rb
|
84
85
|
- lib/jekyll-minify-html/version.rb
|
85
86
|
- test/.gitignore
|
86
|
-
- test/Gemfile
|
87
87
|
- test/_config.yml
|
88
|
-
- test/
|
89
|
-
- test/expected/compressed.html
|
90
|
-
- test/expected/uncompressed.html
|
88
|
+
- test/jekyll-0.12/Gemfile
|
89
|
+
- test/jekyll-0.12/expected/compressed.html
|
90
|
+
- test/jekyll-0.12/expected/uncompressed.html
|
91
|
+
- test/jekyll-1.0/Gemfile
|
92
|
+
- test/jekyll-1.0/expected/compressed.html
|
93
|
+
- test/jekyll-1.0/expected/uncompressed.html
|
91
94
|
- test/site/index.html
|
92
95
|
- test/source/_layouts/default.html
|
93
96
|
- test/source/_plugins/bundler.rb
|
@@ -119,11 +122,13 @@ specification_version: 4
|
|
119
122
|
summary: Minify Jekyll's HTML output using html_press
|
120
123
|
test_files:
|
121
124
|
- test/.gitignore
|
122
|
-
- test/Gemfile
|
123
125
|
- test/_config.yml
|
124
|
-
- test/
|
125
|
-
- test/expected/compressed.html
|
126
|
-
- test/expected/uncompressed.html
|
126
|
+
- test/jekyll-0.12/Gemfile
|
127
|
+
- test/jekyll-0.12/expected/compressed.html
|
128
|
+
- test/jekyll-0.12/expected/uncompressed.html
|
129
|
+
- test/jekyll-1.0/Gemfile
|
130
|
+
- test/jekyll-1.0/expected/compressed.html
|
131
|
+
- test/jekyll-1.0/expected/uncompressed.html
|
127
132
|
- test/site/index.html
|
128
133
|
- test/source/_layouts/default.html
|
129
134
|
- test/source/_plugins/bundler.rb
|
data/test/_production.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
env: production
|