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 +4 -0
- data/app/models/artefact.rb +2 -1
- data/app/validators/slug_validator.rb +11 -0
- data/lib/govuk_content_models/version.rb +1 -1
- metadata +4 -4
data/CHANGELOG.md
CHANGED
data/app/models/artefact.rb
CHANGED
@@ -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')
|
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.
|
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-
|
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:
|
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:
|
472
|
+
hash: -4078975284747344059
|
473
473
|
requirements: []
|
474
474
|
rubyforge_project:
|
475
475
|
rubygems_version: 1.8.23
|