1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/quizzes_ynh.git synced 2024-09-03 20:16:11 +02:00

Merge pull request #8 from YunoHost-Apps/testing

Testing
This commit is contained in:
yalh76 2022-09-09 20:17:14 +02:00 committed by GitHub
commit 985cfccb68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 84 additions and 61 deletions

View file

@ -5,7 +5,7 @@ It shall NOT be edited by hand.
# Quizzes for YunoHost # Quizzes for YunoHost
[![Integration level](https://dash.yunohost.org/integration/quizzes.svg)](https://dash.yunohost.org/appci/app/quizzes) ![](https://ci-apps.yunohost.org/ci/badges/quizzes.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/quizzes.maintain.svg) [![Integration level](https://dash.yunohost.org/integration/quizzes.svg)](https://dash.yunohost.org/appci/app/quizzes) ![Working status](https://ci-apps.yunohost.org/ci/badges/quizzes.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/quizzes.maintain.svg)
[![Install Quizzes with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=quizzes) [![Install Quizzes with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=quizzes)
*[Lire ce readme en français.](./README_fr.md)* *[Lire ce readme en français.](./README_fr.md)*
@ -20,11 +20,9 @@ Multiple choice quiz platform with results analysis interface
**Shipped version:** 1.3.0~ynh1 **Shipped version:** 1.3.0~ynh1
## Screenshots ## Screenshots
![](./doc/screenshots/.DS_Store) ![Screenshot of Quizzes](./doc/screenshots/score_par_theme.png)
![](./doc/screenshots/score_par_theme.png)
## Disclaimers / important information ## Disclaimers / important information
@ -36,20 +34,21 @@ test
``` ```
## Documentation and resources ## Documentation and resources
* Official app website: https://github.com/hipay/quizzes/ * Official app website: <https://github.com/hipay/quizzes/>
* Upstream app code repository: https://github.com/hipay/quizzes/ * Upstream app code repository: <https://github.com/hipay/quizzes/>
* YunoHost documentation for this app: https://yunohost.org/app_quizzes * YunoHost documentation for this app: <https://yunohost.org/app_quizzes>
* Report a bug: https://github.com/YunoHost-Apps/quizzes_ynh/issues * Report a bug: <https://github.com/YunoHost-Apps/quizzes_ynh/issues>
## Developer info ## Developer info
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/quizzes_ynh/tree/testing). Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/quizzes_ynh/tree/testing).
To try the testing branch, please proceed like that. To try the testing branch, please proceed like that.
```
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/quizzes_ynh/tree/testing --debug sudo yunohost app install https://github.com/YunoHost-Apps/quizzes_ynh/tree/testing --debug
or or
sudo yunohost app upgrade quizzes -u https://github.com/YunoHost-Apps/quizzes_ynh/tree/testing --debug sudo yunohost app upgrade quizzes -u https://github.com/YunoHost-Apps/quizzes_ynh/tree/testing --debug
``` ```
**More info regarding app packaging:** https://yunohost.org/packaging_apps **More info regarding app packaging:** <https://yunohost.org/packaging_apps>

View file

@ -1,10 +1,14 @@
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
It shall NOT be edited by hand.
-->
# Quizzes pour YunoHost # Quizzes pour YunoHost
[![Niveau d'intégration](https://dash.yunohost.org/integration/quizzes.svg)](https://dash.yunohost.org/appci/app/quizzes) ![](https://ci-apps.yunohost.org/ci/badges/quizzes.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/quizzes.maintain.svg) [![Niveau d'intégration](https://dash.yunohost.org/integration/quizzes.svg)](https://dash.yunohost.org/appci/app/quizzes) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/quizzes.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/quizzes.maintain.svg)
[![Installer Quizzes avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=quizzes) [![Installer Quizzes avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=quizzes)
*[Read this readme in english.](./README.md)* *[Read this readme in english.](./README.md)*
*[Lire ce readme en français.](./README_fr.md)*
> *Ce package vous permet d'installer Quizzes rapidement et simplement sur un serveur YunoHost. > *Ce package vous permet d'installer Quizzes rapidement et simplement sur un serveur YunoHost.
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
@ -13,14 +17,12 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
Plate-forme de quizzes à choix multiples (QCM) avec interface d'analyse des résultats Plate-forme de quizzes à choix multiples (QCM) avec interface d'analyse des résultats
**Version incluse :** 1.3.0~ynh1 **Version incluse :** 1.3.0~ynh1
## Captures d'écran ## Captures d'écran
![](./doc/screenshots/.DS_Store) ![Capture d'écran de Quizzes](./doc/screenshots/score_par_theme.png)
![](./doc/screenshots/score_par_theme.png)
## Avertissements / informations importantes ## Avertissements / informations importantes
@ -32,20 +34,21 @@ test
``` ```
## Documentations et ressources ## Documentations et ressources
* Site officiel de l'app : https://github.com/hipay/quizzes/ * Site officiel de l'app : <https://github.com/hipay/quizzes/>
* Dépôt de code officiel de l'app : https://github.com/hipay/quizzes/ * Dépôt de code officiel de l'app : <https://github.com/hipay/quizzes/>
* Documentation YunoHost pour cette app : https://yunohost.org/app_quizzes * Documentation YunoHost pour cette app : <https://yunohost.org/app_quizzes>
* Signaler un bug : https://github.com/YunoHost-Apps/quizzes_ynh/issues * Signaler un bug : <https://github.com/YunoHost-Apps/quizzes_ynh/issues>
## Informations pour les développeurs ## Informations pour les développeurs
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/quizzes_ynh/tree/testing). Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/quizzes_ynh/tree/testing).
Pour essayer la branche testing, procédez comme suit. Pour essayer la branche testing, procédez comme suit.
```
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/quizzes_ynh/tree/testing --debug sudo yunohost app install https://github.com/YunoHost-Apps/quizzes_ynh/tree/testing --debug
ou ou
sudo yunohost app upgrade quizzes -u https://github.com/YunoHost-Apps/quizzes_ynh/tree/testing --debug sudo yunohost app upgrade quizzes -u https://github.com/YunoHost-Apps/quizzes_ynh/tree/testing --debug
``` ```
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps **Plus d'infos sur le packaging d'applications :** <https://yunohost.org/packaging_apps>

View file

@ -1,10 +1,7 @@
;; Test complet ;; Test complet
; Manifest ; Manifest
domain="domain.tld" domain="domain.tld"
path="/path"
admin="john"
is_public=1 is_public=1
password="1Strong-Password"
; Checks ; Checks
pkg_linter=1 pkg_linter=1
setup_sub_dir=0 setup_sub_dir=0

View file

@ -1,4 +1,4 @@
location / { location __PATH__/ {
# Path to source # Path to source
alias __FINALPATH__/web/; alias __FINALPATH__/web/;

BIN
doc/.DS_Store vendored

Binary file not shown.

Binary file not shown.

View file

@ -76,14 +76,6 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path" chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path" chown -R $app:www-data "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config
#================================================= #=================================================
# PHP-FPM CONFIGURATION # PHP-FPM CONFIGURATION
#================================================= #=================================================
@ -92,6 +84,14 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
# Create a dedicated PHP-FPM config # Create a dedicated PHP-FPM config
ynh_add_fpm_config ynh_add_fpm_config
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config
#================================================= #=================================================
# SPECIFIC SETUP # SPECIFIC SETUP
#================================================= #=================================================
@ -101,6 +101,10 @@ ynh_script_progression --message="Installing $app with Composer..." --weight=5
ynh_install_composer --install_args="--ignore-platform-reqs" 2>&1 ynh_install_composer --install_args="--ignore-platform-reqs" 2>&1
pushd $final_path
patch --strip=1 < $YNH_APP_BASEDIR/sources/app-array_key_exists.patch
popd
#================================================= #=================================================
# ADD A CONFIGURATION # ADD A CONFIGURATION
#================================================= #=================================================
@ -140,6 +144,8 @@ ynh_script_progression --message="Configuring permissions..." --weight=1
# Make app public if necessary # Make app public if necessary
if [ $is_public -eq 1 ] if [ $is_public -eq 1 ]
then then
# Everyone can access the app.
# The "main" permission is automatically created before the install script.
ynh_permission_update --permission="main" --add="visitors" ynh_permission_update --permission="main" --add="visitors"
fi fi

View file

@ -64,7 +64,7 @@ ynh_remove_app_dependencies
#================================================= #=================================================
# REMOVE VARIOUS FILES # REMOVE VARIOUS FILES
#================================================= #=================================================
ynh_script_progression --message="Removing various files..." ynh_script_progression --message="Removing various files..." --weight=1
# Remove the log files # Remove the log files
ynh_secure_remove --file="/var/log/$app" ynh_secure_remove --file="/var/log/$app"

View file

@ -42,13 +42,6 @@ test ! -d $final_path \
#================================================= #=================================================
# STANDARD RESTORATION STEPS # STANDARD RESTORATION STEPS
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#================================================= #=================================================
# RECREATE THE DEDICATED USER # RECREATE THE DEDICATED USER
#================================================= #=================================================
@ -68,6 +61,14 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path" chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path" chown -R $app:www-data "$final_path"
#=================================================
# REINSTALL DEPENDENCIES
#=================================================
ynh_script_progression --message="Reinstalling dependencies..." --weight=1
# Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# RESTORE THE PHP-FPM CONFIGURATION # RESTORE THE PHP-FPM CONFIGURATION
#================================================= #=================================================
@ -76,12 +77,11 @@ ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weig
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#================================================= #=================================================
# REINSTALL DEPENDENCIES # RESTORE THE NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Reinstalling dependencies..." --weight=1 ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1
# Define and install dependencies ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# RESTORE THE LOGROTATE CONFIGURATION # RESTORE THE LOGROTATE CONFIGURATION

View file

@ -23,7 +23,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#================================================= #=================================================
# CHECK VERSION # CHECK VERSION
#================================================= #=================================================
ynh_script_progression --message="Checking version..." ynh_script_progression --message="Checking version..." --weight=1
upgrade_type=$(ynh_check_app_version_changed) upgrade_type=$(ynh_check_app_version_changed)
@ -62,20 +62,10 @@ then
ynh_setup_source --dest_dir="$final_path" ynh_setup_source --dest_dir="$final_path"
fi fi
ynh_install_composer --install_args="--ignore-platform-reqs" 2>&1
chmod 750 "$final_path" chmod 750 "$final_path"
chmod -R o-rwx "$final_path" chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path" chown -R $app:www-data "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config
#================================================= #=================================================
# UPGRADE DEPENDENCIES # UPGRADE DEPENDENCIES
#================================================= #=================================================
@ -91,6 +81,27 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2
# Create a dedicated PHP-FPM config # Create a dedicated PHP-FPM config
ynh_add_fpm_config ynh_add_fpm_config
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# SPECIFIC UPGRADE
#=================================================
# INSTALL LYCHEE WITH COMPOSER
#=================================================
ynh_script_progression --message="Installing $app with Composer..." --weight=5
ynh_install_composer --install_args="--ignore-platform-reqs" 2>&1
pushd $final_path
patch --strip=1 < $YNH_APP_BASEDIR/sources/app-array_key_exists.patch
popd
#================================================= #=================================================
# UPDATE A CONFIG FILE # UPDATE A CONFIG FILE
#================================================= #=================================================

View file

@ -0,0 +1,11 @@
--- a/vendor/twig/twig/lib/Twig/Template.php 2022-09-05 02:54:39.800617851 +0200
+++ a/vendor/twig/twig/lib/Twig/Template.php 2022-09-05 03:54:48.000000000 +0200
@@ -387,7 +387,7 @@
// object property
if (Twig_TemplateInterface::METHOD_CALL !== $type) {
- if (isset($object->$item) || array_key_exists((string) $item, $object)) {
+ if (isset($object->$item)) {
if ($isDefinedTest) {
return true;
}

View file

@ -1,2 +0,0 @@
*~
*.sw[op]

View file

@ -1,2 +0,0 @@
*~
*.sw[op]