govuk_content_models 22.0.0 → 22.1.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/edition.rb +4 -4
- data/govuk_content_models.gemspec +1 -0
- data/lib/govuk_content_models/version.rb +1 -1
- metadata +20 -4
data/CHANGELOG.md
CHANGED
data/app/models/edition.rb
CHANGED
@@ -21,9 +21,9 @@ class Edition
|
|
21
21
|
field :rejected_count, type: Integer, default: 0
|
22
22
|
field :important_note, type: String
|
23
23
|
|
24
|
-
field :browse_pages, type: Array
|
24
|
+
field :browse_pages, type: Array, default: []
|
25
25
|
field :primary_topic, type: String
|
26
|
-
field :additional_topics, type: Array
|
26
|
+
field :additional_topics, type: Array, default: []
|
27
27
|
|
28
28
|
field :assignee, type: String
|
29
29
|
field :creator, type: String
|
@@ -251,11 +251,11 @@ class Edition
|
|
251
251
|
def check_for_archived_artefact
|
252
252
|
if panopticon_id
|
253
253
|
a = Artefact.find(panopticon_id)
|
254
|
-
if a.state == "archived" and
|
254
|
+
if a.state == "archived" and changes.any?
|
255
255
|
# If we're only changing the state to archived, that's ok
|
256
256
|
# Any other changes are not allowed
|
257
257
|
allowed_keys = ["state", "updated_at"]
|
258
|
-
unless ((
|
258
|
+
unless ((changes.keys - allowed_keys).empty?) and state == "archived"
|
259
259
|
raise "Editing of an edition with an Archived artefact is not allowed"
|
260
260
|
end
|
261
261
|
end
|
@@ -34,6 +34,7 @@ Gem::Specification.new do |gem|
|
|
34
34
|
gem.add_development_dependency "webmock", "1.8.7"
|
35
35
|
gem.add_development_dependency "shoulda-context", "1.0.0"
|
36
36
|
gem.add_development_dependency "timecop", "0.5.9.2"
|
37
|
+
gem.add_development_dependency "debugger"
|
37
38
|
|
38
39
|
# The following are added to help bundler resolve dependencies
|
39
40
|
gem.add_development_dependency "rack", "~> 1.4.4"
|
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: 22.
|
4
|
+
version: 22.1.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-10-
|
12
|
+
date: 2014-10-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bson_ext
|
@@ -273,6 +273,22 @@ dependencies:
|
|
273
273
|
- - '='
|
274
274
|
- !ruby/object:Gem::Version
|
275
275
|
version: 0.5.9.2
|
276
|
+
- !ruby/object:Gem::Dependency
|
277
|
+
name: debugger
|
278
|
+
requirement: !ruby/object:Gem::Requirement
|
279
|
+
none: false
|
280
|
+
requirements:
|
281
|
+
- - ! '>='
|
282
|
+
- !ruby/object:Gem::Version
|
283
|
+
version: '0'
|
284
|
+
type: :development
|
285
|
+
prerelease: false
|
286
|
+
version_requirements: !ruby/object:Gem::Requirement
|
287
|
+
none: false
|
288
|
+
requirements:
|
289
|
+
- - ! '>='
|
290
|
+
- !ruby/object:Gem::Version
|
291
|
+
version: '0'
|
276
292
|
- !ruby/object:Gem::Dependency
|
277
293
|
name: rack
|
278
294
|
requirement: !ruby/object:Gem::Requirement
|
@@ -448,7 +464,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
448
464
|
version: '0'
|
449
465
|
segments:
|
450
466
|
- 0
|
451
|
-
hash:
|
467
|
+
hash: -3250701866585656813
|
452
468
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
453
469
|
none: false
|
454
470
|
requirements:
|
@@ -457,7 +473,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
457
473
|
version: '0'
|
458
474
|
segments:
|
459
475
|
- 0
|
460
|
-
hash:
|
476
|
+
hash: -3250701866585656813
|
461
477
|
requirements: []
|
462
478
|
rubyforge_project:
|
463
479
|
rubygems_version: 1.8.23
|