gandalf
gandalf copied to clipboard
Installer: add setter for HistoryChecker and VersionChecker.
Gandalf is great, I really liked it! It provides the most features that my team-project needs.
However, I'd like to add a custom HistoryChecker
setter (and VersionChecker
btw) to make it more customizable.
Issue
In my case, our team hopes that the optional-update-window show up every time when user launches the app. However, the DefaultHistoryChecker
has made the rule: when launched Gandalf, it will check the optional-update version last time saved in local preference, and if it is identical to the version this time, it will make GateKeeper.updateIsOptional
returns false, causing Gandalf to not show up the window.
Proposal of Solution
After a little dig into the code, I think it is appropriate to add setter function in Gandalf.Installer
, as most of other members has been allowed to re-set here, and HistoryChecker
is designed as an interface. By adding this, I can implement my custom HistoryChecker
, and hence solve the issue above.
I'm willing to discuss. If you have any thought or suggestion about this, please let me know :)
Actually, after re-think about it, I think a custom GateKeeper
should be more match to my case...?
However, the changes will be a lot more if change GateKeeper
from class to interface. And I wonder if it is necessary or useful in other cases...?
And I don't really understand why Travis CI build failed. It says:
* What went wrong:
Execution failed for task ':gandalf:gnagReport'.
> Failed to fetch PR details. Reason: 401 Unauthorized
What could I do to fix it?