Class: Dash::ProjectDirectory
- Inherits:
-
Object
- Object
- Dash::ProjectDirectory
- Defined in:
- lib/dash/project_directory.rb
Overview
Where a project keeps its dash-owned files - secrets and hooks - in the
operator's own repository. Renamed from .kamal in stage 3a of the server
artifact rename (zoolutions/dash#118); .kamal stays readable until 5.0 so an
upgrade doesn't turn every existing project into a missing-secret error.
Deliberately not memoized: dash migrate moves the directory inside a single
process, and a cached answer would be stale for the rest of that invocation.
Constant Summary collapse
- CURRENT =
".dash"- LEGACY =
".kamal"
Class Method Summary collapse
- .join(*parts) ⇒ Object
-
.legacy? ⇒ Boolean
The predicate tests the directory rather than a specific file: a project holding only
secrets-commonorsecrets.<destination>must still resolve, and Dash::Secrets synthesizes those names from the base path. - .path ⇒ Object
Class Method Details
.join(*parts) ⇒ Object
24 25 26 |
# File 'lib/dash/project_directory.rb', line 24 def join(*parts) File.join(path, *parts) end |
.legacy? ⇒ Boolean
The predicate tests the directory rather than a specific file: a project
holding only secrets-common or secrets.<destination> must still
resolve, and Dash::Secrets synthesizes those names from the base path.
20 21 22 |
# File 'lib/dash/project_directory.rb', line 20 def legacy? !Dir.exist?(CURRENT) && Dir.exist?(LEGACY) end |