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
2caeb0b4
Commit
2caeb0b4
authored
Dec 18, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PathList|Analyzer] Minor bugs.
parent
4228ef59
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
9 deletions
+8
-9
analyzer.rb
lib/cocoapods/installer/analyzer.rb
+7
-8
path_list.rb
lib/cocoapods/local_pod/path_list.rb
+1
-1
No files found.
lib/cocoapods/installer/analyzer.rb
View file @
2caeb0b4
...
@@ -373,27 +373,26 @@ module Pod
...
@@ -373,27 +373,26 @@ module Pod
# @return [Pathname] the path of the user project.
# @return [Pathname] the path of the user project.
#
#
def
compute_user_project_path
(
target_definition
)
def
compute_user_project_path
(
target_definition
)
if
target_definition
.
user_project_path
if
target_definition
.
user_project_path
user_project_path
=
Pathname
.
new
(
config
.
project_root
+
target_definition
.
user_project_path
)
path
=
config
.
project_root
+
target_definition
.
user_project_path
user_project_path
=
user_project_path
.
sub_ext
'.xcodeproj'
path
=
"
#{
path
}
.xcodeproj"
unless
File
.
extname
(
path
)
==
'.xcodeproj'
unless
user_project_path
.
exist?
path
=
Pathname
.
new
(
path
)
unless
path
.
exist?
raise
Informative
,
"Unable to find the Xcode project "
\
raise
Informative
,
"Unable to find the Xcode project "
\
"`
#{
user_project_
path
}
` for the target `
#{
target_definition
.
label
}
`."
"`
#{
path
}
` for the target `
#{
target_definition
.
label
}
`."
end
end
else
else
xcodeprojs
=
Pathname
.
glob
(
config
.
project_root
+
'*.xcodeproj'
)
xcodeprojs
=
Pathname
.
glob
(
config
.
project_root
+
'*.xcodeproj'
)
if
xcodeprojs
.
size
==
1
if
xcodeprojs
.
size
==
1
user_project_
path
=
xcodeprojs
.
first
path
=
xcodeprojs
.
first
else
else
raise
Informative
,
"Could not automatically select an Xcode project. "
\
raise
Informative
,
"Could not automatically select an Xcode project. "
\
"Specify one in your Podfile like so:
\n\n
"
\
"Specify one in your Podfile like so:
\n\n
"
\
" xcodeproj 'path/to/Project.xcodeproj'
\n
"
" xcodeproj 'path/to/Project.xcodeproj'
\n
"
end
end
end
end
path
user_project_path
end
end
# Returns a list of the targets from the project of {TargetDefinition}
# Returns a list of the targets from the project of {TargetDefinition}
...
...
lib/cocoapods/local_pod/path_list.rb
View file @
2caeb0b4
...
@@ -45,7 +45,7 @@ module Pod
...
@@ -45,7 +45,7 @@ module Pod
def
read_file_system
def
read_file_system
root_length
=
root
.
to_s
.
length
+
1
root_length
=
root
.
to_s
.
length
+
1
paths
=
Dir
.
glob
(
root
+
"**/*"
,
File
::
FNM_DOTMATCH
)
paths
=
Dir
.
glob
(
root
+
"**/*"
,
File
::
FNM_DOTMATCH
)
paths
=
paths
.
reject
{
|
p
|
p
==
root
+
'/.'
||
p
==
root
+
'/..'
}
paths
=
paths
.
reject
{
|
p
|
p
==
"
#{
root
}
/."
||
p
==
"
#{
root
}
/.."
}
dirs
=
paths
.
select
{
|
path
|
File
.
directory?
(
path
)
}
dirs
=
paths
.
select
{
|
path
|
File
.
directory?
(
path
)
}
dirs
=
dirs
.
map
{
|
p
|
p
[
root_length
..-
1
]
}
dirs
=
dirs
.
map
{
|
p
|
p
[
root_length
..-
1
]
}
paths
=
paths
.
map
{
|
p
|
p
[
root_length
..-
1
]
}
paths
=
paths
.
map
{
|
p
|
p
[
root_length
..-
1
]
}
...
...
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