govuk_content_models 28.1.0 → 28.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 +1 -1
- data/app/models/edition.rb +1 -0
- data/lib/govuk_content_models/version.rb +1 -1
- data/test/models/artefact_test.rb +1 -1
- metadata +4 -4
data/CHANGELOG.md
CHANGED
data/app/models/artefact.rb
CHANGED
@@ -393,7 +393,7 @@ class Artefact
|
|
393
393
|
|
394
394
|
# http://api.rubyonrails.org/classes/ActiveModel/Dirty.html
|
395
395
|
new_need_ids = need_ids_was.blank? ? need_ids : need_ids - need_ids_was
|
396
|
-
errors.add(:need_ids, "must be six-digit
|
396
|
+
errors.add(:need_ids, "must be six-digit integer strings") if new_need_ids.any? {|need_id| need_id !~ /\A\d{6}\z/ }
|
397
397
|
end
|
398
398
|
|
399
399
|
def valid_url_path?(path)
|
data/app/models/edition.rb
CHANGED
@@ -118,7 +118,7 @@ class ArtefactTest < ActiveSupport::TestCase
|
|
118
118
|
artefact = FactoryGirl.build(:artefact, need_ids: ["B1231"])
|
119
119
|
|
120
120
|
refute artefact.valid?
|
121
|
-
assert_includes artefact.errors[:need_ids], "must be six-digit
|
121
|
+
assert_includes artefact.errors[:need_ids], "must be six-digit integer strings"
|
122
122
|
end
|
123
123
|
|
124
124
|
should "not validate need ids that were migrated from the singular need_id field" do
|
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: 28.
|
4
|
+
version: 28.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: 2015-01-
|
12
|
+
date: 2015-01-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bson_ext
|
@@ -477,7 +477,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
477
477
|
version: '0'
|
478
478
|
segments:
|
479
479
|
- 0
|
480
|
-
hash:
|
480
|
+
hash: -3094189113344547894
|
481
481
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
482
482
|
none: false
|
483
483
|
requirements:
|
@@ -486,7 +486,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
486
486
|
version: '0'
|
487
487
|
segments:
|
488
488
|
- 0
|
489
|
-
hash:
|
489
|
+
hash: -3094189113344547894
|
490
490
|
requirements: []
|
491
491
|
rubyforge_project:
|
492
492
|
rubygems_version: 1.8.23
|