metadata_presenter 1.7.1 → 1.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fixtures/branching.json +204 -2
- data/lib/metadata_presenter/version.rb +1 -1
- data/lib/tasks/metadata_presenter_tasks.rake +5 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ac5fd51e02d3200c324282f394e5d8d3b11e0e440592e627290dfd7b6c767ba
|
4
|
+
data.tar.gz: bced641e349533c820815867b08bfca21f7d8c0bbd619ed19615e424edcaa2a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d38891660bc18dfe3472b43b84efc4a4752be370ba88decb17aad07aa47d779282214602bd52b10db043ad9aec8cc582e2010828deb8916f4b4b40fe069165d7
|
7
|
+
data.tar.gz: 289b34c930dd5c2322d6c32bb22d761c2d2f973e8ae8be7edd5104d3af2f429055ac5edbe76a56b9e78b63e48da5958e551f3e1b66a444eaa02572a41ee3febf
|
data/fixtures/branching.json
CHANGED
@@ -219,7 +219,7 @@
|
|
219
219
|
"84a347fc-8d4b-486a-9996-6a86fa9544c5": {
|
220
220
|
"_type": "branch",
|
221
221
|
"next": {
|
222
|
-
"default": "
|
222
|
+
"default": "48357db5-7c06-4e85-94b1-5e1c9d8f39eb",
|
223
223
|
"conditions": [
|
224
224
|
{
|
225
225
|
"condition_type": "or",
|
@@ -263,10 +263,84 @@
|
|
263
263
|
"2cc66e51-2c14-4023-86bf-ded49887cdb2": {
|
264
264
|
"_type": "page",
|
265
265
|
"next": {
|
266
|
-
"default": "
|
266
|
+
"default": "48357db5-7c06-4e85-94b1-5e1c9d8f39eb"
|
267
267
|
}
|
268
268
|
},
|
269
269
|
"f6c51f88-7be8-4cb7-bbfc-6c905727a051": {
|
270
|
+
"_type": "page",
|
271
|
+
"next": {
|
272
|
+
"default": "48357db5-7c06-4e85-94b1-5e1c9d8f39eb"
|
273
|
+
}
|
274
|
+
},
|
275
|
+
"48357db5-7c06-4e85-94b1-5e1c9d8f39eb": {
|
276
|
+
"_type": "page",
|
277
|
+
"next": {
|
278
|
+
"default": "1079b5b8-abd0-4bf6-aaac-1f01e69e3b39"
|
279
|
+
}
|
280
|
+
},
|
281
|
+
"1079b5b8-abd0-4bf6-aaac-1f01e69e3b39": {
|
282
|
+
"_type": "branch",
|
283
|
+
"next": {
|
284
|
+
"default": "941137d7-a1da-43fd-994a-98a4f9ea6d46",
|
285
|
+
"conditions": [
|
286
|
+
{
|
287
|
+
"condition_type": "and",
|
288
|
+
"next": "56e80942-d0a4-405a-85cd-bd1b100013d6",
|
289
|
+
"criterias": [
|
290
|
+
{
|
291
|
+
"operator": "is",
|
292
|
+
"page": "48357db5-7c06-4e85-94b1-5e1c9d8f39eb",
|
293
|
+
"component": "3a430712-a75f-4412-836d-4ec7b2cb1ac9",
|
294
|
+
"field": "30258b55-ec04-4278-86b7-8382cbd34bea"
|
295
|
+
},
|
296
|
+
{
|
297
|
+
"operator": "is",
|
298
|
+
"page": "48357db5-7c06-4e85-94b1-5e1c9d8f39eb",
|
299
|
+
"component": "3a430712-a75f-4412-836d-4ec7b2cb1ac9",
|
300
|
+
"field": "9339d86e-b53c-42c0-ab6e-1ab3e2340873"
|
301
|
+
},
|
302
|
+
{
|
303
|
+
"operator": "is",
|
304
|
+
"page": "48357db5-7c06-4e85-94b1-5e1c9d8f39eb",
|
305
|
+
"component": "3a430712-a75f-4412-836d-4ec7b2cb1ac9",
|
306
|
+
"field": "5d650e5d-57ac-42a1-9348-c1b93248753a"
|
307
|
+
}
|
308
|
+
]
|
309
|
+
},
|
310
|
+
{
|
311
|
+
"condition_type": "or",
|
312
|
+
"next": "6324cca4-7770-4765-89b9-1cdc41f49c8b",
|
313
|
+
"criterias": [
|
314
|
+
{
|
315
|
+
"operator": "is",
|
316
|
+
"page": "48357db5-7c06-4e85-94b1-5e1c9d8f39eb",
|
317
|
+
"component": "3a430712-a75f-4412-836d-4ec7b2cb1ac9",
|
318
|
+
"field": "6b82b4e4-6dfd-4b3c-b6ed-2d71be0980bf"
|
319
|
+
},
|
320
|
+
{
|
321
|
+
"operator": "is",
|
322
|
+
"page": "48357db5-7c06-4e85-94b1-5e1c9d8f39eb",
|
323
|
+
"component": "3a430712-a75f-4412-836d-4ec7b2cb1ac9",
|
324
|
+
"field": "8c2c6161-7309-4e4f-9f3c-9fa629bcb459"
|
325
|
+
}
|
326
|
+
]
|
327
|
+
}
|
328
|
+
]
|
329
|
+
}
|
330
|
+
},
|
331
|
+
"941137d7-a1da-43fd-994a-98a4f9ea6d46": {
|
332
|
+
"_type": "page",
|
333
|
+
"next": {
|
334
|
+
"default": "e337070b-f636-49a3-a65c-f506675265f0"
|
335
|
+
}
|
336
|
+
},
|
337
|
+
"56e80942-d0a4-405a-85cd-bd1b100013d6": {
|
338
|
+
"_type": "page",
|
339
|
+
"next": {
|
340
|
+
"default": "e337070b-f636-49a3-a65c-f506675265f0"
|
341
|
+
}
|
342
|
+
},
|
343
|
+
"6324cca4-7770-4765-89b9-1cdc41f49c8b": {
|
270
344
|
"_type": "page",
|
271
345
|
"next": {
|
272
346
|
"default": "e337070b-f636-49a3-a65c-f506675265f0"
|
@@ -482,6 +556,7 @@
|
|
482
556
|
"url": "favourite-fruit",
|
483
557
|
"_type": "page.singlequestion",
|
484
558
|
"_uuid": "0b297048-aa4d-49b6-ac74-18e069118185",
|
559
|
+
"heading": "",
|
485
560
|
"components": [
|
486
561
|
{
|
487
562
|
"_id": "favourite-fruit_radios_1",
|
@@ -525,6 +600,7 @@
|
|
525
600
|
"url": "apple-juice",
|
526
601
|
"_type": "page.singlequestion",
|
527
602
|
"_uuid": "d4342dfd-0d09-4a91-a0ea-d7fd67e706cc",
|
603
|
+
"heading": "",
|
528
604
|
"components": [
|
529
605
|
{
|
530
606
|
"_id": "apple-juice_radios_1",
|
@@ -561,6 +637,7 @@
|
|
561
637
|
"url": "orange-juice",
|
562
638
|
"_type": "page.singlequestion",
|
563
639
|
"_uuid": "91e9f7c6-2f75-4b7d-9eb5-0cf352f7be66",
|
640
|
+
"heading": "",
|
564
641
|
"components": [
|
565
642
|
{
|
566
643
|
"_id": "orange-juice_radios_1",
|
@@ -597,6 +674,7 @@
|
|
597
674
|
"url": "favourite-band",
|
598
675
|
"_type": "page.singlequestion",
|
599
676
|
"_uuid": "05c3306c-0a39-42d2-9e0f-93fd49248f4e",
|
677
|
+
"heading": "",
|
600
678
|
"components": [
|
601
679
|
{
|
602
680
|
"_id": "favourite-band_radios_1",
|
@@ -633,6 +711,7 @@
|
|
633
711
|
"url": "music-app",
|
634
712
|
"_type": "page.singlequestion",
|
635
713
|
"_uuid": "8002df6e-29ab-4cdf-b520-1d7bb931a28f",
|
714
|
+
"heading": "",
|
636
715
|
"components": [
|
637
716
|
{
|
638
717
|
"_id": "music-app_radios_1",
|
@@ -669,6 +748,7 @@
|
|
669
748
|
"url": "best-formbuilder",
|
670
749
|
"_type": "page.singlequestion",
|
671
750
|
"_uuid": "ef2cafe3-37e2-4533-9b0c-09a970cd38d4",
|
751
|
+
"heading": "",
|
672
752
|
"components": [
|
673
753
|
{
|
674
754
|
"_id": "best-formbuilder_radios_1",
|
@@ -840,6 +920,7 @@
|
|
840
920
|
"url": "marvel-series",
|
841
921
|
"_type": "page.singlequestion",
|
842
922
|
"_uuid": "dc7454f9-4186-48d7-b055-684d57bbcdc7",
|
923
|
+
"heading": "",
|
843
924
|
"components": [
|
844
925
|
{
|
845
926
|
"_id": "marvel-series_radios_1",
|
@@ -937,6 +1018,127 @@
|
|
937
1018
|
],
|
938
1019
|
"section_heading": ""
|
939
1020
|
},
|
1021
|
+
{
|
1022
|
+
"_id": "page.best-arnold-quote",
|
1023
|
+
"url": "best-arnold-quote",
|
1024
|
+
"body": "Body section",
|
1025
|
+
"lede": "",
|
1026
|
+
"_type": "page.singlequestion",
|
1027
|
+
"_uuid": "48357db5-7c06-4e85-94b1-5e1c9d8f39eb",
|
1028
|
+
"heading": "Question",
|
1029
|
+
"components": [
|
1030
|
+
{
|
1031
|
+
"_id": "best-arnold-quote_checkboxes_1",
|
1032
|
+
"hint": "",
|
1033
|
+
"name": "best-arnold-quote_checkboxes_1",
|
1034
|
+
"_type": "checkboxes",
|
1035
|
+
"_uuid": "3a430712-a75f-4412-836d-4ec7b2cb1ac9",
|
1036
|
+
"items": [
|
1037
|
+
{
|
1038
|
+
"_id": "best-arnold-quote_checkboxes_1_item_1",
|
1039
|
+
"hint": "",
|
1040
|
+
"name": "best-arnold-quote_checkboxes_1",
|
1041
|
+
"_type": "checkbox",
|
1042
|
+
"_uuid": "30258b55-ec04-4278-86b7-8382cbd34bea",
|
1043
|
+
"label": "You are not you. You are me"
|
1044
|
+
},
|
1045
|
+
{
|
1046
|
+
"_id": "best-arnold-quote_checkboxes_1_item_2",
|
1047
|
+
"hint": "",
|
1048
|
+
"name": "best-arnold-quote_checkboxes_1",
|
1049
|
+
"_type": "checkbox",
|
1050
|
+
"_uuid": "9339d86e-b53c-42c0-ab6e-1ab3e2340873",
|
1051
|
+
"label": "Get to the chopper"
|
1052
|
+
},
|
1053
|
+
{
|
1054
|
+
"_id": "best-arnold-quote_checkboxes_1_item_3",
|
1055
|
+
"hint": "",
|
1056
|
+
"name": "best-arnold-quote_checkboxes_1",
|
1057
|
+
"_type": "checkbox",
|
1058
|
+
"_uuid": "5d650e5d-57ac-42a1-9348-c1b93248753a",
|
1059
|
+
"label": "You have been terminated"
|
1060
|
+
},
|
1061
|
+
{
|
1062
|
+
"_id": "best-arnold-quote_checkboxes_1_item_4",
|
1063
|
+
"hint": "",
|
1064
|
+
"name": "best-arnold-quote_checkboxes_1",
|
1065
|
+
"_type": "checkbox",
|
1066
|
+
"_uuid": "6b82b4e4-6dfd-4b3c-b6ed-2d71be0980bf",
|
1067
|
+
"label": "I am GROOT"
|
1068
|
+
},
|
1069
|
+
{
|
1070
|
+
"_id": "best-arnold-quote_checkboxes_1_item_5",
|
1071
|
+
"hint": "",
|
1072
|
+
"name": "best-arnold-quote_checkboxes_1",
|
1073
|
+
"_type": "checkbox",
|
1074
|
+
"_uuid": "8c2c6161-7309-4e4f-9f3c-9fa629bcb459",
|
1075
|
+
"label": "Dance Off, Bro."
|
1076
|
+
}
|
1077
|
+
],
|
1078
|
+
"legend": "Select all Arnold Schwarzenegger quotes",
|
1079
|
+
"validation": {
|
1080
|
+
"required": true
|
1081
|
+
}
|
1082
|
+
}
|
1083
|
+
]
|
1084
|
+
},
|
1085
|
+
{
|
1086
|
+
"_id": "page.arnold-right-answers",
|
1087
|
+
"url": "arnold-right-answers",
|
1088
|
+
"body": "You are right! Now, talk to the hand!",
|
1089
|
+
"lede": "",
|
1090
|
+
"_type": "page.content",
|
1091
|
+
"_uuid": "56e80942-d0a4-405a-85cd-bd1b100013d6",
|
1092
|
+
"heading": "You are right",
|
1093
|
+
"components": [
|
1094
|
+
{
|
1095
|
+
"_id": "arnold-right-answers_content_1",
|
1096
|
+
"name": "arnold-right-answers_content_1",
|
1097
|
+
"_type": "content",
|
1098
|
+
"_uuid": "9a7948f1-9e9a-4273-b52e-e2917c79f37c",
|
1099
|
+
"content": "You are right! Now, talk to the hand!"
|
1100
|
+
}
|
1101
|
+
],
|
1102
|
+
"section_heading": ""
|
1103
|
+
},
|
1104
|
+
{
|
1105
|
+
"_id": "page.arnold-wrong-answers",
|
1106
|
+
"url": "arnold-wrong-answers",
|
1107
|
+
"body": "You are wrong! These are from the Guardians of the Galaxy!",
|
1108
|
+
"lede": "",
|
1109
|
+
"_type": "page.content",
|
1110
|
+
"_uuid": "6324cca4-7770-4765-89b9-1cdc41f49c8b",
|
1111
|
+
"heading": "You are wrong",
|
1112
|
+
"components": [
|
1113
|
+
{
|
1114
|
+
"_id": "arnold-wrong-answers_content_1",
|
1115
|
+
"name": "arnold-wrong-answers_content_1",
|
1116
|
+
"_type": "content",
|
1117
|
+
"_uuid": "3bd3ca1d-fed7-43b0-ab90-b4425b634203",
|
1118
|
+
"content": "You need to master the ability of standing so incredibly still, that you become invisible to the eye."
|
1119
|
+
}
|
1120
|
+
],
|
1121
|
+
"section_heading": ""
|
1122
|
+
},
|
1123
|
+
{
|
1124
|
+
"_id": "page.arnold-incomplete-answers",
|
1125
|
+
"url": "arnold-incomplete-answers",
|
1126
|
+
"body": "You are wrong! The answers are incomplete.",
|
1127
|
+
"lede": "",
|
1128
|
+
"_type": "page.content",
|
1129
|
+
"_uuid": "941137d7-a1da-43fd-994a-98a4f9ea6d46",
|
1130
|
+
"heading": "You are wrong",
|
1131
|
+
"components": [
|
1132
|
+
{
|
1133
|
+
"_id": "arnold-incomplete-answers_content_1",
|
1134
|
+
"name": "arnold-incomplete-answers_content_1",
|
1135
|
+
"_type": "content",
|
1136
|
+
"_uuid": "16252a29-8e00-4247-b47f-3e94c863a540",
|
1137
|
+
"content": "The answers are incomplete. You need to remember Arnold saying 'I will be back'. So go back to answer correctly."
|
1138
|
+
}
|
1139
|
+
],
|
1140
|
+
"section_heading": ""
|
1141
|
+
},
|
940
1142
|
{
|
941
1143
|
"_id": "page.check-answers",
|
942
1144
|
"url": "check-answers",
|
@@ -48,14 +48,14 @@ module MetadataPresenter
|
|
48
48
|
flow_object = service.flow(id)
|
49
49
|
|
50
50
|
if flow_object.branch?
|
51
|
-
full_description = flow_object.conditions.map do |condition|
|
52
|
-
condition.criterias.map
|
51
|
+
full_description = flow_object.conditions.map.each_with_index do |condition, _index|
|
52
|
+
condition.criterias.map { |criteria|
|
53
53
|
criteria.service = service
|
54
54
|
|
55
|
-
"
|
56
|
-
|
55
|
+
"#{criteria.criteria_component.humanised_title} #{criteria.operator} #{criteria.field_label}"
|
56
|
+
}.join(" #{condition.condition_type} ")
|
57
57
|
end
|
58
|
-
nodes[id] = @graphviz.add_nodes(full_description.flatten.join('
|
58
|
+
nodes[id] = @graphviz.add_nodes(full_description.flatten.join(' / '))
|
59
59
|
else
|
60
60
|
current_page = find_page_by_uuid(id)
|
61
61
|
nodes[id] = @graphviz.add_nodes(current_page.url)
|