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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZTc1NWMyNjFjMGI0MTc3NmQ1ZGI5NDZjNTY1MWRjZDllOGM3NzAyYg==
4
+ ZmY3ZmMwOTIzYzI2ZmY1YmZiYmVmY2YyZWYyYTFhM2ZiNDg5ZWU5NQ==
5
5
  data.tar.gz: !binary |-
6
- Mzc5OGM4ZmI2YTMyY2M3NmU5NjZlYjA0NTEwOTI3YzY0NmUxNDA1Yw==
6
+ MDY4YmQyYTFiNjY4ZjI3Njc3MGY0N2RjMGE3MTU2ZmQ3YzlhMWQ0Nw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Yjk5Y2FiZTI0MzVlYzc4MTExMmQyMmM3ZDNiNDFmMjUyYWI3YjdmZDg4NDll
10
- NmFiODcyMTFiMDgwNDRjZWMwYzI3NThmN2E3MDM1N2E3Yzk3MDZiYWU5MjNl
11
- NmNlZjRhYjNmYzdjZDI3ZThiYjRmMzkyNjY4MDMyYjZiOGU4ZjU=
9
+ NWU5YjNlNzU3YjRiYjNhYTdjNWY2MTQxZTcwMDY2NGZlM2NiNzg0Zjk4ZGUy
10
+ NDk1MTQ0YTYwMmRlNzM5ZTljYjBhODg4YWQyN2MxZjY4NmZmNmM5NjZlZDUw
11
+ MTA4ZGYzNWNhMGU1MmYyMTE5OGUzMmE1MzMzMDZhOTJhY2EwYjE=
12
12
  data.tar.gz: !binary |-
13
- MDk0NDcyMzVkNDllNTk0YmViMTMwYTc4MmE0MzZlM2RhZDgwZDk4MTI1YTE0
14
- MmFhYzg2OGU1NGRhMzEyYTBlOTlmMjRjZTU3MmFmOTk3ODBlNWVkMzc2YTEw
15
- ODNkZmQ5NTFiYzliOWMzZGQwNjhjOGU4ZjljMDU0OWIyODYyNzI=
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
 
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.5.43'
2
+ VERSION = '0.5.44'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.43
4
+ version: 0.5.44
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry