appydave-tools 0.17.1 → 0.18.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.
@@ -1,7 +1,7 @@
1
- # VAT (Video Asset Tools) - Integration Testing Plan
1
+ # DAM (Digital Asset Management) - Integration Testing Plan
2
2
 
3
3
  **Date**: 2025-11-08
4
- **Purpose**: Validate VAT integration into appydave-tools gem
4
+ **Purpose**: Validate DAM integration into appydave-tools gem
5
5
  **Tester**: David Cruwys
6
6
  **Status**: Ready for User Acceptance Testing
7
7
 
@@ -21,21 +21,21 @@
21
21
  - ✅ Documentation complete
22
22
 
23
23
  **Commands - Phase 1 Complete** (CLI args + auto-detect):
24
- - ✅ `vat help` - Help system
25
- - ✅ `vat list` - Project discovery (3 modes + pattern matching)
26
- - ✅ `vat s3-up` - Upload to S3
24
+ - ✅ `dam help` - Help system
25
+ - ✅ `dam list` - Project discovery (3 modes + pattern matching)
26
+ - ✅ `dam s3-up` - Upload to S3
27
27
 
28
28
  **Commands - Phase 2 Complete** (CLI args + auto-detect):
29
- - ✅ `vat s3-down` - Download from S3
30
- - ✅ `vat s3-status` - Check sync status
31
- - ✅ `vat s3-cleanup` - Delete S3 files
29
+ - ✅ `dam s3-down` - Download from S3
30
+ - ✅ `dam s3-status` - Check sync status
31
+ - ✅ `dam s3-cleanup` - Delete S3 files
32
32
 
33
33
  **Commands - Not Yet Migrated**:
34
- - ⏳ `vat manifest` - Generate project manifest
35
- - ⏳ `vat archive` - Archive to SSD
36
- - ⏳ `vat sync-ssd` - Sync from SSD
34
+ - ⏳ `dam manifest` - Generate project manifest
35
+ - ⏳ `dam archive` - Archive to SSD
36
+ - ⏳ `dam sync-ssd` - Sync from SSD
37
37
 
38
- **Utilities - Not Migrated** (not VAT commands):
38
+ **Utilities - Not Migrated** (not DAM commands):
39
39
  - ❌ `status-all.sh` - Git status for all repos (workflow script, not needed in gem)
40
40
  - ❌ `sync-all.sh` - Git pull for all repos (workflow script, not needed in gem)
41
41
  - ❌ `clone-all.sh` - Clone all repos (workflow script, not needed in gem)
@@ -55,12 +55,12 @@ cd ~/dev/ad/appydave-tools
55
55
  bundle install
56
56
 
57
57
  # 3. Verify tests pass
58
- bundle exec rspec spec/appydave/tools/vat/
58
+ bundle exec rspec spec/appydave/tools/dam/
59
59
  # Expected: 64 examples, 0 failures
60
60
 
61
- # 4. VAT commands available via bin/
62
- ls bin/vat*
63
- # Should show: vat, vat_init.rb, vat_help.rb, vat_list.rb, s3_sync_*.rb
61
+ # 4. DAM commands available via bin/
62
+ ls bin/dam*
63
+ # Should show: dam, dam_init.rb, dam_help.rb, dam_list.rb, s3_sync_*.rb
64
64
  ```
65
65
 
66
66
  **For Gem Testing** (after gem install):
@@ -71,9 +71,9 @@ rake build
71
71
  # 2. Install locally
72
72
  gem install pkg/appydave-tools-*.gem
73
73
 
74
- # 3. Verify vat command available
75
- which vat
76
- # Should show: /Users/davidcruwys/.rbenv/shims/vat (or similar)
74
+ # 3. Verify dam command available
75
+ which dam
76
+ # Should show: /Users/davidcruwys/.rbenv/shims/dam (or similar)
77
77
 
78
78
  # 4. Initialize configuration
79
79
  ad_config -c
@@ -100,12 +100,12 @@ cat ~/.aws/credentials | grep -A2 "\[david-appydave\]"
100
100
  ad_config -p brands
101
101
  # Should show: All 6 brands with AWS profiles
102
102
 
103
- # Check vat works
104
- vat help
105
- # Should show: VAT (Video Asset Tools) help
103
+ # Check dam works
104
+ dam help
105
+ # Should show: DAM (Digital Asset Management) help
106
106
 
107
107
  # Check config
108
- vat list
108
+ dam list
109
109
  # Should show: Brands: appydave, voz, aitldr, ... (or error if not configured)
110
110
  ```
111
111
 
@@ -119,7 +119,7 @@ vat list
119
119
 
120
120
  #### Test 1.1: Config Module
121
121
  ```bash
122
- bundle exec rspec spec/appydave/tools/vat/config_spec.rb
122
+ bundle exec rspec spec/appydave/tools/dam/config_spec.rb
123
123
  ```
124
124
  **Coverage**:
125
125
  - ✅ projects_root configuration
@@ -135,7 +135,7 @@ bundle exec rspec spec/appydave/tools/vat/config_spec.rb
135
135
 
136
136
  #### Test 1.2: ProjectResolver Module
137
137
  ```bash
138
- bundle exec rspec spec/appydave/tools/vat/project_resolver_spec.rb
138
+ bundle exec rspec spec/appydave/tools/dam/project_resolver_spec.rb
139
139
  ```
140
140
  **Coverage**:
141
141
  - ✅ FliVideo short name expansion (b65 → full name)
@@ -151,7 +151,7 @@ bundle exec rspec spec/appydave/tools/vat/project_resolver_spec.rb
151
151
 
152
152
  #### Test 1.3: ConfigLoader Module
153
153
  ```bash
154
- bundle exec rspec spec/appydave/tools/vat/config_loader_spec.rb
154
+ bundle exec rspec spec/appydave/tools/dam/config_loader_spec.rb
155
155
  ```
156
156
  **Coverage**:
157
157
  - ✅ .video-tools.env parsing
@@ -171,14 +171,14 @@ bundle exec rspec spec/appydave/tools/vat/config_loader_spec.rb
171
171
  #### Test 2.1: Help System
172
172
  ```bash
173
173
  # Test: Main help
174
- bin/vat help
174
+ bin/dam help
175
175
 
176
176
  # Test: Command-specific help
177
- bin/vat help list
178
- bin/vat help s3-up
179
- bin/vat help s3-down
180
- bin/vat help brands
181
- bin/vat help workflows
177
+ bin/dam help list
178
+ bin/dam help s3-up
179
+ bin/dam help s3-down
180
+ bin/dam help brands
181
+ bin/dam help workflows
182
182
  ```
183
183
  **Expected**:
184
184
  - Full help overview
@@ -194,7 +194,7 @@ bin/vat help workflows
194
194
  #### Test 2.3: List Brands (Mode 1)
195
195
  ```bash
196
196
  # Test: List brands only
197
- bin/vat list
197
+ bin/dam list
198
198
  ```
199
199
  **Expected**: `Brands: aitldr, appydave, joy, kiros, ss, voz` (shortcuts)
200
200
 
@@ -206,7 +206,7 @@ bin/vat list
206
206
  #### Test 2.4: List Brands with Summary (Mode 2)
207
207
  ```bash
208
208
  # Test: Brands with project counts
209
- bin/vat list --summary
209
+ bin/dam list --summary
210
210
  ```
211
211
  **Expected**:
212
212
  ```
@@ -224,7 +224,7 @@ joy: Z projects
224
224
  #### Test 2.5: List Brand Projects (Mode 3)
225
225
  ```bash
226
226
  # Test: All projects for brand
227
- bin/vat list appydave
227
+ bin/dam list appydave
228
228
  ```
229
229
  **Expected**: List of all appydave projects (excludes `archived/`, `.git`, etc.)
230
230
 
@@ -236,7 +236,7 @@ bin/vat list appydave
236
236
  #### Test 2.6: Pattern Matching (Mode 3b)
237
237
  ```bash
238
238
  # Test: Pattern matching
239
- bin/vat list appydave 'b6*'
239
+ bin/dam list appydave 'b6*'
240
240
  ```
241
241
  **Expected**: Only projects starting with `b6` (b60-b69)
242
242
 
@@ -351,14 +351,14 @@ bin/s3_sync_cleanup.rb --dry-run
351
351
 
352
352
  #### Test 3.1: Gem Commands Available
353
353
  ```bash
354
- # Test: vat command in PATH
355
- which vat
354
+ # Test: dam command in PATH
355
+ which dam
356
356
 
357
357
  # Test: Help works
358
- vat help
358
+ dam help
359
359
  ```
360
360
  **Expected**:
361
- - `which vat` shows gem bin path
361
+ - `which dam` shows gem bin path
362
362
  - Help text displays
363
363
 
364
364
  **Status**: [ ] Pass [ ] Fail
@@ -368,10 +368,10 @@ vat help
368
368
 
369
369
  #### Test 3.2: All List Commands Work
370
370
  ```bash
371
- vat list
372
- vat list --summary
373
- vat list appydave
374
- vat list appydave 'b6*'
371
+ dam list
372
+ dam list --summary
373
+ dam list appydave
374
+ dam list appydave 'b6*'
375
375
  ```
376
376
  **Expected**: All modes work correctly
377
377
 
@@ -382,10 +382,10 @@ vat list appydave 'b6*'
382
382
 
383
383
  #### Test 3.3: S3 Commands Work (CLI Args)
384
384
  ```bash
385
- vat s3-up appydave b65 --dry-run
386
- vat s3-down appydave b65 --dry-run
387
- vat s3-status appydave b65
388
- vat s3-cleanup appydave b65 --dry-run
385
+ dam s3-up appydave b65 --dry-run
386
+ dam s3-down appydave b65 --dry-run
387
+ dam s3-status appydave b65
388
+ dam s3-cleanup appydave b65 --dry-run
389
389
  ```
390
390
  **Expected**: All commands work with explicit args
391
391
 
@@ -398,10 +398,10 @@ vat s3-cleanup appydave b65 --dry-run
398
398
  ```bash
399
399
  cd ~/dev/video-projects/v-appydave/b65-*
400
400
 
401
- vat s3-up --dry-run
402
- vat s3-down --dry-run
403
- vat s3-status
404
- vat s3-cleanup --dry-run
401
+ dam s3-up --dry-run
402
+ dam s3-down --dry-run
403
+ dam s3-status
404
+ dam s3-cleanup --dry-run
405
405
  ```
406
406
  **Expected**: All commands auto-detect from PWD
407
407
 
@@ -413,12 +413,12 @@ vat s3-cleanup --dry-run
413
413
  #### Test 3.5: Brand Shortcuts Work
414
414
  ```bash
415
415
  # Test: All 6 brand shortcuts
416
- vat list appydave # v-appydave
417
- vat list voz # v-voz
418
- vat list aitldr # v-aitldr
419
- vat list kiros # v-kiros
420
- vat list joy # v-beauty-and-joy
421
- vat list ss # v-supportsignal
416
+ dam list appydave # v-appydave
417
+ dam list voz # v-voz
418
+ dam list aitldr # v-aitldr
419
+ dam list kiros # v-kiros
420
+ dam list joy # v-beauty-and-joy
421
+ dam list ss # v-supportsignal
422
422
  ```
423
423
  **Expected**: All shortcuts expand correctly
424
424
 
@@ -430,7 +430,7 @@ vat list ss # v-supportsignal
430
430
  #### Test 3.6: Short Name Expansion (FliVideo)
431
431
  ```bash
432
432
  # Test: Short name expands to full name
433
- vat list appydave b65
433
+ dam list appydave b65
434
434
  # Should resolve to: b65-guy-monroe-marketing-plan (or similar)
435
435
  ```
436
436
  **Expected**: Expands `b65` to full project name
@@ -444,7 +444,7 @@ vat list appydave b65
444
444
 
445
445
  #### Test 4.1: Invalid Brand Name
446
446
  ```bash
447
- vat list invalid-brand
447
+ dam list invalid-brand
448
448
  ```
449
449
  **Expected**: Error message listing available brands
450
450
 
@@ -455,7 +455,7 @@ vat list invalid-brand
455
455
 
456
456
  #### Test 4.2: Invalid Project Name
457
457
  ```bash
458
- vat list appydave invalid-project
458
+ dam list appydave invalid-project
459
459
  ```
460
460
  **Expected**: Error "No project found matching 'invalid-project'"
461
461
 
@@ -468,7 +468,7 @@ vat list appydave invalid-project
468
468
  ```bash
469
469
  # Test: Temporarily rename config
470
470
  mv ~/.config/appydave/settings.json ~/.config/appydave/settings.json.bak
471
- vat list
471
+ dam list
472
472
  mv ~/.config/appydave/settings.json.bak ~/.config/appydave/settings.json
473
473
  ```
474
474
  **Expected**: Error "VIDEO_PROJECTS_ROOT not configured! Run: ad_config -e"
@@ -478,11 +478,11 @@ mv ~/.config/appydave/settings.json.bak ~/.config/appydave/settings.json
478
478
 
479
479
  ---
480
480
 
481
- #### Test 4.4: No Arguments to vat
481
+ #### Test 4.4: No Arguments to dam
482
482
  ```bash
483
- vat
483
+ dam
484
484
  ```
485
- **Expected**: Usage message and suggestion to run `vat help`
485
+ **Expected**: Usage message and suggestion to run `dam help`
486
486
 
487
487
  **Status**: [ ] Pass [ ] Fail
488
488
  **Notes**: ___________________________________________
@@ -491,7 +491,7 @@ vat
491
491
 
492
492
  #### Test 4.5: Unknown Command
493
493
  ```bash
494
- vat unknown-command
494
+ dam unknown-command
495
495
  ```
496
496
  **Expected**: Error "Unknown command: unknown-command"
497
497
 
@@ -503,7 +503,7 @@ vat unknown-command
503
503
  #### Test 4.6: S3 Commands Without Brand Path
504
504
  ```bash
505
505
  cd /tmp
506
- vat s3-up
506
+ dam s3-up
507
507
  ```
508
508
  **Expected**: Error "Could not detect brand and project from current directory"
509
509
 
@@ -516,7 +516,7 @@ vat s3-up
516
516
 
517
517
  #### Test 5.1: List Performance
518
518
  ```bash
519
- time vat list --summary
519
+ time dam list --summary
520
520
  ```
521
521
  **Expected**: Completes in < 2 seconds
522
522
 
@@ -527,7 +527,7 @@ time vat list --summary
527
527
 
528
528
  #### Test 5.2: Pattern Matching Performance
529
529
  ```bash
530
- time vat list appydave 'b*'
530
+ time dam list appydave 'b*'
531
531
  ```
532
532
  **Expected**: Completes in < 1 second
533
533
 
@@ -541,17 +541,17 @@ time vat list appydave 'b*'
541
541
  #### Test 6.1: Complete Upload/Download Cycle
542
542
  ```bash
543
543
  # 1. Upload project
544
- vat s3-up appydave b65
544
+ dam s3-up appydave b65
545
545
 
546
546
  # 2. Check status
547
- vat s3-status appydave b65
547
+ dam s3-status appydave b65
548
548
  # Expected: All files in sync
549
549
 
550
550
  # 3. Download to different location (simulate collaborator)
551
- vat s3-down appydave b65
551
+ dam s3-down appydave b65
552
552
 
553
553
  # 4. Clean up
554
- vat s3-cleanup appydave b65 --force
554
+ dam s3-cleanup appydave b65 --force
555
555
  ```
556
556
  **Expected**: Full workflow works without errors
557
557
 
@@ -563,11 +563,11 @@ vat s3-cleanup appydave b65 --force
563
563
  #### Test 6.2: Pattern-Based Discovery
564
564
  ```bash
565
565
  # Discover all b60-series projects
566
- vat list appydave 'b6*'
566
+ dam list appydave 'b6*'
567
567
 
568
568
  # Upload multiple projects (if needed)
569
569
  for project in b60 b61 b65; do
570
- vat s3-up appydave $project --dry-run
570
+ dam s3-up appydave $project --dry-run
571
571
  done
572
572
  ```
573
573
  **Expected**: Pattern matching helps with batch operations
@@ -581,12 +581,12 @@ done
581
581
 
582
582
  ### Commands Migrated but Not Updated for CLI Args
583
583
 
584
- These commands were copied from the original VAT but still need Phase 2 updates:
584
+ These commands were copied from the original DAM but still need Phase 2 updates:
585
585
 
586
586
  #### ⏳ Generate Manifest
587
587
  ```bash
588
588
  # Current: bin/generate_manifest.rb
589
- # Expected: vat manifest appydave
589
+ # Expected: dam manifest appydave
590
590
  ```
591
591
  **Status**: Copied but needs CLI arg support
592
592
  **Priority**: Low (utility command, not core workflow)
@@ -596,7 +596,7 @@ These commands were copied from the original VAT but still need Phase 2 updates:
596
596
  #### ⏳ Archive Project
597
597
  ```bash
598
598
  # Current: bin/archive_project.rb
599
- # Expected: vat archive appydave b63
599
+ # Expected: dam archive appydave b63
600
600
  ```
601
601
  **Status**: Copied but needs CLI arg support
602
602
  **Priority**: Medium (used for completed projects)
@@ -606,7 +606,7 @@ These commands were copied from the original VAT but still need Phase 2 updates:
606
606
  #### ⏳ Sync from SSD
607
607
  ```bash
608
608
  # Current: bin/sync_from_ssd.rb
609
- # Expected: vat sync-ssd appydave
609
+ # Expected: dam sync-ssd appydave
610
610
  ```
611
611
  **Status**: Copied but needs CLI arg support
612
612
  **Priority**: Medium (used for recovery)
@@ -615,7 +615,7 @@ These commands were copied from the original VAT but still need Phase 2 updates:
615
615
 
616
616
  ### Workflow Scripts (Not Migrating to Gem)
617
617
 
618
- These are repository management scripts, not VAT commands:
618
+ These are repository management scripts, not DAM commands:
619
619
 
620
620
  - ❌ `status-all.sh` - Git status for all v-* repos
621
621
  - ❌ `sync-all.sh` - Git pull for all repos
@@ -676,19 +676,19 @@ These are repository management scripts, not VAT commands:
676
676
  - [x] Documentation complete
677
677
 
678
678
  **Commands (CLI Args + Auto-Detect)**:
679
- - [x] `vat help` - Help system
680
- - [x] `vat list` - All 4 modes working
681
- - [x] `vat s3-up` - Upload to S3
682
- - [x] `vat s3-down` - Download from S3 ⭐ Phase 2 complete
683
- - [x] `vat s3-status` - Check sync status ⭐ Phase 2 complete
684
- - [x] `vat s3-cleanup` - Delete S3 files ⭐ Phase 2 complete
679
+ - [x] `dam help` - Help system
680
+ - [x] `dam list` - All 4 modes working
681
+ - [x] `dam s3-up` - Upload to S3
682
+ - [x] `dam s3-down` - Download from S3 ⭐ Phase 2 complete
683
+ - [x] `dam s3-status` - Check sync status ⭐ Phase 2 complete
684
+ - [x] `dam s3-cleanup` - Delete S3 files ⭐ Phase 2 complete
685
685
 
686
686
  ### ⏳ Pending Implementation
687
687
 
688
688
  **Commands (Copied but need CLI arg support)**:
689
- - [ ] `vat manifest` - Generate project manifest
690
- - [ ] `vat archive` - Archive to SSD
691
- - [ ] `vat sync-ssd` - Sync from SSD
689
+ - [ ] `dam manifest` - Generate project manifest
690
+ - [ ] `dam archive` - Archive to SSD
691
+ - [ ] `dam sync-ssd` - Sync from SSD
692
692
 
693
693
  **Testing**:
694
694
  - [ ] Manual integration tests (Phase 2)
@@ -729,7 +729,7 @@ These are repository management scripts, not VAT commands:
729
729
  **Phase 3 - Gem Tests**: [ ] PENDING
730
730
  - [ ] Gem builds successfully
731
731
  - [ ] Gem installs locally
732
- - [ ] All vat commands work after install
732
+ - [ ] All dam commands work after install
733
733
 
734
734
  **Phase 4 - Edge Cases**: [ ] PENDING
735
735
  - [ ] Error handling works
@@ -754,7 +754,7 @@ These are repository management scripts, not VAT commands:
754
754
  ## Recommended Test Order
755
755
 
756
756
  **Start here** (automated tests):
757
- 1. ✅ Run all RSpec tests: `bundle exec rspec spec/appydave/tools/vat/`
757
+ 1. ✅ Run all RSpec tests: `bundle exec rspec spec/appydave/tools/dam/`
758
758
 
759
759
  **Then manual development tests** (safest first):
760
760
  2. Phase 2.1-2.5: Help and list commands
@@ -777,14 +777,14 @@ These are repository management scripts, not VAT commands:
777
777
 
778
778
  ## Notes for Tester
779
779
 
780
- ### Key Differences from Original VAT
780
+ ### Key Differences from Original DAM
781
781
 
782
782
  1. **Commands now work from anywhere**: Original required `cd` to project directory or explicit paths
783
783
  2. **Phase 2 commands complete**: s3-down, s3-status, s3-cleanup now accept CLI args
784
784
  3. **Namespace changed**: `VatConfig` → `Appydave::Tools::Vat::Config`
785
785
  4. **Gem-based**: Install via `gem install appydave-tools` instead of shell alias
786
786
  5. **Better tested**: 64 RSpec tests vs. manual testing only
787
- 6. **Configuration migrated**: `~/.vat-config` → `~/.config/appydave/settings.json` (managed via `ad_config`)
787
+ 6. **Configuration migrated**: `~/.dam-config` → `~/.config/appydave/settings.json` (managed via `ad_config`)
788
788
 
789
789
  ### What to Watch For
790
790
 
@@ -797,5 +797,5 @@ These are repository management scripts, not VAT commands:
797
797
 
798
798
  **Created**: 2025-11-08
799
799
  **Version**: 1.0 (Integration Testing Plan)
800
- **Purpose**: Validate VAT integration into appydave-tools gem
800
+ **Purpose**: Validate DAM integration into appydave-tools gem
801
801
  **Reference**: `/Users/davidcruwys/dev/video-projects/video-asset-tools/docs/testing-plan.md`
@@ -228,3 +228,14 @@ include_context 'vat filesystem with brands', brands: %w[appydave voz]
228
228
 
229
229
  **Document maintained by:** AppyDave engineering team
230
230
  **Next review:** After addressing VAT manifest bugs
231
+
232
+ ## Communication Patterns & Practices
233
+
234
+ Because this document is now a shared artifact between CODEx and Claude, align on the following collaboration rules so recommendations stay constructive and actionable:
235
+
236
+ 1. **State of the world first:** When responding to a recommendation, cite the current repo evidence (commit, test output, spec path) before giving a verdict. This keeps future readers from guessing which version you inspected.
237
+ 2. **Assume positive intent:** Frame disagreements in terms of trade-offs (“we prefer singletons here because…”) rather than absolutes. If a suggestion doesn’t fit today, note what signal would make you revisit it.
238
+ 3. **Acknowledge deltas:** When new findings arrive (e.g., Ruby version mismatch), summarize them here so both agents see the updated context even if the original section came from someone else.
239
+ 4. **Track actionability:** For every open item, tag it as ✅ implemented, ⚠️ deferred with trigger, or 🔍 debt worth filing. Avoid leaving “bad pattern” remarks without a next step.
240
+ 5. **Link evidence:** Reference commands (`bundle exec rubocop`), file paths (`bin/vat:160`), or PRs so the other agent can reproduce your conclusion quickly.
241
+ 6. **Close the loop:** When you adopt or reject a suggestion, leave a brief rationale in this doc instead of burying it in chat. That keeps the shared history centralized.
@@ -8,9 +8,24 @@ module Appydave
8
8
  class BrandsConfig < ConfigBase
9
9
  # Retrieve brand information by brand key (string or symbol)
10
10
  def get_brand(brand_key)
11
- brand_key = brand_key.to_s
12
- info = data['brands'][brand_key] || default_brand_info
13
- BrandInfo.new(brand_key, info)
11
+ brand_key_str = brand_key.to_s
12
+
13
+ # Try direct key lookup first (case-insensitive)
14
+ brand_entry = data['brands'].find { |key, _info| key.downcase == brand_key_str.downcase }
15
+ if brand_entry
16
+ actual_key = brand_entry[0]
17
+ return BrandInfo.new(actual_key, brand_entry[1])
18
+ end
19
+
20
+ # Try lookup by shortcut (case-insensitive)
21
+ brand_entry = data['brands'].find { |_key, info| info['shortcut']&.downcase == brand_key_str.downcase }
22
+ if brand_entry
23
+ actual_key = brand_entry[0]
24
+ return BrandInfo.new(actual_key, brand_entry[1])
25
+ end
26
+
27
+ # Return default if not found (use normalized lowercase key)
28
+ BrandInfo.new(brand_key_str.downcase, default_brand_info)
14
29
  end
15
30
 
16
31
  # Set brand information
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Appydave
4
4
  module Tools
5
- module Vat
5
+ module Dam
6
6
  # VatConfig - Configuration management for Video Asset Tools
7
7
  #
8
8
  # Manages VIDEO_PROJECTS_ROOT and brand path resolution
@@ -35,34 +35,42 @@ module Appydave
35
35
  brand = expand_brand(brand_key)
36
36
  path = File.join(projects_root, brand)
37
37
 
38
- raise "Brand directory not found: #{path}\nAvailable brands: #{available_brands.join(', ')}" unless Dir.exist?(path)
38
+ unless Dir.exist?(path)
39
+ brands_list = available_brands_display
40
+ raise "Brand directory not found: #{path}\nAvailable brands:\n#{brands_list}"
41
+ end
39
42
 
40
43
  path
41
44
  end
42
45
 
43
46
  # Expand brand shortcut to full brand name
44
47
  # Reads from brands.json if available, falls back to hardcoded shortcuts
45
- # @param shortcut [String] Brand shortcut (e.g., 'appydave')
48
+ # @param shortcut [String] Brand shortcut (e.g., 'appydave', 'ad', 'APPYDAVE')
46
49
  # @return [String] Full brand name (e.g., 'v-appydave')
47
50
  def expand_brand(shortcut)
48
- return shortcut if shortcut.start_with?('v-')
51
+ shortcut_str = shortcut.to_s
52
+
53
+ return shortcut_str if shortcut_str.start_with?('v-')
49
54
 
50
55
  # Try to read from brands.json
51
56
  Appydave::Tools::Configuration::Config.configure
52
57
  brands_config = Appydave::Tools::Configuration::Config.brands
53
58
 
54
- # Check if this shortcut exists in brands.json
55
- if brands_config.shortcut?(shortcut)
56
- brand = brands_config.brands.find { |b| b.shortcut == shortcut }
57
- return "v-#{brand.key}" if brand
58
- end
59
+ # Check if input matches a brand key (case-insensitive)
60
+ brand = brands_config.brands.find { |b| b.key.downcase == shortcut_str.downcase }
61
+ return "v-#{brand.key}" if brand
62
+
63
+ # Check if input matches a brand shortcut (case-insensitive)
64
+ brand = brands_config.brands.find { |b| b.shortcut.downcase == shortcut_str.downcase }
65
+ return "v-#{brand.key}" if brand
59
66
 
60
67
  # Fall back to hardcoded shortcuts for backwards compatibility
61
- case shortcut
68
+ normalized = shortcut_str.downcase
69
+ case normalized
62
70
  when 'joy' then 'v-beauty-and-joy'
63
71
  when 'ss' then 'v-supportsignal'
64
72
  else
65
- "v-#{shortcut}"
73
+ "v-#{normalized}"
66
74
  end
67
75
  end
68
76
 
@@ -90,6 +98,16 @@ module Appydave
90
98
  .sort
91
99
  end
92
100
 
101
+ # Get available brands with both shortcut and name for error messages
102
+ def available_brands_display
103
+ Appydave::Tools::Configuration::Config.configure
104
+ brands_config = Appydave::Tools::Configuration::Config.brands
105
+
106
+ brands_config.brands.map do |brand|
107
+ " #{brand.shortcut.ljust(10)} - #{brand.name}"
108
+ end.sort.join("\n")
109
+ end
110
+
93
111
  # Check if directory is a valid brand
94
112
  # @param brand_path [String] Full path to potential brand directory
95
113
  # @return [Boolean] true if valid brand
@@ -114,14 +132,15 @@ module Appydave
114
132
 
115
133
  private
116
134
 
117
- # Auto-detect projects root by finding git repos
135
+ # Auto-detect projects root by finding v-shared directory
118
136
  # @return [String] Detected path or raises error
119
137
  def detect_projects_root
120
138
  # Try to find v-shared in parent directories
121
139
  current = Dir.pwd
122
140
  5.times do
123
141
  test_path = File.join(current, 'v-shared')
124
- return File.dirname(test_path) if Dir.exist?(test_path) && Dir.exist?(File.join(test_path, 'video-asset-tools'))
142
+ # Return parent of v-shared as projects root
143
+ return File.dirname(test_path) if Dir.exist?(test_path)
125
144
 
126
145
  parent = File.dirname(current)
127
146
  break if parent == current
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Appydave
4
4
  module Tools
5
- module Vat
5
+ module Dam
6
6
  # Configuration loader for video asset tools
7
7
  # Loads settings from .video-tools.env file in the repository root
8
8
  #
@@ -5,15 +5,15 @@ require 'fileutils'
5
5
 
6
6
  module Appydave
7
7
  module Tools
8
- module Vat
8
+ module Dam
9
9
  # Generate manifest JSON for video projects
10
10
  class ManifestGenerator
11
11
  attr_reader :brand, :brand_info, :brand_path
12
12
 
13
13
  def initialize(brand, brand_info: nil, brand_path: nil)
14
- @brand = brand
15
- @brand_path = brand_path || Config.brand_path(brand)
16
14
  @brand_info = brand_info || load_brand_info(brand)
15
+ @brand = @brand_info.key # Use resolved brand key, not original input
16
+ @brand_path = brand_path || Config.brand_path(@brand)
17
17
  end
18
18
 
19
19
  # Generate manifest for this brand
@@ -8,7 +8,7 @@ require 'find'
8
8
 
9
9
  module Appydave
10
10
  module Tools
11
- module Vat
11
+ module Dam
12
12
  # Project listing functionality for VAT
13
13
  class ProjectListing
14
14
  # List all brands with summary table
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Appydave
4
4
  module Tools
5
- module Vat
5
+ module Dam
6
6
  # ProjectResolver - Resolve short project names to full paths
7
7
  #
8
8
  # Handles: