Skip to content
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

Support for Cocoapods 1.0 #7

Merged
merged 3 commits into from
Jul 6, 2016
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add no_validate option to external sources
  • Loading branch information
petercv committed Jul 6, 2016
commit ccb0f08a6cb6c25fb99e1edc8545b8458062e126
23 changes: 23 additions & 0 deletions lib/cocoapods-deploy/command/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 77,28 @@ def dependencies_for(specification)
end
end
end

# Applies patch to external sources to add a no_validate option which
# can be used to disable validation of downloaded podspecs. A normal install
# doesn't validate the podspecs of non-external pods even though certain
# podspecs are not entirely valid (for example an invalid license file type).
# This would mean the normal install command can install certain pods that deploy
# doesn't because of the validation. This patch makes sure validation doesn't
# happen when deploy is being used.
#
# TODO: BDD
def apply_external_sources_patch
ExternalSources::AbstractExternalSource.class_eval do
attr_accessor :no_validate

old_validate_podspec = instance_method(:validate_podspec)

def validate_podspec(podspec)
return if no_validate
old_validate_podspec(podspec)
end
end
end

# Installs required sources for lockfile - TODO: Simplify code
def install_sources_for_lockfile
Expand Down Expand Up @@ -115,6 137,7 @@ def run

# TODO: BDD Patch
apply_resolver_patch
apply_external_sources_patch

install_sources_for_lockfile
install(transform_podfile)
Expand Down