temple 0.6.7 → 0.6.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 39b989dfbda6a7b4cd349b3580cb3352a1fbe16c
4
- data.tar.gz: f83ebdd80cbfe3a87cb40ee1e82b04e7985ccc95
3
+ metadata.gz: de7a5f291f7511f72860f051904f76a53789d165
4
+ data.tar.gz: 8d879f88faf0ea956abaaeac2cc65d1c26669098
5
5
  SHA512:
6
- metadata.gz: 4cd1b41809a7d563c7c3d91c8311dde78c093ca04e279210666b4160c4b33b9efb0d21b8ca7532087536b3d4078ef912957255474189d0129a278c3d149ad42e
7
- data.tar.gz: 1daf0219baec00f3e4a768b5a4560992ceb65c2aa8a255b9cf7e266d9e1a23432ac41ffa8cc6b953950dc659d6205f312e0d033a6fcdd6c5689153b1fc84d5c1
6
+ metadata.gz: 5c98e7222a80e362cb7570a9c5ca3a9db3f99082d8a8fe756f3420863e215faeccfd7b7b1063d845c695c9262b15746deed73f94a40ddb323f2548b51a58b189
7
+ data.tar.gz: da695941eb653ca94f4fb039b757c4fafe05ee9dc7c83dc11428cb6c05b31d72213d5a9d7dbfa70ef2fbadcd73446f17982ff5f9bb329bc06b97cffd21ab8295
data/.travis.yml CHANGED
@@ -3,11 +3,11 @@ rvm:
3
3
  - 1.8.7
4
4
  - 1.9.3
5
5
  - 2.0.0
6
+ - 2.1.0
6
7
  - ruby-head
7
8
  - jruby-18mode
8
9
  - jruby-19mode
9
- - rbx-18mode
10
- - rbx-19mode
10
+ - rbx-2
11
11
  matrix:
12
12
  allow_failures:
13
13
  - rvm: ruby-head
data/CHANGES CHANGED
@@ -1,3 +1,8 @@
1
+ 0.6.8
2
+
3
+ * HTML::Fast add svg doctype
4
+ * Render standalone html 5 attributes
5
+
1
6
  0.6.7
2
7
 
3
8
  * HTML::Pretty - change some block level tags
@@ -11,6 +11,7 @@ module Temple
11
11
  'mobile' => '<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">',
12
12
  'basic' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">',
13
13
  'transitional' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
14
+ 'svg' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">'
14
15
  }.freeze
15
16
 
16
17
  HTML_DOCTYPES = {
@@ -23,7 +24,7 @@ module Temple
23
24
 
24
25
  define_options :format => :xhtml,
25
26
  :attr_quote => '"',
26
- :autoclose => %w[meta img link br hr input area param col base],
27
+ :autoclose => %w[base basefont bgsound link meta area br embed img keygen wbr input menuitem param source track hr col frame],
27
28
  :js_wrapper => nil
28
29
 
29
30
  HTML = [:html, :html4, :html5]
@@ -56,7 +57,7 @@ module Temple
56
57
  end
57
58
 
58
59
  def html?
59
- HTML.include?(options[:format])
60
+ !xhtml?
60
61
  end
61
62
 
62
63
  def on_html_doctype(type)
@@ -104,10 +105,14 @@ module Temple
104
105
  end
105
106
 
106
107
  def on_html_attr(name, value)
107
- [:multi,
108
- [:static, " #{name}=#{options[:attr_quote]}"],
109
- compile(value),
110
- [:static, options[:attr_quote]]]
108
+ if html? && empty_exp?(value)
109
+ [:static, " #{name}"]
110
+ else
111
+ [:multi,
112
+ [:static, " #{name}=#{options[:attr_quote]}"],
113
+ compile(value),
114
+ [:static, options[:attr_quote]]]
115
+ end
111
116
  end
112
117
 
113
118
  def on_html_js(content)
@@ -1,3 +1,3 @@
1
1
  module Temple
2
- VERSION = '0.6.7'
2
+ VERSION = '0.6.8'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: temple
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.7
4
+ version: 0.6.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Magnus Holm
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-30 00:00:00.000000000 Z
12
+ date: 2014-07-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: tilt