octopress-minify-html 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 66f77e6b6bb79662f053933158b6d2fed390df9b
4
- data.tar.gz: af0050be86b438969992080bebe54fd8b1ddce08
3
+ metadata.gz: 15911b5abb878de4c25afe9738b80634eadf8184
4
+ data.tar.gz: 0a03fb37a8f05c04445478570fd9bb9050649176
5
5
  SHA512:
6
- metadata.gz: 030746768af211227b1e5e810621ff6b0da078f7d1510364a728584a83222c318fa94a8764190f5df3ffe12144e72b200fa6c3fdc0d34d1abeff26067dc4ecfe
7
- data.tar.gz: dd2b2fbc4e4dafde8824955f955e240b8663a70c84ddc5cf0a85bbb2914ff956892a5eb3df9412585508330f4fcb1225d4463a2e24f68e6cab39815b3a55e88b
6
+ metadata.gz: 471871685631817c4e06cc4f588ae86db7d89968482fb5e92dfc645b33e997c83304e001a03dd2c855241a139b3770760d80c7b156b0cdb0ac510b8d6e2de12d
7
+ data.tar.gz: 8ad301154ba97a7f546f917ad8b45c0d3a28d3cc35fa0fd2e8283debbe0b77db0e02435d4680eb3111f947ada72fb874f5aa1bf054870efc60e623b89dbc1aec
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ### 1.2.2 (2015-02-25)
4
+
5
+ - Fix: No longer compresses non-HTML pages.
6
+
3
7
  ### 1.2.1 (2015-01-05)
4
8
 
5
9
  - Rewritten on top of Octopress Hooks.
@@ -6,13 +6,19 @@ module Octopress
6
6
  module MinifyHTML
7
7
  class MinifyPage < Hooks::All
8
8
  def post_render(item)
9
- item.output = HtmlPress.press(item.output) if minify?(item.site.config)
9
+ item.output = HtmlPress.press(item.output) if minify?(item)
10
10
  end
11
11
 
12
- def minify?(config)
13
- minify = config['minify_html']
14
- production = config['env'].nil? || config['env'] =~ /production/i
15
- minify || (minify.nil? && production)
12
+ def minify?(item)
13
+ if item.url.end_with?('html')
14
+ config = item.site.config
15
+ minify = config['minify_html']
16
+ production = config['env'].nil? || config['env'] =~ /production/i
17
+
18
+ # Minify if configuration explicitly requires minification
19
+ # or if Jekyll env is production
20
+ minify || (minify.nil? && production)
21
+ end
16
22
  end
17
23
  end
18
24
  end
@@ -1,5 +1,5 @@
1
1
  module Octopress
2
2
  module MinifyHTML
3
- VERSION = "1.2.1"
3
+ VERSION = "1.2.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress-minify-html
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-06 00:00:00.000000000 Z
11
+ date: 2015-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: pry-byebug
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
97
111
  description: Minify Jekyll's HTML output using html_press
98
112
  email:
99
113
  - brandon@imathis.com