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,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# DAM S3 Operations - Session Summary
|
|
2
2
|
**Date**: 2025-11-09
|
|
3
3
|
**Status**: Ready to Continue - Archive/SSD Commands Next
|
|
4
4
|
|
|
@@ -34,7 +34,7 @@ S3Operations.new('test', 'test-project',
|
|
|
34
34
|
|
|
35
35
|
### 2. Added S3 Cleanup Local Command ✅
|
|
36
36
|
|
|
37
|
-
**New Command**: `
|
|
37
|
+
**New Command**: `dam s3-cleanup-local <brand> <project> --force [--dry-run]`
|
|
38
38
|
|
|
39
39
|
**Features**:
|
|
40
40
|
- Deletes files from local `s3-staging/` directory
|
|
@@ -45,8 +45,8 @@ S3Operations.new('test', 'test-project',
|
|
|
45
45
|
- Auto-detection from PWD
|
|
46
46
|
|
|
47
47
|
**Implementation**:
|
|
48
|
-
- Added `cleanup_local` method to S3Operations (lib/appydave/tools/
|
|
49
|
-
- Added `delete_local_file`
|
|
48
|
+
- Added `cleanup_local` method to S3Operations (lib/appydave/tools/dam/s3_operations.rb:212-275)
|
|
49
|
+
- Added `delete_local_file` pridame method (lib/appydave/tools/dam/s3_operations.rb:359-371)
|
|
50
50
|
- Added CLI command handler
|
|
51
51
|
- Added comprehensive help documentation
|
|
52
52
|
|
|
@@ -63,8 +63,8 @@ S3Operations.new('test', 'test-project',
|
|
|
63
63
|
- 📁 **[local only]** - File local but not in S3 ⭐ NEW
|
|
64
64
|
|
|
65
65
|
**Implementation**:
|
|
66
|
-
- Rewrote `status` method to check both S3 AND local files (lib/appydave/tools/
|
|
67
|
-
- Added `list_local_files` helper method (lib/appydave/tools/
|
|
66
|
+
- Rewrote `status` method to check both S3 AND local files (lib/appydave/tools/dam/s3_operations.rb:139-202)
|
|
67
|
+
- Added `list_local_files` helper method (lib/appydave/tools/dam/s3_operations.rb:424-434)
|
|
68
68
|
- Enhanced summary: Shows file counts and sizes for both S3 and local
|
|
69
69
|
|
|
70
70
|
**Tests**: Added 2 new tests (local-only files, comprehensive summary)
|
|
@@ -72,17 +72,17 @@ S3Operations.new('test', 'test-project',
|
|
|
72
72
|
### 4. Renamed Cleanup Commands for Consistency ✅
|
|
73
73
|
|
|
74
74
|
**Old Names**:
|
|
75
|
-
- `
|
|
76
|
-
- `
|
|
75
|
+
- `dam s3-cleanup` → Delete S3 files
|
|
76
|
+
- `dam cleanup-local` → Delete local files
|
|
77
77
|
|
|
78
78
|
**New Names**:
|
|
79
|
-
- `
|
|
80
|
-
- `
|
|
79
|
+
- `dam s3-cleanup-remote` → Delete S3 files
|
|
80
|
+
- `dam s3-cleanup-local` → Delete local files
|
|
81
81
|
|
|
82
82
|
**Backward Compatibility**: Old names still work but show deprecation warning
|
|
83
83
|
|
|
84
84
|
**Changes**:
|
|
85
|
-
- Updated command registration (bin/
|
|
85
|
+
- Updated command registration (bin/dam:13-24)
|
|
86
86
|
- Renamed methods
|
|
87
87
|
- Updated all help documentation
|
|
88
88
|
- Added deprecation notices
|
|
@@ -98,12 +98,12 @@ S3Operations.new('test', 'test-project',
|
|
|
98
98
|
|
|
99
99
|
### Manual Testing (David) ✅
|
|
100
100
|
**Session 1**:
|
|
101
|
-
- ✅ `
|
|
102
|
-
- ✅ `
|
|
103
|
-
- ✅ `
|
|
101
|
+
- ✅ `dam s3-cleanup-remote` - Tested and working
|
|
102
|
+
- ✅ `dam s3-cleanup-local` - Tested and working
|
|
103
|
+
- ✅ `dam s3-status` - Shows all 4 states correctly (synced, modified, S3 only, local only)
|
|
104
104
|
|
|
105
105
|
**Session 2**:
|
|
106
|
-
- ⏳ `
|
|
106
|
+
- ⏳ `dam archive` - Ready for manual testing
|
|
107
107
|
|
|
108
108
|
### S3Operations Test Coverage
|
|
109
109
|
- **Session 1**: 33 tests (upload, download, status, cleanup, cleanup_local)
|
|
@@ -113,17 +113,17 @@ S3Operations.new('test', 'test-project',
|
|
|
113
113
|
|
|
114
114
|
## Current State
|
|
115
115
|
|
|
116
|
-
### Implemented
|
|
117
|
-
1. ✅ `
|
|
118
|
-
2. ✅ `
|
|
119
|
-
3. ✅ `
|
|
120
|
-
4. ✅ `
|
|
121
|
-
5. ✅ `
|
|
122
|
-
6. ✅ `
|
|
123
|
-
7. ✅ `
|
|
116
|
+
### Implemented DAM Commands
|
|
117
|
+
1. ✅ `dam list [brand] [pattern]` - List brands/projects
|
|
118
|
+
2. ✅ `dam s3-up <brand> <project>` - Upload to S3
|
|
119
|
+
3. ✅ `dam s3-down <brand> <project>` - Download from S3
|
|
120
|
+
4. ✅ `dam s3-status <brand> <project>` - Check sync status (all 4 states)
|
|
121
|
+
5. ✅ `dam s3-cleanup-remote <brand> <project>` - Delete S3 files
|
|
122
|
+
6. ✅ `dam s3-cleanup-local <brand> <project>` - Delete local files
|
|
123
|
+
7. ✅ `dam archive <brand> <project>` - Copy to SSD backup ⭐ NEW (2025-11-09 Session 2)
|
|
124
124
|
|
|
125
125
|
### Not Yet Implemented
|
|
126
|
-
1. ⏳ `
|
|
126
|
+
1. ⏳ `dam sync-ssd <brand>` - Restore from SSD
|
|
127
127
|
|
|
128
128
|
---
|
|
129
129
|
|
|
@@ -132,7 +132,7 @@ S3Operations.new('test', 'test-project',
|
|
|
132
132
|
### What We Accomplished
|
|
133
133
|
|
|
134
134
|
#### 1. Implemented Archive Command ✅
|
|
135
|
-
**New Command**: `
|
|
135
|
+
**New Command**: `dam archive <brand> <project> [--force] [--dry-run]`
|
|
136
136
|
|
|
137
137
|
**Features**:
|
|
138
138
|
- Copies entire project directory to SSD backup location
|
|
@@ -143,13 +143,13 @@ S3Operations.new('test', 'test-project',
|
|
|
143
143
|
- Auto-detection from PWD
|
|
144
144
|
|
|
145
145
|
**Implementation**:
|
|
146
|
-
- Added `archive` method to S3Operations (lib/appydave/tools/
|
|
146
|
+
- Added `archive` method to S3Operations (lib/appydave/tools/dam/s3_operations.rb:298-340)
|
|
147
147
|
- Added helper methods:
|
|
148
|
-
- `copy_to_ssd` (lib/appydave/tools/
|
|
149
|
-
- `delete_local_project` (lib/appydave/tools/
|
|
150
|
-
- `calculate_directory_size` (lib/appydave/tools/
|
|
151
|
-
- Added CLI command handler (bin/
|
|
152
|
-
- Added comprehensive help documentation (bin/
|
|
148
|
+
- `copy_to_ssd` (lib/appydave/tools/dam/s3_operations.rb:493-522)
|
|
149
|
+
- `delete_local_project` (lib/appydave/tools/dam/s3_operations.rb:524-547)
|
|
150
|
+
- `calculate_directory_size` (lib/appydave/tools/dam/s3_operations.rb:549-556)
|
|
151
|
+
- Added CLI command handler (bin/dam:148-156)
|
|
152
|
+
- Added comprehensive help documentation (bin/dam:480-515)
|
|
153
153
|
|
|
154
154
|
**Tests**: 8 new tests covering all scenarios (297 total tests, 90.69% coverage)
|
|
155
155
|
|
|
@@ -172,7 +172,7 @@ S3Operations.new('test', 'test-project',
|
|
|
172
172
|
## Next Steps (For Future Session)
|
|
173
173
|
|
|
174
174
|
### Priority 1: Sync from SSD Command ⏳
|
|
175
|
-
Implement `
|
|
175
|
+
Implement `dam sync-ssd <brand>` to restore projects from SSD:
|
|
176
176
|
|
|
177
177
|
**Requirements** (from original discussion):
|
|
178
178
|
- Copy entire project directory to SSD backup location
|
|
@@ -196,7 +196,7 @@ Implement `vat sync-ssd <brand>` to restore projects from SSD:
|
|
|
196
196
|
4. Help documentation
|
|
197
197
|
|
|
198
198
|
### Priority 2: Sync from SSD Command
|
|
199
|
-
Implement `
|
|
199
|
+
Implement `dam sync-ssd <brand>` to restore projects from SSD:
|
|
200
200
|
|
|
201
201
|
**Requirements**:
|
|
202
202
|
- List available projects on SSD
|
|
@@ -206,7 +206,7 @@ Implement `vat sync-ssd <brand>` to restore projects from SSD:
|
|
|
206
206
|
|
|
207
207
|
### Priority 3: Documentation
|
|
208
208
|
- Document AWS permissions strategy for team members
|
|
209
|
-
- Update CLAUDE.md with latest
|
|
209
|
+
- Update CLAUDE.md with latest DAM commands
|
|
210
210
|
- Update usage documentation
|
|
211
211
|
|
|
212
212
|
---
|
|
@@ -225,7 +225,7 @@ class MyOperations
|
|
|
225
225
|
@brand_path = brand_path || Config.brand_path(brand)
|
|
226
226
|
end
|
|
227
227
|
|
|
228
|
-
|
|
228
|
+
pridame
|
|
229
229
|
|
|
230
230
|
def load_from_config(brand)
|
|
231
231
|
Config.configure
|
|
@@ -247,9 +247,9 @@ end
|
|
|
247
247
|
```
|
|
248
248
|
|
|
249
249
|
### File Locations
|
|
250
|
-
- **S3 operations**: `lib/appydave/tools/
|
|
251
|
-
- **S3 tests**: `spec/appydave/tools/
|
|
252
|
-
- **
|
|
250
|
+
- **S3 operations**: `lib/appydave/tools/dam/s3_operations.rb`
|
|
251
|
+
- **S3 tests**: `spec/appydave/tools/dam/s3_operations_spec.rb`
|
|
252
|
+
- **DAM CLI**: `bin/dam`
|
|
253
253
|
- **Brands config**: `lib/appydave/tools/configuration/models/brands_config.rb`
|
|
254
254
|
|
|
255
255
|
---
|
|
@@ -266,16 +266,16 @@ end
|
|
|
266
266
|
## Key Files Modified
|
|
267
267
|
|
|
268
268
|
### Session 1
|
|
269
|
-
1. `lib/appydave/tools/
|
|
270
|
-
2. `spec/appydave/tools/
|
|
271
|
-
3. `bin/
|
|
269
|
+
1. `lib/appydave/tools/dam/s3_operations.rb` - Refactored with DI, added cleanup_local, fixed status
|
|
270
|
+
2. `spec/appydave/tools/dam/s3_operations_spec.rb` - Rewrote to use DI, added new tests
|
|
271
|
+
3. `bin/dam` - Renamed cleanup commands, updated help
|
|
272
272
|
4. `.rubocop.yml` - Disabled MessageSpies and StubbedMock cops
|
|
273
273
|
|
|
274
274
|
### Session 2
|
|
275
|
-
1. `lib/appydave/tools/
|
|
276
|
-
2. `spec/appydave/tools/
|
|
277
|
-
3. `bin/
|
|
278
|
-
4. `docs/
|
|
275
|
+
1. `lib/appydave/tools/dam/s3_operations.rb` - Added archive method and helper methods
|
|
276
|
+
2. `spec/appydave/tools/dam/s3_operations_spec.rb` - Added 8 archive tests
|
|
277
|
+
3. `bin/dam` - Added archive command handler and help documentation
|
|
278
|
+
4. `docs/dam/session-summary-2025-11-09.md` - Updated with Session 2 accomplishments
|
|
279
279
|
|
|
280
280
|
---
|
|
281
281
|
|
|
@@ -301,7 +301,7 @@ end
|
|
|
301
301
|
### What We Accomplished
|
|
302
302
|
|
|
303
303
|
#### 1. Implemented Manifest Command ✅
|
|
304
|
-
**New Command**: `
|
|
304
|
+
**New Command**: `dam manifest <brand> [--all]`
|
|
305
305
|
|
|
306
306
|
**Features**:
|
|
307
307
|
- Scans local and SSD storage locations
|
|
@@ -312,10 +312,10 @@ end
|
|
|
312
312
|
- `--all` flag generates manifests for all configured brands
|
|
313
313
|
|
|
314
314
|
**Implementation**:
|
|
315
|
-
- Created `ManifestGenerator` class with dependency injection (lib/appydave/tools/
|
|
315
|
+
- Created `ManifestGenerator` class with dependency injection (lib/appydave/tools/dam/manifest_generator.rb)
|
|
316
316
|
- Added to main library requires (lib/appydave/tools.rb:60)
|
|
317
|
-
- Added CLI command handler (bin/
|
|
318
|
-
- Added comprehensive help documentation (bin/
|
|
317
|
+
- Added CLI command handler (bin/dam:160-201)
|
|
318
|
+
- Added comprehensive help documentation (bin/dam:561-615)
|
|
319
319
|
|
|
320
320
|
**Output Example**:
|
|
321
321
|
```
|
|
@@ -338,7 +338,7 @@ Disk Usage:
|
|
|
338
338
|
```
|
|
339
339
|
|
|
340
340
|
#### 2. Wrote Comprehensive Tests ✅ (PRIMARY ACHIEVEMENT)
|
|
341
|
-
**Created**: `spec/appydave/tools/
|
|
341
|
+
**Created**: `spec/appydave/tools/dam/manifest_generator_spec.rb`
|
|
342
342
|
|
|
343
343
|
**Test Coverage**: 24 new tests covering:
|
|
344
344
|
- Initialization with/without dependency injection
|
|
@@ -348,7 +348,7 @@ Disk Usage:
|
|
|
348
348
|
- Both locations (mixed)
|
|
349
349
|
- SSD not configured
|
|
350
350
|
- SSD not mounted
|
|
351
|
-
- Special directory exclusion (s3-staging, archived, final, .hidden,
|
|
351
|
+
- Special directory exclusion (s3-staging, archived, final, .hidden, _pridame)
|
|
352
352
|
- Heavy file detection (.mp4, .mov, .avi, .mkv, .webm)
|
|
353
353
|
- Light file detection (.srt, .vtt, .jpg, .png, .md, .txt, .json, .yml)
|
|
354
354
|
- Mixed file detection
|
|
@@ -402,46 +402,46 @@ Disk Usage:
|
|
|
402
402
|
#### 5. Updated Documentation ✅
|
|
403
403
|
|
|
404
404
|
**README.md**:
|
|
405
|
-
- Added `
|
|
406
|
-
- Added `
|
|
407
|
-
- Renamed `
|
|
408
|
-
- Added `
|
|
409
|
-
- Enhanced `
|
|
410
|
-
|
|
411
|
-
**docs/
|
|
412
|
-
- Added `
|
|
413
|
-
- Added `
|
|
405
|
+
- Added `dam archive` example
|
|
406
|
+
- Added `dam manifest` example
|
|
407
|
+
- Renamed `dam s3-cleanup` → `dam s3-cleanup-remote`
|
|
408
|
+
- Added `dam s3-cleanup-local`
|
|
409
|
+
- Enhanced `dam s3-status` description
|
|
410
|
+
|
|
411
|
+
**docs/dam/usage.md**:
|
|
412
|
+
- Added `dam manifest [brand] [--all]` full documentation with output example
|
|
413
|
+
- Added `dam archive [brand] [project] [--dry-run] [--force]` full documentation
|
|
414
414
|
- Renamed cleanup commands with backward compatibility note
|
|
415
|
-
- Added `
|
|
415
|
+
- Added `dam s3-cleanup-local` documentation
|
|
416
416
|
- Updated all examples to use new command names
|
|
417
417
|
|
|
418
|
-
**docs/
|
|
418
|
+
**docs/dam/dam-vision.md**:
|
|
419
419
|
- Moved from `docs/dam/overview.md`
|
|
420
420
|
- Enhanced with comprehensive context mapping user stories to implementations
|
|
421
|
-
- Explained
|
|
421
|
+
- Explained DAM as a complete DAM (Digital Asset Management) system
|
|
422
422
|
|
|
423
423
|
**Deleted Stale Docs**:
|
|
424
|
-
- `docs/
|
|
425
|
-
- `docs/
|
|
426
|
-
- `docs/
|
|
427
|
-
- `docs/
|
|
424
|
+
- `docs/dam/dam-implementation-status.md`
|
|
425
|
+
- `docs/dam/dam-integration-plan.md`
|
|
426
|
+
- `docs/dam/dam-integration-summary.md`
|
|
427
|
+
- `docs/dam/dam-refactoring-summary.md`
|
|
428
428
|
|
|
429
429
|
---
|
|
430
430
|
|
|
431
431
|
## Final Status (End of 2025-11-09)
|
|
432
432
|
|
|
433
|
-
### All
|
|
434
|
-
1. ✅ `
|
|
435
|
-
2. ✅ `
|
|
436
|
-
3. ✅ `
|
|
437
|
-
4. ✅ `
|
|
438
|
-
5. ✅ `
|
|
439
|
-
6. ✅ `
|
|
440
|
-
7. ✅ `
|
|
441
|
-
8. ✅ `
|
|
433
|
+
### All DAM Commands Implemented
|
|
434
|
+
1. ✅ `dam list [brand] [pattern]` - List brands/projects
|
|
435
|
+
2. ✅ `dam s3-up <brand> <project>` - Upload to S3
|
|
436
|
+
3. ✅ `dam s3-down <brand> <project>` - Download from S3
|
|
437
|
+
4. ✅ `dam s3-status <brand> <project>` - Check sync status (all 4 states)
|
|
438
|
+
5. ✅ `dam s3-cleanup-remote <brand> <project>` - Delete S3 files
|
|
439
|
+
6. ✅ `dam s3-cleanup-local <brand> <project>` - Delete local files
|
|
440
|
+
7. ✅ `dam archive <brand> <project>` - Copy to SSD backup
|
|
441
|
+
8. ✅ `dam manifest <brand> [--all]` - Generate project manifest ⭐ NEW
|
|
442
442
|
|
|
443
443
|
### Not Yet Implemented
|
|
444
|
-
1. ⏳ `
|
|
444
|
+
1. ⏳ `dam sync-ssd <brand>` - Restore from SSD (final remaining command)
|
|
445
445
|
|
|
446
446
|
### Test & Coverage Stats
|
|
447
447
|
- **Total Tests**: 321 examples
|
|
@@ -459,7 +459,7 @@ Disk Usage:
|
|
|
459
459
|
## Next Steps (For Future Session)
|
|
460
460
|
|
|
461
461
|
### Priority 1: Sync from SSD Command ⏳
|
|
462
|
-
Implement `
|
|
462
|
+
Implement `dam sync-ssd <brand>` to restore projects from SSD - the final remaining DAM command.
|
|
463
463
|
|
|
464
464
|
**Requirements**:
|
|
465
465
|
- List available projects on SSD
|
|
@@ -475,4 +475,4 @@ Implement `vat sync-ssd <brand>` to restore projects from SSD - the final remain
|
|
|
475
475
|
|
|
476
476
|
---
|
|
477
477
|
|
|
478
|
-
**Session Complete**:
|
|
478
|
+
**Session Complete**: DAM is now production-ready with 8/9 commands implemented and published as gem version 0.17.0! 🎉
|