Skip to content

Commit 07a5a73

Browse files
authored
Merge pull request #589 from OWASP/release-fix
Adding tarot as a template for the leaflet.
2 parents adfb04d + aa2ea15 commit 07a5a73

File tree

5 files changed

+12
-17
lines changed

5 files changed

+12
-17
lines changed

.github/workflows/pre-release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,10 @@
8181
title: "Latest pre-release"
8282
files: |
8383
CHANGELOG.md
84-
LICENSE
8584
LICENSE.md
8685
README.md
8786
creative-commons-attribution-3.0.txt
88-
output/owasp_cornucopia_mobileapp_1.00.zip
87+
output/owasp_cornucopia_mobileapp_1.00_en.zip
8988
output/owasp_cornucopia_webapp_1.22_en.zip
9089
output/owasp_cornucopia_webapp_1.22_es.zip
9190
output/owasp_cornucopia_webapp_1.22_fr.zip

.github/workflows/release.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
run: pipenv run coverage xml
6666
- name: Check test coverage - Report
6767
run: pipenv run coverage report --fail-under 85 scripts/convert*
68-
- name: Generate new output files
68+
- name: Generate new output file
6969
run: |
7070
pipenv run python scripts/convert.py -l all -lt all -t bridge -v 1.22 -e webapp
7171
pipenv run python scripts/convert.py -l all -lt all -t tarot -v 1.22 -e webapp
@@ -94,11 +94,10 @@
9494
prerelease: false
9595
files: |
9696
CHANGELOG.md
97-
LICENSE
9897
LICENSE.md
9998
README.md
10099
creative-commons-attribution-3.0.txt
101-
output/owasp_cornucopia_mobileapp_1.00.zip
100+
output/owasp_cornucopia_mobileapp_1.00_en.zip
102101
output/owasp_cornucopia_webapp_1.22_en.zip
103102
output/owasp_cornucopia_webapp_1.22_es.zip
104103
output/owasp_cornucopia_webapp_1.22_fr.zip

scripts/convert.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ def get_mapping_data_for_edition(
445445
"""Get the raw data of the replacement text from correct yaml file"""
446446
data: Dict[Any, Dict[Any, Any]] = {}
447447
logging.debug(
448-
f" --- Starting get_mapping_data_for_edition() for edition: "
448+
" --- Starting get_mapping_data_for_edition() for edition: "
449449
f"{edition} , language: {language} and version: {version} "
450450
f" with mapping to version {get_valid_mapping_for_version(version, edition)}"
451451
)
@@ -804,9 +804,6 @@ def get_valid_mapping_for_version(version: str, edition: str) -> str:
804804

805805
def get_valid_templates() -> List[str]:
806806
templates = []
807-
if convert_vars.args.layout.lower() in "leaflet":
808-
templates.append("bridge")
809-
return templates
810807
if convert_vars.args.template.lower() == "all":
811808
for template in [t for t in convert_vars.TEMPLATE_CHOICES if t not in ("all", "bridge_qr")]:
812809
templates.append(template)

source/webapp-mappings-2.00.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ meta:
99
languages: ["en", "es", "fr", "nl", "nl", "no-nb", "pt-br"]
1010
suits:
1111
-
12-
name: "Data Validation & Encoding"
12+
name: "DATA VALIDATION & ENCODING"
1313
cards:
1414
-
1515
id: "DV2"
@@ -108,7 +108,7 @@ suits:
108108
capec: [ 23, 28, 76, 152, 160, 261 ]
109109
safecode: [ 2, 19, 20 ]
110110
-
111-
name: "Authentication"
111+
name: "AUTHENTICATION"
112112
cards:
113113
-
114114
id: "AC2"
@@ -207,7 +207,7 @@ suits:
207207
capec: [ 115, 207, 554 ]
208208
safecode: [ 14, 28 ]
209209
-
210-
name: "Session Management"
210+
name: "SESSION MANAGEMENT"
211211
cards:
212212
-
213213
id: "SM2"
@@ -306,7 +306,7 @@ suits:
306306
capec: [ 21 ]
307307
safecode: [ 14, 28 ]
308308
-
309-
name: "Authorization"
309+
name: "AUTHORIZATION"
310310
cards:
311311
-
312312
id: "AZ2"
@@ -405,7 +405,7 @@ suits:
405405
capec: [ 207, 554 ]
406406
safecode: [ 8, 10, 11 ]
407407
-
408-
name: "Cryptography"
408+
name: "CRYPTOGRAPHY"
409409
cards:
410410
-
411411
id: "CR2"
@@ -504,7 +504,7 @@ suits:
504504
capec: [ 207, 554 ]
505505
safecode: [ 14, 21, 29 ]
506506
-
507-
name: "Cornucopia"
507+
name: "CORNUCOPIA"
508508
cards:
509509
-
510510
id: "CO2"

tests/scripts/convert_utest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def test_get_valid_style_choices_dynamic(self) -> None:
113113

114114
def test_get_valid_style_choices_blank(self) -> None:
115115
c.convert_vars.args = argparse.Namespace(template="", layout="")
116-
want_template = ["bridge"]
116+
want_template = ["bridge", "tarot"]
117117

118118
got_template = c.get_valid_templates()
119119
self.assertListEqual(want_template, got_template)
@@ -127,7 +127,7 @@ def test_get_valid_style_choices_all(self) -> None:
127127

128128
def test_get_valid_style_choices_for_leaflet(self) -> None:
129129
c.convert_vars.args = argparse.Namespace(template="all", layout="leaflet")
130-
want_template = ["bridge"]
130+
want_template = ["bridge", "tarot"]
131131

132132
got_template = c.get_valid_templates()
133133
self.assertListEqual(want_template, got_template)

0 commit comments

Comments
 (0)