The majority of the code changes concern refactoring BuildFileRetriever to be in a cleaner state. Previously multiple methods where being duplicated for both plugins and nodes which have to be manually passed into an internal data structure.
Instead inheritance is used to share the code and make the distinctions between plugins and nodes. The Cache has been removed from Input and is now included within a new BuildFileRetriever::Cache class. The new Cache class also has the retrieve method that works for both nodes and plugins.
The internal Struct for BFR has been removed and its methods have become standard instance methods.
Finally it fixes #300. When a file is downloaded, it is still cached to the cache/templates directory. But instead of saving the files using its basename, the url is hashed. This insures each url will have a unique download cache. (The hashing algorithm is SHA-1, so this does ignore the possibility of SHA-1 collisions).
Based on #419, please merge it first.
The majority of the code changes concern refactoring
BuildFileRetriever
to be in a cleaner state. Previously multiple methods where being duplicated for bothplugins
andnodes
which have to be manually passed into an internal data structure.Instead inheritance is used to share the code and make the distinctions between
plugins
andnodes
. TheCache
has been removed fromInput
and is now included within a newBuildFileRetriever::Cache
class. The newCache
class also has theretrieve
method that works for bothnodes
andplugins
.The internal
Struct
for BFR has been removed and its methods have become standard instance methods.Finally it fixes #300. When a file is downloaded, it is still cached to the
cache/templates
directory. But instead of saving the files using itsbasename
, the url is hashed. This insures eachurl
will have a unique download cache. (The hashing algorithm is SHA-1, so this does ignore the possibility of SHA-1 collisions).