dominate 0.6.2 → 0.6.3

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: 72d9211bc986aa60662aca31c47f9d21079012ca
4
- data.tar.gz: b4134caf0f64afff8dd8586e92f8120f3748694f
3
+ metadata.gz: d7f63715cf73f28c3124306141fd51b42132e15a
4
+ data.tar.gz: 7458532248d77685e6c936d27690e78140e6064f
5
5
  SHA512:
6
- metadata.gz: dbd70fd7b2e6d7ef293c3c3af0563427a7a49753eccb7b25a331a69906a5ca1d49ecb41a471ac180ff1ab70469fa1b4b89641d04c0f4cd456eea1adac3e68e4b
7
- data.tar.gz: bf9a7234075c749d8938b67e8eba81d39b57ca312307ee82e707547e9f5da74b48d085e8625317058a38550b08e1572cdb16d4e91b3babf81e53c08b0195ebf5
6
+ metadata.gz: dc51e52664773dc29afd1f434762bb1e9dc1bbd5feb86d50b5fdea4a93b2c82ce1e117cf0f7e62b9be56b20ffda805fce77dff4a466e71b8d73e6f726b9ee292
7
+ data.tar.gz: b9f652270fa9cc1bb9b574fb7767f00cbfda9808a65723d8ecae4f9d981404bed64aa24286b468e45ab55ab4433bb3f85fed9a911fa551b3972fd949ce9fe95c
data/lib/dominate/html.rb CHANGED
@@ -19,7 +19,7 @@ module Dominate
19
19
  dom
20
20
  end
21
21
 
22
- def load_file path, config, instance
22
+ def load_file path, c, instance
23
23
  html = _cache.fetch(path) {
24
24
  template = false
25
25
 
@@ -38,7 +38,7 @@ module Dominate
38
38
  end
39
39
 
40
40
  template
41
- }.render instance, config.to_h
41
+ }.render instance, c.to_h
42
42
 
43
43
  html
44
44
  end
@@ -34,9 +34,11 @@ class DeepOpenStruct < OpenStruct
34
34
 
35
35
  if v.is_a? Array
36
36
  @table[k.to_sym] ||= []
37
+ @hash_table[k.to_sym] ||= []
37
38
 
38
39
  v.each { | entry |
39
40
  @table[k.to_sym] << entry
41
+ @hash_table[k.to_sym] << entry
40
42
  }
41
43
  else
42
44
  @table[k.to_sym] = (v.is_a?(Hash) ? self.class.new(v) : v)
@@ -1,3 +1,3 @@
1
1
  module Dominate
2
- VERSION = "0.6.2"
2
+ VERSION = "0.6.3"
3
3
  end
@@ -44,11 +44,14 @@ module Dominate
44
44
  resp = widget.send state
45
45
  end
46
46
 
47
- if resp.is_a? Dominate::Dom
48
- html = "<div id='#{widget.id_for(state)}'>#{resp.html}</div>"
49
- resp.reset_html
50
- resp.doc.inner_html = html
51
- resp.html
47
+ # if resp.is_a? Dominate::Dom
48
+ # html = "<div id='#{widget.id_for(state)}'>#{resp.html}</div>"
49
+ # resp.reset_html
50
+ # resp.doc.inner_html = html
51
+ # resp.html
52
+ if resp.is_a? String
53
+ html = "<div id='#{widget.id_for(state)}'>#{resp}</div>"
54
+ html
52
55
  else
53
56
  resp
54
57
  end
@@ -60,11 +60,14 @@ module Dominate
60
60
  resp = send(state)
61
61
  end
62
62
 
63
- if resp.is_a? Dominate::Dom
64
- html = "<div id='#{id_for(state)}'>#{resp.html}</div>"
65
- resp.doc.inner_html = html
66
- resp.reset_html
67
- resp.html
63
+ # if resp.is_a? Dominate::Dom
64
+ # html = "<div id='#{id_for(state)}'>#{resp.html}</div>"
65
+ # resp.doc.inner_html = html
66
+ # resp.reset_html
67
+ # resp.html
68
+ if resp.is_a? String
69
+ html = "<div id='#{id_for(state)}'>#{resp}</div>"
70
+ html
68
71
  else
69
72
  resp
70
73
  end
@@ -132,11 +135,14 @@ module Dominate
132
135
  resp = send(e)
133
136
  end
134
137
 
135
- if resp.is_a? Dominate::Dom
136
- html = "<div id='#{id_for(e)}'>#{resp.html}</div>"
137
- resp.doc.inner_html = html
138
- resp.reset_html
139
- res.write resp.html
138
+ # if resp.is_a? Dominate::Dom
139
+ # html = "<div id='#{id_for(e)}'>#{resp.html}</div>"
140
+ # resp.doc.inner_html = html
141
+ # resp.reset_html
142
+ # res.write resp.html
143
+ if resp.is_a? String
144
+ html = "<div id='#{id_for(e)}'>#{html}</div>"
145
+ res.write html
140
146
  else
141
147
  resp
142
148
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dominate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - cj