module Fastlane::Helper

Public Class Methods

authenticate(gcloud_key_file) click to toggle source
# File lib/fastlane/plugin/screenshot_notifier/helper/screenshot_notifier_helper.rb, line 6
def self.authenticate(gcloud_key_file)
  UI.message "Authenticate with GCP"
  Action.sh("gcloud auth activate-service-account --key-file #{gcloud_key_file}")
end
calc_aspect_ratio(imagePath) click to toggle source
# File lib/fastlane/plugin/screenshot_notifier/helper/screenshot_notifier_helper.rb, line 19
def self.calc_aspect_ratio(imagePath)
  width, height = FastImage.size(imagePath)
  UI.message "Image(#{imagePath}) size #{width} * #{height}"
  height / width.to_f
end
firebase_object_url(bucket, path) click to toggle source
# File lib/fastlane/plugin/screenshot_notifier/helper/screenshot_notifier_helper.rb, line 15
def self.firebase_object_url(bucket, path)
  "https://firebasestorage.googleapis.com/v0/b/#{bucket}/o/#{CGI.escape(path)}?alt=media"
end
get_current_commit_hash() click to toggle source
# File lib/fastlane/plugin/screenshot_notifier/helper/screenshot_notifier_helper.rb, line 11
def self.get_current_commit_hash
  Action.sh("git rev-parse HEAD").chomp!
end