Commit d8cb489a authored by Marius Rackwitz's avatar Marius Rackwitz

[Command::Update] Extract #verify_pods_are_installed!

Increases code readability.
parent 368f89ea
......@@ -73,14 +73,9 @@ module Pod
super
end
def run
verify_podfile_exists!
installer = installer_for_config
if @pods
verify_lockfile_exists!
# Check if all given pods are installed
#
def verify_pods_are_installed!
lockfile_roots = config.lockfile.pod_names.map { |p| Specification.root_name(p) }
missing_pods = @pods.map { |p| Specification.root_name(p) }.select do |pod|
!lockfile_roots.include?(pod)
......@@ -96,7 +91,15 @@ module Pod
end
raise Informative, message
end
end
def run
verify_podfile_exists!
installer = installer_for_config
if @pods
verify_lockfile_exists!
verify_pods_are_installed!
installer.update = { :pods => @pods }
else
UI.puts 'Update all pods'.yellow unless @pods
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment