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
b2fbf8b9
Commit
b2fbf8b9
authored
Oct 25, 2011
by
Nolan Waite
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Locate project templates from standalone executable
parent
c587b9f4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
project_template.rb
lib/cocoapods/project_template.rb
+12
-2
No files found.
lib/cocoapods/project_template.rb
View file @
b2fbf8b9
...
...
@@ -10,8 +10,18 @@ module Pod
# that makes the use of __FILE__ impossible.
#
#TEMPLATES_DIR = Pathname.new(File.expand_path('../../../xcode-project-templates', __FILE__))
file
=
$LOADED_FEATURES
.
find
{
|
file
|
file
=~
%r{cocoapods/project_template
\.
rbo?$}
}
TEMPLATES_DIR
=
Pathname
.
new
(
File
.
expand_path
(
'../../../xcode-project-templates'
,
file
))
# Rest of this is to handle sourcing template projects from standalone
# executable, for which even the $LOADED_FEATURES workaround fails.
possibilities
=
[
[
$LOADED_FEATURES
.
find
{
|
file
|
file
=~
%r{cocoapods/project_template
\.
rbo?$}
},
'../../../xcode-project-templates'
],
[
$0
,
'../xcode-project-templates'
]
]
TEMPLATES_DIR
=
possibilities
.
map
do
|
base
,
relpath
|
Pathname
.
new
(
File
.
expand_path
(
relpath
,
base
))
end
.
find
{
|
path
|
path
&&
path
.
exist?
}
def
path
@path
||=
case
@platform
...
...
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