caboose-cms 0.5.43 → 0.5.44
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/models/caboose/block_cache.rb +16 -0
- data/app/models/caboose/page_cacher.rb +2 -1
- data/lib/caboose/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZmY3ZmMwOTIzYzI2ZmY1YmZiYmVmY2YyZWYyYTFhM2ZiNDg5ZWU5NQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDY4YmQyYTFiNjY4ZjI3Njc3MGY0N2RjMGE3MTU2ZmQ3YzlhMWQ0Nw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NWU5YjNlNzU3YjRiYjNhYTdjNWY2MTQxZTcwMDY2NGZlM2NiNzg0Zjk4ZGUy
|
10
|
+
NDk1MTQ0YTYwMmRlNzM5ZTljYjBhODg4YWQyN2MxZjY4NmZmNmM5NjZlZDUw
|
11
|
+
MTA4ZGYzNWNhMGU1MmYyMTE5OGUzMmE1MzMzMDZhOTJhY2EwYjE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZDJkMWFmYzhlZjY4MmU2MWM3NDU2OTUwMWU1NTg3ZGE1NzhmMjc3Y2I3Nzdh
|
14
|
+
MjYyZGI2ODlmMGE2ZDM5ZjFlNGZjNDE1YWMzOThmNTdkMDY5MmVjZmRlYmNm
|
15
|
+
MGUzMDkxNGRjMzFhZjg5YmU3NzIzMTc3NzU2M2JjODUwNGQyZmY=
|
@@ -27,6 +27,22 @@ module Caboose
|
|
27
27
|
end
|
28
28
|
return nil
|
29
29
|
end
|
30
|
+
|
31
|
+
def children_where(h)
|
32
|
+
arr = []
|
33
|
+
self.children.each do |b|
|
34
|
+
matches = true
|
35
|
+
h.each do |k,v|
|
36
|
+
if b.send(k) != v
|
37
|
+
matches = false
|
38
|
+
break
|
39
|
+
end
|
40
|
+
end
|
41
|
+
arr << b if matches
|
42
|
+
end
|
43
|
+
return nil if arr.count == 0
|
44
|
+
return arr
|
45
|
+
end
|
30
46
|
|
31
47
|
#def render(block, options = nil)
|
32
48
|
# block = self.child(block) if block && block.is_a?(String)
|
@@ -102,7 +102,8 @@ module Caboose
|
|
102
102
|
f.gsub!(/block\.partial\((.*?),(.*?)\)/ , 'render :partial => \1')
|
103
103
|
f.gsub!(/block\.render\((.*?),(.*?)\)/ , 'render_block_type(block, \1, page, view, controller_view_content, modal, empty_text, editing, css, js, csrf_meta_tags, csrf_meta_tags2, logged_in_user, site)')
|
104
104
|
f.gsub!(/\=\s*render_block_type\(/ , 'render_block_type(')
|
105
|
-
f.gsub!(/\=\s*raw render_block_type\(/ , 'render_block_type(')
|
105
|
+
f.gsub!(/\=\s*raw render_block_type\(/ , 'render_block_type(')
|
106
|
+
f.gsub!(/block.children.where\(([^\)]*?)\)\.all/, 'block.children_where(\1)')
|
106
107
|
|
107
108
|
#@render_functions[bt.id] = "<% def render_block_type_#{bt.id}(block, page, view, controller_view_content, modal, empty_text, editing, css, js, csrf_meta_tags, csrf_meta_tags2, logged_in_user, site) %>#{f}<% end %>"
|
108
109
|
|
data/lib/caboose/version.rb
CHANGED