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

Feature/specs sources #19

Closed
wants to merge 22 commits into from
Closed

Conversation

netbe
Copy link
Contributor

@netbe netbe commented Jun 5, 2013

This pull request partially fixes issue CocoaPods/CocoaPods#982

It had the ability to specify other specs repositories sources with the following syntax:

source http://myrepo.com/specs
source http://myrepo2.com/specs

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling a61d6db on netbe:feature/specs-sources into 1dfeece on CocoaPods:master.

# @!group Attributes

# @return [Array<Source>] all the specs source locations.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method should only return a list of strings as the Podfile should't be concerned with the source class. The actual matching should be done by the Pod::Installer::Analyzer (or by a helper class under its namespace).

@fabiopelosin
Copy link
Member

Looks good to me, other than those minor points that I mentioned. Once this is done I think that the support for CocoaPods/CocoaPods#982 in Core is complete.

@fabiopelosin
Copy link
Member

👍

@fabiopelosin
Copy link
Member

@netbe any update on this?

@netbe
Copy link
Contributor Author

netbe commented Aug 2, 2013

@irrationalfab yep I have to finish this up. But I guess i will finish first CocoaPods/CocoaPods#982 and get back on this as there might be other change.

I think at some point we said we should specify names instead of url and then it's up to user to add the repo manually.

or i can modify core now to support source '<url>', '<name>'

@fabiopelosin
Copy link
Member

Thanks for the update I was just checking if the issue was still active.

I don't recall the discussion about the URL. I think that we could start with just the names and add the cloningfunctionality  later.

Sent from my iPhone

On Fri, Aug 2, 2013 at 12:54 PM, François Benaiteau
notifications@github.com wrote:

@irrationalfab yep I have to finish this up. But I guess i will finish first CocoaPods/CocoaPods#982 and get back on this as there might be other change.
I think at some point we said we should specify names instead of url and then it's up to user to add the repo manually.

or i can modify core now to support source '<url>', '<name>'

Reply to this email directly or view it on GitHub:
#19 (comment)

@netbe
Copy link
Contributor Author

netbe commented Oct 7, 2013

@irrationalfab trying to get back to this old PR. Sorry for that, I mainly change the sources to be name of repos instead of urls

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.15%) when pulling 24b7804 on netbe:feature/specs-sources into 11e6a7f on CocoaPods:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) when pulling 61725d2 on netbe:feature/specs-sources into 11e6a7f on CocoaPods:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) when pulling 1f6f9cd on netbe:feature/specs-sources into 11e6a7f on CocoaPods:master.

end

# @return [Array<Source>] all the sources.
#
def all
@sources ||= dirs.map { |repo| Source.new(repo) }.sort_by(&:name)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI I removed the sort_by in order to have the priority (natural order)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would be nice to have some specs to check that the it handles the given sources and that priority the order is respected. Please add a note about the list being ordered by importance.

@fabiopelosin
Copy link
Member

Nice the Core patch is shaping up!

@fabiopelosin
Copy link
Member

Btw, we are aiming for a 100% Coverage in this repo.

@netbe
Copy link
Contributor Author

netbe commented Oct 8, 2013

@irrationalfab yeah i ll try to add a test for the case where repo_dirs is an array, but in my opinion it could always be an array as SourceManager.agggregate does not cover all the cases. The one without source specify = sources = ["master"]

Also would be nice to have the podifle.lock contain the source somehow, what do you think about that?

@fabiopelosin
Copy link
Member

@irrationalfab yeah i ll try to add a test for the case where repo_dirs is an array, but in my opinion it could always be an array as SourceManager.agggregate does not cover all the cases. The one without source specify = sources = ["master"]

I think that was my point as well, client should provide the paths of the sources as an array.

Also would be nice to have the podifle.lock contain the source somehow, what do you think about that?

The Podfile should suffice imo, but I'm not sure. I would not worry about that atm.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) when pulling 8331a5d on netbe:feature/specs-sources into 11e6a7f on CocoaPods:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) when pulling 49b455d on netbe:feature/specs-sources into 11e6a7f on CocoaPods:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) when pulling eda35a6 on netbe:feature/specs-sources into 11e6a7f on CocoaPods:master.

@netbe
Copy link
Contributor Author

netbe commented Oct 21, 2013

@irrationalfab Ok i think for the Core, there is no more stuff to do, maybe a more precise comment on source priorities, I basically took the same description as for Gemfile. But I was surprised to see the last added source was the highest priority.
see http://bundler.io/v1.3/man/gemfile.5.html#SOURCE-PRIORITY
Or did i misunderstood something?
Anyway took the other way around, as it appears more logic to me.

ie: Podfile:

source "source1"
source "source2"

Priority order: source1 then source2

For the default source I will handle it in cocoapods gem.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) when pulling fe1cdcd on netbe:feature/specs-sources into 11e6a7f on CocoaPods:master.

@fabiopelosin
Copy link
Member

👍 Regarding the source priority in bundler I interpret it in the same way. I generally prefer to adopt their conventions to avoid gotchas but in this case the priority as proposed by you makes much more sense!

I think that this can be merged when the patch in CocoaPods/CocoaPods is ready 🍻

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 6c77bf0 on netbe:feature/specs-sources into 8b1ace0 on CocoaPods:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 3f80cec on netbe:feature/specs-sources into 26f43e2 on CocoaPods:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 88b3a9b on netbe:feature/specs-sources into 26f43e2 on CocoaPods:master.

François Benaiteau and others added 22 commits April 17, 2014 23:13
Also updating previous work according to comments of pull request.
Order of repo sources does matter now.
But in this test it does not. 
So for asserting we make sure we have the same order - alphabetic order
Removed private helper for master repo
Also updating previous work according to comments of pull request.
Removed private helper for master repo
@@ -5,7 +5,7 @@ module Pod

describe 'Set Information' do
before do
set = Source::Aggregate.new(fixture('spec-repos')).search_by_name('JSONKit').first
set = Source::Aggregate.new([fixture('spec-repos/master'), fixture('spec-repos/test_repo')]).search_by_name('JSONKit').first

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [132/80]

@fabiopelosin fabiopelosin self-assigned this Aug 11, 2014
@fabiopelosin fabiopelosin mentioned this pull request Aug 20, 2014
@fabiopelosin
Copy link
Member

Closed in favour of #160

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants