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
9215defe
Commit
9215defe
authored
Jul 17, 2014
by
Kyle Fuller
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2277 from CocoaPods/path-podspec-cwd
[Sandbox] Evaluate podspecs from their original path
parents
c5c61f76
a8e5fb57
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
CHANGELOG.md
CHANGELOG.md
+6
-0
sandbox.rb
lib/cocoapods/sandbox.rb
+6
-1
sandbox_spec.rb
spec/unit/sandbox_spec.rb
+12
-0
No files found.
CHANGELOG.md
View file @
9215defe
...
@@ -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 @
9215defe
...
@@ -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,11 +254,15 @@ module Pod
...
@@ -253,11 +254,15 @@ module Pod
end
end
FileUtils
.
copy
(
podspec
,
output_path
)
FileUtils
.
copy
(
podspec
,
output_path
)
end
end
Dir
.
chdir
(
podspec
.
is_a?
(
Pathname
)
?
File
.
dirname
(
podspec
)
:
Dir
.
pwd
)
do
spec
=
Specification
.
from_file
(
output_path
)
spec
=
Specification
.
from_file
(
output_path
)
unless
spec
.
name
==
name
unless
spec
.
name
==
name
raise
Informative
,
"The name of the given podspec `
#{
spec
.
name
}
` doesn't match the expected one `
#{
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 @
9215defe
...
@@ -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