govuk_personalisation 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f19f176c2aa1874082e94b2798bc865b4b612ec92682ba41d8b6ed386239543
4
- data.tar.gz: 50c849e85a7d2115316c7db368e16f2c15649f82265b1a2c87a787aae49018e1
3
+ metadata.gz: dfc2b7eaa63dff171682233c9a9aeb902e2e888b1ad3bba5bb6a1f0556d1c1e1
4
+ data.tar.gz: a8641359718d30bc54f193cdf902108c1de52b3167e7028c972ba228383807d9
5
5
  SHA512:
6
- metadata.gz: e9ddd7d63d119782c1a8663ba076f233881dbfd04fadd9007d53afaaa68555145a10c30e1a0e2e04f65867d79c13ba662a9febb0e2ba4ba657bf056056efa6f2
7
- data.tar.gz: '02950b7e918f99b08f2cbeeec51da89e8aeaaa7be115250c4e918aebf0a06e6fb7768c59cf208f20dc17c11c7edf346fcc2edbe1c4ff9a3c2caabad9673d4941'
6
+ metadata.gz: 84c745bb3cd6b4b7d0e9ea6c420d4e9fb233e2be8342fe9a95d4afa47194d9b5686ffa783012a45ec48e976e52893ef3f2c091105659bf390f851604909a3939
7
+ data.tar.gz: b314b9488c92e1fce28082af10b876b47bfbad0e5f589fc33c301882af12a0a3cbf2cb61dfdf8273b4bbdc92b17fe1cebf790e15f50574d07985c521841d5411
data/CHANGELOG.md CHANGED
@@ -1,7 +1,11 @@
1
- ## [0.2.0]
1
+ # 0.3.0
2
+
3
+ - Always set `Vary: GOVUK-Account-Session` response header ([#4](https://github.com/alphagov/govuk_personalisation/pull/4))
4
+
5
+ # 0.2.0
2
6
 
3
7
  - Add AccountConcern to extract common account-related functionality ([#3](https://github.com/alphagov/govuk_personalisation/pull/3))
4
8
 
5
- ## [0.1.0] - 2021-05-12
9
+ # 0.1.0
6
10
 
7
11
  - Initial release
@@ -13,6 +13,7 @@ module GovukPersonalisation
13
13
 
14
14
  included do
15
15
  before_action :fetch_account_session_header
16
+ before_action :set_account_vary_header
16
17
  attr_accessor :account_session_header
17
18
  end
18
19
 
@@ -29,6 +30,10 @@ module GovukPersonalisation
29
30
  end
30
31
  end
31
32
 
33
+ def set_account_vary_header
34
+ response.headers["Vary"] = [response.headers["Vary"], ACCOUNT_SESSION_RESPONSE_HEADER_NAME].compact.join(", ")
35
+ end
36
+
32
37
  def set_account_session_header(govuk_account_session = nil)
33
38
  @account_session_header = govuk_account_session if govuk_account_session
34
39
  response.headers[ACCOUNT_SESSION_RESPONSE_HEADER_NAME] = @account_session_header
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GovukPersonalisation
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_personalisation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-01 00:00:00.000000000 Z
11
+ date: 2021-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails