metadata_presenter 1.7.4 → 1.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f3ed3876afc6593e2b6108203f7b46401212fc213191d6db6c9a7f3322f6b342
4
- data.tar.gz: c60618fb9af15d327a198cc8cbcbca389ffc7f3554a1bdcf63596b8d024ef727
3
+ metadata.gz: 86a854cda58e43b201b7822776e20af692ea00f7e95bed976bf546d0bb2259c4
4
+ data.tar.gz: cf833a226b554e172ba02d4d24b4c1a6a611b44033d5fa7c253d4739fa3c4723
5
5
  SHA512:
6
- metadata.gz: 2d294dd3c15cac7c56a99c37b0c59d58a4bfba7ecec43ef17548b587e74113e9b1161a99722b5da9c2d3593623e0aa425f8a55b8778364541a859dd9784cd03a
7
- data.tar.gz: 35a4408bbe40c5d13cd7bde8924a70380f6ac9d19356050211e1b6ee5683595f5b709b5a275fa7e3d74dac373578d96b8c8af3d08c39775f5d9a286844777159
6
+ metadata.gz: aa52155a487fe1d8f9cc20249f8e13ae421ea4c26bd0ce60f8cc80b45fc78cda45a5bbed43172bfa24559807fd7d90d33c573ede095a0d1525150ec26b09d191
7
+ data.tar.gz: 26cf5ce6a264158f9fe45bf96420bbc4cf25e988b8030144eb920ec1fb327731235efcf81dafd52165b17b21560c30561714b9de28236706559e65872a99609f
@@ -6,8 +6,11 @@ Rails.logger.info('Loading default metadata')
6
6
  default_metadata = Dir.glob("#{Rails.application.config.default_metadata_directory}/*/**")
7
7
  default_metadata.each do |metadata_file|
8
8
  metadata = JSON.parse(File.read(metadata_file))
9
- Rails.logger.info(metadata['_id'])
10
- Rails.application.config.default_metadata[metadata['_id']] = metadata
9
+
10
+ key = metadata['_id'] || metadata['_type']
11
+ Rails.logger.info(key)
12
+
13
+ Rails.application.config.default_metadata[key] = metadata
11
14
  end
12
15
 
13
16
  Rails.logger.info(
@@ -1,5 +1,4 @@
1
1
  {
2
- "_id": "flow.branch",
3
2
  "_type": "flow.branch",
4
3
  "next": {
5
4
  "default": "",
@@ -1,5 +1,4 @@
1
1
  {
2
- "_id": "flow.page",
3
2
  "_type": "flow.page",
4
3
  "next": {
5
4
  "default": ""
@@ -185,5 +185,6 @@
185
185
  "_id": "config.service",
186
186
  "_type": "config.service"
187
187
  }
188
- }
188
+ },
189
+ "standalone_pages": []
189
190
  }
@@ -1,3 +1,3 @@
1
1
  module MetadataPresenter
2
- VERSION = '1.7.4'.freeze
2
+ VERSION = '1.7.5'.freeze
3
3
  end
@@ -0,0 +1,24 @@
1
+ {
2
+ "$id": "http://gov.uk/schema/v1.0.0/flow/base",
3
+ "_name": "flow.base",
4
+ "title": "Base flow object",
5
+ "description": "Base flow object containing page or branch objects",
6
+ "type": "object",
7
+ "patternProperties": {
8
+ "type": "object",
9
+ "^S_": {
10
+ "type": "string"
11
+ },
12
+ "properties": {
13
+ "anyOf": [
14
+ {
15
+ "$ref": "flow.page"
16
+ },
17
+ {
18
+ "$ref": "flow.branch"
19
+ }
20
+ ]
21
+ },
22
+ "additionalProperties": false
23
+ }
24
+ }
@@ -33,17 +33,7 @@
33
33
  "$ref": "configuration"
34
34
  },
35
35
  "flow": {
36
- "type": "object",
37
- "items": {
38
- "anyOf": [
39
- {
40
- "$ref": "flow.page"
41
- },
42
- {
43
- "$ref": "flow.branch"
44
- }
45
- ]
46
- }
36
+ "$ref": "flow.base"
47
37
  },
48
38
  "pages": {
49
39
  "type": "array",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metadata_presenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.4
4
+ version: 1.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - MoJ Online
@@ -438,6 +438,7 @@ files:
438
438
  - schemas/definition/width_class.input.json
439
439
  - schemas/definition/width_class.json
440
440
  - schemas/errors/errors.json
441
+ - schemas/flow/base.json
441
442
  - schemas/flow/branch.json
442
443
  - schemas/flow/page.json
443
444
  - schemas/link/link.json