Same holds true for cache files, so there should be no problem anymore with installs where the static folder is not writable.
Also introduced two new devel config vars to disable merging and minifying of the assets, solved the empty-less-bundle problem and made sure babel knows about the jinja extension.
This should allow users to adjust the behaviour of the communication stack more granularly in case the regular settings which only consider G4, G28, G29, G30, G32 to be real long runners without output are not sufficient.
Actual test whether key is provided or not happens in before_request handler of flask app, hence the more granular processing in the decorator was unecessary since around november '14. Adjusted to only do the actual processing necessary to replicate login_required behaviour/login users if necessary.
Closes#516 (actually, that was solved since introduction of the before_request handler which took that work off the hands of the decorator, but now it's properly documented too)
Match against entry_point origins using both package name and package name plus version. If one of those matches (depends on pip version if output will include version or not), it's the plugin we are looking for.
This way we don't need to try to strip a version number from the package name as output by pip without knowing if a version number is included or not.
Some pip invocations return extra info after the Successfully installed
(like "Cleaning up..."). Also, not all packages include a version
number in their package names.
The only translation that is going to be bundled with OctoPrint for now will be .de, if at all. The reason simply being that this is the only translation I can update myself and hence guarantee a good user experience for.
setup.py now offers two new commands, babel_bundle and babel_pack, with which translations for plugins and core OctoPrint can be automatically bundled or packed as language packs once compiled. This should make sharing translations quite easy in the future.
That is the first step towards downloadable (and separately managed) translation packages, decoupled from the software's release cycle and source control. Since it will be impossible to properly maintain all languages concurrently with OctoPrint's releases, decoupling that will hopefully increase the user experience through preventing broken translations (or stalling releases due to having to wait for the translations to be updated).
Sometimes they will still get discovered by python even though their packages have since been uninstalled.
This will also lead to them being reloaded after an uninstall and a subsequent plugin reload.
Marking them as uninstalled and not handing out uninstalled plugins when collecting them solves this.
Added phase specific hooks for queuing, queued, sending and sent phases of a command ("octoprint.comm.protocol.gcode.<phase>"). Removed old queuing phase hook and declared as obsolete hook in plugin manager to prevent plugins that depend on it from being enabled.
Adding those new hooks also necessitated refactoring the whole command processing, made it more modular and added phase specific handler functions that allow handling all blocking commands centrally for example.
Since it cannot be reliably determined by the system if a hook is essential for a plugin's functionality or not, it makes more sense to just disable plugins that utilize obsolete hooks then risk running half working plugins.
This will hopefully prevent conflicting routes between multiple plugins from being registered and also ensures a more consistent behaviour compared to BlueprintPlugin mixins.
Thanks to @Salandora for bringing this up.