govuk_personalisation 0.9.0 → 0.10.0

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
  SHA256:
3
- metadata.gz: c790c79fa0ba26b2b84efecd07532446c2497cbfd874586526b65f589ba715ca
4
- data.tar.gz: 899f016d1a906e2fe2893b62da8999e33edc9b7c8ae6df9d6caee6ce9c14aa28
3
+ metadata.gz: d966869deca66c3fbea1730d7b2478ca77bc019d499b824269a9456eeffa82d9
4
+ data.tar.gz: fc4735bde8c3077c1e8e2795e4deb496b2c7816bfe6006057b0c8e59ceb27196
5
5
  SHA512:
6
- metadata.gz: '0398288ee33c9a21186c833fec51049b38f49e62b7d6e649970599ffae8ae7a3a0096100fc17b325b1f63698030dc7c31c2a2350206b3af65c0bd3fb46e36bd8'
7
- data.tar.gz: 2ca84334520a9521f79ca1e49a1a3f36af4e1fc0bccaa5c855f9f4b19628c6909a68af91c3388266039fec8afc2ce8c1883bd8be8aecba36567dd6d3a51c5fe0
6
+ metadata.gz: 826c826f13b08be03d467655bab27bab323ec6b8823bdddc25b52f0d20906344ee4ece5c95a31bf7726e2aabdea0511b46934b5a37137d7e8788d496b570395f
7
+ data.tar.gz: a74b510d5f549e3d0cc9df6b533763d5ac9a3c9211e424f49372b705acb9bb64229f35794f0aadaeee5492d8108040a5780acdc9a8e4d5c7bb4cf54a88b4b979
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 0.10.0
2
+ - Add `url_with_analytics` helper to allow apps to access the URL used for `redirect_with_analytics` ([#22](https://github.com/alphagov/govuk_personalisation/pull/22))
3
+
1
4
  # 0.9.0
2
5
  - Add `redirect_with_analytics` helper, attaches _ga and cookie_consent values from existing params to redirects. ([#19](https://github.com/alphagov/govuk_personalisation/pull/19))
3
6
  - Add `GovukPersonalisation::Redirect` and `.build_url` helper to construct valid URLs with additional parameters. ([#19](https://github.com/alphagov/govuk_personalisation/pull/19))
@@ -131,7 +131,15 @@ module GovukPersonalisation
131
131
  #
132
132
  # @param url [String] The URL to redirect to
133
133
  def redirect_with_analytics(url)
134
- redirect_to GovukPersonalisation::Redirect.build_url(url, params.permit(:_ga, :cookie_consent).to_h)
134
+ redirect_to url_with_analytics(url)
135
+ end
136
+
137
+ # Build a URL adding parameters necessary for cross-domain analytics
138
+ # and cookie consent
139
+ #
140
+ # @param url [String] The URL
141
+ def url_with_analytics(url)
142
+ GovukPersonalisation::Redirect.build_url(url, params.permit(:_ga, :cookie_consent).to_h)
135
143
  end
136
144
  end
137
145
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GovukPersonalisation
4
- VERSION = "0.9.0"
4
+ VERSION = "0.10.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.9.0
4
+ version: 0.10.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-10-07 00:00:00.000000000 Z
11
+ date: 2021-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: plek