class Pod::Podfile::TargetDefinition
Attributes
cache_proxy_source[R]
ignore_cache_proxy[R]
Public Instance Methods
check_ignore_cache_proxy_pod(pod)
click to toggle source
@param [String] pod @return [TrueClass, FalseClass]
# File lib/cocoapods-cache-proxy/native/podfile_dsl.rb, line 119 def check_ignore_cache_proxy_pod(pod) return false if pod.blank? ignores = [] ignores.concat(get_ignore_cache_proxy_pods) ignores.concat(root.get_ignore_cache_proxy_pods) unless root.nil? ignores.concat(parent.get_ignore_cache_proxy_pods) unless parent.nil? ignores.uniq.include?(pod) end
get_ignore_cache_proxy_pods()
click to toggle source
@return [Array<String>]
# File lib/cocoapods-cache-proxy/native/podfile_dsl.rb, line 113 def get_ignore_cache_proxy_pods @ignore_cache_proxy.nil? ? [] : @ignore_cache_proxy.uniq end
orig_parse_inhibit_warnings(name, requirements)
—- 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`.
Alias for: parse_inhibit_warnings
parse_inhibit_warnings(name, requirements)
click to toggle source
# File lib/cocoapods-cache-proxy/native/podfile_dsl.rb, line 52 def parse_inhibit_warnings(name, requirements) options = requirements.last if options.is_a?(Hash) if options.has_key?(Pod::Podfile::IgnorePodProxy.keyword) ignore = options[Pod::Podfile::IgnorePodProxy.keyword] options.delete(Pod::Podfile::IgnorePodProxy.keyword) set_ignore_cache_proxy_pods([name]) if ignore end if options.has_key?(Pod::Podfile::UsedPodProxySource.keyword) source_name = options[Pod::Podfile::UsedPodProxySource.keyword] options.delete(Pod::Podfile::UsedPodProxySource.keyword) unless source_name.blank? raise Pod::Informative.exception "cache proxy source: `#{source_name}` source does not exist." unless (source = CPSH.get_cache_proxy_source_conf(source_name)) @cache_proxy_source = Hash.new if @cache_proxy_source.nil? @cache_proxy_source[name] = source end end requirements.pop if options.empty? end orig_parse_inhibit_warnings(name, requirements) end
Also aliased as: orig_parse_inhibit_warnings
proxy_source_for_pod(pod)
click to toggle source
@param [String] pod @return [CacheProxySource]
# File lib/cocoapods-cache-proxy/native/podfile_dsl.rb, line 130 def proxy_source_for_pod(pod) return nil if @cache_proxy_source.blank? @cache_proxy_source[pod] end
set_ignore_cache_proxy_pods(pods)
click to toggle source
@param [Array<String>] pods
# File lib/cocoapods-cache-proxy/native/podfile_dsl.rb, line 104 def set_ignore_cache_proxy_pods(pods) return if pods.blank? @ignore_cache_proxy = [] if @ignore_cache_proxy.nil? pods.uniq.each do |pod| @ignore_cache_proxy << pod unless @ignore_cache_proxy.include?(pod) end end