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
a6a9f9ed
Commit
a6a9f9ed
authored
Nov 16, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Sandbox] Use the realpath of the root.
Fixes pod lib lint Closes #1566
parent
f09bb136
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
4 deletions
+19
-4
CHANGELOG.md
CHANGELOG.md
+5
-0
sandbox.rb
lib/cocoapods/sandbox.rb
+2
-2
headers_store.rb
lib/cocoapods/sandbox/headers_store.rb
+3
-2
sandbox_spec.rb
spec/unit/sandbox_spec.rb
+9
-0
No files found.
CHANGELOG.md
View file @
a6a9f9ed
...
...
@@ -6,6 +6,11 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
###### Bug Fixes
*
Fixed a bug which resulted in
`pod lib lint`
not being able to find the
headers.
[
Fabio Pelosin
](
https://github.com/irrationalfab
)
[
#1566
](
https://github.com/CocoaPods/CocoaPods/issues/1566
)
*
Fixed the developer frameworks search paths so that
`$(SDKROOT)/Developer/Library/Frameworks`
is used for iOS and
`$(DEVELOPER_LIBRARY_DIR)/Frameworks`
is used for OS X
...
...
lib/cocoapods/sandbox.rb
View file @
a6a9f9ed
...
...
@@ -62,13 +62,13 @@ module Pod
# @param [String, Pathname] root @see root
#
def
initialize
(
root
)
@root
=
Pathname
.
new
(
root
)
FileUtils
.
mkdir_p
(
root
)
@root
=
Pathname
.
new
(
root
).
realpath
@public_headers
=
HeadersStore
.
new
(
self
,
"Headers"
)
@predownloaded_pods
=
[]
@head_pods
=
[]
@checkout_sources
=
{}
@development_pods
=
{}
FileUtils
.
mkdir_p
(
@root
)
end
# @return [Lockfile] the manifest which contains the information about the
...
...
lib/cocoapods/sandbox/headers_store.rb
View file @
a6a9f9ed
...
...
@@ -9,7 +9,7 @@ module Pod
# @return [Pathname] the absolute path of this header directory.
#
def
root
@sandbox
.
root
+
@relative_path
@
root
||=
@
sandbox
.
root
+
@relative_path
end
# @return [Sandbox] the sandbox where this header directory is stored.
...
...
@@ -70,7 +70,8 @@ module Pod
namespaced_path
.
mkpath
unless
File
.
exist?
(
namespaced_path
)
relative_header_paths
.
map
do
|
relative_header_path
|
source
=
(
@sandbox
.
root
+
relative_header_path
).
relative_path_from
(
namespaced_path
)
absolute_source
=
(
@sandbox
.
root
+
relative_header_path
)
source
=
absolute_source
.
relative_path_from
(
namespaced_path
)
Dir
.
chdir
(
namespaced_path
)
do
FileUtils
.
ln_sf
(
source
,
relative_header_path
.
basename
)
end
...
...
spec/unit/sandbox_spec.rb
View file @
a6a9f9ed
...
...
@@ -11,6 +11,15 @@ module Pod
describe
"In general"
do
it
"reads the real path of the root so it can be used to build relative paths"
do
root_realpath
=
temporary_directory
+
'Folder/SubFolder'
FileUtils
.
mkdir_p
(
root_realpath
)
symlink
=
temporary_directory
+
'symlink'
File
.
symlink
(
root_realpath
,
symlink
)
sandbox
=
Pod
::
Sandbox
.
new
(
symlink
+
'Sandbox'
)
sandbox
.
root
.
to_s
.
should
.
end_with
'Folder/SubFolder/Sandbox'
end
it
"automatically creates its root if it doesn't exist"
do
File
.
directory?
(
temporary_directory
+
'Sandbox'
).
should
.
be
.
true
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