govuk_content_models 20.1.0 → 20.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 20.2.0
2
+
3
+ * Adds new `finder_email_signup` Artefact kind and validator for finder e-mail signups.
4
+
1
5
  ## 20.1.0
2
6
 
3
7
  * Adds new Whitehall publication sub-type format of `regulation` for Artefact
@@ -90,7 +90,8 @@ class Artefact
90
90
  "manual-change-history",
91
91
  "manual-section",
92
92
  "medical_safety_alert"],
93
- "finder-api" => ["finder"],
93
+ "finder-api" => ["finder",
94
+ "finder_email_signup"],
94
95
  "whitehall" => ["announcement",
95
96
  "authored_article",
96
97
  "case_study",
@@ -5,6 +5,7 @@ class SlugValidator < ActiveModel::EachValidator
5
5
  DonePageValidator,
6
6
  ForeignTravelAdvicePageValidator,
7
7
  HelpPageValidator,
8
+ FinderEmailSignupValidator,
8
9
  GovernmentPageValidator,
9
10
  ManualPageValidator,
10
11
  ManualChangeHistoryValidator,
@@ -72,6 +73,16 @@ protected
72
73
  end
73
74
  end
74
75
 
76
+ class FinderEmailSignupValidator < InstanceValidator
77
+ def applicable?
78
+ of_kind?("finder_email_signup")
79
+ end
80
+
81
+ def validate!
82
+ url_after_first_slash_is_valid_slug!
83
+ end
84
+ end
85
+
75
86
  class HelpPageValidator < InstanceValidator
76
87
  def applicable?
77
88
  of_kind?('help_page')
@@ -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 = "20.1.0"
3
+ VERSION = "20.2.0"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_content_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 20.1.0
4
+ version: 20.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-09-17 00:00:00.000000000 Z
12
+ date: 2014-09-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bson_ext
@@ -460,7 +460,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
460
460
  version: '0'
461
461
  segments:
462
462
  - 0
463
- hash: 1559350769952214726
463
+ hash: -4078975284747344059
464
464
  required_rubygems_version: !ruby/object:Gem::Requirement
465
465
  none: false
466
466
  requirements:
@@ -469,7 +469,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
469
469
  version: '0'
470
470
  segments:
471
471
  - 0
472
- hash: 1559350769952214726
472
+ hash: -4078975284747344059
473
473
  requirements: []
474
474
  rubyforge_project:
475
475
  rubygems_version: 1.8.23