govuk_ab_testing 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 345d3b5e64657fcdadb0a328c6dc63d60561bde8
|
|
4
|
+
data.tar.gz: 1e7561324d79a00b1e3fbb91fe0cb2d6ac8ecf93
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 37291f8e208496b8a581744d96a036b6d949a8dd975320f378fa0533900f7a17044bccfe183e21b490b9523034752add3090a1cba767118f36389852c142707f
|
|
7
|
+
data.tar.gz: 069f8ea8718bfc0fee5b9d0bacfe827eea46210d7df2d99e9b1ea2d285364f1dff76aa899f47e88e88a4db5b073e785104d017b0c5e3c3acade45c65b250f2c8
|
|
@@ -10,7 +10,8 @@ module GovukAbTesting
|
|
|
10
10
|
|
|
11
11
|
yield
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
assert_match ab_test.response_header, response.headers['Vary'],
|
|
14
|
+
"You probably forgot to use `configure_response`"
|
|
14
15
|
|
|
15
16
|
unless args[:assert_meta_tag] == false
|
|
16
17
|
content = ab_test.meta_tag_name + ':' + requested_variant.variant_name
|
|
@@ -34,8 +34,7 @@ module GovukAbTesting
|
|
|
34
34
|
#
|
|
35
35
|
# @param [ApplicationController::Response] the `response` in the controller
|
|
36
36
|
def configure_response(response)
|
|
37
|
-
|
|
38
|
-
response.headers['Vary'] = ab_test.response_header
|
|
37
|
+
response.headers['Vary'] = [response.headers['Vary'], ab_test.response_header].compact.join(', ')
|
|
39
38
|
end
|
|
40
39
|
|
|
41
40
|
# HTML meta tag used to track the results of your experiment
|