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
acce8f22
Commit
acce8f22
authored
Feb 20, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Command::Spec::Cat] Fix raise caused by other Pods including the name of the searched Pod
parent
ffd6e993
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
spec.rb
lib/cocoapods/command/spec.rb
+16
-5
No files found.
lib/cocoapods/command/spec.rb
View file @
acce8f22
...
...
@@ -284,22 +284,33 @@ module Pod
end
end
# @param [String] spec
# The name of the specification.
#
# @param [Bool] show_all
# Whether the paths for all the versions should be returned or
# only the one for the last version.
#
# @return [Pathname] the absolute path or paths of the given podspec
#
def
get_path_of_spec
(
spec
,
show_all
=
false
)
pod
s
=
SourcesManager
.
search_by_name
(
spec
)
set
s
=
SourcesManager
.
search_by_name
(
spec
)
unless
pods
.
count
==
1
names
=
pods
.
collect
(
&
:name
)
*
', '
if
sets
.
count
==
1
set
=
sets
.
first
elsif
sets
.
map
(
&
:name
).
include?
(
spec
)
set
=
sets
.
find
{
|
s
|
s
.
name
==
spec
}
else
names
=
sets
.
collect
(
&
:name
)
*
', '
raise
Informative
,
"More than one spec found for '
#{
spec
}
':
\n
#{
names
}
"
end
unless
show_all
best_spec
,
spec_source
=
spec_and_source_from_set
(
pods
.
firs
t
)
best_spec
,
spec_source
=
spec_and_source_from_set
(
se
t
)
return
pathname_from_spec
(
best_spec
,
spec_source
)
end
return
all_paths_from_set
(
pods
.
firs
t
)
return
all_paths_from_set
(
se
t
)
end
# @return [Pathname] the absolute path of the given spec and source
...
...
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