cells-erb 0.0.5 → 0.0.6

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: 3089398d6b69c76996f010670e19881242c86df0
4
- data.tar.gz: f3a3dbd48aacf304f957d5a72d259b3620d0036a
3
+ metadata.gz: 71447b55d01719ad8654f41a4efa377848653c51
4
+ data.tar.gz: 15ca9881197f5ab748ae08c2e442477d95d697ff
5
5
  SHA512:
6
- metadata.gz: b1061c785daa3dafad971ad9a21ff25caf279cdf8f9393f62a2ef1950a1d3368933c3ce81c545b2237573381a15c969ac7f62169bc259c253fce6c80137a5a49
7
- data.tar.gz: c14145e5d9a9380fe1aa383e669534814f0ee523593942c7b29a6aea8d812aa6783e7eed18ab30b53f237a806a78f765da307a0195bfcfdde424a430834e28f3
6
+ metadata.gz: fd53c5c1b61267d2f52e8dac11dac8fc24f74b16fedb5a1264735d0da64c6112300d6ae531c3c7a05400bae553322122e767ac27c3201e1779916b810644fe43
7
+ data.tar.gz: 4a1a0f42796af6165751ae7a1b11c58ee590f4a1f86a34bd601fc2444294b488b285d7a7e1aa24756860bb9b2f6afff8b350ae6849c75f73ec410936e759f499
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.0.6
2
+
3
+ * Changed `#tag_options`. We now do escape strings as attributes are double-quoted strings already. It makes sense, thanks Rails.
4
+
1
5
  # 0.0.5
2
6
 
3
7
  * Fix `#concat`.
@@ -15,8 +15,6 @@ module Cell
15
15
  def template_options_for(options)
16
16
  {
17
17
  template_class: ::Cell::Erb::Template,
18
- escape_html: false,
19
- escape_attrs: false,
20
18
  suffix: "erb"
21
19
  }
22
20
  end
@@ -45,6 +43,12 @@ module Cell
45
43
  super
46
44
  end
47
45
 
46
+ # We do statically set escape=true since attributes are double-quoted strings, so we have
47
+ # to escape (default in Rails).
48
+ def tag_options(options, escape = true)
49
+ super(options, true)
50
+ end
51
+
48
52
  def form_tag_with_body(html_options, content)
49
53
  "#{form_tag_html(html_options)}" << content.to_s << "</form>"
50
54
  end
@@ -1,5 +1,5 @@
1
1
  module Cell
2
2
  module Erb
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
  end
5
5
  end
@@ -5,7 +5,7 @@ Word.
5
5
  hallo
6
6
  <% end %>
7
7
 
8
- <%= content_tag( :ul) do %>
8
+ <%= content_tag(:ul, "data-x" => '{"a":"1"}') do %>
9
9
  Hallo
10
10
  <% end %>
11
11
 
@@ -43,7 +43,7 @@ class ErbTest < MiniTest::Spec
43
43
  <a href=\"/rails/sucks\">
44
44
  hallo
45
45
  </a>
46
- <ul>
46
+ <ul data-x="{&quot;a&quot;:&quot;1&quot;}">
47
47
  Hallo
48
48
  </ul>
49
49
  </form>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cells-erb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abdelkader Boudih
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-06-22 00:00:00.000000000 Z
12
+ date: 2015-06-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cells
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  version: '0'
130
130
  requirements: []
131
131
  rubyforge_project:
132
- rubygems_version: 2.2.2
132
+ rubygems_version: 2.4.8
133
133
  signing_key:
134
134
  specification_version: 4
135
135
  summary: Tilt binding for Erbse.