middleman-minify-html 3.4.0 → 3.4.1

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: 5df4c0a7461850bbd06d73d35d9a9e786967c2fd
4
- data.tar.gz: 200af04b0d2195989f0cf7b5443d3637b20655d7
3
+ metadata.gz: c973a247e556b8fa805787e4d447450abb2d50db
4
+ data.tar.gz: 1749bcba292c6a2cf8e96d954e39670a87fb3620
5
5
  SHA512:
6
- metadata.gz: 5997da6a701907aa9ad7f7ef82855a1261059c8071eb5c6eb1dec98379fcd1432fd2e1ae52c8e58ee36f27ed0a9e6065e7186deb3e563cbac1264bdf4a11c411
7
- data.tar.gz: 221f487913eb299c0a60763b8d9c4249cc348177730b8aff01013e16c9251c32ed5133c7c4ed9ce335723ee0d8ac720ebeeb1fc85a9122c158f2494d45183422
6
+ metadata.gz: a29e5dc31dc3d374706fd68f6d4936707df9dd5ac7ad9514da3de3ef985c003693f162537edf959ea4fab2a9170a6cf2abb320b8e0a1fc98768ccff9df77490f
7
+ data.tar.gz: f8a87713a8e490e841182a174717cda22447eba4adaa76728549b617602c86006ee0f86e7e923410f8182c651f315c958ec9e99d91d45ea109dc1bb7ae0e2d3e
@@ -1,15 +1,20 @@
1
1
  rvm:
2
- - 1.9.3
3
- - 2.0.0
4
- - 2.1.1
2
+ - ruby-head
3
+ - jruby-head
5
4
  - jruby-19mode
5
+ - 2.2
6
+ - 2.1
7
+ - 2.0
8
+ os:
9
+ - linux
10
+ - osx
11
+ matrix:
12
+ fast_finish: true
13
+ allow_failures:
14
+ - rvm: ruby-head
15
+ - rvm: jruby-19mode
16
+ - rvm: jruby-head
6
17
 
7
- gemfile:
8
- - Gemfile
9
- - Gemfile-v4
10
18
  script: "bundle exec rake test"
11
19
 
12
- env: TEST=true
13
-
14
- matrix:
15
- fast_finish: true
20
+ env: TEST=true
data/Gemfile CHANGED
@@ -1,6 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem "middleman-core", :github => "middleman/middleman", :branch => "v3-stable"
3
+ gem "middleman-cli", :github => "middleman/middleman", :branch => "master"
4
+ gem "middleman-core", :github => "middleman/middleman", :branch => "master"
4
5
 
5
6
  # Specify your gem's dependencies in middleman-minify-html.gemspec
6
7
  gemspec
@@ -1,8 +1,6 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem "middleman-cli", :github => "middleman/middleman", :branch => "master"
4
- gem "middleman-core", :github => "middleman/middleman", :branch => "master"
5
- gem "middleman-templates", :github => "middleman/middleman", :branch => "master"
3
+ gem "middleman-core", :github => "middleman/middleman", :branch => "v3-stable"
6
4
 
7
5
  # Specify your gem's dependencies in middleman-minify-html.gemspec
8
6
  gemspec
data/README.md CHANGED
@@ -11,13 +11,38 @@ gem install middleman
11
11
  middleman init MY_PROJECT
12
12
  ```
13
13
 
14
- If you already have a Middleman project: Add `gem "middleman-minify-html"` to your `Gemfile` and run `bundle install`
14
+ If you already have a Middleman project: Add `gem 'middleman-minify-html'` to your `Gemfile` and run `bundle install`
15
15
 
16
16
  ## Configuration
17
17
 
18
- ```
18
+ ```ruby
19
19
  activate :minify_html
20
20
  ```
21
+ The various options can be passed with a block or as a hash like so:
22
+ ```ruby
23
+ activate :minify_html, remove_input_attributes: false
24
+ ```
25
+ These are the default settings, as listed in the [Htmlcompressor documentation](https://github.com/paolochiodi/htmlcompressor#usage):
26
+ ```ruby
27
+ activate :minify_html do |html|
28
+ html.remove_multi_spaces = true # Remove multiple spaces
29
+ html.remove_comments = true # Remove comments
30
+ html.remove_intertag_spaces = false # Remove inter-tag spaces
31
+ html.remove_quotes = true # Remove quotes
32
+ html.simple_doctype = false # Use simple doctype
33
+ html.remove_script_attributes = true # Remove script attributes
34
+ html.remove_style_attributes = true # Remove style attributes
35
+ html.remove_link_attributes = true # Remove link attributes
36
+ html.remove_form_attributes = false # Remove form attributes
37
+ html.remove_input_attributes = true # Remove input attributes
38
+ html.remove_javascript_protocol = true # Remove JS protocol
39
+ html.remove_http_protocol = false # Remove HTTP protocol
40
+ html.remove_https_protocol = false # Remove HTTPS protocol
41
+ html.preserve_line_breaks = false # Preserve line breaks
42
+ html.simple_boolean_attributes = true # Use simple boolean attributes
43
+ html.preserve_patterns = nil # Patterns to preserve
44
+ end
45
+ ```
21
46
 
22
47
  ## Build & Dependency Status
23
48
 
@@ -49,11 +74,11 @@ The best way to get quick responses to your issues and swift fixes to your bugs
49
74
 
50
75
  ## License
51
76
 
52
- Copyright (c) 2012-2013 Thomas Reynolds. MIT Licensed, see [LICENSE] for details.
77
+ Copyright (c) 2012-2014 Thomas Reynolds. MIT Licensed, see [LICENSE] for details.
53
78
 
54
79
  [middleman]: http://middlemanapp.com
55
80
  [gem]: https://rubygems.org/gems/middleman-minify-html
56
81
  [travis]: http://travis-ci.org/middleman/middleman-minify-html
57
82
  [gemnasium]: https://gemnasium.com/middleman/middleman-minify-html
58
83
  [codeclimate]: https://codeclimate.com/github/middleman/middleman-minify-html
59
- [LICENSE]: https://github.com/middleman/middleman-minify-html/blob/master/LICENSE.md
84
+ [LICENSE]: https://github.com/middleman/middleman-minify-html/blob/master/LICENSE.md
@@ -11,10 +11,11 @@ module Middleman
11
11
  option :remove_form_attributes, false, 'Remove form attributes'
12
12
  option :remove_input_attributes, true, 'Remove input attributes'
13
13
  option :remove_javascript_protocol, true, 'Remove JS protocol'
14
- option :remove_http_protocol, true, 'Remove HTTP protocol'
14
+ option :remove_http_protocol, false, 'Remove HTTP protocol'
15
15
  option :remove_https_protocol, false, 'Remove HTTPS protocol'
16
16
  option :preserve_line_breaks, false, 'Preserve line breaks'
17
17
  option :simple_boolean_attributes, true, 'Use simple boolean attributes'
18
+ option :preserve_patterns, nil, 'Patterns to preserve'
18
19
 
19
20
  def initialize(*)
20
21
  super
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module MinifyHtml
3
- VERSION = "3.4.0"
3
+ VERSION = "3.4.1"
4
4
  end
5
5
  end
@@ -16,5 +16,5 @@ Gem::Specification.new do |s|
16
16
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
17
  s.require_paths = ["lib"]
18
18
  s.add_runtime_dependency("middleman-core", [">= 3.2"])
19
- s.add_runtime_dependency("htmlcompressor", ["~> 0.1.0"])
19
+ s.add_runtime_dependency("htmlcompressor", ["~> 0.2.0"])
20
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-minify-html
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.0
4
+ version: 3.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Reynolds
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-27 00:00:00.000000000 Z
11
+ date: 2015-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman-core
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.1.0
33
+ version: 0.2.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.1.0
40
+ version: 0.2.0
41
41
  description: A HTML whitespace minifier for Middleman
42
42
  email:
43
43
  - me@tdreyno.com
@@ -49,7 +49,7 @@ files:
49
49
  - ".travis.yml"
50
50
  - CONTRIBUTING.md
51
51
  - Gemfile
52
- - Gemfile-v4
52
+ - Gemfile-v3
53
53
  - LICENSE.md
54
54
  - README.md
55
55
  - Rakefile
@@ -85,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
85
  version: '0'
86
86
  requirements: []
87
87
  rubyforge_project:
88
- rubygems_version: 2.2.2
88
+ rubygems_version: 2.4.8
89
89
  signing_key:
90
90
  specification_version: 4
91
91
  summary: A HTML whitespace minifier for Middleman