htmlcompressor 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ 0.0.6 - 19/04/2013
2
+ Switch to POSIX "bracket expression" from \p{Blank} to provide better ruby compatibility
3
+ Minor fixes to README
1
4
  0.0.5 - 31/01/2013
2
5
  Safer rack default options: remove_intertag_spaces => false
3
6
  README more clear
data/README.md CHANGED
@@ -25,21 +25,21 @@ The compressor ships with basic and safe default options that may be overwritten
25
25
  :enabled => true
26
26
  :remove_multi_spaces => true,
27
27
  :remove_comments => true,
28
- :remove_intertag_spaces => fasle,
29
- :remove_quotes => fasle,
28
+ :remove_intertag_spaces => false,
29
+ :remove_quotes => false,
30
30
  :compress_css => false,
31
31
  :compress_javascript => false,
32
32
  :simple_doctype => false,
33
- :remove_script_attributes => fasle,
34
- :remove_style_attributes => fasle,
35
- :remove_link_attributes => fasle,
36
- :remove_form_attributes => fasle,
37
- :remove_input_attributes => fasle,
38
- :remove_javascript_protocol => fasle,
39
- :remove_http_protocol => fasle,
33
+ :remove_script_attributes => false,
34
+ :remove_style_attributes => false,
35
+ :remove_link_attributes => false,
36
+ :remove_form_attributes => false,
37
+ :remove_input_attributes => false,
38
+ :remove_javascript_protocol => false,
39
+ :remove_http_protocol => false,
40
40
  :remove_https_protocol => false,
41
41
  :preserve_line_breaks => false,
42
- :simple_boolean_attributes => fasle
42
+ :simple_boolean_attributes => false
43
43
  }
44
44
  ```
45
45
 
@@ -77,7 +77,7 @@ module HtmlCompressor
77
77
  REL_EXTERNAL_PATTERN = Regexp.new("<(?:[^>]*)rel\\s*=\\s*([\"']*)(?:alternate\\s+)?external\\1(?:[^>]*)>", Regexp::MULTILINE | Regexp::IGNORECASE)
78
78
  EVENT_PATTERN1 = Regexp.new("(\\son[a-z]+\\s*=\\s*\")([^\"\\\\\\r\\n]*(?:\\\\.[^\"\\\\\\r\\n]*)*)(\")", Regexp::IGNORECASE) # unmasked: \son[a-z]+\s*=\s*"[^"\\\r\n]*(?:\\.[^"\\\r\n]*)*""
79
79
  EVENT_PATTERN2 = Regexp.new("(\\son[a-z]+\\s*=\\s*')([^'\\\\\\r\\n]*(?:\\\\.[^'\\\\\\r\\n]*)*)(')", Regexp::IGNORECASE)
80
- LINE_BREAK_PATTERN = Regexp.new("(?:\\p{Blank}*(\\r?\\n)\\p{Blank}*)+")
80
+ LINE_BREAK_PATTERN = Regexp.new("(?:[[:blank:]]*(\\r?\\n)[[:blank:]]*)+")
81
81
  SURROUNDING_SPACES_MIN_PATTERN = Regexp.new("\\s*(</?(?:" + BLOCK_TAGS_MIN.gsub(",", "|") + ")(?:>|[\\s/][^>]*>))\\s*", Regexp::MULTILINE | Regexp::IGNORECASE)
82
82
  SURROUNDING_SPACES_MAX_PATTERN = Regexp.new("\\s*(</?(?:" + BLOCK_TAGS_MAX.gsub(",", "|") + ")(?:>|[\\s/][^>]*>))\\s*", Regexp::MULTILINE | Regexp::IGNORECASE)
83
83
  SURROUNDING_SPACES_ALL_PATTERN = Regexp.new("\\s*(<[^>]+>)\\s*", Regexp::MULTILINE | Regexp::IGNORECASE)
@@ -1,3 +1,3 @@
1
1
  module HtmlCompressor
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -1,4 +1,4 @@
1
- <script type="text/javascript">var a=0,a=a+1;alert(a);</script><script><![CDATA[var a=0,a=a+1;alert(a);]]></script><pre>
1
+ <script type="text/javascript">var i=0,i=i+1;alert(i);</script><script><![CDATA[var i=0,i=i+1;alert(i);]]></script><pre>
2
2
  <script>
3
3
  var i = 0; //comment
4
4
  i = i + 1;
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: htmlcompressor
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Paolo Chiodi
@@ -15,12 +15,10 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-02-06 00:00:00 +01:00
18
+ date: 2013-04-19 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- name: yui-compressor
23
- prerelease: false
24
22
  requirement: &id001 !ruby/object:Gem::Requirement
25
23
  none: false
26
24
  requirements:
@@ -33,10 +31,10 @@ dependencies:
33
31
  - 6
34
32
  version: 0.9.6
35
33
  type: :runtime
34
+ name: yui-compressor
36
35
  version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: closure-compiler
39
36
  prerelease: false
37
+ - !ruby/object:Gem::Dependency
40
38
  requirement: &id002 !ruby/object:Gem::Requirement
41
39
  none: false
42
40
  requirements:
@@ -49,10 +47,10 @@ dependencies:
49
47
  - 5
50
48
  version: 1.1.5
51
49
  type: :development
50
+ name: closure-compiler
52
51
  version_requirements: *id002
53
- - !ruby/object:Gem::Dependency
54
- name: rake
55
52
  prerelease: false
53
+ - !ruby/object:Gem::Dependency
56
54
  requirement: &id003 !ruby/object:Gem::Requirement
57
55
  none: false
58
56
  requirements:
@@ -63,10 +61,10 @@ dependencies:
63
61
  - 0
64
62
  version: "0"
65
63
  type: :development
64
+ name: rake
66
65
  version_requirements: *id003
67
- - !ruby/object:Gem::Dependency
68
- name: minitest
69
66
  prerelease: false
67
+ - !ruby/object:Gem::Dependency
70
68
  requirement: &id004 !ruby/object:Gem::Requirement
71
69
  none: false
72
70
  requirements:
@@ -77,7 +75,9 @@ dependencies:
77
75
  - 0
78
76
  version: "0"
79
77
  type: :development
78
+ name: minitest
80
79
  version_requirements: *id004
80
+ prerelease: false
81
81
  description: Put your html on a diet
82
82
  email:
83
83
  - chiodi84@gmail.com
@@ -250,7 +250,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
250
250
  requirements: []
251
251
 
252
252
  rubyforge_project:
253
- rubygems_version: 1.6.0
253
+ rubygems_version: 1.6.2
254
254
  signing_key:
255
255
  specification_version: 3
256
256
  summary: htmlcompressor provides a class and a rack middleware to minify html pages