govuk_schemas 5.0.1 → 5.0.2

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: 11fe25fadfae015a3a24eaf4abd396e618821351ce046f5102e3d25f8e2c1b1c
4
- data.tar.gz: 3ec36c9783619553fbf7a8cafc92af1f6e7788bfb2c7b7b1146c0269a1cf5227
3
+ metadata.gz: b4a46de8726a08e51bbe527cfb95d351a24998bf9bc9b2f3fd273529cf5c080a
4
+ data.tar.gz: 615c093ccede2446126bef34dd2e64f9c325ba5f9ed212b160ec57e442054522
5
5
  SHA512:
6
- metadata.gz: 51c8478cc3b921d0d6f97911f890705634acb7d4fca3d61cee5e3547b2e1ce82e69ac4fbb6df2a7224b3f7710b7a981df4006ec3d3474a8a980254da55af8a85
7
- data.tar.gz: 14676e6b674e0cf8fbb0957ff9865dbfb91085ea49cffca3156dd15c2616eb15f7b2657679f6508ae28216cbbc95e5356e77f48d0b18f140656eb90a082b8ae1
6
+ metadata.gz: bd2bba00a69249ae7b6e8dbc27ecbbb7a029d14dce3a9ce4c765ab3ca050dd68a1299a6263da238dc1759efcea6a74c83e95329fee9450655568ee9fbea98cc0
7
+ data.tar.gz: 29a6b200fc9c41c35961bbb6398878f59e8bc948d565c813df2a73051e179a16e05343a5e0821bc4c5624c2185a4233aeb41822a6792a869690fb081d73eefac
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 5.0.2
2
+
3
+ * Fix issue where customised schema validation message was incorrect for a modified payload
4
+
1
5
  # 5.0.1
2
6
 
3
7
  * Improve speed of random schema generation for customised content items
@@ -93,7 +93,8 @@ module GovukSchemas
93
93
  private
94
94
 
95
95
  def customise_payload(payload)
96
- original_payload = payload
96
+ # Use Marshal to create a deep dup of the payload so the original can be mutated
97
+ original_payload = Marshal.load(Marshal.dump(payload))
97
98
  customised_payload = yield(payload)
98
99
  customised_errors = validation_errors_for(customised_payload)
99
100
 
@@ -1,4 +1,4 @@
1
1
  module GovukSchemas
2
2
  # @private
3
- VERSION = "5.0.1".freeze
3
+ VERSION = "5.0.2".freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_schemas
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.1
4
+ version: 5.0.2
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: 2024-05-22 00:00:00.000000000 Z
11
+ date: 2024-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json-schema