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.82.0.beta.20180219010003 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.82.0.beta.20180218010003 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.82.0.beta.20180217010002 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.82.0.beta.20180216010003 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.82.0.beta.20180215010002 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.82.0.beta.20180214010002 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.81.0 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.81.0.beta.20180213010002 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.81.0.beta.20180212010003 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.81.0.beta.20180211010003 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.81.0.beta.20180210010002 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.81.0.beta.20180209010002 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.81.0.beta.20180208010003 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.81.0.beta.20180207010002 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.81.0.beta.20180206010002 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.81.0.beta.20180205010003 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.81.0.beta.20180204010002 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.81.0.beta.20180203010003 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.81.0.beta.20180202010003 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.80.0 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb