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
62aecc4e
Commit
62aecc4e
authored
Aug 28, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Project] Rename Local Pods group do Development Pods
parent
8ea1f5da
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
23 deletions
+23
-23
installer.rb
lib/cocoapods/installer.rb
+1
-1
project.rb
lib/cocoapods/project.rb
+8
-8
sandbox.rb
lib/cocoapods/sandbox.rb
+5
-5
cocoapods-integration-specs
spec/cocoapods-integration-specs
+1
-1
external_sources_spec.rb
spec/unit/external_sources_spec.rb
+1
-1
project_spec.rb
spec/unit/project_spec.rb
+5
-5
sandbox_spec.rb
spec/unit/sandbox_spec.rb
+2
-2
No files found.
lib/cocoapods/installer.rb
View file @
62aecc4e
...
...
@@ -389,7 +389,7 @@ module Pod
def
write_pod_project
UI
.
message
"- Writing Xcode project file to
#{
UI
.
path
sandbox
.
project_path
}
"
do
pods_project
.
pods
.
remove_from_project
if
pods_project
.
pods
.
empty?
pods_project
.
local_pods
.
remove_from_project
if
pods_project
.
local
_pods
.
empty?
pods_project
.
development_pods
.
remove_from_project
if
pods_project
.
development
_pods
.
empty?
pods_project
.
main_group
.
sort_by_type!
pods_project
[
'Frameworks'
].
sort_by_type!
pods_project
.
save
...
...
lib/cocoapods/project.rb
View file @
62aecc4e
...
...
@@ -18,7 +18,7 @@ module Pod
@support_files_group
=
new_group
(
'Targets Support Files'
)
@refs_by_absolute_path
=
{}
@pods
=
new_group
(
'Pods'
)
@
local_pods
=
new_group
(
'Local
Pods'
)
@
development_pods
=
new_group
(
'Development
Pods'
)
end
# @return [PBXGroup] The group for the support files of the aggregate
...
...
@@ -30,9 +30,9 @@ module Pod
#
attr_reader
:pods
# @return [PBXGroup] The group for
Local
Pods.
# @return [PBXGroup] The group for
Development
Pods.
#
attr_reader
:
local
_pods
attr_reader
:
development
_pods
public
...
...
@@ -49,18 +49,18 @@ module Pod
# @param [#to_s] path
# The path to the root of the Pod.
#
# @param [Bool]
local
# Wether the group should be added to the
Local
Pods group.
# @param [Bool]
development
# Wether the group should be added to the
Development
Pods group.
#
# @param [Bool] absolute
# Wether the path of the group should be set as absolute.
#
# @return [PBXGroup] The new group.
#
def
add_pod_group
(
pod_name
,
path
,
local
=
false
,
absolute
=
false
)
def
add_pod_group
(
pod_name
,
path
,
development
=
false
,
absolute
=
false
)
raise
"[BUG]"
if
pod_group
(
pod_name
)
parent_group
=
local
?
local
_pods
:
pods
parent_group
=
development
?
development
_pods
:
pods
source_tree
=
absolute
?
:
absolute
:
:group
parent_group
.
new_group
(
pod_name
,
path
,
source_tree
)
end
...
...
@@ -68,7 +68,7 @@ module Pod
# @return [Array<PBXGroup>] Returns all the group of the Pods.
#
def
pod_groups
pods
.
children
.
objects
+
local
_pods
.
children
.
objects
pods
.
children
.
objects
+
development
_pods
.
children
.
objects
end
# Returns the group for the Pod with the given name.
...
...
lib/cocoapods/sandbox.rb
View file @
62aecc4e
...
...
@@ -67,7 +67,7 @@ module Pod
@predownloaded_pods
=
[]
@head_pods
=
[]
@checkout_sources
=
{}
@
local
_pods
=
{}
@
development
_pods
=
{}
FileUtils
.
mkdir_p
(
@root
)
end
...
...
@@ -152,7 +152,7 @@ module Pod
def
pod_dir
(
name
)
root_name
=
Specification
.
root_name
(
name
)
if
local?
(
root_name
)
Pathname
.
new
(
local
_pods
[
root_name
])
Pathname
.
new
(
development
_pods
[
root_name
])
else
# root + "Sources/#{name}"
root
+
root_name
...
...
@@ -342,7 +342,7 @@ module Pod
#
def
store_local_path
(
name
,
path
)
root_name
=
Specification
.
root_name
(
name
)
local
_pods
[
root_name
]
=
path
.
to_s
development
_pods
[
root_name
]
=
path
.
to_s
end
# @return [Hash{String=>String}] The path of the Pods with a local source
...
...
@@ -350,7 +350,7 @@ module Pod
#
# @todo Rename (e.g. `pods_with_local_path`)
#
attr_reader
:
local
_pods
attr_reader
:
development
_pods
# Checks if a Pod is locally sourced?
#
...
...
@@ -361,7 +361,7 @@ module Pod
#
def
local?
(
name
)
root_name
=
Specification
.
root_name
(
name
)
!
local
_pods
[
root_name
].
nil?
!
development
_pods
[
root_name
].
nil?
end
#-------------------------------------------------------------------------#
...
...
cocoapods-integration-specs
@
d989cb15
Subproject commit
bcc200c3fee14a7506e9c865fe3b6912a955aa94
Subproject commit
d989cb15e2426eeeaf5d1e4b7e9a0ea179f09906
spec/unit/external_sources_spec.rb
View file @
62aecc4e
...
...
@@ -234,7 +234,7 @@ module Pod
it
"marks the Pod as local in the sandbox"
do
@external_source
.
fetch
(
config
.
sandbox
)
config
.
sandbox
.
local
_pods
.
should
==
{
config
.
sandbox
.
development
_pods
.
should
==
{
"Reachability"
=>
fixture
(
'integration/Reachability'
).
to_s
}
end
...
...
spec/unit/project_spec.rb
View file @
62aecc4e
...
...
@@ -19,8 +19,8 @@ module Pod
@project
.
pods
.
name
.
should
==
'Pods'
end
it
"creates the
Local
Pods group on initialization"
do
@project
.
local_pods
.
name
.
should
==
'Local
Pods'
it
"creates the
development
Pods group on initialization"
do
@project
.
development_pods
.
name
.
should
==
'Development
Pods'
end
end
...
...
@@ -38,10 +38,10 @@ module Pod
group
.
name
.
should
==
'BananaLib'
end
it
"adds the group for a
Local
Pod"
do
it
"adds the group for a
development
Pod"
do
path
=
config
.
sandbox
.
pod_dir
(
'BananaLib'
)
group
=
@project
.
add_pod_group
(
'BananaLib'
,
path
,
true
)
group
.
parent
.
should
==
@project
.
local
_pods
group
.
parent
.
should
==
@project
.
development
_pods
group
.
name
.
should
==
'BananaLib'
end
...
...
@@ -77,7 +77,7 @@ module Pod
it
"doesn't alters the original groups"
do
@project
.
pods
.
children
.
map
(
&
:name
).
sort
.
should
==
[
"BananaLib"
]
@project
.
local
_pods
.
children
.
map
(
&
:name
).
sort
.
should
==
[
"OrangeLib"
]
@project
.
development
_pods
.
children
.
map
(
&
:name
).
sort
.
should
==
[
"OrangeLib"
]
end
end
...
...
spec/unit/sandbox_spec.rb
View file @
62aecc4e
...
...
@@ -172,12 +172,12 @@ module Pod
it
"stores the local path of a Pod"
do
@sandbox
.
store_local_path
(
'BananaLib/Subspec'
,
Pathname
.
new
(
'Some Path'
))
@sandbox
.
local
_pods
[
'BananaLib'
].
should
==
'Some Path'
@sandbox
.
development
_pods
[
'BananaLib'
].
should
==
'Some Path'
end
it
"returns the path of the local pods grouped by name"
do
@sandbox
.
store_local_path
(
'BananaLib'
,
'Some Path'
)
@sandbox
.
local
_pods
.
should
==
{
'BananaLib'
=>
'Some Path'
}
@sandbox
.
development
_pods
.
should
==
{
'BananaLib'
=>
'Some Path'
}
end
it
"returns whether a Pod is local"
do
...
...
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