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.28.0.beta.20170420010017 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.28.0.beta.20170419010123 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.28.0.beta.20170418010021 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.28.0.beta.20170417010100 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.28.0.beta.20170416010028 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.28.0.beta.20170415010110 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.27.0 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.27.0.beta.20170414010035 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.27.0.beta.20170413010117 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.27.0.beta.20170412010036 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.27.0.beta.20170411010118 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.27.0.beta.20170410010020 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.27.0.beta.20170409010031 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.26.1 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.27.0.beta.20170408010009 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.27.0.beta.20170407010056 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.26.0 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.26.0.beta.20170406010019 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.26.0.beta.20170405010026 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.26.0.beta.20170404010022 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb