govuk_content_models 32.0.0 → 32.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/app/models/user.rb +9 -8
- data/govuk_content_models.gemspec +1 -1
- data/lib/govuk_content_models/test_helpers/factories.rb +3 -1
- data/lib/govuk_content_models/version.rb +1 -1
- data/test/models/licence_edition_test.rb +5 -5
- data/test/models/user_test.rb +7 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1cf903c765eb0fc8a68cc9f8924b85054c13bbd
|
4
|
+
data.tar.gz: 6d397d3891fcb8c25594a87f10d245cff6de0f06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c6f0b8ba9a6e550f6d0ed0de0237be9a9bc9908c39bb468c2a2ffca322a937240da7b1ed6dc90882d37afca0063223e1b45fcbe4743d2cd4a03d3607e92a1e9
|
7
|
+
data.tar.gz: d9a05ab4a03b66a0608078785e7db503a19c5bf43d613a5b3706b45054df0bf00611ef0a7fb197ed42cabaa078d8e68601e1fa3097daf239768cf95014d01c68
|
data/CHANGELOG.md
CHANGED
data/app/models/user.rb
CHANGED
@@ -14,14 +14,15 @@ class User
|
|
14
14
|
defined?(USER_COLLECTION_NAME) ? USER_COLLECTION_NAME : "users"
|
15
15
|
end
|
16
16
|
|
17
|
-
field "name",
|
18
|
-
field "uid",
|
19
|
-
field "version",
|
20
|
-
field "email",
|
21
|
-
field "permissions",
|
22
|
-
field "remotely_signed_out",
|
23
|
-
field "organisation_slug",
|
24
|
-
field "disabled",
|
17
|
+
field "name", type: String
|
18
|
+
field "uid", type: String
|
19
|
+
field "version", type: Integer
|
20
|
+
field "email", type: String
|
21
|
+
field "permissions", type: Array
|
22
|
+
field "remotely_signed_out", type: Boolean, default: false
|
23
|
+
field "organisation_slug", type: String
|
24
|
+
field "disabled", type: Boolean, default: false
|
25
|
+
field "organisation_content_id", type: String
|
25
26
|
|
26
27
|
index "uid", unique: true
|
27
28
|
index "disabled"
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
|
|
18
18
|
gem.add_dependency "bson_ext"
|
19
19
|
gem.add_dependency "gds-api-adapters", ">= 10.9.0"
|
20
20
|
|
21
|
-
gem.add_dependency "gds-sso", "
|
21
|
+
gem.add_dependency "gds-sso", "~> 11.2"
|
22
22
|
gem.add_dependency "govspeak", "~> 3.1"
|
23
23
|
# Mongoid 2.5.0 supports the newer 1.7.x and 1.8.x Mongo drivers
|
24
24
|
gem.add_dependency "mongoid", "~> 2.5"
|
@@ -135,7 +135,7 @@ FactoryGirl.define do
|
|
135
135
|
factory :video_edition, traits: [:with_body], parent: :edition, :class => 'VideoEdition' do
|
136
136
|
end
|
137
137
|
|
138
|
-
factory :business_support_edition, :parent => :edition, :class => "BusinessSupportEdition" do
|
138
|
+
factory :business_support_edition, traits: [:with_body], :parent => :edition, :class => "BusinessSupportEdition" do
|
139
139
|
end
|
140
140
|
|
141
141
|
factory :guide_edition, :parent => :edition, :class => "GuideEdition" do
|
@@ -194,6 +194,8 @@ FactoryGirl.define do
|
|
194
194
|
|
195
195
|
factory :licence_edition, :parent => :edition, :class => "LicenceEdition" do
|
196
196
|
licence_identifier "AB1234"
|
197
|
+
licence_short_description "This is a licence short description."
|
198
|
+
licence_overview "This is a licence overview."
|
197
199
|
end
|
198
200
|
|
199
201
|
factory :local_service do |ls|
|
@@ -57,7 +57,7 @@ class LicenceEditionTest < ActiveSupport::TestCase
|
|
57
57
|
assert_equal 'wibble', new_version.licence_identifier
|
58
58
|
assert new_version.valid?, "Expected clone to be valid"
|
59
59
|
end
|
60
|
-
|
60
|
+
|
61
61
|
should "not validate the continuation link when blank" do
|
62
62
|
@l.continuation_link = ""
|
63
63
|
assert @l.valid?, "continuation link validation should not be triggered when the field is blank"
|
@@ -92,13 +92,13 @@ class LicenceEditionTest < ActiveSupport::TestCase
|
|
92
92
|
|
93
93
|
context "indexable_content" do
|
94
94
|
should "include the licence_overview, removing markup" do
|
95
|
-
licence = FactoryGirl.create(:licence_edition
|
96
|
-
|
95
|
+
licence = FactoryGirl.create(:licence_edition)
|
96
|
+
assert_includes licence.indexable_content, "This is a licence overview"
|
97
97
|
end
|
98
98
|
|
99
99
|
should "include the licence_short_description" do
|
100
|
-
licence = FactoryGirl.create(:licence_edition
|
101
|
-
|
100
|
+
licence = FactoryGirl.create(:licence_edition)
|
101
|
+
assert_includes licence.indexable_content, "This is a licence short description."
|
102
102
|
end
|
103
103
|
end
|
104
104
|
end
|
data/test/models/user_test.rb
CHANGED
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: 32.
|
4
|
+
version: 32.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Battley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bson_ext
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: gds-sso
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '11.2'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '11.2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: govspeak
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|