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
a8e5fb57
Commit
a8e5fb57
authored
Jun 27, 2014
by
Kyle Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Sandbox] Evaluate podspecs from their original path
Re
https://github.com/CocoaPods/pod-template/issues/50
parent
c5c61f76
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
4 deletions
+27
-4
CHANGELOG.md
CHANGELOG.md
+6
-0
sandbox.rb
lib/cocoapods/sandbox.rb
+9
-4
sandbox_spec.rb
spec/unit/sandbox_spec.rb
+12
-0
No files found.
CHANGELOG.md
View file @
a8e5fb57
...
@@ -13,6 +13,12 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
...
@@ -13,6 +13,12 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
[
Ash Furrow
](
ashfurrow]
[
Ash Furrow
](
ashfurrow]
[
#2136
](
https://github.com/CocoaPods/CocoaPods/issues/2136
)
[
#2136
](
https://github.com/CocoaPods/CocoaPods/issues/2136
)
*
Always evaluate podspecs from the original podspec directory. This fixes
issues when you are using relative paths inside ruby podspecs and using a
pod's via
`:path`
.
[
Kyle Fuller
](
kylef
)
[
pod-template#50
](
https://github.com/CocoaPods/pod-template/issues/50
)
## 0.33.1
## 0.33.1
...
...
lib/cocoapods/sandbox.rb
View file @
a8e5fb57
...
@@ -191,7 +191,8 @@ module Pod
...
@@ -191,7 +191,8 @@ module Pod
#
#
def
specification
(
name
)
def
specification
(
name
)
if
file
=
specification_path
(
name
)
if
file
=
specification_path
(
name
)
Specification
.
from_file
(
file
)
original_path
=
development_pods
[
name
]
Dir
.
chdir
(
original_path
||
Dir
.
pwd
)
{
Specification
.
from_file
(
file
)
}
end
end
end
end
...
@@ -253,9 +254,13 @@ module Pod
...
@@ -253,9 +254,13 @@ module Pod
end
end
FileUtils
.
copy
(
podspec
,
output_path
)
FileUtils
.
copy
(
podspec
,
output_path
)
end
end
spec
=
Specification
.
from_file
(
output_path
)
unless
spec
.
name
==
name
Dir
.
chdir
(
podspec
.
is_a?
(
Pathname
)
?
File
.
dirname
(
podspec
)
:
Dir
.
pwd
)
do
raise
Informative
,
"The name of the given podspec `
#{
spec
.
name
}
` doesn't match the expected one `
#{
name
}
`"
spec
=
Specification
.
from_file
(
output_path
)
unless
spec
.
name
==
name
raise
Informative
,
"The name of the given podspec `
#{
spec
.
name
}
` doesn't match the expected one `
#{
name
}
`"
end
end
end
end
end
...
...
spec/unit/sandbox_spec.rb
View file @
a8e5fb57
...
@@ -107,6 +107,18 @@ module Pod
...
@@ -107,6 +107,18 @@ module Pod
@sandbox
.
specification
(
'BananaLib'
).
name
.
should
==
'BananaLib'
@sandbox
.
specification
(
'BananaLib'
).
name
.
should
==
'BananaLib'
end
end
it
"loads the stored specification from the original path"
do
spec_file
=
fixture
(
'banana-lib/BananaLib.podspec'
)
spec
=
Specification
.
from_file
(
spec_file
)
Specification
.
expects
(
:from_file
).
with
do
Dir
.
pwd
==
fixture
(
'banana-lib'
).
to_s
end
.
twice
.
returns
(
spec
)
@sandbox
.
store_podspec
(
'BananaLib'
,
spec_file
)
@sandbox
.
store_local_path
(
'BananaLib'
,
fixture
(
'banana-lib'
))
@sandbox
.
specification
(
'BananaLib'
)
end
it
"returns the directory where to store the specifications"
do
it
"returns the directory where to store the specifications"
do
@sandbox
.
specifications_dir
.
should
==
temporary_directory
+
'Sandbox/Local Podspecs'
@sandbox
.
specifications_dir
.
should
==
temporary_directory
+
'Sandbox/Local Podspecs'
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