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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/CLAUDE.md +44 -7
- data/README.md +8 -5
- data/bin/{vat → dam} +163 -83
- data/docs/{vat → dam}/dam-vision.md +13 -13
- data/docs/{vat → dam}/session-summary-2025-11-09.md +79 -79
- data/docs/{vat → dam}/usage.md +118 -93
- data/docs/{vat → dam}/vat-testing-plan.md +94 -94
- data/docs/development/CODEX-recommendations.md +11 -0
- data/lib/appydave/tools/configuration/models/brands_config.rb +18 -3
- data/lib/appydave/tools/{vat → dam}/config.rb +32 -13
- data/lib/appydave/tools/{vat → dam}/config_loader.rb +1 -1
- data/lib/appydave/tools/{vat → dam}/manifest_generator.rb +3 -3
- data/lib/appydave/tools/{vat → dam}/project_listing.rb +1 -1
- data/lib/appydave/tools/{vat → dam}/project_resolver.rb +1 -1
- data/lib/appydave/tools/{vat → dam}/s3_operations.rb +3 -3
- data/lib/appydave/tools/dam/sync_from_ssd.rb +241 -0
- data/lib/appydave/tools/version.rb +1 -1
- data/lib/appydave/tools.rb +7 -6
- data/package.json +1 -1
- metadata +13 -12
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
#
|
|
1
|
+
# DAM (Digital Asset Management) - Integration Testing Plan
|
|
2
2
|
|
|
3
3
|
**Date**: 2025-11-08
|
|
4
|
-
**Purpose**: Validate
|
|
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
|
-
- ✅ `
|
|
25
|
-
- ✅ `
|
|
26
|
-
- ✅ `
|
|
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
|
-
- ✅ `
|
|
30
|
-
- ✅ `
|
|
31
|
-
- ✅ `
|
|
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
|
-
- ⏳ `
|
|
35
|
-
- ⏳ `
|
|
36
|
-
- ⏳ `
|
|
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
|
|
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/
|
|
58
|
+
bundle exec rspec spec/appydave/tools/dam/
|
|
59
59
|
# Expected: 64 examples, 0 failures
|
|
60
60
|
|
|
61
|
-
# 4.
|
|
62
|
-
ls bin/
|
|
63
|
-
# Should show:
|
|
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
|
|
75
|
-
which
|
|
76
|
-
# Should show: /Users/davidcruwys/.rbenv/shims/
|
|
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
|
|
104
|
-
|
|
105
|
-
# Should show:
|
|
103
|
+
# Check dam works
|
|
104
|
+
dam help
|
|
105
|
+
# Should show: DAM (Digital Asset Management) help
|
|
106
106
|
|
|
107
107
|
# Check config
|
|
108
|
-
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
174
|
+
bin/dam help
|
|
175
175
|
|
|
176
176
|
# Test: Command-specific help
|
|
177
|
-
bin/
|
|
178
|
-
bin/
|
|
179
|
-
bin/
|
|
180
|
-
bin/
|
|
181
|
-
bin/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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:
|
|
355
|
-
which
|
|
354
|
+
# Test: dam command in PATH
|
|
355
|
+
which dam
|
|
356
356
|
|
|
357
357
|
# Test: Help works
|
|
358
|
-
|
|
358
|
+
dam help
|
|
359
359
|
```
|
|
360
360
|
**Expected**:
|
|
361
|
-
- `which
|
|
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
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
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
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
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
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
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
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
481
|
+
#### Test 4.4: No Arguments to dam
|
|
482
482
|
```bash
|
|
483
|
-
|
|
483
|
+
dam
|
|
484
484
|
```
|
|
485
|
-
**Expected**: Usage message and suggestion to run `
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
544
|
+
dam s3-up appydave b65
|
|
545
545
|
|
|
546
546
|
# 2. Check status
|
|
547
|
-
|
|
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
|
-
|
|
551
|
+
dam s3-down appydave b65
|
|
552
552
|
|
|
553
553
|
# 4. Clean up
|
|
554
|
-
|
|
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
|
-
|
|
566
|
+
dam list appydave 'b6*'
|
|
567
567
|
|
|
568
568
|
# Upload multiple projects (if needed)
|
|
569
569
|
for project in b60 b61 b65; do
|
|
570
|
-
|
|
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
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
|
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] `
|
|
680
|
-
- [x] `
|
|
681
|
-
- [x] `
|
|
682
|
-
- [x] `
|
|
683
|
-
- [x] `
|
|
684
|
-
- [x] `
|
|
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
|
-
- [ ] `
|
|
690
|
-
- [ ] `
|
|
691
|
-
- [ ] `
|
|
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
|
|
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/
|
|
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
|
|
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**: `~/.
|
|
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
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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
|
-
|
|
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-#{
|
|
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
|
|
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
|
-
|
|
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
|
|
@@ -5,15 +5,15 @@ require 'fileutils'
|
|
|
5
5
|
|
|
6
6
|
module Appydave
|
|
7
7
|
module Tools
|
|
8
|
-
module
|
|
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
|