Sha256: d69d97657af44ca23d1ffc26836018136a142d546ece0e1705c4029bdf941c2a

Contents?: true

Size: 1.19 KB

Versions: 31

Compression:

Stored size: 1.19 KB

Contents

module Pod
  class Podfile
    class TargetDefinition
      def detect_prebuilt_pod(name, requirements)
        @explicit_prebuilt_pod_names ||= []
        options = requirements.last || {}
        @explicit_prebuilt_pod_names << Specification.root_name(name) if options.is_a?(Hash) && options[:binary]
        options.delete(:binary) if options.is_a?(Hash)
        requirements.pop if options.empty?
      end

      # Returns the names of pod targets explicitly declared as prebuilt in Podfile using `:binary => true`.
      def explicit_prebuilt_pod_names
        names = @explicit_prebuilt_pod_names || []
        names += parent.explicit_prebuilt_pod_names if !parent.nil? && parent.is_a?(TargetDefinition)
        names
      end

      # ---- patch method ----
      # We want modify `store_pod` method, but it's hard to insert a line in the
      # implementation. So we patch a method called in `store_pod`.
      original_parse_inhibit_warnings = instance_method(:parse_inhibit_warnings)
      define_method(:parse_inhibit_warnings) do |name, requirements|
        detect_prebuilt_pod(name, requirements)
        original_parse_inhibit_warnings.bind(self).call(name, requirements)
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 4 rubygems

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