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
6e40410f
Commit
6e40410f
authored
Apr 04, 2014
by
Samuel Ford
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
preserve local pod paths specified as absolute or rooted to home
parent
d92c6880
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
5 deletions
+22
-5
external_sources.rb
lib/cocoapods/external_sources.rb
+2
-1
installer.rb
lib/cocoapods/installer.rb
+2
-1
sandbox.rb
lib/cocoapods/sandbox.rb
+17
-2
installer_spec.rb
spec/unit/installer_spec.rb
+1
-1
No files found.
lib/cocoapods/external_sources.rb
View file @
6e40410f
...
@@ -352,7 +352,8 @@ module Pod
...
@@ -352,7 +352,8 @@ module Pod
UI
.
titled_section
(
"Fetching podspec for `
#{
name
}
`
#{
description
}
"
,
{
:verbose_prefix
=>
"-> "
})
do
UI
.
titled_section
(
"Fetching podspec for `
#{
name
}
`
#{
description
}
"
,
{
:verbose_prefix
=>
"-> "
})
do
podspec
=
podspec_path
podspec
=
podspec_path
store_podspec
(
sandbox
,
podspec
)
store_podspec
(
sandbox
,
podspec
)
sandbox
.
store_local_path
(
name
,
podspec
.
dirname
)
path_is_absolute_or_rooted_to_home
=
declared_path
.
absolute?
||
declared_path
.
to_s
.
start_with?
(
'~'
)
sandbox
.
store_local_path
(
name
,
podspec
.
dirname
,
path_is_absolute_or_rooted_to_home
)
end
end
end
end
...
...
lib/cocoapods/installer.rb
View file @
6e40410f
...
@@ -297,7 +297,8 @@ module Pod
...
@@ -297,7 +297,8 @@ module Pod
pod_names
.
each
do
|
pod_name
|
pod_names
.
each
do
|
pod_name
|
local
=
sandbox
.
local?
(
pod_name
)
local
=
sandbox
.
local?
(
pod_name
)
path
=
sandbox
.
pod_dir
(
pod_name
)
path
=
sandbox
.
pod_dir
(
pod_name
)
@pods_project
.
add_pod_group
(
pod_name
,
path
,
local
,
local
)
was_absolute
=
sandbox
.
local_path_was_absolute?
(
pod_name
)
@pods_project
.
add_pod_group
(
pod_name
,
path
,
local
,
was_absolute
)
end
end
if
config
.
podfile_path
if
config
.
podfile_path
...
...
lib/cocoapods/sandbox.rb
View file @
6e40410f
...
@@ -69,6 +69,7 @@ module Pod
...
@@ -69,6 +69,7 @@ module Pod
@head_pods
=
[]
@head_pods
=
[]
@checkout_sources
=
{}
@checkout_sources
=
{}
@development_pods
=
{}
@development_pods
=
{}
@development_pods_were_absolute
=
{}
end
end
# @return [Lockfile] the manifest which contains the information about the
# @return [Lockfile] the manifest which contains the information about the
...
@@ -158,7 +159,17 @@ module Pod
...
@@ -158,7 +159,17 @@ module Pod
root
+
root_name
root
+
root_name
end
end
end
end
# Returns true if the path as originally specified was absolute.
#
# @param [String] name
#
# @return [Bool] true if originally absolute
#
def
local_path_was_absolute?
(
name
)
@development_pods_were_absolute
[
name
]
end
# @return [Pathname] the directory where to store the documentation.
# @return [Pathname] the directory where to store the documentation.
#
#
def
documentation_dir
def
documentation_dir
...
@@ -338,11 +349,15 @@ module Pod
...
@@ -338,11 +349,15 @@ module Pod
# @param [#to_s] path
# @param [#to_s] path
# The local path where the Pod is stored.
# The local path where the Pod is stored.
#
#
# @param [Bool] was_absolute
# True if the specified local path was absolute.
#
# @return [void]
# @return [void]
#
#
def
store_local_path
(
name
,
path
)
def
store_local_path
(
name
,
path
,
was_absolute
=
false
)
root_name
=
Specification
.
root_name
(
name
)
root_name
=
Specification
.
root_name
(
name
)
development_pods
[
root_name
]
=
path
.
to_s
development_pods
[
root_name
]
=
path
.
to_s
@development_pods_were_absolute
[
root_name
]
=
was_absolute
end
end
# @return [Hash{String=>String}] The path of the Pods with a local source
# @return [Hash{String=>String}] The path of the Pods with a local source
...
...
spec/unit/installer_spec.rb
View file @
6e40410f
...
@@ -257,7 +257,7 @@ module Pod
...
@@ -257,7 +257,7 @@ module Pod
@installer
.
pods_project
.
class
.
should
==
Pod
::
Project
@installer
.
pods_project
.
class
.
should
==
Pod
::
Project
end
end
it
"
sets the path of the Pod group to an absolute path if local
"
do
it
"
preserves Pod paths specified as absolute or rooted to home
"
do
local_podfile
=
generate_local_podfile
local_podfile
=
generate_local_podfile
local_installer
=
Installer
.
new
(
config
.
sandbox
,
local_podfile
)
local_installer
=
Installer
.
new
(
config
.
sandbox
,
local_podfile
)
local_installer
.
send
(
:analyze
)
local_installer
.
send
(
:analyze
)
...
...
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