Introduce GDK::Context and move away from singleton use
Overview
Currently, GDK
acts a namespace (module
) and as a singleton where GDK root path and GDK config path are hardcoded.
Proposed solution
To be able to instantiate multiple GDK instances to support Cells integration we should:
- Create a new class
GDK::Context
and pass the root path and config path - Avoid inferring pathes via
__dir__
and useGDK.instance.root
- Add
GDK.instance
and (for now)GDK.config
returnGDK.instance.config
- Avoid using
GDK.config
in all collaborators (commands, services) and passGDK.instance
instead explicitly
Impacted categories
The following categories relate to this issue:
-
gdk-reliability - e.g. When a GDK action fails to complete. -
gdk-usability - e.g. Improvements or suggestions around how the GDK functions. -
gdk-performance - e.g. When a GDK action is slow or times out.
Steps to replicate (optional)
Proposal (optional)
Environment (optional)
- Operating system name:
<!-- output of `uname -a` command -->
- Architecture:
<!-- output of `arch` command -->
- The contents of your
gdk.yml
(if any) - Ruby version:
<!-- output of `ruby --version` command -->
- GDK version:
<!-- output of `git rev-parse --short HEAD` command -->
Edited by Peter Leitzen