slimmer 3.28.0 → 3.28.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ # 3.28.1
2
+
3
+ * Added nil check for multivalue custom vars in google analytics configurator
4
+
1
5
  # 3.28.0
2
6
 
3
7
  * Report multiple need ids to Google analytics and Performance tracking
@@ -33,7 +33,7 @@ module Slimmer::Processors
33
33
  end
34
34
 
35
35
  def set_multivalue_custom_var(slot, name, values)
36
- return nil if values.empty?
36
+ return nil if !values.is_a?(Array) || values.empty?
37
37
  set_custom_var(slot, name, values.join(',').downcase)
38
38
  end
39
39
 
@@ -1,3 +1,3 @@
1
1
  module Slimmer
2
- VERSION = '3.28.0'
2
+ VERSION = '3.28.1'
3
3
  end
@@ -119,6 +119,28 @@ module GoogleAnalyticsTest
119
119
  end
120
120
  end
121
121
 
122
+ class WithInvalidAttributes < SlimmerIntegrationTest
123
+ include JavaScriptAssertions
124
+
125
+ def setup
126
+ super
127
+ end
128
+
129
+ def test_should_skip_passing_need_ids_if_they_are_nil
130
+ artefact = artefact_for_slug_in_a_subsection("something", "rhubarb/in-puddings")
131
+ headers = {
132
+ Slimmer::Headers::ARTEFACT_HEADER => artefact.to_json,
133
+ Slimmer::Headers::FORMAT_HEADER => "custard"
134
+ }
135
+ given_response 200, GENERIC_DOCUMENT, headers
136
+
137
+ refute_custom_var "NeedID"
138
+ # the presence of these attributes tests that the nil check worked
139
+ assert_custom_var 1, "Section", "rhubarb", PAGE_LEVEL_EVENT
140
+ assert_custom_var 2, "Format", "custard", PAGE_LEVEL_EVENT
141
+ end
142
+ end
143
+
122
144
  class WithoutHeadersTest < SlimmerIntegrationTest
123
145
  include JavaScriptAssertions
124
146
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slimmer
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.28.0
4
+ version: 3.28.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-03-31 00:00:00.000000000 Z
13
+ date: 2014-04-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: nokogiri
@@ -341,7 +341,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
341
341
  version: '0'
342
342
  segments:
343
343
  - 0
344
- hash: -4353529555828351700
344
+ hash: -2679624557716830951
345
345
  required_rubygems_version: !ruby/object:Gem::Requirement
346
346
  none: false
347
347
  requirements:
@@ -350,7 +350,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
350
350
  version: '0'
351
351
  segments:
352
352
  - 0
353
- hash: -4353529555828351700
353
+ hash: -2679624557716830951
354
354
  requirements: []
355
355
  rubyforge_project: slimmer
356
356
  rubygems_version: 1.8.23