jekyll-minify-html 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MGUyMTc4YzRjZTY1MTQ5MWZhZTcxMGMxY2U2ZTc3YzAxNjljOWE2OQ==
4
+ YTM5ODJlYzRiNWU0YmMyMzg2MDUzY2QzOTE3YTkwMTI1MDcwZDI1Zg==
5
5
  data.tar.gz: !binary |-
6
- MWVkMzE0YjEzMmM2YzU2OTY1NWYwYTNlMmJlMWQwNmE5YWJiY2Q5Zg==
6
+ MTMxMzIyOWJiMzVkOGY1MjQ1YWYzNDg3MDU1MDBmZWYxYTk5YjYzZg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZDlmNWE4NTZjZmUwZjNhNjg3ZTFmYWY5ODBmMzM5ZTliMjlhMDdjNzlhYTk1
10
- YjdlOGJhZWZiNjBmYmM4ODVmZjFhMDY5OTlhZTBmNzhkZGVlN2NhYWQxNzEx
11
- ZjlmZWQ4YTNmZWRmYTkwNmEyN2E3ZGVkZGYxM2FiY2IxMjAzYjg=
9
+ OTJlNzU1MjJiNDliZTFjZDc1YjA4NzIzZTYwOWY1MTA0YjVhOGM2ZTVmNjc3
10
+ YzdjMzRmNzUwM2JhYjgyYmYwMmM0Y2JiM2QzZDU3NDM5YjkwNDgxMDYyMzM5
11
+ Y2EzMmU4NDIyZmQ3ZTk5YWRkMDE5OTc3NzhiMWIzNzliYzgxYmQ=
12
12
  data.tar.gz: !binary |-
13
- YzU4NGEzZmNlZWQxZTVjMDhiYjNkMTcxOWU3ZDA5Njg4Yzc4ZWFiOTNkZGIw
14
- MTc0MmQ5NzU4M2RmMTUwNmNkM2M4ZmU0ZWUxMWUyODliODU2MmNiZWRkMTc5
15
- Y2IwODM4NTc2ZTYwYmExZjIzMzI5ZGFlZTZhYTVjNWIzZDYwMmY=
13
+ Y2Q1ODA5ZGMyMzk4OGQzNWRiNTM4MjY2Yzg5M2YxZDVmNDQzZjU1N2Y3YzAy
14
+ YTYyZWJmZGZlNWU2YzkzMjJkNTQ5NGM0NjhiZTkyMjhlZjIzNzNlN2M4ZTRk
15
+ YTFmZDQ4YzM4MWRkMjg5MTMzZTM5M2MyM2NmYzU2OGI4M2ExZGQ=
@@ -0,0 +1,11 @@
1
+ # Changelog
2
+
3
+ ## 1.0.1 (2013-10-25)
4
+
5
+ - Now compatible with Jekyll 0.12+
6
+ - Added tests for Jekyll 0.12 and Jekyll 1.0
7
+
8
+ ## 1.0.0 (2013-10-24)
9
+
10
+ Initial Release
11
+
@@ -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", "~> 1.0"
24
+ spec.add_runtime_dependency "jekyll", ">= 0.12"
25
25
  spec.add_runtime_dependency "html_press", "~> 0.8.2"
26
26
  end
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module MinifyHTMLVersion
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
5
5
  end
@@ -1,5 +1,7 @@
1
1
  name: Your New Jekyll Site
2
2
  markdown: redcarpet
3
+ redcarpet:
4
+ smart: false
3
5
  source: source
4
6
  plugins: source/_plugins
5
7
  destination: site
@@ -0,0 +1,10 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in jekyll-markdown-block.gemspec
4
+ group :jekyll_plugins do
5
+ gem "jekyll-minify-html", path: "../../"
6
+ end
7
+
8
+ gem "colorator"
9
+ gem "redcarpet"
10
+ gem "jekyll", "~> 0.12.0"
@@ -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&#39;s a code block.
30
+ Don&#39;t compress this!
31
+
32
+ ^ empty line suckas!
33
+ What are you going to do about it?
34
+ I&#39;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"
@@ -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>
@@ -1,29 +1,49 @@
1
1
  require 'colorator'
2
2
 
3
- has_failed = false
4
-
5
- `bundle exec jekyll build --config _config.yml,_production.yml --trace`
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
- compressed_diff = `diff expected/compressed.html site/index.html`
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
- `bundle exec jekyll build --trace`
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
- uncompressed_diff = `diff expected/uncompressed.html site/index.html`
34
+ test('uncompressed', "1.0")
35
+ test('uncompressed', "0.12")
12
36
 
13
- if compressed_diff.size == 0
14
- puts "Compression passed".green
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
- if uncompressed_diff.size == 0
22
- puts "Disabling compression passed".green
23
- else
24
- puts "Disabling compression failed".red
25
- puts uncompressed_diff
26
- has_failed = true
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.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-24 00:00:00.000000000 Z
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: '1.0'
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: '1.0'
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/_production.yml
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/_production.yml
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
@@ -1 +0,0 @@
1
- env: production