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

Add CDN repo Source to allow retrieving specs from a web URL #469

Merged
merged 1 commit into from Dec 15, 2018

Conversation

@igor-makarov
Copy link
Contributor

@igor-makarov igor-makarov commented Nov 15, 2018

This PR complements #8280 in the main repo.

See all the details there.

lib/cocoapods-core/cdn_source.rb Outdated Show resolved Hide resolved
lib/cocoapods-core/cdn_source.rb Outdated Show resolved Hide resolved
lib/cocoapods-core/cdn_source.rb Outdated Show resolved Hide resolved
lib/cocoapods-core/cdn_source.rb Outdated Show resolved Hide resolved
lib/cocoapods-core/cdn_source.rb Outdated Show resolved Hide resolved
lib/cocoapods-core/cdn_source.rb Outdated Show resolved Hide resolved
lib/cocoapods-core/cdn_source.rb Outdated Show resolved Hide resolved
lib/cocoapods-core/cdn_source.rb Outdated Show resolved Hide resolved
@igor-makarov
Copy link
Contributor Author

@igor-makarov igor-makarov commented Nov 17, 2018

I've made (hopefully) all the requested changes.

@igor-makarov
Copy link
Contributor Author

@igor-makarov igor-makarov commented Nov 18, 2018

I've added a threadpool to handle all the concurrency, using ruby-concurrent.

In addition, I've moved all the optimizations that were previously in the analyzer, into the CDNSource file.

Copy link
Member

@amorde amorde left a comment

This is awesome! Would love to see tests for this before merging

lib/cocoapods-core/cdn_source.rb Outdated Show resolved Hide resolved
lib/cocoapods-core/cdn_source.rb Outdated Show resolved Hide resolved
lib/cocoapods-core/cdn_source.rb Outdated Show resolved Hide resolved
lib/cocoapods-core/cdn_source.rb Outdated Show resolved Hide resolved
lib/cocoapods-core/cdn_source.rb Outdated Show resolved Hide resolved
lib/cocoapods-core/cdn_source.rb Outdated Show resolved Hide resolved
lib/cocoapods-core/cdn_source.rb Show resolved Hide resolved
lib/cocoapods-core/cdn_source.rb Outdated Show resolved Hide resolved
lib/cocoapods-core/cdn_source.rb Outdated Show resolved Hide resolved
@igor-makarov igor-makarov force-pushed the master branch 2 times, most recently from 1200768 to f6b0f23 Nov 19, 2018
@igor-makarov
Copy link
Contributor Author

@igor-makarov igor-makarov commented Nov 19, 2018

So I've picked all the nits, and made most of the implementation-related methods private.

I've begun adding unit tests. I'm using webrick for mocking the CDN server. I had to put its hookup in spec_helper to ensure no tests fail. I think it works better than VCR, because what I need is a read-only, static-hosted HTTP server that supports ETag out of the box.

@igor-makarov
Copy link
Contributor Author

@igor-makarov igor-makarov commented Nov 20, 2018

I've added the tests for CDNSource. It's now 93% covered, according to what I can see.

@igor-makarov
Copy link
Contributor Author

@igor-makarov igor-makarov commented Nov 21, 2018

I've pruned the new mock_cdn_repo_remote fixture to have significantly less files. Hope that's better.

amorde
amorde approved these changes Nov 28, 2018
Copy link
Member

@amorde amorde left a comment

Haven't gotten the chance to try it out yet but the diff looks good to me

lib/cocoapods-core/cdn_source.rb Outdated Show resolved Hide resolved
lib/cocoapods-core/cdn_source.rb Outdated Show resolved Hide resolved
@igor-makarov
Copy link
Contributor Author

@igor-makarov igor-makarov commented Dec 15, 2018

I've made the changes requested by @segiddins.

@dnkoutso dnkoutso merged commit 87c71c4 into CocoaPods:master Dec 15, 2018
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants