Sha256: 29c6d76e237e4bd9f2a8f0ef748eb25f2243d12cea393a3dcad9b15984408f75

Contents?: true

Size: 705 Bytes

Versions: 29

Compression:

Stored size: 705 Bytes

Contents

require_relative "base"
require_relative "integration"

module PodPrebuild
  class Diagnosis
    def initialize(options)
      @diagnosers = [
        IntegrationDiagnosis
      ].map { |klazz| klazz.new(options) }
    end

    def run
      diagnosis = @diagnosers.map(&:run)
      errors = diagnosis.select { |d| d[0] == :error }.map { |d| d[1] }
      warnings = diagnosis.select { |d| d[0] == :error }.map { |d| d[1] }

      warnings.each { |d| Pod::UI.puts "⚠️  #{d[1]}" }
      errors.each { |d| Pod::UI.puts "🚩  #{d[1]}" }
      return if errors.empty? || !PodPrebuild.config.strict_diagnosis?

      raise "There are #{errors.count} error(s) spotted after the diagnosis"
    end
  end
end

Version data entries

29 entries across 29 versions & 4 rubygems

Version Path
cocoapods-binary-cache-next-0.1.16 lib/cocoapods-binary-cache/diagnosis/diagnosis.rb
cocoapods-binary-cache-next-0.1.15 lib/cocoapods-binary-cache/diagnosis/diagnosis.rb
cocoapods-binary-artifactory-cache-0.0.19 lib/cocoapods-binary-artifactory-cache/diagnosis/diagnosis.rb
cocoapods-binary-artifactory-cache-0.0.18 lib/cocoapods-binary-artifactory-cache/diagnosis/diagnosis.rb
cocoapods-binary-artifactory-cache-0.0.17 lib/cocoapods-binary-artifactory-cache/diagnosis/diagnosis.rb
cocoapods-binary-artifactory-cache-0.0.16 lib/cocoapods-binary-artifactory-cache/diagnosis/diagnosis.rb
cocoapods-binary-artifactory-cache-0.0.15 lib/cocoapods-binary-artifactory-cache/diagnosis/diagnosis.rb
cocoapods-binary-artifactory-cache-0.0.14 lib/cocoapods-binary-artifactory-cache/diagnosis/diagnosis.rb
cocoapods-binary-artifactory-cache-0.0.13 lib/cocoapods-binary-artifactory-cache/diagnosis/diagnosis.rb
cocoapods-binary-artifactory-cache-0.0.12 lib/cocoapods-binary-artifactory-cache/diagnosis/diagnosis.rb
cocoapods-binary-artifactory-cache-0.0.11 lib/cocoapods-binary-artifactory-cache/diagnosis/diagnosis.rb
cocoapods-binary-artifactory-cache-0.0.10 lib/cocoapods-binary-artifactory-cache/diagnosis/diagnosis.rb
cocoapods-binary-artifactory-cache-0.0.9 lib/cocoapods-binary-artifactory-cache/diagnosis/diagnosis.rb
cocoapods-binary-ht-1.0.0 lib/cocoapods-binary-ht/diagnosis/diagnosis.rb
cocoapods-binary-artifactory-cache-0.0.8 lib/cocoapods-binary-artifactory-cache/diagnosis/diagnosis.rb
cocoapods-binary-artifactory-cache-0.0.7 lib/cocoapods-binary-artifactory-cache/diagnosis/diagnosis.rb
cocoapods-binary-artifactory-cache-0.0.6 lib/cocoapods-binary-artifactory-cache/diagnosis/diagnosis.rb
cocoapods-binary-artifactory-cache-0.0.5 lib/cocoapods-binary-artifactory-cache/diagnosis/diagnosis.rb
cocoapods-binary-artifactory-cache-0.0.4 lib/cocoapods-binary-artifactory-cache/diagnosis/diagnosis.rb
cocoapods-binary-artifactory-cache-0.0.3 lib/cocoapods-binary-artifactory-cache/diagnosis/diagnosis.rb