4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/cocoapods-xzdevelop/xz_installer_analyzer.rb', line 4
def dependencies_to_fetch(podfile_state)
@deps_to_fetch ||= begin
deps_to_fetch = []
deps_with_external_source = podfile_dependencies.select(&:external_source)
if update_mode == :all
deps_to_fetch = deps_with_external_source
else
deps_to_fetch = deps_with_external_source.select do |dep|
pods_to_fetch(podfile_state).include?(dep.root_name)
end
deps_to_fetch_if_needed = deps_with_external_source.select { |dep| podfile_state.unchanged.include?(dep.root_name) }
deps_to_fetch += deps_to_fetch_if_needed.select do |dep|
sandbox.specification_path(dep.root_name).nil? ||
!dep.external_source[:path].nil? ||
!sandbox.pod_dir(dep.root_name).directory? ||
checkout_requires_update?(dep) ||
!dep.external_source[:dev].nil? ||
!dep.external_source[:binary].nil?
end
end
deps_to_fetch.uniq(&:root_name)
end
end
|