Skip to content

Fix syntax #92

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/cocoapods-binary/Integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# Provide a special "download" process for prebuilded pods.
#
# As the frameworks is already exsited in local folder. We
# As the frameworks is already existed in local folder. We
# just create a symlink to the original target folder.
#
module Pod
Expand Down Expand Up @@ -114,7 +114,7 @@ def remove_target_files_if_needed
changes = Pod::Prebuild::Passer.prebuild_pods_changes
updated_names = []
if changes == nil
updated_names = PrebuildSandbox.from_standard_sandbox(self.sandbox).exsited_framework_pod_names
updated_names = PrebuildSandbox.from_standard_sandbox(self.sandbox).existed_framework_pod_names
else
added = changes.added
changed = changes.changed
Expand Down
12 changes: 6 additions & 6 deletions lib/cocoapods-binary/Prebuild.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ def have_exact_prebuild_cache?
unchanged = changes.unchanged
deleted = changes.deleted

exsited_framework_pod_names = sandbox.exsited_framework_pod_names
existed_framework_pod_names = sandbox.existed_framework_pod_names
missing = unchanged.select do |pod_name|
not exsited_framework_pod_names.include?(pod_name)
not existed_framework_pod_names.include?(pod_name)
end

needed = (added + changed + deleted + missing)
Expand All @@ -58,7 +58,7 @@ def have_exact_prebuild_cache?
# The install method when have completed cache
def install_when_cache_hit!
# just print log
self.sandbox.exsited_framework_target_names.each do |name|
self.sandbox.existed_framework_target_names.each do |name|
UI.puts "Using #{name}"
end
end
Expand All @@ -82,11 +82,11 @@ def prebuild_frameworks!
deleted = changes.deleted

existed_framework_folder.mkdir unless existed_framework_folder.exist?
exsited_framework_pod_names = sandbox.exsited_framework_pod_names
existed_framework_pod_names = sandbox.existed_framework_pod_names

# additions
missing = unchanged.select do |pod_name|
not exsited_framework_pod_names.include?(pod_name)
not existed_framework_pod_names.include?(pod_name)
end


Expand Down Expand Up @@ -191,7 +191,7 @@ def prebuild_frameworks!
# Remove useless files
# remove useless pods
all_needed_names = self.pod_targets.map(&:name).uniq
useless_target_names = sandbox.exsited_framework_target_names.reject do |name|
useless_target_names = sandbox.existed_framework_target_names.reject do |name|
all_needed_names.include? name
end
useless_target_names.each do |name|
Expand Down
12 changes: 6 additions & 6 deletions lib/cocoapods-binary/helper/prebuild_sandbox.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ def framework_folder_path_for_target_name(name)
end


def exsited_framework_target_names
exsited_framework_name_pairs.map {|pair| pair[0]}.uniq
def existed_framework_target_names
existed_framework_name_pairs.map {|pair| pair[0]}.uniq
end
def exsited_framework_pod_names
exsited_framework_name_pairs.map {|pair| pair[1]}.uniq
def existed_framework_pod_names
existed_framework_name_pairs.map {|pair| pair[1]}.uniq
end
def existed_target_names_for_pod_name(pod_name)
exsited_framework_name_pairs.select {|pair| pair[1] == pod_name }.map { |pair| pair[0]}
existed_framework_name_pairs.select {|pair| pair[1] == pod_name }.map { |pair| pair[0]}
end


Expand All @@ -59,7 +59,7 @@ def pod_name_for_target_folder(target_folder_path)
end

# Array<[target_name, pod_name]>
def exsited_framework_name_pairs
def existed_framework_name_pairs
return [] unless generate_framework_path.exist?
generate_framework_path.children().map do |framework_path|
if framework_path.directory? && (not framework_path.children.empty?)
Expand Down