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
e01bf9f9
Commit
e01bf9f9
authored
Dec 08, 2014
by
Imre Mihaly
Committed by
Kyle Fuller
Dec 24, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some parameters renamed, and a clarifying comment added
parent
66476792
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
11 deletions
+14
-11
file_references_installer.rb
lib/cocoapods/installer/file_references_installer.rb
+3
-3
project.rb
lib/cocoapods/project.rb
+11
-8
No files found.
lib/cocoapods/installer/file_references_installer.rb
View file @
e01bf9f9
...
@@ -152,20 +152,20 @@ module Pod
...
@@ -152,20 +152,20 @@ module Pod
# @param [Symbol] group_key
# @param [Symbol] group_key
# The key of the group of the Pods project.
# The key of the group of the Pods project.
#
#
# @param [Bool]
group_if
_development
# @param [Bool]
reflect_file_system_structure_for
_development
# Wether organizing the a local pod's files in subgroups inside
# Wether organizing the a local pod's files in subgroups inside
# the pod's group is allowed.
# the pod's group is allowed.
#
#
# @return [void]
# @return [void]
#
#
def
add_file_accessors_paths_to_pods_group
(
file_accessor_key
,
group_key
=
nil
,
group_if
_development
=
false
)
def
add_file_accessors_paths_to_pods_group
(
file_accessor_key
,
group_key
=
nil
,
reflect_file_system_structure_for
_development
=
false
)
file_accessors
.
each
do
|
file_accessor
|
file_accessors
.
each
do
|
file_accessor
|
pod_name
=
file_accessor
.
spec
.
name
pod_name
=
file_accessor
.
spec
.
name
local
=
sandbox
.
local?
(
pod_name
)
local
=
sandbox
.
local?
(
pod_name
)
paths
=
file_accessor
.
send
(
file_accessor_key
)
paths
=
file_accessor
.
send
(
file_accessor_key
)
paths
.
each
do
|
path
|
paths
.
each
do
|
path
|
group
=
pods_project
.
group_for_spec
(
file_accessor
.
spec
.
name
,
group_key
)
group
=
pods_project
.
group_for_spec
(
file_accessor
.
spec
.
name
,
group_key
)
pods_project
.
add_file_reference
(
path
,
group
,
local
&&
group_if
_development
)
pods_project
.
add_file_reference
(
path
,
group
,
local
&&
reflect_file_system_structure_for
_development
)
end
end
end
end
end
end
...
...
lib/cocoapods/project.rb
View file @
e01bf9f9
...
@@ -145,20 +145,23 @@ module Pod
...
@@ -145,20 +145,23 @@ module Pod
# @param [PBXGroup] group
# @param [PBXGroup] group
# The group for the new file reference.
# The group for the new file reference.
#
#
# @param [Bool] development
# @param [Bool] reflect_file_system_structure
# Wether the file is part of a development pod.
# Wether group structure should reflect the file system structure.
# If it is then groups will be created to reflect the code's structure in the filesystem.
# If yes, where needed, intermediate groups are created, similar to
# how mkdir -p operates.
#
#
# @return [PBXFileReference] The new file reference.
# @return [PBXFileReference] The new file reference.
#
#
def
add_file_reference
(
absolute_path
,
group
,
development
=
false
)
def
add_file_reference
(
absolute_path
,
group
,
reflect_file_system_structure
=
false
)
unless
Pathname
.
new
(
absolute_path
).
absolute?
file_path_name
=
Pathname
.
new
(
absolute_path
)
unless
file_path_name
.
absolute?
raise
ArgumentError
,
"Paths must be absolute
#{
absolute_path
}
"
raise
ArgumentError
,
"Paths must be absolute
#{
absolute_path
}
"
end
end
if
development
if
reflect_file_system_structure
relative_path
=
Pathname
.
new
(
absolute_path
).
relative_path_from
(
group
.
real_path
).
dirname
relative_path
=
file_path_name
.
relative_path_from
(
group
.
real_path
)
relative_path
.
each_filename
do
|
name
|
relative_dir
=
relative_path
.
dirname
relative_dir
.
each_filename
do
|
name
|
next
if
name
==
"."
next
if
name
==
"."
group
=
group
[
name
]
||
group
.
new_group
(
name
,
name
)
group
=
group
[
name
]
||
group
.
new_group
(
name
,
name
)
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