class Pod::Resolver
Public Instance Methods
search_for(dependency)
click to toggle source
Filter specifications
# File lib/cocoapods-whitelist/hook/resolver.rb, line 9 def search_for(dependency) ## If you have a dependency problem, then no specification is returned from :search_for specifications = original_search_for(dependency) valid_specifications = validate_dependency(dependency,specifications) if valid_specifications.size != specifications.size Pod::UI.puts "WARNING: More than 1 specification for dependency #{dependency.root_name} was found.".yellow Pod::UI.puts "WARNING: Check if this could be a potencial dependency inyection".red end valid_specifications end
Also aliased as: original_search_for
validate_dependency(dependency, specifications)
click to toggle source
Returns the valids specifications for a given dependency Params:
dependency
-
dependency to be validated
specifications
-
potencial unsecure specs
@returs the result of the validation
# File lib/cocoapods-whitelist/hook/resolver.rb, line 27 def validate_dependency(dependency, specifications) private_sources = get_private_sources() SourceHelper.instance.setup(sources, private_sources) unless SourceHelper.instance.is_filled validator = SourceValidator.new(SourceHelper.instance.specs, private_sources) return validator.filter_dependency(dependency.root_name, specifications) end