caboose-cms 0.5.192 → 0.5.193

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
- YzFhZWU3NWRkNDk3NzhiMzM5ZDA2ZDdjZWU3YjgyOTFjMTdkODI4MA==
4
+ NDgzYmEyYzE1Mjg5ZDljNGJhYWUzMjhlOTYwZmVhZmFjZTdkZGEwMQ==
5
5
  data.tar.gz: !binary |-
6
- YWIzZmZkM2Q2ODE0Y2Q1MDAyOTc4MTUwNjIwZWFmNDQ0ZTVmMDJjMw==
6
+ ODY1NDE2MmQzZTdhN2Y5YWE1MDIwMmUwYzM4MWVhOTI4MGZiY2U5Zg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YTMxZDUzZDU2ZTkwZTc1NjM2ZGY5MGZhYjdmZDY3NTgzMmQ0MWZkOTcyNzc5
10
- NWIzYTgyMTZiNTFmOGJkMTczMTNmNjA5OTVmYTBmZmM3ZDkzOTA5YTJjN2Y4
11
- NjlmM2Y1MTBmMmRmYWFjN2JkNTRhZmQ2ZDcxMjA0NGJmYmI4MTU=
9
+ NzIzMmEzMDY3Zjk4NmFkYTRlNTkxYTZjZWQ2ZjA2NzMzYjRjMzA1ZDE4MmNh
10
+ MTVjOTAyMDA5ZWE4NjFmNWRjYmZhNTJjZDMzZGY1ODk5ZDkxZTNlNzk2M2Rl
11
+ ZWQ3ZDczZWNjOGNlMjY0YTAxNmQ2ODJiYmQzZTg3NWI1YTA2NTE=
12
12
  data.tar.gz: !binary |-
13
- MjcyODM0MmExYjBlOGVjZTJjZDE3M2NkYTA1NjQwYmE4MGI0NjQ0MTBkMDYx
14
- M2EzYTI3YjU0Yzg5NWExZDdjNTc5ODI1ZTIwMjVjMTkzMjgwZDcxYTFlOGJj
15
- MTZkMjIxYTJhYWJhNDMyMjEwN2ZlMDkzY2Y3NTY4NDNkNzAxNGE=
13
+ MmM0OTI5YjcwNjVmM2QzNTE5OTM0NDNiNWIwMWM0NzNlZjI4Yjk0MzEzZTU1
14
+ MTA3ZmNmNzljMzIyNzczMmJhYmJkMjI1ZDZiNDUzMDk3YzA3ZDE0NjIwZDYy
15
+ YWYwYTQzMzFjOWZmZGE4YjQ0YTU1NWIyMWJlNzM3MDZkNTVmZGQ=
@@ -240,10 +240,10 @@ class Caboose::Block < ActiveRecord::Base
240
240
  str = view.render(:partial => "../../sites/#{site.name}/blocks/#{name}", :locals => options2)
241
241
  rescue ActionView::MissingTemplate => ex
242
242
  begin
243
- str = view.render(:partial => "caboose/blocks/#{name}", :locals => options2)
244
- rescue
243
+ str = view.render(:partial => "caboose/blocks/#{name}", :locals => options2)
244
+ rescue Exception => ex
245
245
  Caboose.log("Partial caboose/blocks/#{name} doesn't exist.")
246
- str = "<p class='note error'>#{self.partial_message(block, ex)}</p>"
246
+ str = "<p class='note error'>#{self.partial_message(name, ex)}</p>"
247
247
  end
248
248
  end
249
249
 
@@ -8,32 +8,10 @@ module Caboose
8
8
  :conversion_id,
9
9
  :labels_function
10
10
 
11
- def labels(page)
12
- return eval(self.custom_labels_function)
13
- end
14
-
15
- def js_code(request, page)
16
- return "" if !self.site.use_retargeting
17
-
18
- str = ""
19
- labels = self.labels(request, page)
20
- labels.each do |label|
21
- str << "<script type='text/javascript'>\n"
22
- str << "/* <![CDATA[ */\n"
23
- str << "var google_conversion_id = #{self.conversion_id};\n"
24
- str << "var google_conversion_label = '#{label}';\n"
25
- str << "var google_custom_params = window.google_tag_params;\n"
26
- str << "var google_remarketing_only = true;\n"
27
- str << "/* ]]> */\n"
28
- str << "</script>\n"
29
- str << "<script type='text/javascript' src='//www.googleadservices.com/pagead/conversion.js'></script>\n"
30
- str << "<noscript>\n"
31
- str << "<div style='display:inline;'>\n"
32
- str << "<img height='1' width='1' style='border-style:none;' alt='' src='//googleads.g.doubleclick.net/pagead/viewthroughconversion/#{self.conversion_id}/?value=1.00&amp;currency_code=USD&amp;label=#{label}&amp;guid=ON&amp;script=0'/>\n"
33
- str << "</div>\n"
34
- str << "</noscript>\n"
35
- end
36
- return str
11
+ def labels(request, page)
12
+ arr = eval(self.labels_function)
13
+ return [arr] if arr is_a? String
14
+ return arr
37
15
  end
38
16
 
39
17
  end
@@ -1,9 +1,9 @@
1
1
  <% if site.use_retargeting %>
2
2
  <% rc = site.retargeting_config %>
3
- <% rc.labels(request, page).each do |label %>
3
+ <% rc.labels(request, page).each do |label| %>
4
4
  <script type='text/javascript'>
5
5
  /* <![CDATA[ */
6
- var google_conversion_id = #{rc.conversion_id};
6
+ var google_conversion_id = <%= rc.conversion_id %>;
7
7
  var google_conversion_label = "<%= raw label %>";
8
8
  var google_custom_params = window.google_tag_params;
9
9
  var google_remarketing_only = true;
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.5.192'
2
+ VERSION = '0.5.193'
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.192
4
+ version: 0.5.193
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry