jdel / sspks

A very simple Synology Package Server, reverse engineered from the official Synology package repository and SynoCommunity.
GNU General Public License v3.0
254 stars 64 forks source link

Allow empty maintainer and distributor #31

Closed benrubson closed 7 years ago

benrubson commented 7 years ago

Hello,

This PR allows to set empty maintainer and distributor in INFO file, so that this info is not displayed in Packet Center.

Thank you 👍

Ben

jdel commented 7 years ago

Could you read the values for

from the config file ?

benrubson commented 7 years ago

From the config file ? These values are taken from the INFO file, this PR allows for example to set in this file : maintainer="" So that this field won't be displayed in Packet Center.

However, if we don't set maintainer in INFO file, the default value SSpkS will be displayed.

jdel commented 7 years ago

I meant putting the default values in the configuration file. So if someone wants to change them they can just edit the config file

benrubson commented 7 years ago

Oh sorry, understood now :) JsonOutput does not know Config yet, not sure how to do it properly (without breaking files under tests/), but I could have a look deeper.

benrubson commented 7 years ago

OK, tests are failing, as I did not update them yet.

mbirth commented 7 years ago

Scrutinizer is still complaining. Could you fix the tests, too, please? (I think you can just give an empty Config object.)

mbirth commented 7 years ago

btw: You can run the checks locally by executing vendor/bin/phpunit from the project's root directory.

Do you know if the Synology can work with null values or does it need an empty string ("")?

benrubson commented 7 years ago

I tested with null values, Package Center works correctly, it simply does not show the values. Would you prefer an empty value ?

mbirth commented 7 years ago

Looking good now. I'm still waiting for @jdel 's green light to merge all your contributions. Many thanks for them!

benrubson commented 7 years ago

U're welcome, thank you for your great work 👍

benrubson commented 7 years ago

Do you know if the Synology can work with null values or does it need an empty string ("")?

Well, I finally faced (and reproduced) a case where Package Center was refreshing indefinitely with null values. Empty string solves this issue.