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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a0058611b546601d33f5fee0834dad01f4fe7bcc
4
- data.tar.gz: 9db7133fba1303205008ca5b506ed9c45f358a55
3
+ metadata.gz: 851afe01641622678e6986485e050702787b6c97
4
+ data.tar.gz: 83ee61242580cc8a5de3698fff9ae8b7b646cc69
5
5
  SHA512:
6
- metadata.gz: 2515e779fa85aeab77fb9c8573e9c858a4cf9fbc3e5a89b88571a1ea8e47695f4e5fd7a4545e862b3dc37f40eb7d08bfb8a549d06a083da2603e42e19d8f588e
7
- data.tar.gz: df17b5938a902da78b75cf00aa18620c08315e39f6bf71d9c64d140ec657b0cc3b28196a4d2b27219b5c85a3cc63c955234f7a79509fe8f85a15d14f10c13263
6
+ metadata.gz: 73621e6c912281415150bd6e2331384b8a91750acfb2385a3d8e88d509f5274b956f6a25bec583791e0487fb0b9a9c2a59a36fa7e5e85eb39600fcf1a0635b01
7
+ data.tar.gz: d024e54a3cf57498cd99f668299a1b629411d3a5dfcbead3176a8705aecb148f78e0b1d51cf47e45fa7dbd52cf1612f096f911ad6be84464c3a44fa4b4eb73eb
@@ -3,5 +3,5 @@ require 'herbie/generic_helpers.rb'
3
3
  require 'herbie/html_helpers.rb'
4
4
 
5
5
  module Herbie
6
- VERSION = '0.4.0'
6
+ VERSION = '0.4.1'
7
7
  end
@@ -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?}>"
@@ -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.0
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-03-06 00:00:00.000000000 Z
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: