This patch creates horizon.utils.file-discovery module which provides
functionalities for automatic file-discovery. With these infrastructural
helpers, we can build JavaScript and HTML file auto-discovery for horizon
align with th existing plug-in mechanism.
1) discover_files(base_path, sub_path='', ext='', trim_base_path=False):
Discover all files with certain extension in given paths
2) sort_js_files(js_files):
Sorts JavaScript files in `js_files` into source files, mock files
and spec files based on file extension.
Output:
* sources: source files for production. The order of source files
is significant and should be listed in the below order:
- First all the files that defines application's angular module.
Those files have extension of `.module.js`. The order among them
is not significant.
- Followed by all other source code files. The order among them
is not significant.
* mocks: mock files provide mock data/services for tests. They have
extension of `.mock.js`. The order among them is not significant.
* specs: spec files for testing. They have extension of `.spec.js`.
The order among them is not significant.
3) discover_static_files(base_path, sub_path=''):
Discover static files in given paths, returns JavaScript sources,
mocks, specs and HTML templates files grouped in lists.
Partially-Implements: blueprint auto-js-file-finding
Change-Id: Idd0b69451f81b2f740b10515e3e274d48b681dbe