appydave-tools 0.18.1 → 0.18.2
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 +8 -0
- data/CLAUDE.md +23 -0
- data/docs/SESSION-SUMMARY-WINDOWS-PREP.md +340 -0
- data/docs/WINDOWS-COMPATIBILITY-REPORT.md +429 -0
- data/docs/WINDOWS-SETUP.md +438 -0
- data/docs/WINDOWS-START-HERE.md +202 -0
- data/docs/dam/vat-testing-plan.md +2 -0
- data/docs/dam/windows-testing-guide.md +750 -0
- data/lib/appydave/tools/dam/s3_operations.rb +70 -8
- data/lib/appydave/tools/dam/sync_from_ssd.rb +41 -0
- data/lib/appydave/tools/version.rb +1 -1
- data/package.json +1 -1
- metadata +6 -1
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
# Windows Compatibility Report
|
|
2
|
+
|
|
3
|
+
**Date:** 2025-11-10
|
|
4
|
+
**Purpose:** Document Windows compatibility status and required fixes for appydave-tools
|
|
5
|
+
**Status:** Ready for Windows testing after fixes
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Executive Summary
|
|
10
|
+
|
|
11
|
+
AppyDave Tools is **95% Windows-compatible** with one critical bug requiring fix before Windows testing can proceed.
|
|
12
|
+
|
|
13
|
+
**Good news:**
|
|
14
|
+
- ✅ Core Ruby code uses cross-platform APIs (`File.join`, `Dir.glob`, `Pathname`)
|
|
15
|
+
- ✅ AWS SDK is platform-agnostic
|
|
16
|
+
- ✅ No shell commands or Unix-specific system calls
|
|
17
|
+
- ✅ No chmod/permissions dependencies
|
|
18
|
+
- ✅ 321 tests all use platform-independent code
|
|
19
|
+
|
|
20
|
+
**Issue found:**
|
|
21
|
+
- ❌ **CRITICAL BUG:** Hardcoded macOS SSL certificate path in S3Operations will break AWS connections on Windows
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Critical Bug: SSL Certificate Path
|
|
26
|
+
|
|
27
|
+
### Location
|
|
28
|
+
`lib/appydave/tools/dam/s3_operations.rb:42`
|
|
29
|
+
|
|
30
|
+
### Current Code (BROKEN ON WINDOWS)
|
|
31
|
+
```ruby
|
|
32
|
+
def create_s3_client(brand_info)
|
|
33
|
+
profile_name = brand_info.aws.profile
|
|
34
|
+
raise "AWS profile not configured for brand '#{brand}'" if profile_name.nil? || profile_name.empty?
|
|
35
|
+
|
|
36
|
+
credentials = Aws::SharedCredentials.new(profile_name: profile_name)
|
|
37
|
+
Aws::S3::Client.new(
|
|
38
|
+
credentials: credentials,
|
|
39
|
+
region: brand_info.aws.region,
|
|
40
|
+
http_wire_trace: false,
|
|
41
|
+
ssl_verify_peer: true,
|
|
42
|
+
ssl_ca_bundle: '/etc/ssl/cert.pem' # ❌ macOS-specific path
|
|
43
|
+
)
|
|
44
|
+
end
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Problem
|
|
48
|
+
- `/etc/ssl/cert.pem` does not exist on Windows
|
|
49
|
+
- AWS SDK will fail with SSL certificate verification error
|
|
50
|
+
- Affects ALL S3 operations (upload, download, status, cleanup)
|
|
51
|
+
|
|
52
|
+
### Recommended Fix
|
|
53
|
+
|
|
54
|
+
**Option 1: Remove hardcoded path (simplest)**
|
|
55
|
+
```ruby
|
|
56
|
+
def create_s3_client(brand_info)
|
|
57
|
+
profile_name = brand_info.aws.profile
|
|
58
|
+
raise "AWS profile not configured for brand '#{brand}'" if profile_name.nil? || profile_name.empty?
|
|
59
|
+
|
|
60
|
+
credentials = Aws::SharedCredentials.new(profile_name: profile_name)
|
|
61
|
+
Aws::S3::Client.new(
|
|
62
|
+
credentials: credentials,
|
|
63
|
+
region: brand_info.aws.region,
|
|
64
|
+
http_wire_trace: false
|
|
65
|
+
# Let AWS SDK auto-detect SSL certificates (works on all platforms)
|
|
66
|
+
)
|
|
67
|
+
end
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Why this works:**
|
|
71
|
+
- AWS SDK automatically finds system certificates on all platforms
|
|
72
|
+
- Windows: Uses Windows Certificate Store
|
|
73
|
+
- Mac: Finds macOS system certificates
|
|
74
|
+
- Linux: Finds OpenSSL certificates
|
|
75
|
+
|
|
76
|
+
**Option 2: Platform-specific paths (complex, not recommended)**
|
|
77
|
+
```ruby
|
|
78
|
+
def create_s3_client(brand_info)
|
|
79
|
+
profile_name = brand_info.aws.profile
|
|
80
|
+
raise "AWS profile not configured for brand '#{brand}'" if profile_name.nil? || profile_name.empty?
|
|
81
|
+
|
|
82
|
+
credentials = Aws::SharedCredentials.new(profile_name: profile_name)
|
|
83
|
+
|
|
84
|
+
# Platform-specific SSL bundle
|
|
85
|
+
ssl_bundle = case RbConfig::CONFIG['host_os']
|
|
86
|
+
when /darwin/i
|
|
87
|
+
'/etc/ssl/cert.pem'
|
|
88
|
+
when /linux/i
|
|
89
|
+
'/etc/ssl/certs/ca-certificates.crt'
|
|
90
|
+
when /mswin|mingw|cygwin/i
|
|
91
|
+
nil # Windows uses Certificate Store
|
|
92
|
+
else
|
|
93
|
+
nil
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
client_options = {
|
|
97
|
+
credentials: credentials,
|
|
98
|
+
region: brand_info.aws.region,
|
|
99
|
+
http_wire_trace: false
|
|
100
|
+
}
|
|
101
|
+
client_options[:ssl_ca_bundle] = ssl_bundle if ssl_bundle
|
|
102
|
+
|
|
103
|
+
Aws::S3::Client.new(client_options)
|
|
104
|
+
end
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Recommendation:** Use **Option 1** - simpler, more maintainable, relies on AWS SDK's platform detection.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Platform Compatibility Analysis
|
|
112
|
+
|
|
113
|
+
### ✅ Fully Compatible Code
|
|
114
|
+
|
|
115
|
+
**File operations (38 uses):**
|
|
116
|
+
- `File.join()` - Cross-platform path joining
|
|
117
|
+
- `Dir.glob()` - Works with Windows wildcards
|
|
118
|
+
- `File.exist?()` - Works with drive letters
|
|
119
|
+
- `File.directory?()` - Platform-agnostic
|
|
120
|
+
- `File.size()` - Cross-platform
|
|
121
|
+
- `FileUtils.mkdir_p()` - Creates directories on all platforms
|
|
122
|
+
- `FileUtils.cp_r()` - Copies files/dirs on all platforms
|
|
123
|
+
- `FileUtils.rm_rf()` - Deletes on all platforms
|
|
124
|
+
|
|
125
|
+
**Path handling:**
|
|
126
|
+
- `Pathname` class - Windows-aware
|
|
127
|
+
- Forward slashes work in Ruby on Windows
|
|
128
|
+
- No hardcoded path separators
|
|
129
|
+
|
|
130
|
+
**AWS SDK:**
|
|
131
|
+
- `Aws::S3::Client` - Platform-agnostic
|
|
132
|
+
- `Aws::SharedCredentials` - Reads from `~/.aws/credentials` (works on Windows as `%USERPROFILE%\.aws\credentials`)
|
|
133
|
+
|
|
134
|
+
**JSON parsing:**
|
|
135
|
+
- `JSON.parse()` / `JSON.generate()` - Cross-platform
|
|
136
|
+
|
|
137
|
+
**MD5 checksums:**
|
|
138
|
+
- `Digest::MD5.file()` - Cross-platform
|
|
139
|
+
|
|
140
|
+
### ⚠️ Potential Compatibility Concerns (Not Currently Issues)
|
|
141
|
+
|
|
142
|
+
**1. Line endings**
|
|
143
|
+
- Ruby handles both CRLF (Windows) and LF (Unix)
|
|
144
|
+
- File I/O automatically converts
|
|
145
|
+
- **No action needed**
|
|
146
|
+
|
|
147
|
+
**2. Case sensitivity**
|
|
148
|
+
- Windows file system is case-insensitive
|
|
149
|
+
- Mac/Linux are case-sensitive
|
|
150
|
+
- **Impact:** Project names like `B65` and `b65` are same on Windows
|
|
151
|
+
- **Recommendation:** Document to use lowercase for consistency
|
|
152
|
+
|
|
153
|
+
**3. Path length limits**
|
|
154
|
+
- Windows MAX_PATH = 260 characters (can be extended)
|
|
155
|
+
- **Impact:** Long project names may fail
|
|
156
|
+
- **Recommendation:** Document Windows long path enablement
|
|
157
|
+
|
|
158
|
+
**4. Reserved filenames**
|
|
159
|
+
- Windows reserves: `CON`, `PRN`, `AUX`, `NUL`, `COM1-9`, `LPT1-9`
|
|
160
|
+
- **Impact:** Can't create projects with these names
|
|
161
|
+
- **Recommendation:** Document in Windows guide
|
|
162
|
+
|
|
163
|
+
**5. External drive mounting**
|
|
164
|
+
- Mac: `/Volumes/T7/`
|
|
165
|
+
- Windows: `E:\` or `F:\` (varies by system)
|
|
166
|
+
- **Impact:** Users must configure per-system in `brands.json`
|
|
167
|
+
- **Already documented** in Windows setup guide
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Testing Status
|
|
172
|
+
|
|
173
|
+
### Documentation Created ✅
|
|
174
|
+
|
|
175
|
+
1. **[docs/WINDOWS-SETUP.md](./WINDOWS-SETUP.md)**
|
|
176
|
+
- Complete Ruby installation guide (RubyInstaller)
|
|
177
|
+
- Gem installation steps
|
|
178
|
+
- Configuration setup with Windows path examples
|
|
179
|
+
- AWS CLI Windows installation
|
|
180
|
+
- Troubleshooting common Windows issues
|
|
181
|
+
- Terminal comparison (PowerShell, Command Prompt, Git Bash)
|
|
182
|
+
|
|
183
|
+
2. **[docs/dam/windows-testing-guide.md](./dam/windows-testing-guide.md)**
|
|
184
|
+
- 30+ Windows-specific test scenarios
|
|
185
|
+
- Path format testing
|
|
186
|
+
- Terminal testing (PowerShell, cmd, Git Bash)
|
|
187
|
+
- All DAM commands tested
|
|
188
|
+
- Error handling verification
|
|
189
|
+
- Performance benchmarks
|
|
190
|
+
|
|
191
|
+
3. **CLAUDE.md updated**
|
|
192
|
+
- Added Windows Setup section
|
|
193
|
+
- Links to Windows documentation
|
|
194
|
+
- Quick Windows onboarding steps
|
|
195
|
+
|
|
196
|
+
4. **vat-testing-plan.md updated**
|
|
197
|
+
- Links to Windows testing guide
|
|
198
|
+
|
|
199
|
+
### Tests Pending ⏳
|
|
200
|
+
|
|
201
|
+
**Manual testing required:**
|
|
202
|
+
- [ ] Install on Windows 10/11
|
|
203
|
+
- [ ] Run all 321 automated tests
|
|
204
|
+
- [ ] Execute manual DAM command tests
|
|
205
|
+
- [ ] Verify S3 operations (after SSL fix)
|
|
206
|
+
- [ ] Test archive/sync-ssd with external SSD
|
|
207
|
+
- [ ] Performance benchmarks
|
|
208
|
+
|
|
209
|
+
**Blocker:** SSL certificate bug must be fixed before Windows testing can succeed
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Recommendations
|
|
214
|
+
|
|
215
|
+
### Priority 1: Fix SSL Bug (CRITICAL)
|
|
216
|
+
|
|
217
|
+
**Action:** Remove hardcoded SSL certificate path from `s3_operations.rb:42`
|
|
218
|
+
|
|
219
|
+
**Implementation:**
|
|
220
|
+
```ruby
|
|
221
|
+
# Remove these lines:
|
|
222
|
+
ssl_verify_peer: true,
|
|
223
|
+
ssl_ca_bundle: '/etc/ssl/cert.pem' # macOS system certificates
|
|
224
|
+
|
|
225
|
+
# Let AWS SDK auto-detect (works on all platforms)
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**Testing:**
|
|
229
|
+
1. Run on Mac - verify S3 operations still work
|
|
230
|
+
2. Run on Windows - verify S3 operations now work
|
|
231
|
+
3. Update tests if needed
|
|
232
|
+
|
|
233
|
+
**Estimated effort:** 5 minutes to fix, 10 minutes to test
|
|
234
|
+
|
|
235
|
+
### Priority 2: Windows Testing (After Fix)
|
|
236
|
+
|
|
237
|
+
**Action:** Test on Windows 10/11 with Jan
|
|
238
|
+
|
|
239
|
+
**Prerequisites:**
|
|
240
|
+
- SSL bug fixed
|
|
241
|
+
- Gem published with fix
|
|
242
|
+
- Jan has Windows machine ready
|
|
243
|
+
|
|
244
|
+
**Test plan:**
|
|
245
|
+
- Follow [docs/dam/windows-testing-guide.md](./dam/windows-testing-guide.md)
|
|
246
|
+
- Run all 321 automated tests
|
|
247
|
+
- Execute manual test scenarios
|
|
248
|
+
- Document any issues found
|
|
249
|
+
|
|
250
|
+
**Estimated effort:** 2-3 hours
|
|
251
|
+
|
|
252
|
+
### Priority 3: CI/CD Windows Testing (Future)
|
|
253
|
+
|
|
254
|
+
**Action:** Add Windows to GitHub Actions CI
|
|
255
|
+
|
|
256
|
+
**Implementation:**
|
|
257
|
+
```yaml
|
|
258
|
+
# .github/workflows/main.yml
|
|
259
|
+
strategy:
|
|
260
|
+
matrix:
|
|
261
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
262
|
+
ruby: ['3.3', '3.4']
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
**Benefits:**
|
|
266
|
+
- Automated Windows compatibility testing
|
|
267
|
+
- Catch platform-specific issues early
|
|
268
|
+
- Build confidence for Windows users
|
|
269
|
+
|
|
270
|
+
**Estimated effort:** 30 minutes to add, ongoing CI time
|
|
271
|
+
|
|
272
|
+
### Priority 4: Documentation Maintenance
|
|
273
|
+
|
|
274
|
+
**Keep updated:**
|
|
275
|
+
- Windows setup guide as Ruby versions change
|
|
276
|
+
- Testing guide as new DAM commands added
|
|
277
|
+
- Troubleshooting section with reported issues
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
## Windows Installation Notes (for Jan/Testers)
|
|
282
|
+
|
|
283
|
+
### Ruby Installation (RubyInstaller is Easy!)
|
|
284
|
+
|
|
285
|
+
**Good news:** Ruby on Windows is straightforward via RubyInstaller.
|
|
286
|
+
|
|
287
|
+
**Installation steps:**
|
|
288
|
+
1. Download RubyInstaller: https://rubyinstaller.org/downloads/
|
|
289
|
+
2. Choose **Ruby+Devkit 3.3.x (x64)** or **3.4.x (x64)**
|
|
290
|
+
3. Run installer:
|
|
291
|
+
- ✅ Check "Add Ruby executables to your PATH"
|
|
292
|
+
- ✅ Install MSYS2 DevKit (needed for native gems)
|
|
293
|
+
4. Verify: `ruby --version` and `gem --version`
|
|
294
|
+
|
|
295
|
+
**Gem installation:**
|
|
296
|
+
```powershell
|
|
297
|
+
gem install appydave-tools
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
**Configuration:**
|
|
301
|
+
```powershell
|
|
302
|
+
# Create config directory
|
|
303
|
+
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.config\appydave"
|
|
304
|
+
|
|
305
|
+
# Initialize
|
|
306
|
+
ad_config -c
|
|
307
|
+
|
|
308
|
+
# Edit (use forward slashes in JSON!)
|
|
309
|
+
notepad "$env:USERPROFILE\.config\appydave\settings.json"
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
**Example config (Windows):**
|
|
313
|
+
```json
|
|
314
|
+
{
|
|
315
|
+
"video-projects-root": "C:/Users/Jan/Videos/video-projects"
|
|
316
|
+
}
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
**Complete guide:** [docs/WINDOWS-SETUP.md](./WINDOWS-SETUP.md)
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
## Testing Checklist for Jan
|
|
324
|
+
|
|
325
|
+
### Setup Phase
|
|
326
|
+
- [ ] Install Ruby via RubyInstaller (3.3+ or 3.4+)
|
|
327
|
+
- [ ] Install MSYS2 DevKit (prompted during Ruby install)
|
|
328
|
+
- [ ] Verify Ruby: `ruby --version`
|
|
329
|
+
- [ ] Install gem: `gem install appydave-tools`
|
|
330
|
+
- [ ] Create config: `ad_config -c`
|
|
331
|
+
- [ ] Edit settings.json with Windows paths (forward slashes!)
|
|
332
|
+
|
|
333
|
+
### Basic Testing
|
|
334
|
+
- [ ] `gpt_context --help` - Should show help without errors
|
|
335
|
+
- [ ] `ad_config -l` - Should list configurations
|
|
336
|
+
- [ ] `dam help` - Should show DAM help
|
|
337
|
+
|
|
338
|
+
### DAM Testing (Requires AWS Setup)
|
|
339
|
+
- [ ] Install AWS CLI for Windows
|
|
340
|
+
- [ ] Configure AWS: `aws configure`
|
|
341
|
+
- [ ] `dam list` - Should show brands
|
|
342
|
+
- [ ] `dam list appydave` - Should show projects
|
|
343
|
+
- [ ] `dam s3-status appydave <project>` - **THIS TESTS THE SSL FIX**
|
|
344
|
+
|
|
345
|
+
### Expected Results
|
|
346
|
+
- ✅ All commands work without errors
|
|
347
|
+
- ✅ Windows paths display correctly (not garbled)
|
|
348
|
+
- ✅ S3 operations succeed (after SSL fix)
|
|
349
|
+
|
|
350
|
+
### Report Issues
|
|
351
|
+
If errors occur, collect:
|
|
352
|
+
- Windows version (10 or 11)
|
|
353
|
+
- Ruby version: `ruby --version`
|
|
354
|
+
- Full error message
|
|
355
|
+
- Command that failed
|
|
356
|
+
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
## Code Quality Notes
|
|
360
|
+
|
|
361
|
+
### Strong Cross-Platform Practices ✅
|
|
362
|
+
|
|
363
|
+
The codebase demonstrates excellent cross-platform awareness:
|
|
364
|
+
|
|
365
|
+
1. **No shell dependencies** - Pure Ruby only
|
|
366
|
+
2. **No Unix commands** - No `cat`, `grep`, `find`, etc.
|
|
367
|
+
3. **No hardcoded paths** (except the one SSL bug)
|
|
368
|
+
4. **Platform-agnostic file operations**
|
|
369
|
+
5. **Standard library usage**
|
|
370
|
+
6. **Well-tested** (321 tests, 91% coverage)
|
|
371
|
+
|
|
372
|
+
### SSL Bug is Likely an Oversight
|
|
373
|
+
|
|
374
|
+
The hardcoded SSL certificate path is inconsistent with the otherwise excellent cross-platform code. It was likely added to fix a Mac-specific SSL issue and not tested on other platforms.
|
|
375
|
+
|
|
376
|
+
**Evidence it's an oversight:**
|
|
377
|
+
- Rest of codebase is platform-agnostic
|
|
378
|
+
- No other hardcoded paths exist
|
|
379
|
+
- AWS SDK has built-in certificate detection
|
|
380
|
+
|
|
381
|
+
**Fix is trivial:** Just remove the hardcoded path and let AWS SDK auto-detect.
|
|
382
|
+
|
|
383
|
+
---
|
|
384
|
+
|
|
385
|
+
## Summary for David
|
|
386
|
+
|
|
387
|
+
**What I've done:**
|
|
388
|
+
|
|
389
|
+
1. ✅ **Created comprehensive Windows documentation:**
|
|
390
|
+
- Complete setup guide with RubyInstaller instructions
|
|
391
|
+
- 30+ Windows-specific test scenarios
|
|
392
|
+
- Path format examples and troubleshooting
|
|
393
|
+
|
|
394
|
+
2. ✅ **Updated existing documentation:**
|
|
395
|
+
- Added Windows section to CLAUDE.md
|
|
396
|
+
- Linked Windows guides in testing plan
|
|
397
|
+
|
|
398
|
+
3. ✅ **Audited codebase for Windows issues:**
|
|
399
|
+
- Found 1 critical bug (SSL certificate path)
|
|
400
|
+
- Verified 38 cross-platform file operations
|
|
401
|
+
- No shell commands or Unix dependencies
|
|
402
|
+
|
|
403
|
+
4. ✅ **Provided clear fix recommendation:**
|
|
404
|
+
- Remove hardcoded SSL path
|
|
405
|
+
- Let AWS SDK auto-detect certificates
|
|
406
|
+
- 5-minute fix, 10-minute test
|
|
407
|
+
|
|
408
|
+
**What Jan needs to do (after SSL fix):**
|
|
409
|
+
|
|
410
|
+
1. Install Ruby via RubyInstaller (easy - 10 minutes)
|
|
411
|
+
2. Install appydave-tools gem (1 minute)
|
|
412
|
+
3. Configure with Windows paths (5 minutes)
|
|
413
|
+
4. Run test scenarios from Windows testing guide (2-3 hours)
|
|
414
|
+
5. Report any issues
|
|
415
|
+
|
|
416
|
+
**Timeline:**
|
|
417
|
+
|
|
418
|
+
- **Today:** Fix SSL bug (15 minutes)
|
|
419
|
+
- **Tomorrow:** Publish gem with fix
|
|
420
|
+
- **This week:** Jan tests on Windows
|
|
421
|
+
- **Next week:** Add Windows CI if tests pass
|
|
422
|
+
|
|
423
|
+
**Confidence level:** 95% - One bug to fix, then should work perfectly on Windows!
|
|
424
|
+
|
|
425
|
+
---
|
|
426
|
+
|
|
427
|
+
**Created by:** Claude Code (AI Assistant)
|
|
428
|
+
**Date:** 2025-11-10
|
|
429
|
+
**Review required:** SSL bug fix implementation
|