cem_acpt 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/cem_acpt/platform/gcp/cmd.rb +3 -11
- data/lib/cem_acpt/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b36c525ca6904813988ad305cc4a89607dff2edcdc8d749e347660047174b37
|
4
|
+
data.tar.gz: ed7e418fbcfadd8773f25f026afa0341119ab28c5e3cc91976f46c42e83af5aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee9ccfe1841b755c0f8df1937d66d0e04e62efe29326f16df33af5d9d66fe47441177098a2ffaffd1f843397d19d2f5cf95dcb1b4e536568d0d52cc5848aa052
|
7
|
+
data.tar.gz: c1c4f2b3a96134009552f9d464b407b64abef6d37f19df28f99b18b17445a492872a77116e924164c38aa65d1b8a96cb089ae7eff58f7414fbc5d7376f24e5cc
|
data/Gemfile.lock
CHANGED
@@ -337,17 +337,9 @@ module CemAcpt::Platform::Gcp
|
|
337
337
|
|
338
338
|
# This function returns the currently authenticated user's name sanitized for use in SSH
|
339
339
|
def authenticated_user_name
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
rescue RuntimeError
|
344
|
-
auth_json = local_exec('auth list')
|
345
|
-
uname = auth_json.find { |x| x['status'] == 'ACTIVE' }['account']
|
346
|
-
end
|
347
|
-
|
348
|
-
raise 'failed to find authenticated user name' unless uname
|
349
|
-
|
350
|
-
uname.gsub(/[^a-zA-Z0-9_]/, '_')
|
340
|
+
local_exec('compute os-login describe-profile', project_flag: false)['posixAccounts'][0]['username']
|
341
|
+
rescue StandardError => e
|
342
|
+
raise "failed to find authenticated user name from os-login profile: #{e.message}"
|
351
343
|
end
|
352
344
|
end
|
353
345
|
end
|
data/lib/cem_acpt/version.rb
CHANGED