metadata_presenter 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/default_metadata/config/meta.json +24 -0
  3. data/default_metadata/config/service.json +7 -0
  4. data/default_metadata/page/confirmation.json +4 -0
  5. data/default_metadata/page/summary.json +6 -0
  6. data/default_metadata/service/base.json +18 -0
  7. data/default_metadata/string/error.max_length.json +6 -0
  8. data/default_metadata/string/error.min_length.json +6 -0
  9. data/default_metadata/string/error.required.json +7 -0
  10. data/{lib/fixtures → fixtures}/non_finished_service.json +0 -0
  11. data/{lib/fixtures → fixtures}/service.json +0 -0
  12. data/{lib/fixtures → fixtures}/version.json +0 -0
  13. data/lib/metadata_presenter/engine.rb +0 -5
  14. data/lib/metadata_presenter/version.rb +1 -1
  15. data/schemas/condition/condition.json +48 -0
  16. data/schemas/config/meta.json +27 -0
  17. data/schemas/config/service.json +106 -0
  18. data/schemas/definition/block.json +28 -0
  19. data/schemas/definition/component.json +13 -0
  20. data/schemas/definition/components.json +15 -0
  21. data/schemas/definition/condition.base.json +25 -0
  22. data/schemas/definition/condition.boolean.json +25 -0
  23. data/schemas/definition/condition.defined.json +25 -0
  24. data/schemas/definition/condition.expression.json +22 -0
  25. data/schemas/definition/condition.number.json +49 -0
  26. data/schemas/definition/condition.text.json +48 -0
  27. data/schemas/definition/condition.value_type.json +24 -0
  28. data/schemas/definition/conditional.boolean.json +20 -0
  29. data/schemas/definition/conditions.all.json +20 -0
  30. data/schemas/definition/conditions.any.json +26 -0
  31. data/schemas/definition/conditions.exactly.json +26 -0
  32. data/schemas/definition/control.json +75 -0
  33. data/schemas/definition/data.json +28 -0
  34. data/schemas/definition/field.json +26 -0
  35. data/schemas/definition/html_attributes.json +37 -0
  36. data/schemas/definition/label.json +30 -0
  37. data/schemas/definition/link_list.json +30 -0
  38. data/schemas/definition/name.json +18 -0
  39. data/schemas/definition/namespace.json +28 -0
  40. data/schemas/definition/next_page.json +40 -0
  41. data/schemas/definition/page.content.json +23 -0
  42. data/schemas/definition/page.form.json +96 -0
  43. data/schemas/definition/page.json +109 -0
  44. data/schemas/definition/page.singlequestion.json +31 -0
  45. data/schemas/definition/repeatable.json +72 -0
  46. data/schemas/definition/width_class.input.json +48 -0
  47. data/schemas/definition/width_class.json +34 -0
  48. data/schemas/errors/errors.json +139 -0
  49. data/schemas/link/link.json +46 -0
  50. data/schemas/page/confirmation.json +35 -0
  51. data/schemas/page/start.json +34 -0
  52. data/schemas/page/summary.json +63 -0
  53. data/schemas/request/services.json +48 -0
  54. data/schemas/request/versions.json +13 -0
  55. data/schemas/service/base.json +53 -0
  56. data/schemas/service/configuration.json +22 -0
  57. data/schemas/service/locale.json +12 -0
  58. data/schemas/text/text.json +23 -0
  59. data/schemas/validations/validations.json +443 -0
  60. metadata +57 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 980f55dc2fb23ae04b80fbe0451030e4b20bb0f9981a85928fb724a7bbf07d4a
4
- data.tar.gz: d213b5fcd20600ab4b1eb4a0e731388d5ed5746fb9424979a852332de789ccaa
3
+ metadata.gz: 6f79e91606c7c59673a86669d122dc416167cacc1c3455b31767b0e5f4e2d286
4
+ data.tar.gz: 0203707a252c31f29b1f4e68fb1355986af11988f32b053b2d7938440807f9b3
5
5
  SHA512:
6
- metadata.gz: bca5d7a79da2185c616ef72da9d5374d08d5318f86b0f87bc3d546997f13655e2269f3bc3e3717213df3f05ebfed966e34aae07dd9a7bebebe99c527255e38b9
7
- data.tar.gz: 3b4c67f54561246e93f96c822bf3c933d989b89051255b113e9027400a97df25d2c9fd526ecf7fff1f80a65958501f461e3fd5eefca52a2e64a1cca729990446
6
+ metadata.gz: 8ecfa6692526cf69e58a9b3f1762793d55f94a85c77c1a2289462da1ce30f45c8713bcb82de1f8125e203a21d68c6f4b20884ed0c7a795ab014ed522b64200d2
7
+ data.tar.gz: d56dbb21959134416f939556f95d0f9f8c3b47ff9304c7a2895220bf94b3a406d0e136e39330bc8d39c01cc200fc2f047f5c9b80d6e17c2c8f7decb46af96511
@@ -0,0 +1,24 @@
1
+ {
2
+ "_id": "config.meta",
3
+ "_type": "config.meta",
4
+ "items": [
5
+ {
6
+ "_id": "config.meta--link",
7
+ "_type": "link",
8
+ "href": "/cookies",
9
+ "text": "Cookies"
10
+ },
11
+ {
12
+ "_id": "config.meta--link--2",
13
+ "_type": "link",
14
+ "href": "/privacy",
15
+ "text": "Privacy"
16
+ },
17
+ {
18
+ "_id": "config.meta--link--3",
19
+ "_type": "link",
20
+ "href": "/accessibility",
21
+ "text": "Accessibility"
22
+ }
23
+ ]
24
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "_id": "config.service",
3
+ "_type": "config.service",
4
+ "homepage_url": "https://www.gov.uk",
5
+ "service_email_address": "moj-online@digital.justice.gov.uk",
6
+ "service_url": "page.start"
7
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "_id": "page.confirmation",
3
+ "heading": "Required - Confirmation"
4
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "_id": "page.summary",
3
+ "heading": "Check your answers",
4
+ "send_heading": "Now send your application",
5
+ "send_body": "By submitting this application you confirm that, to the best of your knowledge, the details you are providing are correct."
6
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "_id": "service.base",
3
+ "_type": "service.base",
4
+ "service_name": "Service name goes here",
5
+ "configuration": {},
6
+ "pages": [
7
+ {
8
+ "_id": "page.start",
9
+ "_type": "page.start",
10
+ "heading": "Start page heading",
11
+ "body": "Start page body text",
12
+ "lede": "Start page lede text",
13
+ "steps": [],
14
+ "url": "/"
15
+ }
16
+ ],
17
+ "locale": "en"
18
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "_id": "error.max_length",
3
+ "_type": "string.error",
4
+ "description": "Input (string) is too long",
5
+ "value": "Your answer for '%{control}' is too long (%{max_length} characters at most)"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "_id": "error.min_length",
3
+ "_type": "string.error",
4
+ "description": "Input (string) is too short",
5
+ "value": "Your answer for '%{control}' is too short (%{min_length} characters at least)"
6
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "_id": "error.required",
3
+ "_type": "string.error",
4
+ "description": "Input is required",
5
+ "value": "Enter an answer for %{control}",
6
+ "value:cy": "Rhowch ateb i {control}"
7
+ }
File without changes
File without changes
@@ -5,10 +5,5 @@ module MetadataPresenter
5
5
  isolate_namespace MetadataPresenter
6
6
 
7
7
  MetadataPresenter.parent_controller = '::ApplicationController'
8
-
9
- def fixtures_directory
10
- @_fixtures_directory ||=
11
- Pathname.new(MetadataPresenter::Engine.root.join('lib', 'fixtures'))
12
- end
13
8
  end
14
9
  end
@@ -1,3 +1,3 @@
1
1
  module MetadataPresenter
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
@@ -0,0 +1,48 @@
1
+ {
2
+ "$id": "http://gov.uk/schema/v1.0.0/condition",
3
+ "_name": "condition",
4
+ "title": "Condition",
5
+ "type": "object",
6
+ "allOf": [
7
+ {
8
+ "properties": {
9
+ "_id": {
10
+ "title": "Condition ID",
11
+ "type": "string"
12
+ },
13
+ "_type": {
14
+ "title": "Type",
15
+ "type": "string",
16
+ "const": "condition"
17
+ },
18
+ "description": {
19
+ "title": "Description",
20
+ "type": "string"
21
+ },
22
+ "negated": {
23
+ "title": "Negated",
24
+ "type": "boolean"
25
+ }
26
+ }
27
+ },
28
+ {
29
+ "oneOf": [
30
+ {
31
+ "$ref": "definition.condition.expression"
32
+ },
33
+ {
34
+ "$ref": "definition.conditions.all"
35
+ },
36
+ {
37
+ "$ref": "definition.conditions.any"
38
+ },
39
+ {
40
+ "$ref": "definition.conditions.exactly"
41
+ }
42
+ ]
43
+ }
44
+ ],
45
+ "category": [
46
+ "definition"
47
+ ]
48
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$id": "http://gov.uk/schema/v1.0.0/config/meta",
3
+ "_name": "config.meta",
4
+ "title": "Form meta links",
5
+ "description": "List of links to display in GOVUK footer",
6
+ "usage": "Use the config.meta component to provide a list of links in the footer",
7
+ "type": "object",
8
+ "allOf": [
9
+ {
10
+ "$ref": "definition.link_list"
11
+ }
12
+ ],
13
+ "properties": {
14
+ "_id": {
15
+ "const": "config.meta"
16
+ },
17
+ "_type": {
18
+ "const": "config.meta"
19
+ },
20
+ "title": {
21
+ "type": "null"
22
+ }
23
+ },
24
+ "category": [
25
+ "configuration"
26
+ ]
27
+ }
@@ -0,0 +1,106 @@
1
+ {
2
+ "$id": "http://gov.uk/schema/v1.0.0/config/service",
3
+ "title": "Service configuration options",
4
+ "_name": "config.service",
5
+ "description": "Configuration options for a service",
6
+ "type": "object",
7
+ "properties": {
8
+ "_id": {
9
+ "const": "config.service"
10
+ },
11
+ "_type": {
12
+ "const": "config.service"
13
+ },
14
+ "homepage_url": {
15
+ "title": "Homepage URL",
16
+ "description": "The Homepage URL of the service",
17
+ "type": "string"
18
+ },
19
+ "service_email_address": {
20
+ "title": "Service Email Address",
21
+ "description": "The email address of the service",
22
+ "type": "string"
23
+ },
24
+ "service_url": {
25
+ "title": "Service URL",
26
+ "description": "The URL of the first page of the service",
27
+ "type": "string"
28
+ },
29
+ "phase": {
30
+ "title": "Form phase",
31
+ "type": "string",
32
+ "enum": [
33
+ "none",
34
+ "alpha",
35
+ "beta"
36
+ ],
37
+ "default": "alpha"
38
+ },
39
+ "phase_text": {
40
+ "title": "Form phase text",
41
+ "type": "string",
42
+ "content": true
43
+ },
44
+ "code": {
45
+ "title": "Form code",
46
+ "description": "Code used for form (eg. C100)",
47
+ "type": "string"
48
+ },
49
+ "pdf_heading": {
50
+ "title": "PDF heading",
51
+ "description": "Used as form’s heading when generating PDF output",
52
+ "type": "string"
53
+ },
54
+ "pdf_sub_heading": {
55
+ "title": "PDF subheading",
56
+ "description": "Used as form’s subheading when generating PDF output",
57
+ "type": "string"
58
+ },
59
+ "email_input_name_user": {
60
+ "title": "CC email address field",
61
+ "description": "Name of input used as email address to send user a copy of submission details",
62
+ "type": "string"
63
+ },
64
+ "attach_user_submission": {
65
+ "title": "Attach confirmation of submission to user email",
66
+ "type": "boolean",
67
+ "default": false
68
+ },
69
+ "email_subject_user": {
70
+ "title": "CC email subject",
71
+ "type": "string"
72
+ },
73
+ "email_template_user": {
74
+ "title": "CC email template",
75
+ "type": "string",
76
+ "multiline": true
77
+ },
78
+ "email_subject_team": {
79
+ "title": "Form team email subject",
80
+ "type": "string"
81
+ },
82
+ "email_template_team": {
83
+ "title": "Form team email template",
84
+ "type": "string",
85
+ "multiline": true
86
+ },
87
+ "session_duration": {
88
+ "title": "Session duration",
89
+ "description": "How many minutes a user’s session should last",
90
+ "type": "number"
91
+ },
92
+ "data_retention_duration": {
93
+ "title": "User data retention duration",
94
+ "description": "How many days a user’s data should be kept for",
95
+ "type": "number"
96
+ }
97
+ },
98
+ "allOf": [
99
+ {
100
+ "$ref": "definition.data"
101
+ }
102
+ ],
103
+ "category": [
104
+ "configuration"
105
+ ]
106
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$id": "http://gov.uk/schema/v1.0.0/definition/block",
3
+ "_name": "definition.block",
4
+ "title": "Block definition",
5
+ "properties": {
6
+ "show": {
7
+ "title": "Visibility",
8
+ "category": [
9
+ "logic"
10
+ ],
11
+ "description": "Whether to show or hide the page/component",
12
+ "oneOf": [
13
+ {
14
+ "$ref": "definition.conditional.boolean"
15
+ }
16
+ ],
17
+ "default": true
18
+ }
19
+ },
20
+ "allOf": [
21
+ {
22
+ "$ref": "definition.data"
23
+ }
24
+ ],
25
+ "category": [
26
+ "definition"
27
+ ]
28
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$id": "http://gov.uk/schema/v1.0.0/definition/component",
3
+ "_name": "definition.component",
4
+ "title": "Component definition",
5
+ "allOf": [
6
+ {
7
+ "$ref": "definition.block"
8
+ }
9
+ ],
10
+ "category": [
11
+ "component"
12
+ ]
13
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "$id": "http://gov.uk/schema/v1.0.0/definition/components",
3
+ "_name": "definition.components",
4
+ "title": "Components definition",
5
+ "properties": {
6
+ "components": {
7
+ "title": "Components",
8
+ "description": "The form or content elements used on the page",
9
+ "type": "array",
10
+ "items": {
11
+ "$ref": "definition.component"
12
+ }
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$id": "http://gov.uk/schema/v1.0.0/definition/condition/base",
3
+ "_name": "definition.condition.base",
4
+ "title": "Base condition properties",
5
+ "properties": {
6
+ "identifier": {
7
+ "title": "Identifier",
8
+ "type": "string"
9
+ },
10
+ "identifier_type": {
11
+ "title": "Identifier type",
12
+ "type": "string",
13
+ "enum": [
14
+ "input",
15
+ "feature"
16
+ ]
17
+ }
18
+ },
19
+ "required": [
20
+ "identifier"
21
+ ],
22
+ "category": [
23
+ "definition"
24
+ ]
25
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$id": "http://gov.uk/schema/v1.0.0/definition/condition/boolean",
3
+ "_name": "definition.condition.boolean",
4
+ "title": "Boolean condition properties",
5
+ "allOf": [
6
+ {
7
+ "$ref": "definition.condition.base"
8
+ }
9
+ ],
10
+ "properties": {
11
+ "operator": {
12
+ "title": "Operator",
13
+ "type": "string",
14
+ "enum": [
15
+ "isTrue"
16
+ ]
17
+ }
18
+ },
19
+ "required": [
20
+ "operator"
21
+ ],
22
+ "category": [
23
+ "definition"
24
+ ]
25
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$id": "http://gov.uk/schema/v1.0.0/definition/condition/defined",
3
+ "_name": "definition.condition.defined",
4
+ "title": "Defined condition properties",
5
+ "allOf": [
6
+ {
7
+ "$ref": "definition.condition.base"
8
+ }
9
+ ],
10
+ "properties": {
11
+ "operator": {
12
+ "title": "Operator",
13
+ "type": "string",
14
+ "enum": [
15
+ "defined"
16
+ ]
17
+ }
18
+ },
19
+ "required": [
20
+ "operator"
21
+ ],
22
+ "category": [
23
+ "definition"
24
+ ]
25
+ }