Skip to content

Commit

Permalink
Merge 87ea446 into 52908b5
Browse files Browse the repository at this point in the history
  • Loading branch information
neonichu committed Apr 8, 2014
2 parents 52908b5 + 87ea446 commit 25e8ffd
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/cocoapods-core/github.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def self.normalized_repo_id(url_or_id)
# @return [Nil] if the given url is not a valid github repo url.
#
def self.repo_id_from_url(url)
url[%r{github.com/([^/\.]*/[^/\.]*)\.*}, 1]
url[%r{github.com/([^/]*/[^/]*)\.*}, 1]
end

# Performs a get request with the given URL.
Expand Down
73 changes: 72 additions & 1 deletion spec/fixtures/vcr_cassettes/GitHub.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions spec/github_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ module Pod
end
end

it 'returns the information of a repo with dots in the name' do
VCR.use_cassette('GitHub', :record => :new_episodes) do
repo = GitHub.repo('https://github.com/contentful/contentful.objc')
repo['name'].should == 'contentful.objc'
end
end

it 'returns the tags of a repo' do
VCR.use_cassette('GitHub', :record => :new_episodes) do
tags = GitHub.tags('https://github.com/CocoaPods/CocoaPods')
Expand Down

0 comments on commit 25e8ffd

Please sign in to comment.