goat 0.3.23 → 0.3.24

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.
Files changed (3) hide show
  1. data/goat.gemspec +1 -1
  2. data/lib/goat/html.rb +6 -3
  3. metadata +4 -4
data/goat.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = 'goat'
3
- s.version = '0.3.23'
3
+ s.version = '0.3.24'
4
4
  s.summary = 'Pre-release beta version of Goat'
5
5
  s.author = 'Patrick Collison'
6
6
  s.email = 'patrick@collison.ie'
data/lib/goat/html.rb CHANGED
@@ -145,6 +145,8 @@ module Goat
145
145
  [k, v.prefix_ns(id)]
146
146
  elsif v.kind_of?(Array) && HTMLBuilder::ARRAY_ATTRS.include?(k)
147
147
  [k, v]
148
+ elsif v.kind_of?(Integer) && HTMLBuilder::INTEGER_ATTRS.include?(k)
149
+ [k, v]
148
150
  else
149
151
  raise "Invalid object #{v.inspect} to get a prefix in dom:\n#{dom.inspect}"
150
152
  end
@@ -184,6 +186,7 @@ module Goat
184
186
 
185
187
  class HTMLBuilder
186
188
  ARRAY_ATTRS = [:class]
189
+ INTEGER_ATTRS = [:colspan, :rowspan]
187
190
 
188
191
  class TagBuilder
189
192
  # TODO: gmail trick of only a single onclick() handler
@@ -206,18 +209,18 @@ module Goat
206
209
  @attrs.map_to_hash do |k, v|
207
210
  if k == :class && v.kind_of?(Array)
208
211
  new[:class] = @attrs[:class].join(' ')
209
- else
212
+ else
210
213
  new[k] = v
211
214
  end
212
215
  end
213
216
 
214
217
  @attrs = new
215
218
  end
216
-
219
+
217
220
  def identity
218
221
  [@tag, @attrs, @body]
219
222
  end
220
-
223
+
221
224
  def dispatch
222
225
  meth = "#{@tag}_tag".to_sym
223
226
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: goat
3
3
  version: !ruby/object:Gem::Version
4
- hash: 61
4
+ hash: 35
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 23
10
- version: 0.3.23
9
+ - 24
10
+ version: 0.3.24
11
11
  platform: ruby
12
12
  authors:
13
13
  - Patrick Collison
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-17 00:00:00 +00:00
18
+ date: 2011-01-03 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies: []
21
21