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.
@@ -25,7 +25,13 @@ module Appydave
25
25
 
26
26
  def register(key, klass)
27
27
  @configurations ||= {}
28
- @configurations[key] = klass.new
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>] [brand, project] or [nil, nil]
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
- brand = ::Regexp.last_match(1)
119
- project = ::Regexp.last_match(2)
120
- return [brand, project] if project_exists?(brand, project)
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 name (v-appydave format)
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)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Appydave
4
4
  module Tools
5
- VERSION = '0.36.0'
5
+ VERSION = '0.37.0'
6
6
  end
7
7
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appydave-tools",
3
- "version": "0.36.0",
3
+ "version": "0.37.0",
4
4
  "description": "AppyDave YouTube Automation Tools",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
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.36.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