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
80569fde
Commit
80569fde
authored
Mar 30, 2014
by
Samuel Ford
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix #1042 - keep absolute paths for local pods as is
parent
42560625
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
5 deletions
+29
-5
CHANGELOG.md
CHANGELOG.md
+3
-0
external_sources.rb
lib/cocoapods/external_sources.rb
+7
-2
installer.rb
lib/cocoapods/installer.rb
+3
-2
sandbox.rb
lib/cocoapods/sandbox.rb
+16
-1
No files found.
CHANGELOG.md
View file @
80569fde
...
@@ -76,6 +76,9 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
...
@@ -76,6 +76,9 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
[
#1840
](
https://github.com/CocoaPods/CocoaPods/issues/1840
)
[
#1840
](
https://github.com/CocoaPods/CocoaPods/issues/1840
)
[
Core#71
](
https://github.com/CocoaPods/Core/pull/71
)
[
Core#71
](
https://github.com/CocoaPods/Core/pull/71
)
*
Fix to keep absolute paths specified for local pods as is.
[
Samuel Ford
](
https://github.com/samuelwford
)
[
#1042
](
https://github.com/CocoaPods/CocoaPods/issues/1042
)
## 0.30.0
## 0.30.0
[
CocoaPods
](
https://github.com/CocoaPods/CocoaPods/compare/0.29.0...0.30.0
)
[
CocoaPods
](
https://github.com/CocoaPods/CocoaPods/compare/0.29.0...0.30.0
)
...
...
lib/cocoapods/external_sources.rb
View file @
80569fde
...
@@ -352,7 +352,7 @@ module Pod
...
@@ -352,7 +352,7 @@ 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
)
sandbox
.
store_local_path
(
name
,
podspec
.
dirname
,
Pathname
.
new
(
declared_path
).
absolute?
)
end
end
end
end
...
@@ -368,10 +368,15 @@ module Pod
...
@@ -368,10 +368,15 @@ module Pod
# @!group Helpers
# @!group Helpers
# @return [String] the path as declared in the podspec
#
def
declared_path
(
params
[
:path
]
||
params
[
:local
]).
to_s
end
# @return [Pathname] the path of the podspec.
# @return [Pathname] the path of the podspec.
#
#
def
podspec_path
def
podspec_path
declared_path
=
(
params
[
:path
]
||
params
[
:local
]).
to_s
path_with_ext
=
File
.
extname
(
declared_path
)
==
'.podspec'
?
declared_path
:
"
#{
declared_path
}
/
#{
name
}
.podspec"
path_with_ext
=
File
.
extname
(
declared_path
)
==
'.podspec'
?
declared_path
:
"
#{
declared_path
}
/
#{
name
}
.podspec"
podfile_dir
=
File
.
dirname
(
podfile_path
||
''
)
podfile_dir
=
File
.
dirname
(
podfile_path
||
''
)
absolute_path
=
File
.
expand_path
(
path_with_ext
,
podfile_dir
)
absolute_path
=
File
.
expand_path
(
path_with_ext
,
podfile_dir
)
...
...
lib/cocoapods/installer.rb
View file @
80569fde
...
@@ -295,9 +295,10 @@ module Pod
...
@@ -295,9 +295,10 @@ module Pod
pod_names
=
pod_targets
.
map
(
&
:pod_name
).
uniq
pod_names
=
pod_targets
.
map
(
&
:pod_name
).
uniq
pod_names
.
each
do
|
pod_name
|
pod_names
.
each
do
|
pod_name
|
path
=
sandbox
.
pod_dir
(
pod_name
)
local
=
sandbox
.
local?
(
pod_name
)
local
=
sandbox
.
local?
(
pod_name
)
@pods_project
.
add_pod_group
(
pod_name
,
path
,
local
)
path
=
sandbox
.
pod_dir
(
pod_name
)
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 @
80569fde
...
@@ -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
...
@@ -159,6 +160,16 @@ module Pod
...
@@ -159,6 +160,16 @@ module Pod
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
...
...
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