Class: Fastlane::FirebaseAccount
- Inherits:
-
Object
- Object
- Fastlane::FirebaseAccount
- Defined in:
- lib/fastlane/plugin/wpmreleasetoolkit/models/firebase_account.rb
Class Method Summary collapse
- .activate_service_account_with_key_file(key_file_path) ⇒ Object
-
.auth_status_data ⇒ Object
Lookup the current account authentication status.
- .authenticated? ⇒ Boolean
Class Method Details
.activate_service_account_with_key_file(key_file_path) ⇒ Object
3 4 5 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/models/firebase_account.rb', line 3 def self.activate_service_account_with_key_file(key_file_path) Fastlane::Actions.sh('gcloud', 'auth', 'activate-service-account', '--key-file', key_file_path) end |
.auth_status_data ⇒ Object
Lookup the current account authentication status
15 16 17 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/models/firebase_account.rb', line 15 def self.auth_status_data Fastlane::Actions.sh('gcloud', 'auth', 'list', '--format', 'json', log: false) end |
.authenticated? ⇒ Boolean
7 8 9 10 11 12 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/models/firebase_account.rb', line 7 def self.authenticated? auth_status = JSON.parse(auth_status_data) auth_status.any? do |account| account['status'] == 'ACTIVE' end end |