class Capistrano::Gcp::Autoscaling::Core::ComputeService
Attributes
options[R]
Public Class Methods
new(options = {})
click to toggle source
# File lib/capistrano/gcp/autoscaling/core/compute_service.rb, line 8 def initialize(options = {}) @options = options end
Public Instance Methods
instance()
click to toggle source
# File lib/capistrano/gcp/autoscaling/core/compute_service.rb, line 12 def instance @instance ||= Google::Apis::ComputeV1::ComputeService.new.tap do |instance| ensure_env_variables_set! ensure_authorization_set!(instance) end end
Private Instance Methods
ensure_env_variables_set!()
click to toggle source
# File lib/capistrano/gcp/autoscaling/core/compute_service.rb, line 23 def ensure_env_variables_set! ENV[Google::Auth::CredentialsLoader::PRIVATE_KEY_VAR] = options.fetch(:gcp_private_key) ENV[Google::Auth::CredentialsLoader::CLIENT_EMAIL_VAR] = options.fetch(:gcp_client_email) end