From 5ef6ec7507d651e81fb39458175a137ff69d3c3d Mon Sep 17 00:00:00 2001 From: Emad Ehsanrad Date: Sun, 6 Aug 2023 11:57:52 +0330 Subject: [PATCH] refactor: using tasks directory instead of jobs tasks directory in the cookie-cutter is called "jobs", but everywhere is "tasks". This will fix the inconsistency. --- Makefile | 4 ++-- .../{{ cookiecutter.module_name }}/plugin.py | 6 +++--- .../{jobs/init => tasks/lms}/.gitignore | 0 3 files changed, 5 insertions(+), 5 deletions(-) rename {{ cookiecutter.package_name }}/{{ cookiecutter.module_name }}/templates/{{ cookiecutter.plugin_name }}/{jobs/init => tasks/lms}/.gitignore (100%) diff --git a/Makefile b/Makefile index 7e68412..f2706b2 100644 --- a/Makefile +++ b/Makefile @@ -16,10 +16,10 @@ generate-plugin-for-tests: ## Generate a plugin using the cookiecutter defaults # The cookiecutter has many example code blocks prefixed with '### '. # To help ensure that the example code would work if the user uncommented it, # we remove the all '### ' occurances before running tests. - sed -i 's/### //' tutor-contrib-myplugin/tutormyplugin/plugin.py + sed -i 's/### //' tutor-contrib-myplugin/tutormyplugin/plugin.py # We must also create this init task template, which the cookiecutter # doesn't generate because its usage in plugin.py is commented out. - touch tutor-contrib-myplugin/tutormyplugin/templates/myplugin/jobs/init/lms.sh + touch tutor-contrib-myplugin/tutormyplugin/templates/myplugin/tasks/lms/init.sh @echo "$(MSG)Plugin generated.$(END_MSG)" test-plugin: test-plugin-quality test-plugin-install ## Test the default plugin. diff --git a/{{ cookiecutter.package_name }}/{{ cookiecutter.module_name }}/plugin.py b/{{ cookiecutter.package_name }}/{{ cookiecutter.module_name }}/plugin.py index 4a983de..9f2261f 100644 --- a/{{ cookiecutter.package_name }}/{{ cookiecutter.module_name }}/plugin.py +++ b/{{ cookiecutter.package_name }}/{{ cookiecutter.module_name }}/plugin.py @@ -49,14 +49,14 @@ ######################################## # To add a custom initialization task, create a bash script template under: -# {{ cookiecutter.module_name }}/templates/{{ cookiecutter.plugin_name }}/jobs/init/ +# {{ cookiecutter.module_name }}/templates/{{ cookiecutter.plugin_name }}/tasks/ # and then add it to the MY_INIT_TASKS list. Each task is in the format: # ("", ("", "", "