appydave-tools 0.22.0 → 0.23.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eb7c81970bea29e5f86aaebacc85292975b6924b2adb018fe30d1cd7c1448cfc
|
|
4
|
+
data.tar.gz: 703de8b5395349f6150e624be408b7389e2ec5cbef2f95a229ddbdd1a904c210
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4c714685a4a6611bf7fada4e6116de93a9054c5bd305c3733936501e3658d3e3d4310daf787da2d8a7967ec4b172926e6a7ae86b2695d284262989a8ead7850b
|
|
7
|
+
data.tar.gz: acb79cb193a502a25847e8f31ba8a8266905bb87d4ec60f07ca2706534775b9f10387a23abf5692c3b0884542829067cd02f26baeac13bf2ff844b8169234567
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
# [0.22.0](https://github.com/appydave/appydave-tools/compare/v0.21.2...v0.22.0) (2025-11-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* fix remaining rubocop string literal issue ([a28b9be](https://github.com/appydave/appydave-tools/commit/a28b9bedc31777bf382ebdc54b0abd4e27b7609a))
|
|
7
|
+
* fix rubocop issues in S3 scanner implementation ([20e9d48](https://github.com/appydave/appydave-tools/commit/20e9d481843aa4ab622a3ce6e56ff1183e3bad27))
|
|
8
|
+
* implement S3 scanning to query AWS for actual file data ([f452f95](https://github.com/appydave/appydave-tools/commit/f452f9587ed94f25f100ff36682f9b9c4312b975))
|
|
9
|
+
|
|
1
10
|
## [0.21.2](https://github.com/appydave/appydave-tools/compare/v0.21.1...v0.21.2) (2025-11-17)
|
|
2
11
|
|
|
3
12
|
|
|
@@ -50,9 +50,31 @@ module Appydave
|
|
|
50
50
|
Appydave::Tools::Configuration::Config.brands.get_brand(brand)
|
|
51
51
|
end
|
|
52
52
|
|
|
53
|
+
# Determine which AWS profile to use based on current user
|
|
54
|
+
# Priority: current user's default_aws_profile > brand's aws.profile
|
|
55
|
+
def determine_aws_profile(brand_info)
|
|
56
|
+
# Get current user from settings (if available)
|
|
57
|
+
begin
|
|
58
|
+
current_user_key = Appydave::Tools::Configuration::Config.settings.current_user
|
|
59
|
+
|
|
60
|
+
if current_user_key
|
|
61
|
+
# Look up current user's default AWS profile
|
|
62
|
+
users = Appydave::Tools::Configuration::Config.brands.data['users']
|
|
63
|
+
user_info = users[current_user_key]
|
|
64
|
+
|
|
65
|
+
return user_info['default_aws_profile'] if user_info && user_info['default_aws_profile']
|
|
66
|
+
end
|
|
67
|
+
rescue Appydave::Tools::Error
|
|
68
|
+
# Config not available (e.g., in test environment) - fall through to brand profile
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Fallback to brand's AWS profile
|
|
72
|
+
brand_info.aws.profile
|
|
73
|
+
end
|
|
74
|
+
|
|
53
75
|
def create_s3_client(brand_info)
|
|
54
|
-
profile_name = brand_info
|
|
55
|
-
raise "AWS profile not configured for brand '#{brand}'" if profile_name.nil? || profile_name.empty?
|
|
76
|
+
profile_name = determine_aws_profile(brand_info)
|
|
77
|
+
raise "AWS profile not configured for current user or brand '#{brand}'" if profile_name.nil? || profile_name.empty?
|
|
56
78
|
|
|
57
79
|
credentials = Aws::SharedCredentials.new(profile_name: profile_name)
|
|
58
80
|
|
|
@@ -84,9 +84,31 @@ module Appydave
|
|
|
84
84
|
Appydave::Tools::Configuration::Config.brands.get_brand(brand)
|
|
85
85
|
end
|
|
86
86
|
|
|
87
|
+
# Determine which AWS profile to use based on current user
|
|
88
|
+
# Priority: current user's default_aws_profile > brand's aws.profile
|
|
89
|
+
def determine_aws_profile(brand_info)
|
|
90
|
+
# Get current user from settings (if available)
|
|
91
|
+
begin
|
|
92
|
+
current_user_key = Appydave::Tools::Configuration::Config.settings.current_user
|
|
93
|
+
|
|
94
|
+
if current_user_key
|
|
95
|
+
# Look up current user's default AWS profile
|
|
96
|
+
users = Appydave::Tools::Configuration::Config.brands.data['users']
|
|
97
|
+
user_info = users[current_user_key]
|
|
98
|
+
|
|
99
|
+
return user_info['default_aws_profile'] if user_info && user_info['default_aws_profile']
|
|
100
|
+
end
|
|
101
|
+
rescue Appydave::Tools::Error
|
|
102
|
+
# Config not available (e.g., in test environment) - fall through to brand profile
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Fallback to brand's AWS profile
|
|
106
|
+
brand_info.aws.profile
|
|
107
|
+
end
|
|
108
|
+
|
|
87
109
|
def create_s3_client(brand_info)
|
|
88
|
-
profile_name = brand_info
|
|
89
|
-
raise "AWS profile not configured for brand '#{@brand}'" if profile_name.nil? || profile_name.empty?
|
|
110
|
+
profile_name = determine_aws_profile(brand_info)
|
|
111
|
+
raise "AWS profile not configured for current user or brand '#{@brand}'" if profile_name.nil? || profile_name.empty?
|
|
90
112
|
|
|
91
113
|
credentials = Aws::SharedCredentials.new(profile_name: profile_name)
|
|
92
114
|
|
data/package.json
CHANGED