govuk_content_models 44.4.0 → 45.0.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/Jenkinsfile +1 -1
- data/app/models/action.rb +2 -2
- data/app/models/artefact_action.rb +1 -1
- data/app/models/downtime.rb +1 -1
- data/app/models/edition.rb +1 -1
- data/app/models/workflow.rb +1 -1
- data/config/mongoid.yml +1 -0
- data/govuk_content_models.gemspec +5 -5
- data/lib/govuk_content_models/version.rb +1 -1
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1492dc8b606a3c38a4d8cc03f895423ab4ca427
|
4
|
+
data.tar.gz: bc05f53e841a08f895b42e50e446857eb5c77a96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03aae6d7c3a38e8f0f27d2aeea13b0274da3a1dbd57728122dbbcbdd34d485caedf1956ad0595e9ac013f11f4495c48008b32ee07c16773d916f84cd51b108d3
|
7
|
+
data.tar.gz: ed71d588aa3ae483fa908afb33d28272085cb9beac57bafd66bd8135e624f45c64f0dc0ea8f61cc3475df25a33951a6e2da495b59fb6e4920f4ea649a8195407
|
data/CHANGELOG.md
CHANGED
data/Jenkinsfile
CHANGED
data/app/models/action.rb
CHANGED
@@ -28,8 +28,8 @@ class Action
|
|
28
28
|
|
29
29
|
embedded_in :edition
|
30
30
|
|
31
|
-
belongs_to :recipient, class_name: "User"
|
32
|
-
belongs_to :requester, class_name: "User"
|
31
|
+
belongs_to :recipient, class_name: "User", optional: true
|
32
|
+
belongs_to :requester, class_name: "User", optional: true
|
33
33
|
|
34
34
|
field :approver_id, type: Integer
|
35
35
|
field :approved, type: DateTime
|
@@ -13,7 +13,7 @@ class ArtefactAction
|
|
13
13
|
# Ideally we would like to use the UID field here, since that will be the
|
14
14
|
# same across all applications, but Mongoid doesn't yet support using a
|
15
15
|
# custom primary key on a related field
|
16
|
-
belongs_to :user
|
16
|
+
belongs_to :user, optional: true
|
17
17
|
|
18
18
|
# Not validating presence of a user just yet, since there may be some
|
19
19
|
# circumstances where we can't reliably determine the user. As an example
|
data/app/models/downtime.rb
CHANGED
@@ -6,7 +6,7 @@ class Downtime
|
|
6
6
|
field :start_time, type: DateTime
|
7
7
|
field :end_time, type: DateTime
|
8
8
|
|
9
|
-
belongs_to :artefact
|
9
|
+
belongs_to :artefact, optional: true
|
10
10
|
|
11
11
|
validates_presence_of :message, :start_time, :end_time, :artefact
|
12
12
|
validate :end_time_is_in_future, on: :create
|
data/app/models/edition.rb
CHANGED
@@ -27,7 +27,7 @@ class Edition
|
|
27
27
|
field :change_note, type: String
|
28
28
|
field :review_requested_at, type: DateTime
|
29
29
|
|
30
|
-
belongs_to :assigned_to, class_name: "User"
|
30
|
+
belongs_to :assigned_to, class_name: "User", optional: true
|
31
31
|
|
32
32
|
# state_machine comes from Workflow
|
33
33
|
state_machine.states.map(&:name).each do |state|
|
data/app/models/workflow.rb
CHANGED
@@ -13,7 +13,7 @@ module Workflow
|
|
13
13
|
after_create :notify_siblings_of_new_edition
|
14
14
|
|
15
15
|
field :state, type: String, default: "draft"
|
16
|
-
belongs_to :assigned_to, class_name: "User"
|
16
|
+
belongs_to :assigned_to, class_name: "User", optional: true
|
17
17
|
|
18
18
|
state_machine initial: :draft do
|
19
19
|
after_transition on: :request_amendments do |edition, transition|
|
data/config/mongoid.yml
CHANGED
@@ -17,15 +17,15 @@ Gem::Specification.new do |gem|
|
|
17
17
|
gem.add_dependency "bson_ext"
|
18
18
|
gem.add_dependency "gds-api-adapters", ">= 10.9.0"
|
19
19
|
|
20
|
-
gem.add_dependency "gds-sso", "~>
|
20
|
+
gem.add_dependency "gds-sso", "~> 13.2"
|
21
21
|
gem.add_dependency "govspeak", "~> 3.1"
|
22
|
-
gem.add_dependency "mongoid", "~>
|
22
|
+
gem.add_dependency "mongoid", "~> 6.1"
|
23
23
|
gem.add_dependency "state_machines", "~> 0.4"
|
24
24
|
gem.add_dependency "state_machines-mongoid", "~> 0.1"
|
25
25
|
gem.add_dependency "plek"
|
26
26
|
|
27
27
|
gem.add_development_dependency "database_cleaner", "1.5.1"
|
28
|
-
gem.add_development_dependency "factory_girl", "4.
|
28
|
+
gem.add_development_dependency "factory_girl", "4.8.0"
|
29
29
|
gem.add_development_dependency "gem_publisher", "1.2.0"
|
30
30
|
gem.add_development_dependency "mocha", "1.1.0"
|
31
31
|
gem.add_development_dependency "multi_json"
|
@@ -37,6 +37,6 @@ Gem::Specification.new do |gem|
|
|
37
37
|
gem.add_development_dependency 'pry-byebug'
|
38
38
|
|
39
39
|
# The following are added to help bundler resolve dependencies
|
40
|
-
gem.add_development_dependency "rack", "~>
|
41
|
-
gem.add_development_dependency "rails", "=
|
40
|
+
gem.add_development_dependency "rack", "~> 2.0.1"
|
41
|
+
gem.add_development_dependency "rails", "= 5.0.2"
|
42
42
|
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:
|
4
|
+
version: 45.0.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: 2017-
|
11
|
+
date: 2017-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bson_ext
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '13.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: '13.2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: govspeak
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '6.1'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '6.1'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: state_machines
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - '='
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 4.
|
145
|
+
version: 4.8.0
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - '='
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 4.
|
152
|
+
version: 4.8.0
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: gem_publisher
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -282,28 +282,28 @@ dependencies:
|
|
282
282
|
requirements:
|
283
283
|
- - "~>"
|
284
284
|
- !ruby/object:Gem::Version
|
285
|
-
version:
|
285
|
+
version: 2.0.1
|
286
286
|
type: :development
|
287
287
|
prerelease: false
|
288
288
|
version_requirements: !ruby/object:Gem::Requirement
|
289
289
|
requirements:
|
290
290
|
- - "~>"
|
291
291
|
- !ruby/object:Gem::Version
|
292
|
-
version:
|
292
|
+
version: 2.0.1
|
293
293
|
- !ruby/object:Gem::Dependency
|
294
294
|
name: rails
|
295
295
|
requirement: !ruby/object:Gem::Requirement
|
296
296
|
requirements:
|
297
297
|
- - '='
|
298
298
|
- !ruby/object:Gem::Version
|
299
|
-
version:
|
299
|
+
version: 5.0.2
|
300
300
|
type: :development
|
301
301
|
prerelease: false
|
302
302
|
version_requirements: !ruby/object:Gem::Requirement
|
303
303
|
requirements:
|
304
304
|
- - '='
|
305
305
|
- !ruby/object:Gem::Version
|
306
|
-
version:
|
306
|
+
version: 5.0.2
|
307
307
|
description: Shared models for Panopticon and Publisher
|
308
308
|
email:
|
309
309
|
- pbattley@gmail.com
|