class Fastlane::FirebaseTestLab::Storage

Constants

GCS_OAUTH_SCOPES

Public Class Methods

new(gcp_project, credential, gcp_requests_timeout) click to toggle source
# File lib/fastlane/plugin/firebase_test_lab/helper/storage.rb, line 11
def initialize(gcp_project, credential, gcp_requests_timeout)
  credentials = credential.get_google_credential(GCS_OAUTH_SCOPES)
  @client = Google::Cloud::Storage.new(project_id: gcp_project,
                                       credentials: credentials,
                                       timeout: gcp_requests_timeout)
end

Public Instance Methods

upload_file(source_path, destination_bucket, destination_path) click to toggle source
# File lib/fastlane/plugin/firebase_test_lab/helper/storage.rb, line 18
def upload_file(source_path, destination_bucket, destination_path)
  bucket = @client.bucket(destination_bucket)
  bucket.create_file(source_path, destination_path)
end