Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
9258cd3a
Commit
9258cd3a
authored
Dec 24, 2014
by
Boris Bügling
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2973 from CocoaPods/issue/2965
[Source Manager] Fix issue with source without URL
parents
44e3dab4
0ac712f0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletion
+15
-1
CHANGELOG.md
CHANGELOG.md
+5
-0
sources_manager.rb
lib/cocoapods/sources_manager.rb
+3
-1
sources_manager_spec.rb
spec/unit/sources_manager_spec.rb
+7
-0
No files found.
CHANGELOG.md
View file @
9258cd3a
...
@@ -76,6 +76,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -76,6 +76,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
*
Fix an issue when a user doesn't yet have any spec repositories configured.
*
Fix an issue when a user doesn't yet have any spec repositories configured.
[
Boris Bügling
](
https://github.com/neonichu
)
[
Boris Bügling
](
https://github.com/neonichu
)
*
Fix an issue updating repositories when another spec repository doesn't
have a remote.
[
Kyle Fuller
](
https://github.com/kylef
)
[
#2965
](
https://github.com/CocoaPods/CocoaPods/issues/2965
)
## 0.35.0
## 0.35.0
...
...
lib/cocoapods/sources_manager.rb
View file @
9258cd3a
...
@@ -395,7 +395,9 @@ module Pod
...
@@ -395,7 +395,9 @@ module Pod
#
#
def
source_with_url
(
url
)
def
source_with_url
(
url
)
url
=
url
.
downcase
.
gsub
(
/.git$/
,
''
)
url
=
url
.
downcase
.
gsub
(
/.git$/
,
''
)
aggregate
.
sources
.
find
{
|
s
|
s
.
url
.
downcase
.
gsub
(
/.git$/
,
''
)
==
url
}
aggregate
.
sources
.
find
do
|
source
|
source
.
url
&&
source
.
url
.
downcase
.
gsub
(
/.git$/
,
''
)
==
url
end
end
end
# Returns a suitable repository name for `url`.
# Returns a suitable repository name for `url`.
...
...
spec/unit/sources_manager_spec.rb
View file @
9258cd3a
...
@@ -205,6 +205,13 @@ module Pod
...
@@ -205,6 +205,13 @@ module Pod
SourcesManager
.
find_or_create_source_with_url
(
'https://github.com/artsy/Specs.git'
).
SourcesManager
.
find_or_create_source_with_url
(
'https://github.com/artsy/Specs.git'
).
should
==
'Source'
should
==
'Source'
end
end
it
'handles repositories without a remote url'
do
# for #2965
Command
::
Repo
::
Add
.
any_instance
.
stubs
(
:run
).
once
Source
.
any_instance
.
stubs
(
:url
).
returns
(
nil
)
e
=
lambda
{
SourcesManager
.
find_or_create_source_with_url
(
'url'
)
}
e
.
should
.
not
.
raise
end
end
end
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment