Sha256: b4a24060c1a0fb4b8dbdaf418f45db684324e7f3087f5d4a52446ba463499e46

Contents?: true

Size: 771 Bytes

Versions: 35

Compression:

Stored size: 771 Bytes

Contents

module Pod
  class Installer
    def validate_every_pod_only_have_one_form
      multi_targets_pods = pod_targets
        .group_by(&:pod_name)
        .select do |_, targets|
          is_multi_targets = targets.map { |t| t.platform.name }.uniq.count > 1
          is_multi_forms = targets.map { |t| prebuilt_pod_targets.include?(t) }.uniq.count > 1
          is_multi_targets && is_multi_forms
        end
      return if multi_targets_pods.empty?

      warnings = "One pod can only be prebuilt or not prebuilt. These pod have different forms in multiple targets:\n"
      warnings += multi_targets_pods
        .map { |name, targets| "         #{name}: #{targets.map { |t| t.platform.name }}" }
        .join("\n")
      raise Informative, warnings
    end
  end
end

Version data entries

35 entries across 35 versions & 4 rubygems

Version Path
cocoapods-binary-artifactory-cache-0.0.2 lib/cocoapods-binary-artifactory-cache/pod-binary/integration/validation.rb
cocoapods-binary-artifactory-cache-0.0.1 lib/cocoapods-binary-artifactory-cache/pod-binary/integration/validation.rb
cocoapods-binary-cache-0.1.14 lib/cocoapods-binary-cache/pod-binary/integration/validation.rb
cocoapods-binary-cache-0.1.13 lib/cocoapods-binary-cache/pod-binary/integration/validation.rb
cocoapods-binary-cache-0.1.12 lib/cocoapods-binary-cache/pod-binary/integration/validation.rb
cocoapods-binary-cache-0.1.11 lib/cocoapods-binary-cache/pod-binary/integration/validation.rb
cocoapods-binary-cache-0.1.10 lib/cocoapods-binary-cache/pod-binary/integration/validation.rb
cocoapods-binary-cache-0.1.9 lib/cocoapods-binary-cache/pod-binary/integration/validation.rb
cocoapods-binary-cache-0.1.8 lib/cocoapods-binary-cache/pod-binary/integration/validation.rb
cocoapods-binary-cache-0.1.7 lib/cocoapods-binary-cache/pod-binary/integration/validation.rb
cocoapods-binary-cache-0.1.6 lib/cocoapods-binary-cache/pod-binary/integration/validation.rb
cocoapods-binary-cache-0.1.5 lib/cocoapods-binary-cache/pod-binary/integration/validation.rb
cocoapods-binary-cache-0.1.3 lib/cocoapods-binary-cache/pod-binary/integration/validation.rb
cocoapods-binary-cache-0.1.2 lib/cocoapods-binary-cache/pod-binary/integration/validation.rb
cocoapods-binary-cache-0.1.1 lib/cocoapods-binary-cache/pod-binary/integration/validation.rb