appydave-tools 0.36.0 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/bin/dam +91 -7
- data/docs/ai-instructions/code-quality-retrospective.md +402 -0
- data/docs/ai-instructions/defensive-logging-audit.md +802 -0
- data/lib/appydave/tools/configuration/config.rb +7 -1
- data/lib/appydave/tools/dam/project_resolver.rb +7 -5
- data/lib/appydave/tools/version.rb +1 -1
- data/package.json +1 -1
- metadata +3 -1
|
@@ -25,7 +25,13 @@ module Appydave
|
|
|
25
25
|
|
|
26
26
|
def register(key, klass)
|
|
27
27
|
@configurations ||= {}
|
|
28
|
-
|
|
28
|
+
# Only create new instance if not already registered (prevents multiple reloads)
|
|
29
|
+
@configurations[key] ||= klass.new
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Reset all configurations (primarily for testing)
|
|
33
|
+
def reset
|
|
34
|
+
@configurations = nil
|
|
29
35
|
end
|
|
30
36
|
|
|
31
37
|
def method_missing(method_name, *_args)
|
|
@@ -109,22 +109,24 @@ module Appydave
|
|
|
109
109
|
end
|
|
110
110
|
|
|
111
111
|
# Detect brand and project from current directory
|
|
112
|
-
# @return [Array<String, String>] [
|
|
112
|
+
# @return [Array<String, String>] [brand_key, project] or [nil, nil]
|
|
113
113
|
def detect_from_pwd
|
|
114
114
|
current = Dir.pwd
|
|
115
115
|
|
|
116
116
|
# Check if we're inside a v-* directory
|
|
117
117
|
if current =~ %r{/(v-[^/]+)/([^/]+)/?}
|
|
118
|
-
|
|
119
|
-
project = ::Regexp.last_match(2)
|
|
120
|
-
|
|
118
|
+
brand_with_prefix = ::Regexp.last_match(1)
|
|
119
|
+
project = ::Regexp.last_match(2) # Capture BEFORE .sub() which resets Regexp.last_match
|
|
120
|
+
# Strip 'v-' prefix to get brand key (e.g., 'v-supportsignal' → 'supportsignal')
|
|
121
|
+
brand_key = brand_with_prefix.sub(/^v-/, '')
|
|
122
|
+
return [brand_key, project] if project_exists?(brand_key, project)
|
|
121
123
|
end
|
|
122
124
|
|
|
123
125
|
[nil, nil]
|
|
124
126
|
end
|
|
125
127
|
|
|
126
128
|
# Check if project exists in brand directory
|
|
127
|
-
# @param brand [String] Brand
|
|
129
|
+
# @param brand [String] Brand key (e.g., 'appydave', 'supportsignal')
|
|
128
130
|
# @param project [String] Project name
|
|
129
131
|
# @return [Boolean] true if project directory exists
|
|
130
132
|
def project_exists?(brand, project)
|
data/package.json
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: appydave-tools
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.37.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Cruwys
|
|
@@ -228,6 +228,8 @@ files:
|
|
|
228
228
|
- bin/youtube_automation.rb
|
|
229
229
|
- bin/youtube_manager.rb
|
|
230
230
|
- docs/README.md
|
|
231
|
+
- docs/ai-instructions/code-quality-retrospective.md
|
|
232
|
+
- docs/ai-instructions/defensive-logging-audit.md
|
|
231
233
|
- docs/architecture/cli/cli-pattern-comparison.md
|
|
232
234
|
- docs/architecture/cli/cli-patterns.md
|
|
233
235
|
- docs/architecture/configuration/configuration-systems.md
|