roda-component 0.1.55 → 0.1.56

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: 6f0bd5b2f67beac13bc2f3aca5cf6b9730529bb2
4
- data.tar.gz: 128bc04f62aedf156b4227bdcb7034ee771dbaa4
3
+ metadata.gz: 5663fb4576c922d03561f3c769b18f55a0abed15
4
+ data.tar.gz: 1bc88493e674d9d5c2d9e0450a7298f7a89a5baa
5
5
  SHA512:
6
- metadata.gz: 7b8812b8a409755d5a457946b56ca33d83d1b969d9d2383f72554d008432ce210c4fa83cd34fd7739edc226a761b4ac220a32b9664f947ac36b47a3a32327084
7
- data.tar.gz: fec0b4c8cb970af6be49fde8df2b7f6a0703b198307d0b745900dcfb73d59bf68648602e9c2e61308e9039a9bea56a8f448ef26c889a52368cd9cda5edaf52c9
6
+ metadata.gz: aacbd4f1728b5e97fdef4f576a5e3a3ba3e283e489359f0bd59c173f212e7b779c4ea91dff0d2305982e2f9c4cb0d3374ac26acf770df8c775bb531839217662
7
+ data.tar.gz: f9dedbfb42ca468c72e03304158511c75964d41a2eb9a153abe7d919d7cc7264bc938b55694facdc7f379431d2380f165e242d341cef2af8ba2a2bd9b3477916
@@ -123,7 +123,7 @@ class Roda
123
123
  response = Component::Instance.new(component(comp), scope).instance_exec options, &block
124
124
 
125
125
  if response.is_a? Roda::Component::DOM
126
- content = response.to_xml
126
+ content = response.to_xhtml
127
127
  else
128
128
  content = response
129
129
  end
@@ -226,7 +226,7 @@ class Roda
226
226
  if client?
227
227
  field_error_dom = DOM.new(`#{tmpl.dom}[0].outerHTML`)
228
228
  else
229
- field_error_dom = DOM.new(tmpl.dom.to_html)
229
+ field_error_dom = DOM.new(tmpl.dom.to_xhtml)
230
230
  end
231
231
  else
232
232
  field_error_dom = DOM.new('<span class="field-error"><span>')
@@ -1,5 +1,5 @@
1
1
  class Roda
2
2
  class Component
3
- VERSION = "0.1.55"
3
+ VERSION = "0.1.56"
4
4
  end
5
5
  end
@@ -329,7 +329,7 @@ class Roda
329
329
  # the reason we ave the raw html is so that we can use it client side.
330
330
  def tmpl name, dom, remove = true
331
331
  cache[:tmpl][name] = { dom: remove ? dom.remove : dom }
332
- cache[:tmpl][name][:html] = cache[:tmpl][name][:dom].to_html
332
+ cache[:tmpl][name][:html] = cache[:tmpl][name][:dom].to_xhtml
333
333
  cache[:tmpl][name]
334
334
  end
335
335
  alias :add_tmpl :tmpl
@@ -374,7 +374,7 @@ class Roda
374
374
  def dom
375
375
  if server?
376
376
  # TODO: duplicate cache[:dom] so we don't need to parse all the html again
377
- @_dom ||= DOM.new(cache[:dom].dom.to_html)
377
+ @_dom ||= DOM.new(cache[:dom].dom.to_xhtml)
378
378
  else
379
379
  @_dom ||= DOM.new(Element)
380
380
  end
@@ -178,7 +178,7 @@ class Roda
178
178
  load_component_js comp, action, options
179
179
 
180
180
  if js && comp_response.is_a?(Roda::Component::DOM)
181
- comp_response = comp_response.to_html
181
+ comp_response = comp_response.to_xhtml
182
182
  end
183
183
 
184
184
  if comp_response.is_a?(String) && js
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roda-component
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.55
4
+ version: 0.1.56
5
5
  platform: ruby
6
6
  authors:
7
7
  - cj