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
a5d6e9af
Commit
a5d6e9af
authored
Apr 21, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed trailing white spaces
parent
5981e6ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
21 deletions
+21
-21
local_pod.rb
lib/cocoapods/local_pod.rb
+21
-21
No files found.
lib/cocoapods/local_pod.rb
View file @
a5d6e9af
...
@@ -3,19 +3,19 @@ module Pod
...
@@ -3,19 +3,19 @@ module Pod
attr_reader
:specification
attr_reader
:specification
attr_reader
:sandbox
attr_reader
:sandbox
attr_reader
:platform
attr_reader
:platform
def
initialize
(
specification
,
sandbox
,
platform
)
def
initialize
(
specification
,
sandbox
,
platform
)
@specification
,
@sandbox
,
@platform
=
specification
,
sandbox
,
platform
@specification
,
@sandbox
,
@platform
=
specification
,
sandbox
,
platform
end
end
def
self
.
from_podspec
(
podspec
,
sandbox
,
platform
)
def
self
.
from_podspec
(
podspec
,
sandbox
,
platform
)
new
(
Specification
.
from_file
(
podspec
),
sandbox
,
platform
)
new
(
Specification
.
from_file
(
podspec
),
sandbox
,
platform
)
end
end
def
root
def
root
@sandbox
.
root
+
specification
.
name
@sandbox
.
root
+
specification
.
name
end
end
def
to_s
def
to_s
if
specification
.
local?
if
specification
.
local?
"
#{
specification
}
[LOCAL]"
"
#{
specification
}
[LOCAL]"
...
@@ -23,28 +23,28 @@ module Pod
...
@@ -23,28 +23,28 @@ module Pod
specification
.
to_s
specification
.
to_s
end
end
end
end
def
name
def
name
specification
.
name
specification
.
name
end
end
def
create
def
create
root
.
mkpath
unless
exists?
root
.
mkpath
unless
exists?
end
end
def
exists?
def
exists?
root
.
exist?
root
.
exist?
end
end
def
chdir
(
&
block
)
def
chdir
(
&
block
)
create
create
Dir
.
chdir
(
root
,
&
block
)
Dir
.
chdir
(
root
,
&
block
)
end
end
def
implode
def
implode
root
.
rmtree
if
exists?
root
.
rmtree
if
exists?
end
end
def
clean
def
clean
clean_paths
.
each
{
|
path
|
FileUtils
.
rm_rf
(
path
)
}
clean_paths
.
each
{
|
path
|
FileUtils
.
rm_rf
(
path
)
}
end
end
...
@@ -54,19 +54,19 @@ module Pod
...
@@ -54,19 +54,19 @@ module Pod
@sandbox
.
root
+
specification
.
name
+
prefix_header
@sandbox
.
root
+
specification
.
name
+
prefix_header
end
end
end
end
def
source_files
def
source_files
expanded_paths
(
specification
.
source_files
,
:glob
=>
'*.{h,m,mm,c,cpp}'
,
:relative_to_sandbox
=>
true
)
expanded_paths
(
specification
.
source_files
,
:glob
=>
'*.{h,m,mm,c,cpp}'
,
:relative_to_sandbox
=>
true
)
end
end
def
absolute_source_files
def
absolute_source_files
expanded_paths
(
specification
.
source_files
,
:glob
=>
'*.{h,m,mm,c,cpp}'
)
expanded_paths
(
specification
.
source_files
,
:glob
=>
'*.{h,m,mm,c,cpp}'
)
end
end
def
clean_paths
def
clean_paths
expanded_paths
(
specification
.
clean_paths
)
expanded_paths
(
specification
.
clean_paths
)
end
end
def
resources
def
resources
expanded_paths
(
specification
.
resources
,
:relative_to_sandbox
=>
true
)
expanded_paths
(
specification
.
resources
,
:relative_to_sandbox
=>
true
)
end
end
...
@@ -74,19 +74,19 @@ module Pod
...
@@ -74,19 +74,19 @@ module Pod
def
header_files
def
header_files
source_files
.
select
{
|
f
|
f
.
extname
==
'.h'
}
source_files
.
select
{
|
f
|
f
.
extname
==
'.h'
}
end
end
def
link_headers
def
link_headers
copy_header_mappings
.
each
do
|
namespaced_path
,
files
|
copy_header_mappings
.
each
do
|
namespaced_path
,
files
|
@sandbox
.
add_header_files
(
namespaced_path
,
files
)
@sandbox
.
add_header_files
(
namespaced_path
,
files
)
end
end
end
end
def
add_to_target
(
target
)
def
add_to_target
(
target
)
implementation_files
.
each
do
|
file
|
implementation_files
.
each
do
|
file
|
target
.
add_source_file
(
file
,
nil
,
specification
.
compiler_flags
[
@platform
.
name
].
strip
)
target
.
add_source_file
(
file
,
nil
,
specification
.
compiler_flags
[
@platform
.
name
].
strip
)
end
end
end
end
def
requires_arc?
def
requires_arc?
specification
.
requires_arc
specification
.
requires_arc
end
end
...
@@ -94,13 +94,13 @@ module Pod
...
@@ -94,13 +94,13 @@ module Pod
def
dependencies
def
dependencies
specification
.
dependencies
[
@platform
.
name
]
specification
.
dependencies
[
@platform
.
name
]
end
end
private
private
def
implementation_files
def
implementation_files
source_files
.
select
{
|
f
|
f
.
extname
!=
'.h'
}
source_files
.
select
{
|
f
|
f
.
extname
!=
'.h'
}
end
end
def
relative_root
def
relative_root
root
.
relative_path_from
(
@sandbox
.
root
)
root
.
relative_path_from
(
@sandbox
.
root
)
end
end
...
@@ -115,7 +115,7 @@ module Pod
...
@@ -115,7 +115,7 @@ module Pod
mappings
mappings
end
end
end
end
def
expanded_paths
(
platforms_with_patterns
,
options
=
{})
def
expanded_paths
(
platforms_with_patterns
,
options
=
{})
patterns
=
platforms_with_patterns
.
is_a?
(
Hash
)
?
platforms_with_patterns
[
@platform
.
name
]
:
platforms_with_patterns
patterns
=
platforms_with_patterns
.
is_a?
(
Hash
)
?
platforms_with_patterns
[
@platform
.
name
]
:
platforms_with_patterns
patterns
.
map
do
|
pattern
|
patterns
.
map
do
|
pattern
|
...
...
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