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.85.0.beta.20180308050114 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.85.0.beta.20180307050101 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.85.0.beta.20180306050019 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.85.0.beta.20180305050037 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.85.0.beta.20180304050031 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.85.0.beta.20180303050048 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.85.0.beta.20180302050035 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.84.0 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.84.0.beta.20180301050048 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.84.0.beta.20180228050122 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.84.0.beta.20180227050054 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.83.0 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.83.0.beta.20180226050016 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.83.0.beta.20180225050035 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.83.0.beta.20180224050047 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.82.0 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.82.0.beta.20180223010003 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.82.0.beta.20180222010003 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.82.0.beta.20180221010003 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb
fastlane-2.82.0.beta.20180220010002 fastlane/lib/fastlane/setup/crashlytics_beta_info.rb