herbie 0.4.0 → 0.4.1
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 +4 -4
- data/lib/herbie.rb +1 -1
- data/lib/herbie/html_helpers.rb +1 -1
- data/spec/herbie_spec.rb +8 -0
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 851afe01641622678e6986485e050702787b6c97
|
4
|
+
data.tar.gz: 83ee61242580cc8a5de3698fff9ae8b7b646cc69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73621e6c912281415150bd6e2331384b8a91750acfb2385a3d8e88d509f5274b956f6a25bec583791e0487fb0b9a9c2a59a36fa7e5e85eb39600fcf1a0635b01
|
7
|
+
data.tar.gz: d024e54a3cf57498cd99f668299a1b629411d3a5dfcbead3176a8705aecb148f78e0b1d51cf47e45fa7dbd52cf1612f096f911ad6be84464c3a44fa4b4eb73eb
|
data/lib/herbie.rb
CHANGED
data/lib/herbie/html_helpers.rb
CHANGED
@@ -23,7 +23,7 @@ module Herbie
|
|
23
23
|
end
|
24
24
|
end.join
|
25
25
|
"<#{name}#{' ' + attributes(attrs) unless attrs.empty? || attributes(attrs).empty?}>#{option_tags}</#{name}>"
|
26
|
-
when :span
|
26
|
+
when :span, :textarea
|
27
27
|
"<#{name}#{' ' + attributes(attrs) unless attrs.empty? || attributes(attrs).empty?}></#{name}>"
|
28
28
|
else
|
29
29
|
"<#{name}#{' ' + attributes(attrs) unless attrs.empty? || attributes(attrs).empty?}>"
|
data/spec/herbie_spec.rb
CHANGED
@@ -153,6 +153,14 @@ describe Herbie::Helpers do
|
|
153
153
|
tag(:select, attrs).should == "<select name=\"vehicles\"><option>— Choose —</option><optgroup label=\"Cars\"><option value=\"ferrari\">Ferrari</option><option value=\"vw\">Volkswagen</option><option value=\"ford\">Ford</option></optgroup><optgroup label=\"Trucks\"><option value=\"volvo\">Volvo</option><option value=\"toyota\">Toyota</option><option value=\"gm\">General Motors</option></optgroup><optgroup label=\"Bikes\"><option value=\"suzuki\">Suzuki</option><option value=\"ducati\">Ducati</option><option value=\"kawasaki\">Kawasaki</option></optgroup></select>"
|
154
154
|
end
|
155
155
|
|
156
|
+
it "should output closing textarea tag when supplied with empty content" do
|
157
|
+
attrs = {
|
158
|
+
id: 'comment',
|
159
|
+
placeholder: 'Any comments?'
|
160
|
+
}
|
161
|
+
tag(:textarea, attrs).should == "<textarea id=\"comment\" placeholder=\"Any comments?\"></textarea>"
|
162
|
+
end
|
163
|
+
|
156
164
|
it "should output tags mixed with ERB" do
|
157
165
|
pending "Need a mechanism for capturing erb output within a passed block"
|
158
166
|
erb_fragment = <<-ERB
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: herbie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Darlow
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tilt
|
@@ -120,4 +120,3 @@ test_files:
|
|
120
120
|
- spec/herbie_spec.rb
|
121
121
|
- spec/spec.opts
|
122
122
|
- spec/spec_helper.rb
|
123
|
-
has_rdoc:
|