Sha256: 4f71f09c762a42a91479c3f18667f8caf73cc54fe1b67211b2a508c6261bd83a

Contents?: true

Size: 1.42 KB

Versions: 548

Compression:

Stored size: 1.42 KB

Contents

module Fastlane
  class CrashlyticsBetaInfo
    EXPORT_METHODS = %w(app-store ad-hoc package enterprise development developer-id).freeze

    attr_accessor :crashlytics_path
    attr_accessor :api_key
    attr_accessor :build_secret
    attr_accessor :emails
    attr_accessor :groups
    attr_accessor :schemes
    attr_accessor :export_method

    def schemes=(schemes)
      @schemes = schemes ? schemes.compact : nil
    end

    def emails=(emails)
      @emails = emails ? emails.compact : nil
    end

    def groups=(groups)
      @groups = groups ? groups.compact : nil
    end

    def api_key_valid?
      !api_key.nil? && api_key.to_s.length == 40
    end

    def build_secret_valid?
      !build_secret.nil? && build_secret.to_s.length == 64
    end

    def crashlytics_path_valid?
      !crashlytics_path.nil? && File.exist?(crashlytics_path) && File.exist?(File.join(crashlytics_path, 'submit'))
    end

    def emails_valid?
      !emails.nil? && emails.any? { |email| !email.empty? }
    end

    def groups_valid?
      !groups.nil? && groups.any? { |groups| !groups.empty? }
    end

    def schemes_valid?
      !schemes.nil? && schemes.size == 1 && !schemes.first.empty?
    end

    def export_method_valid?
      !export_method.nil? && !export_method.empty? && EXPORT_METHODS.include?(export_method)
    end

    def has_all_detectable_values?
      api_key && build_secret && crashlytics_path && emails && schemes
    end
  end
end

Version data entries

548 entries across 548 versions & 1 rubygems

Version Path
fastlane-2.3.1 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.3.0 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.2.0 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.1.3 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.1.2 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.1.1 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.1.0 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.0.5 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.0.4 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.0.3 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.0.2 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.0.1 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-1.111.0 lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-1.110.0 lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-1.109.0 lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-1.108.0 lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-1.107.0 lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-1.106.2 lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-1.106.1 lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-1.106.0 lib/fastlane/setup/crashlytics_beta_info.rb