appydave-tools 0.26.0 → 0.28.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 +14 -0
- data/lib/appydave/tools/configuration/models/brands_config.rb +4 -2
- data/lib/appydave/tools/dam/manifest_generator.rb +26 -8
- data/lib/appydave/tools/dam/s3_operations.rb +14 -5
- data/lib/appydave/tools/version.rb +1 -1
- data/package.json +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 29a9ba93d0e44519b784206a951f92fedd912e228dc953f9bbc08605bdcefe11
|
|
4
|
+
data.tar.gz: 69c9b978075248c3881edcf642f484c42831c4d5c54c50e8504c5cd57262fa08
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4488bd01a962aa0445a3b3b9699cf584b86380c8288ac5a77f0f905472747962e3ad855a526b27e5ce78516b08c46581c3b139ce2838f7faf4fac5ddf9968115
|
|
7
|
+
data.tar.gz: 68ca3cc94ca4c5f837de4f2dc0df6c320f6351440b9e27e16faeb3f57a1e9639405da4185c211c95da50790ec7d7e63885eaa2fbf463c938793149f669da9b7c
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [0.27.0](https://github.com/appydave/appydave-tools/compare/v0.26.0...v0.27.0) (2025-11-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add comprehensive unit tests for recent S3 features - Zone.Identifier exclusion, download timing, project directory creation, and excluded_path helper ([70f1950](https://github.com/appydave/appydave-tools/commit/70f19502cdd6f7a5a95a6421850d5b5e4a17b79b))
|
|
7
|
+
|
|
8
|
+
# [0.26.0](https://github.com/appydave/appydave-tools/compare/v0.25.0...v0.26.0) (2025-11-19)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* exclude Windows Zone.Identifier files from upload and archive ([e018b6d](https://github.com/appydave/appydave-tools/commit/e018b6d9750394e38877421d49a9dd7d4319315c))
|
|
14
|
+
|
|
1
15
|
# [0.25.0](https://github.com/appydave/appydave-tools/compare/v0.24.0...v0.25.0) (2025-11-19)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -215,15 +215,17 @@ module Appydave
|
|
|
215
215
|
|
|
216
216
|
# Type-safe class to access brand settings
|
|
217
217
|
class BrandSettings
|
|
218
|
-
attr_accessor :s3_cleanup_days
|
|
218
|
+
attr_accessor :s3_cleanup_days, :projects_subfolder
|
|
219
219
|
|
|
220
220
|
def initialize(data)
|
|
221
221
|
@s3_cleanup_days = data['s3_cleanup_days'] || 90
|
|
222
|
+
@projects_subfolder = data['projects_subfolder'] || ''
|
|
222
223
|
end
|
|
223
224
|
|
|
224
225
|
def to_h
|
|
225
226
|
{
|
|
226
|
-
's3_cleanup_days' => @s3_cleanup_days
|
|
227
|
+
's3_cleanup_days' => @s3_cleanup_days,
|
|
228
|
+
'projects_subfolder' => @projects_subfolder
|
|
227
229
|
}
|
|
228
230
|
end
|
|
229
231
|
end
|
|
@@ -76,6 +76,15 @@ module Appydave
|
|
|
76
76
|
Appydave::Tools::Configuration::Config.brands.get_brand(brand)
|
|
77
77
|
end
|
|
78
78
|
|
|
79
|
+
# Build project directory path respecting brand's projects_subfolder setting
|
|
80
|
+
def project_directory_path(project_id)
|
|
81
|
+
if brand_info.settings.projects_subfolder && !brand_info.settings.projects_subfolder.empty?
|
|
82
|
+
File.join(brand_path, brand_info.settings.projects_subfolder, project_id)
|
|
83
|
+
else
|
|
84
|
+
File.join(brand_path, project_id)
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
79
88
|
def collect_project_ids(ssd_backup, ssd_available)
|
|
80
89
|
all_project_ids = []
|
|
81
90
|
|
|
@@ -98,13 +107,22 @@ module Appydave
|
|
|
98
107
|
end
|
|
99
108
|
|
|
100
109
|
# Scan local flat structure (active projects only)
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
110
|
+
# Check both brand root and projects subfolder if configured
|
|
111
|
+
scan_paths = [brand_path]
|
|
112
|
+
if brand_info.settings.projects_subfolder && !brand_info.settings.projects_subfolder.empty?
|
|
113
|
+
projects_folder = File.join(brand_path, brand_info.settings.projects_subfolder)
|
|
114
|
+
scan_paths << projects_folder if Dir.exist?(projects_folder)
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
scan_paths.each do |scan_path|
|
|
118
|
+
Dir.glob(File.join(scan_path, '*/')).each do |path|
|
|
119
|
+
basename = File.basename(path)
|
|
120
|
+
# Skip hidden and special directories
|
|
121
|
+
next if basename.start_with?('.', '_')
|
|
122
|
+
next if %w[s3-staging archived final].include?(basename)
|
|
106
123
|
|
|
107
|
-
|
|
124
|
+
all_project_ids << basename if valid_project_folder?(path)
|
|
125
|
+
end
|
|
108
126
|
end
|
|
109
127
|
|
|
110
128
|
# Scan archived structure (restored/archived projects)
|
|
@@ -129,7 +147,7 @@ module Appydave
|
|
|
129
147
|
|
|
130
148
|
def build_project_entry(project_id, ssd_backup, ssd_available)
|
|
131
149
|
# Check flat structure (active projects)
|
|
132
|
-
flat_path =
|
|
150
|
+
flat_path = project_directory_path(project_id)
|
|
133
151
|
flat_exists = Dir.exist?(flat_path)
|
|
134
152
|
|
|
135
153
|
# Check archived structure (restored/archived projects)
|
|
@@ -197,7 +215,7 @@ module Appydave
|
|
|
197
215
|
projects.each do |project|
|
|
198
216
|
if project[:storage][:local][:exists]
|
|
199
217
|
# Try flat structure first, then archived structure
|
|
200
|
-
flat_path =
|
|
218
|
+
flat_path = project_directory_path(project[:id])
|
|
201
219
|
if Dir.exist?(flat_path)
|
|
202
220
|
local_bytes += calculate_directory_size(flat_path)
|
|
203
221
|
else
|
|
@@ -51,6 +51,15 @@ module Appydave
|
|
|
51
51
|
Appydave::Tools::Configuration::Config.brands.get_brand(brand)
|
|
52
52
|
end
|
|
53
53
|
|
|
54
|
+
# Build project directory path respecting brand's projects_subfolder setting
|
|
55
|
+
def project_directory_path
|
|
56
|
+
if brand_info.settings.projects_subfolder && !brand_info.settings.projects_subfolder.empty?
|
|
57
|
+
File.join(brand_path, brand_info.settings.projects_subfolder, project_id)
|
|
58
|
+
else
|
|
59
|
+
File.join(brand_path, project_id)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
54
63
|
# Determine which AWS profile to use based on current user
|
|
55
64
|
# Priority: current user's default_aws_profile > brand's aws.profile
|
|
56
65
|
def determine_aws_profile(brand_info)
|
|
@@ -108,7 +117,7 @@ module Appydave
|
|
|
108
117
|
|
|
109
118
|
# Upload files from s3-staging/ to S3
|
|
110
119
|
def upload(dry_run: false)
|
|
111
|
-
project_dir =
|
|
120
|
+
project_dir = project_directory_path
|
|
112
121
|
staging_dir = File.join(project_dir, 's3-staging')
|
|
113
122
|
|
|
114
123
|
unless Dir.exist?(staging_dir)
|
|
@@ -163,7 +172,7 @@ module Appydave
|
|
|
163
172
|
|
|
164
173
|
# Download files from S3 to s3-staging/
|
|
165
174
|
def download(dry_run: false)
|
|
166
|
-
project_dir =
|
|
175
|
+
project_dir = project_directory_path
|
|
167
176
|
staging_dir = File.join(project_dir, 's3-staging')
|
|
168
177
|
|
|
169
178
|
# Ensure project directory exists before download
|
|
@@ -212,7 +221,7 @@ module Appydave
|
|
|
212
221
|
|
|
213
222
|
# Show sync status
|
|
214
223
|
def status
|
|
215
|
-
project_dir =
|
|
224
|
+
project_dir = project_directory_path
|
|
216
225
|
staging_dir = File.join(project_dir, 's3-staging')
|
|
217
226
|
|
|
218
227
|
s3_files = list_s3_files
|
|
@@ -316,7 +325,7 @@ module Appydave
|
|
|
316
325
|
|
|
317
326
|
# Cleanup local s3-staging files
|
|
318
327
|
def cleanup_local(force: false, dry_run: false)
|
|
319
|
-
project_dir =
|
|
328
|
+
project_dir = project_directory_path
|
|
320
329
|
staging_dir = File.join(project_dir, 's3-staging')
|
|
321
330
|
|
|
322
331
|
unless Dir.exist?(staging_dir)
|
|
@@ -384,7 +393,7 @@ module Appydave
|
|
|
384
393
|
return
|
|
385
394
|
end
|
|
386
395
|
|
|
387
|
-
project_dir =
|
|
396
|
+
project_dir = project_directory_path
|
|
388
397
|
|
|
389
398
|
unless Dir.exist?(project_dir)
|
|
390
399
|
puts "❌ Project not found: #{project_dir}"
|
data/package.json
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: appydave-tools
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.28.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Cruwys
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-11-
|
|
11
|
+
date: 2025-11-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activemodel
|