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

Better linting for Github URIs. #77

Merged
merged 1 commit into from
Mar 30, 2014

Conversation

neonichu
Copy link
Member

Actually check URI.host and URI.scheme instead of checking against hardcoded URLs.

Does not longer warn for Github repositories with OAuth authentication, which was reported in CocoaPods/CocoaPods#1928

Does not longer warn for Github repositories with OAuth authentication.
@joshkalpin
Copy link
Member

I like this a lot. Can you make sure to update the changelog on the main repository?

joshkalpin pushed a commit that referenced this pull request Mar 30, 2014
@joshkalpin joshkalpin merged commit 7af0d10 into CocoaPods:master Mar 30, 2014
@neonichu neonichu deleted the fix_github_url_linting branch March 30, 2014 08:55
neonichu added a commit to neonichu/CocoaPods that referenced this pull request Mar 30, 2014
@fabiopelosin
Copy link
Member

👍

@@ -333,18 +333,15 @@ def _validate_source(s)
# Performs validations related to github sources.
#
def perform_github_source_checks(s)
supported_domains = [
'https://github.com',
'https://gist.github.com',
Copy link
Contributor

Choose a reason for hiding this comment

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

These changes seem to drop the check for gist.github.com, is this intentional?

@neonichu
Copy link
Member Author

oops, no that wasn't intended, just slipped by. I will create a corresponding spec and fix.

@Superbil
Copy link

Superbil commented Apr 1, 2014

Oh no, use URI.parse will has side effect. Because we use local path as git repo.

example for path:

/Volumes/myrepo/source code/

URI.parse will throw out InvalidURIError

irb(main):012:0> URI.parse('/Volumes/myrepo/source code/')
URI::InvalidURIError: bad URI(is not URI?): /Volumes/myrepo/source code/
    from /usr/local/Cellar/ruby/2.1.1/lib/ruby/2.1.0/uri/common.rb:176:in `split'
    from /usr/local/Cellar/ruby/2.1.1/lib/ruby/2.1.0/uri/common.rb:211:in `parse'
    from /usr/local/Cellar/ruby/2.1.1/lib/ruby/2.1.0/uri/common.rb:747:in `parse'
    from (irb):12
    from /usr/local/opt/ruby/bin/irb:11:in `<main>'

@neonichu
Copy link
Member Author

neonichu commented Apr 1, 2014

Oh, will a correct URI work in this case, file:///Volumes/myrepo/source%20code/ for your example?

@Superbil
Copy link

Superbil commented Apr 1, 2014

There is no limit for git repo is working on local path or url path. No mater what that path, it is work just fine.

Because this problem, I must change git source path on every pod specs.
Is there had another way to check github or gist repo ?!

@kylef
Copy link
Contributor

kylef commented Apr 1, 2014

@Superbil this is now tracked in #82 and should hopefully be fixed soon, it's only an issue with the linter so installation should work fine.

Ashton-W pushed a commit to Ashton-W/Core that referenced this pull request Nov 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants