metadata_presenter 1.3.2 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e53919bd4f689dd61ae84044e6cba77034053ddae502a61b7672310a917ea085
4
- data.tar.gz: e6620c311a81a98f0a6fc6a40c5d1119449c54d56d79ff5b49f73a5855c8a4de
3
+ metadata.gz: 50e72c6d7db805dc3c408e5be910e7e8622984d6dafe879bdd488857f9ae4d44
4
+ data.tar.gz: 61a5d6f5430a9cf8ae6b5a0d9c6ae03f2869c59e96e70919541e031944d7b99f
5
5
  SHA512:
6
- metadata.gz: 7a49928da6f79c16e42e25af5a95330f1a9069ca1b37846b3a412e1bf33f2fe44da3971869bc583b4965e655836a8af684d2c88794547c0da66b6aa8ba0837b2
7
- data.tar.gz: a28440a4e40e61a9caf08f2e3b7ac7f744b628d295a83d2ef9ca51465fc502f7b590839a06fd5af8ef823dc4a07f8ff191561767fa90d49c51a9720c8ff6a45a
6
+ metadata.gz: 83993ca5083a0c54693f7c46d14561c897c881fe9461c5ccef1881726d9e46f9f5ca69abb8faf8d619fa5ca9fcef46dee8b096b1dda30468a86a8c9a876e1350
7
+ data.tar.gz: ac17522430316217e5bf6c430b326dae237d60f759d6e25125fa701a265e97082238492b47cb0948fe703da6ed35fc5e5da1f54a11bbc2abd17d535001172258
@@ -25,10 +25,11 @@ module MetadataPresenter
25
25
  end
26
26
 
27
27
  def redirect_to_next_page
28
- next_page = NextPage.new(service).find(
28
+ next_page = NextPage.new(
29
+ service: service,
29
30
  session: session,
30
31
  current_page_url: page_url
31
- )
32
+ ).find
32
33
 
33
34
  if next_page.present?
34
35
  redirect_to_page next_page.url
@@ -8,7 +8,7 @@ class MetadataPresenter::Component < MetadataPresenter::Metadata
8
8
  end
9
9
 
10
10
  def items
11
- metadata.items.map do |item|
11
+ Array(metadata.items).map do |item|
12
12
  MetadataPresenter::Item.new(item, editor: editor?)
13
13
  end
14
14
  end
@@ -20,4 +20,8 @@ class MetadataPresenter::Component < MetadataPresenter::Metadata
20
20
  def upload?
21
21
  type == 'upload'
22
22
  end
23
+
24
+ def find_item_by_uuid(uuid)
25
+ items.find { |item| item.uuid == uuid }
26
+ end
23
27
  end
@@ -0,0 +1,13 @@
1
+ module MetadataPresenter
2
+ class Condition < MetadataPresenter::Metadata
3
+ def ==(other)
4
+ metadata.to_h.deep_symbolize_keys == other.metadata.to_h.deep_symbolize_keys
5
+ end
6
+
7
+ def criterias
8
+ Array(metadata.criterias).map do |criteria|
9
+ MetadataPresenter::Criteria.new(criteria)
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,25 @@
1
+ module MetadataPresenter
2
+ class Criteria < MetadataPresenter::Metadata
3
+ attr_accessor :service
4
+
5
+ def ==(other)
6
+ metadata == other.metadata
7
+ end
8
+
9
+ def criteria_page
10
+ service.find_page_by_uuid(page)
11
+ end
12
+
13
+ def criteria_component
14
+ criteria_page.find_component_by_uuid(component)
15
+ end
16
+
17
+ def criteria_field
18
+ criteria_component.find_item_by_uuid(field)
19
+ end
20
+
21
+ def field_label
22
+ criteria_field['label'] if criteria_field
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,29 @@
1
+ module MetadataPresenter
2
+ class EvaluateConditions
3
+ include ActiveModel::Model
4
+ attr_accessor :service, :flow, :user_data
5
+
6
+ def page
7
+ results = conditions.map do |condition|
8
+ condition.criterias.map do |criteria|
9
+ criteria.service = service
10
+
11
+ next unless Operator.new(
12
+ criteria.operator
13
+ ).evaluate(criteria.field_label, user_data[criteria.criteria_component.id])
14
+
15
+ condition.next
16
+ end
17
+ end
18
+
19
+ page_uuid = results.flatten.uniq.compact
20
+ if page_uuid.present?
21
+ service.find_page_by_uuid(page_uuid.first)
22
+ else
23
+ service.find_page_by_uuid(flow.default_next)
24
+ end
25
+ end
26
+
27
+ delegate :conditions, to: :flow
28
+ end
29
+ end
@@ -0,0 +1,17 @@
1
+ module MetadataPresenter
2
+ class Flow < MetadataPresenter::Metadata
3
+ def branch?
4
+ type == 'branch'
5
+ end
6
+
7
+ def default_next
8
+ metadata['next']['default']
9
+ end
10
+
11
+ def conditions
12
+ Array(metadata['next']['conditions']).map do |condition_metadata|
13
+ Condition.new(condition_metadata)
14
+ end
15
+ end
16
+ end
17
+ end
@@ -1,18 +1,63 @@
1
1
  module MetadataPresenter
2
2
  class NextPage
3
- attr_reader :service
3
+ include ActiveModel::Model
4
+ attr_accessor :service, :session, :current_page_url
4
5
 
5
- def initialize(service)
6
- @service = service
7
- end
6
+ def find
7
+ return check_answers_page if return_to_check_you_answer?
8
8
 
9
- def find(session:, current_page_url:)
10
- if session[:return_to_check_you_answer].present?
11
- session[:return_to_check_you_answer] = nil
12
- service.pages.find { |page| page.type == 'page.checkanswers' }
9
+ if conditions?
10
+ evaluate_conditions
11
+ elsif current_page_flow.present?
12
+ service.find_page_by_uuid(current_page_flow.default_next)
13
13
  else
14
14
  service.next_page(from: current_page_url)
15
15
  end
16
16
  end
17
+
18
+ private
19
+
20
+ def check_answers_page
21
+ session[:return_to_check_you_answer] = nil
22
+ service.pages.find { |page| page.type == 'page.checkanswers' }
23
+ end
24
+
25
+ def return_to_check_you_answer?
26
+ session[:return_to_check_you_answer].present?
27
+ end
28
+
29
+ def conditions?
30
+ current_page_flow.present? &&
31
+ next_flow.present? &&
32
+ next_flow_branch_object?
33
+ end
34
+
35
+ def evaluate_conditions
36
+ EvaluateConditions.new(
37
+ service: service,
38
+ flow: next_flow,
39
+ user_data: session[:user_data]
40
+ ).page
41
+ end
42
+
43
+ def current_page
44
+ service.find_page_by_url(current_page_url)
45
+ end
46
+
47
+ def current_page_uuid
48
+ current_page.uuid
49
+ end
50
+
51
+ def current_page_flow
52
+ service.flow(current_page_uuid)
53
+ end
54
+
55
+ def next_flow
56
+ service.flow(current_page_flow.default_next)
57
+ end
58
+
59
+ def next_flow_branch_object?
60
+ next_flow.branch?
61
+ end
17
62
  end
18
63
  end
@@ -18,6 +18,10 @@ module MetadataPresenter
18
18
  to_h.reject { |k, _| k.in?(NOT_EDITABLE) }
19
19
  end
20
20
 
21
+ def find_component_by_uuid(uuid)
22
+ all_components.find { |component| component.uuid == uuid }
23
+ end
24
+
21
25
  def all_components
22
26
  [components, extra_components].flatten.compact
23
27
  end
@@ -5,6 +5,12 @@ class MetadataPresenter::Service < MetadataPresenter::Metadata
5
5
  end
6
6
  end
7
7
 
8
+ def flow(page_uuid)
9
+ MetadataPresenter::Flow.new(metadata.flow[page_uuid])
10
+ rescue StandardError
11
+ nil
12
+ end
13
+
8
14
  def standalone_pages
9
15
  @standalone_pages ||= metadata.standalone_pages.map do |page|
10
16
  MetadataPresenter::Page.new(page, editor: editor?)
@@ -0,0 +1,10 @@
1
+ module MetadataPresenter
2
+ class BaseOperator
3
+ attr_reader :actual, :expected
4
+
5
+ def initialize(actual, expected)
6
+ @actual = actual
7
+ @expected = expected
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,7 @@
1
+ module MetadataPresenter
2
+ class IsAnsweredOperator < BaseOperator
3
+ def evaluate?
4
+ expected.present?
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module MetadataPresenter
2
+ class IsNotAnsweredOperator < BaseOperator
3
+ def evaluate?
4
+ expected.blank?
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module MetadataPresenter
2
+ class IsNotOperator < BaseOperator
3
+ def evaluate?
4
+ @actual != @expected
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module MetadataPresenter
2
+ class IsOperator < BaseOperator
3
+ def evaluate?
4
+ @actual == @expected
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,26 @@
1
+ module MetadataPresenter
2
+ class NoOperator < StandardError
3
+ end
4
+
5
+ class Operator
6
+ attr_reader :operator
7
+
8
+ def initialize(operator)
9
+ @operator = operator
10
+ end
11
+
12
+ def evaluate(actual, expected)
13
+ klass
14
+ .constantize
15
+ .new(actual, expected)
16
+ .evaluate?
17
+ rescue NameError
18
+ raise NoOperator,
19
+ "Operator '#{operator}' is not implemented. You need to create the class #{klass}"
20
+ end
21
+
22
+ def klass
23
+ "MetadataPresenter::#{@operator.capitalize.classify}Operator"
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,3 @@
1
+ ActiveSupport::Inflector.inflections(:en) do |inflect|
2
+ inflect.irregular 'is', 'is'
3
+ end
@@ -0,0 +1,718 @@
1
+ {
2
+ "_id": "service.base",
3
+ "_type": "service.base",
4
+ "flow": {
5
+ "cf6dc32f-502c-4215-8c27-1151a45735bb": {
6
+ "_type": "page",
7
+ "next": {
8
+ "default": "9e1ba77f-f1e5-42f4-b090-437aa9af7f73"
9
+ }
10
+ },
11
+ "9e1ba77f-f1e5-42f4-b090-437aa9af7f73": {
12
+ "_type": "page",
13
+ "next": {
14
+ "default": "68fbb180-9a2a-48f6-9da6-545e28b8d35a"
15
+ }
16
+ },
17
+ "68fbb180-9a2a-48f6-9da6-545e28b8d35a": {
18
+ "_type": "page",
19
+ "next": {
20
+ "default": "09e91fd9-7a46-4840-adbc-244d545cfef7"
21
+ }
22
+ },
23
+ "09e91fd9-7a46-4840-adbc-244d545cfef7": {
24
+ "_type": "branch",
25
+ "next": {
26
+ "default": "0b297048-aa4d-49b6-ac74-18e069118185",
27
+ "conditions": [
28
+ {
29
+ "condition_type": "if",
30
+ "next": "e8708909-922e-4eaf-87a5-096f7a713fcb",
31
+ "criterias": [
32
+ {
33
+ "operator": "is",
34
+ "page": "68fbb180-9a2a-48f6-9da6-545e28b8d35a",
35
+ "component": "ac41be35-914e-4b22-8683-f5477716b7d4",
36
+ "field": "c5571937-9388-4411-b5fa-34ddf9bc4ca0"
37
+ }
38
+ ]
39
+ }
40
+ ]
41
+ }
42
+ },
43
+ "e8708909-922e-4eaf-87a5-096f7a713fcb": {
44
+ "_type": "page",
45
+ "next": {
46
+ "default": "0b297048-aa4d-49b6-ac74-18e069118185"
47
+ }
48
+ },
49
+ "0b297048-aa4d-49b6-ac74-18e069118185": {
50
+ "_type": "page",
51
+ "next": {
52
+ "default": "ffadeb22-063b-4e4f-9502-bd753c706b1d"
53
+ }
54
+ },
55
+ "ffadeb22-063b-4e4f-9502-bd753c706b1d": {
56
+ "_type": "branch",
57
+ "next": {
58
+ "default": "05c3306c-0a39-42d2-9e0f-93fd49248f4e",
59
+ "conditions": [
60
+ {
61
+ "condition_type": "if",
62
+ "next": "d4342dfd-0d09-4a91-a0ea-d7fd67e706cc",
63
+ "criterias": [
64
+ {
65
+ "operator": "is",
66
+ "page": "0b297048-aa4d-49b6-ac74-18e069118185",
67
+ "component": "43ef37a0-8a9d-4dcd-9f76-42b145a50261",
68
+ "field": "0de360a9-f0f3-44dd-a9b9-8bc4ff694aa3"
69
+ }
70
+ ]
71
+ },
72
+ {
73
+ "condition_type": "if",
74
+ "next": "91e9f7c6-2f75-4b7d-9eb5-0cf352f7be66",
75
+ "criterias": [
76
+ {
77
+ "operator": "is",
78
+ "page": "0b297048-aa4d-49b6-ac74-18e069118185",
79
+ "component": "43ef37a0-8a9d-4dcd-9f76-42b145a50261",
80
+ "field": "f5ee4c8f-be21-4f1e-9bd1-6519e964c126"
81
+ }
82
+ ]
83
+ }
84
+ ]
85
+ }
86
+ },
87
+ "d4342dfd-0d09-4a91-a0ea-d7fd67e706cc": {
88
+ "_type": "page",
89
+ "next": {
90
+ "default": "05c3306c-0a39-42d2-9e0f-93fd49248f4e"
91
+ }
92
+ },
93
+ "91e9f7c6-2f75-4b7d-9eb5-0cf352f7be66": {
94
+ "_type": "page",
95
+ "next": {
96
+ "default": "05c3306c-0a39-42d2-9e0f-93fd49248f4e"
97
+ }
98
+ },
99
+ "05c3306c-0a39-42d2-9e0f-93fd49248f4e": {
100
+ "_type": "page",
101
+ "next": {
102
+ "default": "1d02e508-5953-4eca-af2f-9d67511c8648"
103
+ }
104
+ },
105
+ "1d02e508-5953-4eca-af2f-9d67511c8648": {
106
+ "_type": "branch",
107
+ "next": {
108
+ "default": "ef2cafe3-37e2-4533-9b0c-09a970cd38d4",
109
+ "conditions": [
110
+ {
111
+ "condition_type": "if",
112
+ "next": "8002df6e-29ab-4cdf-b520-1d7bb931a28f",
113
+ "criterias": [
114
+ {
115
+ "operator": "is_answered",
116
+ "page": "05c3306c-0a39-42d2-9e0f-93fd49248f4e",
117
+ "component": "c0cc9cba-b53f-4ab5-80a2-bfa6311882ae",
118
+ "field": ""
119
+ }
120
+ ]
121
+ }
122
+ ]
123
+ }
124
+ },
125
+ "8002df6e-29ab-4cdf-b520-1d7bb931a28f": {
126
+ "_type": "page",
127
+ "next": {
128
+ "default": "ef2cafe3-37e2-4533-9b0c-09a970cd38d4"
129
+ }
130
+ },
131
+ "ef2cafe3-37e2-4533-9b0c-09a970cd38d4": {
132
+ "_type": "page",
133
+ "next": {
134
+ "default": "cf8b3e18-dacf-4e91-92e1-018035961003"
135
+ }
136
+ },
137
+ "cf8b3e18-dacf-4e91-92e1-018035961003": {
138
+ "_type": "branch",
139
+ "next": {
140
+ "default": "e337070b-f636-49a3-a65c-f506675265f0",
141
+ "conditions": [
142
+ {
143
+ "condition_type": "if",
144
+ "next": "b5efc09c-ece7-45ae-b0b3-8a7905e25040",
145
+ "criterias": [
146
+ {
147
+ "operator": "is_not",
148
+ "page": "ef2cafe3-37e2-4533-9b0c-09a970cd38d4",
149
+ "component": "4477bbd6-ce23-4c38-8f17-bd5b75386557",
150
+ "field": "7c795f17-288b-430a-86f8-05d5ae63a3a1"
151
+ }
152
+ ]
153
+ }
154
+ ]
155
+ }
156
+ },
157
+ "e337070b-f636-49a3-a65c-f506675265f0": {
158
+ "_type": "page",
159
+ "next": {
160
+ "default": "778e364b-9a7f-4829-8eb2-510e08f156a3"
161
+ }
162
+ },
163
+ "778e364b-9a7f-4829-8eb2-510e08f156a3": {
164
+ "_type": "page",
165
+ "next": {
166
+ "default": ""
167
+ }
168
+ }
169
+ },
170
+ "pages": [
171
+ {
172
+ "_id": "page.start",
173
+ "url": "/",
174
+ "body": "Use this service to:\r\n\r\n* do something\r\n* update your name, address or other details\r\n* do something else\r\n\r\nRegistering takes around 5 minutes.",
175
+ "lede": "",
176
+ "_type": "page.start",
177
+ "_uuid": "cf6dc32f-502c-4215-8c27-1151a45735bb",
178
+ "steps": [
179
+ "page.name",
180
+ "page.do-you-like-star-wars",
181
+ "page.star-wars-knowledge",
182
+ "page.check-answers",
183
+ "page.confirmation"
184
+ ],
185
+ "heading": "Service name goes here",
186
+ "before_you_start": "###Before you start\r\nYou can also register by post.\r\n\r\nThe online service is also available in Welsh (Cymraeg).\r\n\r\nYou cannot register for this service if you’re in the UK illegally."
187
+ },
188
+ {
189
+ "_id": "page.name",
190
+ "url": "name",
191
+ "body": "Body section",
192
+ "lede": "",
193
+ "_type": "page.singlequestion",
194
+ "_uuid": "9e1ba77f-f1e5-42f4-b090-437aa9af7f73",
195
+ "heading": "Question",
196
+ "components": [
197
+ {
198
+ "_id": "name_text_1",
199
+ "hint": "",
200
+ "name": "name_text_1",
201
+ "_type": "text",
202
+ "_uuid": "27d377a2-6828-44ca-87d1-b83ddac98284",
203
+ "label": "Full name",
204
+ "errors": {},
205
+ "collection": "components",
206
+ "validation": {
207
+ "required": true,
208
+ "max_length": 20,
209
+ "min_length": 2
210
+ }
211
+ }
212
+ ]
213
+ },
214
+ {
215
+ "_id": "page.do-you-like-star-wars",
216
+ "url": "do-you-like-star-wars",
217
+ "body": "Body section",
218
+ "lede": "",
219
+ "_type": "page.singlequestion",
220
+ "_uuid": "68fbb180-9a2a-48f6-9da6-545e28b8d35a",
221
+ "heading": "Question",
222
+ "components": [
223
+ {
224
+ "_id": "do-you-like-star-wars_radios_1",
225
+ "hint": "",
226
+ "name": "do-you-like-star-wars_radios_1",
227
+ "_type": "radios",
228
+ "_uuid": "ac41be35-914e-4b22-8683-f5477716b7d4",
229
+ "items": [
230
+ {
231
+ "_id": "do-you-like-star-wars_radios_1_item_1",
232
+ "hint": "",
233
+ "name": "do-you-like-star-wars_radios_1",
234
+ "_type": "radio",
235
+ "_uuid": "c5571937-9388-4411-b5fa-34ddf9bc4ca0",
236
+ "label": "Only on weekends",
237
+ "value": "value-1",
238
+ "errors": {},
239
+ "legend": "Question",
240
+ "collection": "components",
241
+ "validation": {
242
+ "required": true
243
+ }
244
+ },
245
+ {
246
+ "_id": "do-you-like-star-wars_radios_1_item_2",
247
+ "hint": "",
248
+ "name": "do-you-like-star-wars_radios_1",
249
+ "_type": "radio",
250
+ "_uuid": "67160ff1-6f7c-43a8-8bf6-49b3d5f450f6",
251
+ "label": "Hell no!",
252
+ "value": "value-2",
253
+ "errors": {},
254
+ "legend": "Question",
255
+ "collection": "components",
256
+ "validation": {
257
+ "required": true
258
+ }
259
+ }
260
+ ],
261
+ "errors": {},
262
+ "legend": "Do you like Star Wars?",
263
+ "collection": "components",
264
+ "validation": {
265
+ "required": true
266
+ }
267
+ }
268
+ ]
269
+ },
270
+ {
271
+ "_id": "page.star-wars-knowledge",
272
+ "url": "star-wars-knowledge",
273
+ "_type": "page.multiplequestions",
274
+ "_uuid": "e8708909-922e-4eaf-87a5-096f7a713fcb",
275
+ "heading": "How well do you know Star Wars?",
276
+ "components": [
277
+ {
278
+ "_id": "star-wars-knowledge_text_1",
279
+ "hint": "",
280
+ "name": "star-wars-knowledge_text_1",
281
+ "_type": "text",
282
+ "_uuid": "fda1e5a1-ed5f-49c9-a943-dc930a520984",
283
+ "label": "What was the name of the band playing in Jabba's palace?",
284
+ "errors": {},
285
+ "collection": "components",
286
+ "validation": {
287
+ "required": true
288
+ }
289
+ },
290
+ {
291
+ "_id": "star-wars-knowledge_content_1",
292
+ "name": "star-wars-knowledge_content_1",
293
+ "_type": "content",
294
+ "_uuid": "82444d3d-dab6-44c4-a147-e2650326c9eb",
295
+ "content": "Stay on target",
296
+ "collection": "components"
297
+ },
298
+ {
299
+ "_id": "star-wars-knowledge_radios_1",
300
+ "hint": "",
301
+ "name": "star-wars-knowledge_radios_1",
302
+ "_type": "radios",
303
+ "_uuid": "51efe2ca-fc47-4584-8129-e91589a46b9e",
304
+ "items": [
305
+ {
306
+ "_id": "star-wars-knowledge_radios_1_item_1",
307
+ "hint": "",
308
+ "name": "star-wars-knowledge_radios_1",
309
+ "_type": "radio",
310
+ "_uuid": "1b6c5734-04bf-49fa-928a-2e9bbbb09f8c",
311
+ "label": "Harry Potter",
312
+ "value": "value-1",
313
+ "errors": {},
314
+ "legend": "Question",
315
+ "collection": "components",
316
+ "validation": {
317
+ "required": true
318
+ }
319
+ },
320
+ {
321
+ "_id": "star-wars-knowledge_radios_1_item_2",
322
+ "hint": "",
323
+ "name": "star-wars-knowledge_radios_1",
324
+ "_type": "radio",
325
+ "_uuid": "693edfd9-883b-4a6f-95b4-202849395d3d",
326
+ "label": "Din Jarrin",
327
+ "value": "value-2",
328
+ "errors": {},
329
+ "legend": "Question",
330
+ "collection": "components",
331
+ "validation": {
332
+ "required": true
333
+ }
334
+ },
335
+ {
336
+ "_id": "star-wars-knowledge_radios_1_item_3",
337
+ "hint": "",
338
+ "name": "star-wars-knowledge_radios_1",
339
+ "_type": "radio",
340
+ "_uuid": "7bbd84ab-b7c9-49ec-be76-a94c460acac4",
341
+ "label": "Tony Stark",
342
+ "value": "value-3",
343
+ "errors": {},
344
+ "legend": "Question",
345
+ "collection": "components",
346
+ "validation": {
347
+ "required": true
348
+ }
349
+ }
350
+ ],
351
+ "errors": {},
352
+ "legend": "What is The Mandalorian's real name?",
353
+ "collection": "components",
354
+ "validation": {
355
+ "required": true
356
+ }
357
+ }
358
+ ],
359
+ "add_component": "radios",
360
+ "section_heading": "That's no moon"
361
+ },
362
+ {
363
+ "_id": "page.favourite-fruit",
364
+ "url": "favourite-fruit",
365
+ "_type": "page.singlequestion",
366
+ "_uuid": "0b297048-aa4d-49b6-ac74-18e069118185",
367
+ "components": [
368
+ {
369
+ "_id": "favourite-fruit_radios_1",
370
+ "hint": "",
371
+ "name": "favourite-fruit_radios_1",
372
+ "_type": "radios",
373
+ "_uuid": "43ef37a0-8a9d-4dcd-9f76-42b145a50261",
374
+ "items": [
375
+ {
376
+ "_id": "favourite-fruit_radios_1_item_1",
377
+ "hint": "",
378
+ "_type": "radio",
379
+ "_uuid": "0de360a9-f0f3-44dd-a9b9-8bc4ff694aa3",
380
+ "label": "Apples"
381
+ },
382
+ {
383
+ "_id": "favourite-fruit_radios_1_item_2",
384
+ "hint": "",
385
+ "_type": "radio",
386
+ "_uuid": "f5ee4c8f-be21-4f1e-9bd1-6519e964c126",
387
+ "label": "Oranges"
388
+ },
389
+ {
390
+ "_id": "favourite-fruit_radios_1_item_3",
391
+ "hint": "",
392
+ "_type": "radio",
393
+ "_uuid": "8060028a-d8af-497a-83ab-22850fada6fb",
394
+ "label": "Pears"
395
+ }
396
+ ],
397
+ "errors": {},
398
+ "legend": "What is your favourite fruit?",
399
+ "validation": {
400
+ "required": false
401
+ }
402
+ }
403
+ ]
404
+ },
405
+ {
406
+ "_id": "page.apple-juice",
407
+ "url": "apple-juice",
408
+ "_type": "page.singlequestion",
409
+ "_uuid": "d4342dfd-0d09-4a91-a0ea-d7fd67e706cc",
410
+ "components": [
411
+ {
412
+ "_id": "apple-juice_radios_1",
413
+ "hint": "",
414
+ "name": "apple-juice_radios_1",
415
+ "_type": "radios",
416
+ "_uuid": "05ca2a98-6259-426a-adb4-ad9eb5c33501",
417
+ "items": [
418
+ {
419
+ "_id": "apple-juice_radios_1_item_1",
420
+ "hint": "",
421
+ "_type": "radio",
422
+ "_uuid": "8c4a9988-f5ca-4478-888c-9edd48b0cb03",
423
+ "label": "Yes"
424
+ },
425
+ {
426
+ "_id": "apple-juice_radios_1_item_2",
427
+ "hint": "",
428
+ "_type": "radio",
429
+ "_uuid": "6c0c6ab8-cbc2-475e-9f5f-38df4b5a53e8",
430
+ "label": "No"
431
+ }
432
+ ],
433
+ "errors": {},
434
+ "legend": "Do you like apple juice?",
435
+ "validation": {
436
+ "required": true
437
+ }
438
+ }
439
+ ]
440
+ },
441
+ {
442
+ "_id": "page.orange-juice",
443
+ "url": "orange-juice",
444
+ "_type": "page.singlequestion",
445
+ "_uuid": "91e9f7c6-2f75-4b7d-9eb5-0cf352f7be66",
446
+ "components": [
447
+ {
448
+ "_id": "orange-juice_radios_1",
449
+ "hint": "",
450
+ "name": "orange-juice_radios_1",
451
+ "_type": "radios",
452
+ "_uuid": "ce623afd-4a3b-4e5d-a668-819821780107",
453
+ "items": [
454
+ {
455
+ "_id": "orange-juice_radios_1_item_1",
456
+ "hint": "",
457
+ "_type": "radio",
458
+ "_uuid": "5e147348-1bed-4f92-9312-dc95e174f7cf",
459
+ "label": "Yes"
460
+ },
461
+ {
462
+ "_id": "orange-juice_radios_1_item_2",
463
+ "hint": "",
464
+ "_type": "radio",
465
+ "_uuid": "2b23b405-60df-4e71-bee8-bf3f9216ee0c",
466
+ "label": "No"
467
+ }
468
+ ],
469
+ "errors": {},
470
+ "legend": "Do you like orange juice?",
471
+ "validation": {
472
+ "required": true
473
+ }
474
+ }
475
+ ]
476
+ },
477
+ {
478
+ "_id": "page.favourite-band",
479
+ "url": "favourite-band",
480
+ "_type": "page.singlequestion",
481
+ "_uuid": "05c3306c-0a39-42d2-9e0f-93fd49248f4e",
482
+ "components": [
483
+ {
484
+ "_id": "favourite-band_radios_1",
485
+ "hint": "",
486
+ "name": "favourite-band_radios_1",
487
+ "_type": "radios",
488
+ "_uuid": "c0cc9cba-b53f-4ab5-80a2-bfa6311882ae",
489
+ "items": [
490
+ {
491
+ "_id": "favourite-band_radios_1_item_1",
492
+ "hint": "",
493
+ "_type": "radio",
494
+ "_uuid": "aa1e5688-e062-4cd6-8088-018fddd6eb10",
495
+ "label": "Beatles"
496
+ },
497
+ {
498
+ "_id": "favourite-band_radios_1_item_2",
499
+ "hint": "",
500
+ "_type": "radio",
501
+ "_uuid": "78541e4b-abaa-48d7-a48f-5648cf2165d6",
502
+ "label": "Rolling Stones"
503
+ }
504
+ ],
505
+ "errors": {},
506
+ "legend": "What is your favourite band?",
507
+ "validation": {
508
+ "required": false
509
+ }
510
+ }
511
+ ]
512
+ },
513
+ {
514
+ "_id": "page.music-app",
515
+ "url": "music-app",
516
+ "_type": "page.singlequestion",
517
+ "_uuid": "8002df6e-29ab-4cdf-b520-1d7bb931a28f",
518
+ "components": [
519
+ {
520
+ "_id": "music-app_radios_1",
521
+ "hint": "",
522
+ "name": "music-app_radios_1",
523
+ "_type": "radios",
524
+ "_uuid": "79822f1a-42bd-4f02-b3f2-270e8aee487f",
525
+ "items": [
526
+ {
527
+ "_id": "music-app_radios_1_item_1",
528
+ "hint": "",
529
+ "_type": "radio",
530
+ "_uuid": "881dcc5f-845f-480a-b813-1b66e3ffe759",
531
+ "label": "iTunes"
532
+ },
533
+ {
534
+ "_id": "music-app_radios_1_item_2",
535
+ "hint": "",
536
+ "_type": "radio",
537
+ "_uuid": "90b8863c-a247-4d28-bd8f-b6c1cbd27d37",
538
+ "label": "Spotify"
539
+ }
540
+ ],
541
+ "errors": {},
542
+ "legend": "Which app do you use to listen music?",
543
+ "validation": {
544
+ "required": true
545
+ }
546
+ }
547
+ ]
548
+ },
549
+ {
550
+ "_id": "page.best-formbuilder",
551
+ "url": "best-formbuilder",
552
+ "_type": "page.singlequestion",
553
+ "_uuid": "ef2cafe3-37e2-4533-9b0c-09a970cd38d4",
554
+ "components": [
555
+ {
556
+ "_id": "best-formbuilder_radios_1",
557
+ "hint": "",
558
+ "name": "best-formbuilder_radios_1",
559
+ "_type": "radios",
560
+ "_uuid": "4477bbd6-ce23-4c38-8f17-bd5b75386557",
561
+ "items": [
562
+ {
563
+ "_id": "best-formbuilder_radios_1_item_1",
564
+ "hint": "",
565
+ "_type": "radio",
566
+ "_uuid": "7c795f17-288b-430a-86f8-05d5ae63a3a1",
567
+ "label": "MoJ"
568
+ },
569
+ {
570
+ "_id": "best-formbuilder_radios_1_item_2",
571
+ "hint": "",
572
+ "_type": "radio",
573
+ "_uuid": "022c4ba1-5963-46a5-8813-2eafbe2d1934",
574
+ "label": "Others"
575
+ }
576
+ ],
577
+ "errors": {},
578
+ "legend": "What is the best form builder?",
579
+ "validation": {
580
+ "required": false
581
+ }
582
+ }
583
+ ]
584
+ },
585
+ {
586
+ "_id": "page.which-formbuilder",
587
+ "url": "which-formbuilder",
588
+ "body": "Body section",
589
+ "lede": "",
590
+ "_type": "page.singlequestion",
591
+ "_uuid": "b5efc09c-ece7-45ae-b0b3-8a7905e25040",
592
+ "heading": "Question",
593
+ "components": [
594
+ {
595
+ "_id": "which-formbuilder_text_1",
596
+ "hint": "",
597
+ "name": "which-formbuilder_text_1",
598
+ "_type": "text",
599
+ "_uuid": "dd2ae259-dd91-4689-b7d5-d6efd91bf58a",
600
+ "label": "Which Formbuilder is the best?",
601
+ "errors": {},
602
+ "collection": "components",
603
+ "validation": {
604
+ "required": true,
605
+ "max_length": 20,
606
+ "min_length": 2
607
+ }
608
+ }
609
+ ]
610
+ },
611
+ {
612
+ "_id": "page.check-answers",
613
+ "url": "check-answers",
614
+ "_type": "page.checkanswers",
615
+ "_uuid": "e337070b-f636-49a3-a65c-f506675265f0",
616
+ "heading": "Check your answers",
617
+ "send_body": "By submitting this application you confirm that, to the best of your knowledge, the details you are providing are correct.",
618
+ "components": [
619
+ {
620
+ "_id": "check-answers_content_2",
621
+ "name": "check-answers_content_2",
622
+ "_type": "content",
623
+ "_uuid": "b065ff4f-90c5-4ba2-b4ac-c984a9dd2470",
624
+ "content": "Take the cannoli.",
625
+ "collection": "components"
626
+ }
627
+ ],
628
+ "send_heading": "Now send your application",
629
+ "add_component": "content",
630
+ "extra_components": [
631
+ {
632
+ "_id": "check-answers_content_1",
633
+ "name": "check-answers_content_1",
634
+ "_type": "content",
635
+ "_uuid": "3e6ef27e-91a6-402f-8291-b7ce669e824e",
636
+ "content": "Check yourself before you wreck yourself.",
637
+ "collection": "extra_components"
638
+ }
639
+ ],
640
+ "add_extra_component": "content"
641
+ },
642
+ {
643
+ "_id": "page.confirmation",
644
+ "url": "confirmation",
645
+ "body": "Some day I will be the most powerful Jedi ever!",
646
+ "lede": "",
647
+ "_type": "page.confirmation",
648
+ "_uuid": "778e364b-9a7f-4829-8eb2-510e08f156a3",
649
+ "heading": "Complaint sent",
650
+ "components": []
651
+ }
652
+ ],
653
+ "locale": "en",
654
+ "created_at": "2021-04-21T13:10:19Z",
655
+ "created_by": "099d5bf5-5f7b-444c-86ee-9e189cc1a369",
656
+ "service_id": "488edccd-8411-4ffb-a38b-6a96c6ac28d6",
657
+ "version_id": "27dc30c9-f7b8-4dec-973a-bd153f6797df",
658
+ "service_name": "Version Fixture",
659
+ "configuration": {
660
+ "meta": {
661
+ "_id": "config.meta",
662
+ "_type": "config.meta",
663
+ "items": [
664
+ {
665
+ "_id": "config.meta--link",
666
+ "href": "cookies",
667
+ "text": "Cookies",
668
+ "_type": "link"
669
+ },
670
+ {
671
+ "_id": "config.meta--link--2",
672
+ "href": "privacy",
673
+ "text": "Privacy",
674
+ "_type": "link"
675
+ },
676
+ {
677
+ "_id": "config.meta--link--3",
678
+ "href": "accessibility",
679
+ "text": "Accessibility",
680
+ "_type": "link"
681
+ }
682
+ ]
683
+ },
684
+ "service": {
685
+ "_id": "config.service",
686
+ "_type": "config.service"
687
+ }
688
+ },
689
+ "standalone_pages": [
690
+ {
691
+ "_id": "page.cookies",
692
+ "url": "cookies",
693
+ "body": "This online form puts a small file (known as ‘cookies’) onto your computer to collect information about how you browse the site.\r\n\r\nCookies are used to:\r\n\r\n- remember your progress\r\n- measure how you use the website so it can be updated and improved based on your needs\r\n\r\nThis online form's cookie isn't used to identify you personally.\r\n\r\nYou'll normally see a message on the site before we store a cookie on your computer.\r\n\r\nFind out more about [how to manage cookies](https://www.aboutcookies.org/).\r\n\r\n##How cookies are used on this online form\r\n\r\nWe will store a cookie to remember your progress on this computer and to expire your session after 30 minutes of inactivity or when you close your browser.\r\n\r\n- name: _fb_runner_session\r\n- purpose: saves your current progress in this computer and tracks inactivity periods\r\n- expires: after 30 minutes of inactivity or when you close your browser",
694
+ "_type": "page.standalone",
695
+ "_uuid": "fd52e7c0-03f7-4001-ae7e-f2e4142b0ccc",
696
+ "heading": "Cookies",
697
+ "components": []
698
+ },
699
+ {
700
+ "_id": "page.privacy",
701
+ "url": "privacy",
702
+ "body": "This privacy notice explains what [insert your organisation name] means when we talk about personal data, why we ask for this information about you and what we do with it when you use this form.\r\n\r\nIt also explains how we store your data, how you can get a copy of the information we’ve collected about you and how you can complain if you think we’ve done something wrong.\r\n\r\n###Who manages this service\r\n\r\nThis form is managed by [your organisation].\r\n\r\nThe information you submit will be processed by [insert who will be processing the information and, if it’s a separate organisation, what their relationship is to you].\r\n\r\n[Insert name of organisation that acts as data controller for your form] is the data controller for the personal data collected by this form.\r\n\r\n###When we ask for personal data\r\n\r\nWhenever we ask for information about you, we promise to:\r\n\r\n- always let you know why we need it\r\n- ask for relevant personal information only\r\n- make sure we do not keep it longer than needed\r\n- keep your information safe and make sure nobody can access it unless authorised to do so\r\n- only share your data with other organisations for legitimate purposes\r\n- consider any request you make to correct or delete your personal data\r\n\r\nWe also promise to make it easy for you to:\r\n\r\n- tell us at any time if you want us to stop storing your personal data\r\n- make a complaint to the supervisory authority\r\n\r\n###The personal data we collect\r\n\r\nWe only collect personal data that you directly provide with your application.\r\n\r\nWe only collect the information we need to deliver this service to you. The personal data collected includes:\r\n\r\n- [summarise the types of personal information requested by your form]\r\n\r\nWe [use cookies](http://www.aboutcookies.org.uk/managing-cookies) to collect data that tells us about how the service is used, including:\r\n\r\n- your computer, phone or tablet’s IP address\r\n\r\n- the region or town where you are using your computer, phone or tablet\r\n\r\n- the operating system and web browser you use\r\n\r\nThis information is not used to identify you personally.\r\n\r\n###Why we collect your personal data\r\n\r\nWe collect data to [describe why you are collecting personal information]. The processing of your personal data is necessary for [explain why you require the personal information].\r\n\r\nThe legal basis for collecting and processing your personal data is [enter and explain your legal basis here, for example, that it is necessary to perform a task in the public interest or\nin the exercise of your functions as a government department].\r\n\r\nUse of the online form is voluntary. If you do not provide all the information we ask for, we may not be able to process your [insert the purpose of your form, such as claim, application or request].\r\n\r\nPlease note that transmitting information over the internet is generally not completely secure, and [your organisation] can’t guarantee the security of your data. Any data you transmit is at your own risk. [your organisation, and any other organisations involved in processing the data] have procedures and security features in place to keep your data secure once we receive it.\r\n\r\n###Sharing your personal data\r\n\r\nThe information you provide will be shared with… [name any organisations that you might share the data with and provide an explanation of why the information may be shared and what it will be used for]\r\n\r\nWe may also use your contact information to ask for feedback on using the service, but only when you have given your consent for us to do so. [delete this paragraph if not applicable]\r\n\r\nWe’ll never share your information with other organisations for marketing, market research or commercial purposes.\r\n\r\n###Keeping your personal data\r\n\r\nTo protect your personal information, any data you enter as you progress through the online form is held temporarily and securely until you submit your application, after which your application cannot be viewed or modified further online.\r\n\r\n[your organisation, and any other organisations involved in processing the data] will keep your data for [specify how long you will keep the information for and why].\r\n\r\nAll deleted data will be destroyed securely and confidentially.\r\n\r\n###How we use your personal data\r\n\r\nYour online submission will be sent from the online form to [your organisation or whichever other organisation will receive the information for processing] via encrypted email. The system does not retain a copy of your information.\r\n\r\n[select one of the following 3 paragraphs which most closely fits your circumstances and delete the other 2]\r\n\r\nYour personal data is not used in any automated decision making (a decision made solely by automated means without any human involvement) or profiling (automated processing of personal data to evaluate certain conditions about an individual).\r\n\r\nAutomated decision making (a decision made solely by automated means without any human involvement) is used for the purpose of [insert why ADM is used] and is carried out [include when in the process this is carried out]. The personal data used for this purpose includes [insert personal data types].\r\n\r\nProfiling (automated processing of personal data to evaluate certain conditions about an individual) is carried out for the purpose of [insert reason why profiling exists]. The personal data used for this purpose includes [insert personal data types].\r\n\r\n###How we store your personal data\r\n\r\n[your organisation or whichever other organisation will receive the information for processing] take data security very seriously and take every step to ensure that your data remains private and secure. All data collected by this service is stored in a secure database [kept entirely within the UK/kept outside of the UK but within the European Economic Area (EEA). - delete as appropriate]\r\n\r\nIt may sometimes be necessary to transfer personal information overseas, outside of the UK and the European Economic Area (EEA). When this is needed information may be transferred to [insert names of countries]. Any transfers made will be in full compliance with all aspects of the data protection law. [delete this paragraph if not applicable or contact your data protection team for guidance on required safeguards] \r\n\r\nYour application will only be accessible to [your organisation, and any other organisations involved in processing the data] staff who require access to process applications.\r\n\r\n###Your rights\r\n\r\nYou have a number of rights, depending on the reason for processing your information. These include:\r\n\r\n- the right to request a copy of your personal data and information about how your personal data is processed (this is known as a subject access request)\r\n- the right to have inaccuracies in your personal data corrected\r\n- the right to fill in any gaps in your personal data, including by means of a supplementary statement\r\n- the right to ask for the processing of your personal data to be restricted\r\n- the right to ask for your personal data to be deleted if there is no longer a justification for it\r\n- the right to object to automated decision making, including profiling, that has a legal or significant effect on you as an individual\r\n\r\nIf you want to see the personal data that we hold on you, you can make a subject access request. Send your request by post to:\r\n\r\nDisclosure Team \r\nPost point 10.25 \r\n102 Petty France \r\nLondon \r\nSW1H 9AJ\r\n\r\nor email: data.access@justice.gov.uk\r\n\r\nFor all other rights, please write to us at:\r\n\r\n[insert your postal and email addresses]\r\n\r\n###Getting more information\r\n\r\nYou can get more details on:\r\n\r\n- agreements we have with other organisations for sharing information\r\n- when we can pass on personal information without telling you, for example, to help with the prevention or detection of crime or to produce anonymised statistics\r\n- instructions we give to staff on how to collect, use or delete your personal information\r\n- how we check that the information we have is accurate and up-to-date\r\n- how to make a complaint\r\n\r\nFor more information, please contact the [your organisation] data protection officer at:\r\n\r\n[insert the postal and email addresses of your data protection officer - for the MoJ, this is:\r\n\r\nThe Data Protection Officer \r\nMinistry of Justice \r\n10 South Colonnade\nCanary Wharf \r\nLondon \r\nE14 4PU\r\n\r\nEmail: DPO@justice.gov.uk]\r\n\r\n###Making a complaint\r\n\r\nWhen we ask you for information, we will keep to the law. If you think that your information has not been handled correctly, you can contact the [Information Commissioner](https://ico.org.uk/) for independent advice about data protection on the address below:\r\n\r\nInformation Commissioner's Office \r\nWycliffe House \r\nWater Lane \r\nWilmslow \r\nCheshire \r\nSK9 5AF\r\n\r\nTelephone: 0303 123 1113",
703
+ "_type": "page.standalone",
704
+ "_uuid": "4b86fe8c-7723-4cce-9378-7b2510279e04",
705
+ "heading": "Privacy notice",
706
+ "components": []
707
+ },
708
+ {
709
+ "_id": "page.accessibility",
710
+ "url": "accessibility",
711
+ "body": "This accessibility statement applies to [describe your form here - for example, the general enquiries form for the CICA]. There is a separate [accessibility statement for the main GOV.UK website](https://www.gov.uk/help/accessibility-statement).\r\n\r\n###Using this online form\r\n\r\nThis form was built using MoJ Forms, a tool developed by the Ministry of Justice, and uses components from the [GOV.UK Design System](https://design-system.service.gov.uk/).\r\n\r\n[insert your organisation here] is responsible for the content of this online form. The Ministry of Justice is responsible for its technical aspects.\r\n\r\nWe want as many people as possible to be able to use this online form. For example, that means you should be able to:\r\n\r\n- change colours, contrast levels and fonts\r\n- zoom in up to 300% without the text spilling off the screen\r\n- navigate the form using just a keyboard\r\n- navigate the form using speech recognition software\r\n- listen to the form using a screen reader (including recent versions of JAWS, NVDA and VoiceOver)\r\n\r\nWe’ve also made the text as simple as possible to understand.\r\n\r\n[AbilityNet](https://mcmw.abilitynet.org.uk/) has advice on making your device easier to use if you have a disability.\r\n\r\n###Feedback and contact information\r\n\r\nIf you need information on this website in a different format:\r\n\r\n[insert your contact details for user requests here - add other channels, such as text phones or Relay UK, as required]\r\n\r\n- email: [your email address]\r\n- call: [your telephone number]\r\n- [Hours - e.g. Monday to Friday, 9am to 5pm]\r\n\r\nWe'll consider your request and get back to you in [add your SLA - e.g. a week or 5 working days].\r\n\r\n###Reporting accessibility problems with this form\r\n\r\nWe’re always looking to improve the accessibility of this form. If you find any problems not listed on this page or think we’re not meeting accessibility requirements, contact:\r\n\r\n[insert your contact details for user feedback here - add other channels, such as text phones or Relay UK, as required]\r\n\r\n- email: [your email address]\r\n- call: [your telephone number]\r\n- [Hours - e.g. Monday to Friday, 9am to 5pm]\r\n\r\n###Enforcement procedure\r\n\r\nThe Equality and Human Rights Commission (EHRC) is responsible for enforcing the Public Sector Bodies (Websites and Mobile Applications) (No. 2) Accessibility Regulations 2018 (the ‘accessibility regulations’). If you’re not happy with how we respond to your complaint, contact the [Equality Advisory and Support Service (EASS)](https://www.equalityadvisoryservice.com/).\r\n\r\n###Technical information about this online form’s accessibility\r\n\r\nWe are committed to making our online forms and services accessible, in accordance with the Public Sector Bodies (Websites and Mobile Applications) (No. 2) Accessibility Regulations 2018.\r\n\r\n####Compliance status\r\n\r\nThis online form is fully compliant with the [Web Content Accessibility Guidelines version 2.1 AA standard](https://www.w3.org/TR/WCAG21/)\r\n\r\n###Preparation of this accessibility statement\r\n\r\nThis statement was prepared on [date when it was first published]. It was last reviewed on [date when it was last reviewed].\r\n\r\nThis form was last tested on [date when you performed your basic accessibility check].\r\n\r\nIn order to test the compliance of all forms built using the MoJ Forms tool, the Ministry of Justice commissioned The Digital Accessibility Centre (DAC) to carry out a WCAG 2.1 AA level audit of a sample form. This included extensive testing by users with a wide range of disabilities. The audit was performed on 8 April 2021. The audit highlighted a number of non-compliance issues which were fixed on 11 May 2021.\r\n\r\nIn addition, this form was tested by [insert team or organisation here]. It was tested using the [WAVE Web Accessibility Evaluation Tool](https://wave.webaim.org/) following guidance from the Ministry of Justice and the Government Digital Service (GDS).\r\n\r\n###What we’re doing to improve accessibility\r\n\r\nWe will monitor the accessibility of this website on an ongoing basis and fix any accessibility issues reported to us.",
712
+ "_type": "page.standalone",
713
+ "_uuid": "c439c7fd-f411-4e11-8598-4023934bac93",
714
+ "heading": "Accessibility statement",
715
+ "components": []
716
+ }
717
+ ]
718
+ }
@@ -1,3 +1,3 @@
1
1
  module MetadataPresenter
2
- VERSION = '1.3.2'.freeze
2
+ VERSION = '1.4.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metadata_presenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - MoJ Online
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-11 00:00:00.000000000 Z
11
+ date: 2021-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_design_system_formbuilder
@@ -263,8 +263,12 @@ files:
263
263
  - app/helpers/metadata_presenter/default_text.rb
264
264
  - app/jobs/metadata_presenter/application_job.rb
265
265
  - app/models/metadata_presenter/component.rb
266
+ - app/models/metadata_presenter/condition.rb
267
+ - app/models/metadata_presenter/criteria.rb
266
268
  - app/models/metadata_presenter/date_field.rb
269
+ - app/models/metadata_presenter/evaluate_conditions.rb
267
270
  - app/models/metadata_presenter/file_uploader.rb
271
+ - app/models/metadata_presenter/flow.rb
268
272
  - app/models/metadata_presenter/item.rb
269
273
  - app/models/metadata_presenter/meta.rb
270
274
  - app/models/metadata_presenter/meta_item.rb
@@ -275,6 +279,12 @@ files:
275
279
  - app/models/metadata_presenter/page_answers.rb
276
280
  - app/models/metadata_presenter/service.rb
277
281
  - app/models/metadata_presenter/uploaded_file.rb
282
+ - app/operators/metadata_presenter/base_operator.rb
283
+ - app/operators/metadata_presenter/is_answered_operator.rb
284
+ - app/operators/metadata_presenter/is_not_answered_operator.rb
285
+ - app/operators/metadata_presenter/is_not_operator.rb
286
+ - app/operators/metadata_presenter/is_operator.rb
287
+ - app/operators/metadata_presenter/operator.rb
278
288
  - app/presenters/metadata_presenter/page_answers_presenter.rb
279
289
  - app/validators/metadata_presenter/accept_validator.rb
280
290
  - app/validators/metadata_presenter/base_validator.rb
@@ -316,6 +326,7 @@ files:
316
326
  - app/views/metadata_presenter/page/start.html.erb
317
327
  - config/initializers/default_metadata.rb
318
328
  - config/initializers/default_text.rb
329
+ - config/initializers/inflections.rb
319
330
  - config/initializers/page_components.rb
320
331
  - config/initializers/schemas.rb
321
332
  - config/routes.rb
@@ -348,6 +359,7 @@ files:
348
359
  - default_metadata/string/error.required.json
349
360
  - default_metadata/string/error.virus_scan.json
350
361
  - default_text/content.json
362
+ - fixtures/branching.json
351
363
  - fixtures/invalid_content_page.json
352
364
  - fixtures/no_component_page.json
353
365
  - fixtures/non_finished_service.json