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
acc85d87
Commit
acc85d87
authored
Feb 02, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Sandbox] Added #relativize_paths.
parent
bd2297c1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
sandbox.rb
lib/cocoapods/sandbox.rb
+8
-0
sandbox_spec.rb
spec/unit/sandbox_spec.rb
+5
-0
No files found.
lib/cocoapods/sandbox.rb
View file @
acc85d87
...
@@ -103,6 +103,14 @@ module Pod
...
@@ -103,6 +103,14 @@ module Pod
result
result
end
end
# Converts a list of paths to their relative variant.
#
# @return [Array<Pathname>] the relative paths.
#
def
relativize_paths
(
paths
)
paths
.
map
{
|
path
|
relativize
(
path
)
}
end
# @return [String] a string representation suitable for debugging.
# @return [String] a string representation suitable for debugging.
#
#
def
inspect
def
inspect
...
...
spec/unit/sandbox_spec.rb
View file @
acc85d87
...
@@ -51,6 +51,11 @@ module Pod
...
@@ -51,6 +51,11 @@ module Pod
@sandbox
.
relativize
(
path
).
should
==
expected
@sandbox
.
relativize
(
path
).
should
==
expected
end
end
it
"converts a list of paths to the relative paths respec to the sandbox"
do
paths
=
[
temporary_directory
+
'Sandbox/file_1'
,
temporary_directory
+
'Sandbox/file_2'
]
@sandbox
.
relativize_paths
(
paths
).
should
==
[
Pathname
.
new
(
'file_1'
),
Pathname
.
new
(
'file_2'
)]
end
#--------------------------------------#
#--------------------------------------#
it
"returns the path of the manifest"
do
it
"returns the path of the manifest"
do
...
...
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