govuk_content_models 44.0.0 → 44.0.1

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: f89762bef8cb961a0873ce36b6f9a363663e8607
4
- data.tar.gz: 4e94fb7f57bac083c3d49e8ff27d842c2a72a908
3
+ metadata.gz: d12e1e76f0bd53224eb4a3ddcd7c66b825737d58
4
+ data.tar.gz: 8e048105ad319bd831a3e306eb94044ae45637a0
5
5
  SHA512:
6
- metadata.gz: 6d5688791c9a3b7f3923902615ed1965ebd5df03d46880be3e9037c9a6d131ba8135068838ab221a545aa85277caaa9e0afc6cb386b29e90f41be4ec054f1f7b
7
- data.tar.gz: 00bb64ba1f6230856bb4b534a716a700a39dc285a3ee86939bde0ae3fde6aba909df5a0afb8b2e0f012400f301257295d4250916d79ba9e313a257dc18f9233c
6
+ metadata.gz: 695d897919493b44d974ec827d111b0d23bd6ea14c93d373589a83c913d0b620efdccd5d469954a627b34184bd9e226b0df85fdd7b1f93e155d5c154548fb981
7
+ data.tar.gz: 570f1490489880fc04218ebadc61c1b981c0696d15abbb6a685a2e94d519ae17f6af38087740fff0822970559788359d2f1e46883fcaafcad21b73c6bf7d0c4b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 44.0.1
4
+
5
+ - Validate that completed transaction page slugs start with `done/`
6
+
3
7
  ## 44.0.0
4
8
 
5
9
  - Archived editions are not `safe_to_preview?` anymore
@@ -53,10 +53,11 @@ protected
53
53
 
54
54
  class DonePageValidator < InstanceValidator
55
55
  def applicable?
56
- starts_with?("done/")
56
+ of_kind?("completed_transaction")
57
57
  end
58
58
 
59
59
  def validate!
60
+ record.errors[attribute] << "Done page slugs must have a done/ prefix" unless starts_with?("done/")
60
61
  url_after_first_slash_is_valid_slug!
61
62
  end
62
63
  end
@@ -1,4 +1,4 @@
1
1
  module GovukContentModels
2
2
  # Changing this causes Jenkins to tag and release the gem into the wild
3
- VERSION = "44.0.0"
3
+ VERSION = "44.0.1"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_content_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 44.0.0
4
+ version: 44.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Battley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-16 00:00:00.000000000 Z
11
+ date: 2017-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bson_ext