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

Projects
None yet
4 participants
@igor-makarov
Copy link
Contributor

commented Nov 15, 2018

This PR complements #8280 in the main repo.

See all the details there.

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 lib/cocoapods-core/cdn_source.rb Outdated

@igor-makarov igor-makarov force-pushed the igor-makarov:master branch from e65f0f6 to 8d3eb50 Nov 17, 2018

@igor-makarov

This comment has been minimized.

Copy link
Contributor Author

commented Nov 17, 2018

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

@igor-makarov

This comment has been minimized.

Copy link
Contributor Author

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.

@amorde
Copy link
Member

left a comment

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

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
Show resolved Hide resolved lib/cocoapods-core/cdn_source.rb Outdated
Show resolved Hide resolved lib/cocoapods-core/cdn_source.rb Outdated

@igor-makarov igor-makarov force-pushed the igor-makarov:master branch 2 times, most recently from 1200768 to f6b0f23 Nov 19, 2018

@igor-makarov

This comment has been minimized.

Copy link
Contributor Author

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 igor-makarov force-pushed the igor-makarov:master branch from 0bbc118 to 260159d Nov 20, 2018

@igor-makarov

This comment has been minimized.

Copy link
Contributor Author

commented Nov 20, 2018

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

@igor-makarov igor-makarov force-pushed the igor-makarov:master branch from b4589c2 to 40ba72e Nov 21, 2018

@igor-makarov

This comment has been minimized.

Copy link
Contributor Author

commented Nov 21, 2018

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

@igor-makarov igor-makarov force-pushed the igor-makarov:master branch from 40ba72e to fd74937 Nov 26, 2018

@igor-makarov igor-makarov force-pushed the igor-makarov:master branch from fd74937 to 67674cd Nov 27, 2018

@dnkoutso dnkoutso added this to the 1.7 milestone Nov 28, 2018

@amorde

amorde approved these changes Nov 28, 2018

Copy link
Member

left a comment

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

@igor-makarov igor-makarov force-pushed the igor-makarov:master branch from 67674cd to 7a0916b Nov 28, 2018

@igor-makarov igor-makarov force-pushed the igor-makarov:master branch 2 times, most recently from 34c129c to bd2b99e Dec 10, 2018

Show resolved Hide resolved lib/cocoapods-core/cdn_source.rb Outdated
Show resolved Hide resolved lib/cocoapods-core/cdn_source.rb Outdated

@igor-makarov igor-makarov force-pushed the igor-makarov:master branch from bd2b99e to ad7f063 Dec 15, 2018

@igor-makarov

This comment has been minimized.

Copy link
Contributor Author

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

Danger All good
Details
Peril All green. Congrats.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.