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
cc2fc7e1
Commit
cc2fc7e1
authored
Apr 15, 2014
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ExternalSources::PathSource] Fix relative path detection
Closes
https://github.com/CocoaPods/CocoaPods/issues/2050
parent
583d5448
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
1 deletion
+22
-1
path_source.rb
lib/cocoapods/external_sources/path_source.rb
+1
-1
sandbox.rb
lib/cocoapods/sandbox.rb
+0
-0
path_source_spec.rb
spec/unit/external_sources/path_source_spec.rb
+21
-0
No files found.
lib/cocoapods/external_sources/path_source.rb
View file @
cc2fc7e1
...
...
@@ -19,7 +19,7 @@ module Pod
"`
#{
declared_path
}
`"
end
store_podspec
(
sandbox
,
podspec
)
is_absolute
=
absolute?
(
podspec
)
is_absolute
=
absolute?
(
declared_path
)
sandbox
.
store_local_path
(
name
,
podspec
.
dirname
,
is_absolute
)
end
end
...
...
lib/cocoapods/sandbox.rb
View file @
cc2fc7e1
spec/unit/external_sources/path_source_spec.rb
View file @
cc2fc7e1
...
...
@@ -42,6 +42,22 @@ module Pod
should
.
raise
Informative
do
@subject
.
fetch
(
config
.
sandbox
)
end
.
message
.
should
.
match
/No podspec found for `Reachability` in `
#{
temporary_directory
}
`/
it
"marks a pod as relative"
do
@subject
.
stubs
(
:params
).
returns
(
:path
=>
'./Reachability'
)
Pathname
.
any_instance
.
stubs
(
:exist?
).
returns
(
true
)
config
.
sandbox
.
stubs
(
:store_podspec
)
@subject
.
fetch
(
config
.
sandbox
)
config
.
sandbox
.
local_path_was_absolute?
(
'Reachability'
).
should
.
be
.
false
end
it
"marks a pod as absolute"
do
@subject
.
stubs
(
:params
).
returns
(
:path
=>
'/path/Reachability'
)
Pathname
.
any_instance
.
stubs
(
:exist?
).
returns
(
true
)
config
.
sandbox
.
stubs
(
:store_podspec
)
@subject
.
fetch
(
config
.
sandbox
)
config
.
sandbox
.
local_path_was_absolute?
(
'Reachability'
).
should
.
be
.
true
end
end
describe
"#podspec_path"
do
...
...
@@ -79,6 +95,11 @@ module Pod
result
.
should
.
be
.
false
end
it
"consider relative paths not explicitly set from the current dir"
do
result
=
@subject
.
send
(
:absolute?
,
'./ThirdPartyCode/UrbanAirship'
)
result
.
should
.
be
.
false
end
it
'returns that a path is absolute'
do
result
=
@subject
.
send
(
:absolute?
,
'/path/to/UrbanAirship'
)
result
.
should
.
be
.
true
...
...
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