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
b263097e
Commit
b263097e
authored
May 15, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Documentation] Adapted for Specification refactoring.
parent
59a035f3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
15 deletions
+21
-15
documentation.rb
lib/cocoapods/generator/documentation.rb
+3
-6
installer.rb
lib/cocoapods/installer.rb
+3
-2
local_pod.rb
lib/cocoapods/local_pod.rb
+15
-7
No files found.
lib/cocoapods/generator/documentation.rb
View file @
b263097e
...
@@ -42,13 +42,11 @@ module Pod
...
@@ -42,13 +42,11 @@ module Pod
end
end
def
files
def
files
@pod
.
source_files
(
false
)
.
map
(
&
:to_s
)
@pod
.
all_specs_source_files
.
map
(
&
:to_s
)
end
end
def
index_file
def
index_file
@pod
.
chdir
do
@pod
.
readme_file
Dir
.
glob
(
'README*'
,
File
::
FNM_CASEFOLD
).
first
end
end
end
def
spec_appledoc_options
def
spec_appledoc_options
...
@@ -66,8 +64,7 @@ module Pod
...
@@ -66,8 +64,7 @@ module Pod
'--keep-undocumented-objects'
,
'--keep-undocumented-objects'
,
'--keep-undocumented-members'
,
'--keep-undocumented-members'
,
'--keep-intermediate-files'
,
'--keep-intermediate-files'
,
'--exit-threshold'
,
'2'
'--exit-threshold'
,
'2'
# appledoc terminates with an exits status of 1 if a warning was logged
# appledoc exits with 1 if a warning was logged
]
]
index
=
index_file
index
=
index_file
options
+=
[
'--index-desc'
,
index
]
if
index
options
+=
[
'--index-desc'
,
index
]
if
index
...
...
lib/cocoapods/installer.rb
View file @
b263097e
...
@@ -55,7 +55,8 @@ module Pod
...
@@ -55,7 +55,8 @@ module Pod
unless
pod
.
exists?
unless
pod
.
exists?
downloader
=
Downloader
.
for_pod
(
pod
)
downloader
=
Downloader
.
for_pod
(
pod
)
downloader
.
download
downloader
.
download
# The docs need to be generated before cleaning
# The docs need to be generated before cleaning because
# the documentation is created for all the subspecs.
generate_docs
(
pod
)
generate_docs
(
pod
)
pod
.
clean
if
config
.
clean
pod
.
clean
if
config
.
clean
end
end
...
@@ -69,7 +70,7 @@ module Pod
...
@@ -69,7 +70,7 @@ module Pod
puts
"-> Installing documentation"
if
config
.
verbose?
puts
"-> Installing documentation"
if
config
.
verbose?
doc_generator
.
generate
(
config
.
doc_install?
)
doc_generator
.
generate
(
config
.
doc_install?
)
else
else
puts
"-> Using existing documentation"
puts
"-> Using existing documentation"
if
config
.
verbose?
end
end
end
end
...
...
lib/cocoapods/local_pod.rb
View file @
b263097e
...
@@ -102,15 +102,17 @@ module Pod
...
@@ -102,15 +102,17 @@ module Pod
end
end
def
readme_file
def
readme_file
expanded_paths
(
%w[
README* readme*
]
).
first
expanded_paths
(
%w[
README{*,.*} readme{*,.*}
]
).
first
end
end
def
license_file
def
license_file
expanded_paths
(
%w[ LICENSE* licence* ]
).
first
file
=
top_specification
.
license
[
:file
]
if
top_specification
.
license
file
||
expanded_paths
(
%w[ LICENSE{*,.*} licence{*,.*} ]
).
first
end
end
# TODO: implement case insensitive search
def
preserve_paths
def
preserve_paths
chained_expanded_paths
(
:preserve_paths
)
+
expanded_paths
(
%w[ *.podspec notice* NOTICE* ]
)
chained_expanded_paths
(
:preserve_paths
)
+
expanded_paths
(
%w[ *.podspec notice* NOTICE*
CREDITS*
]
)
end
end
def
header_files
def
header_files
...
@@ -121,6 +123,16 @@ module Pod
...
@@ -121,6 +123,16 @@ module Pod
specifications
.
map
{
|
s
|
s
.
xcconfig
}.
reduce
(
:merge
)
specifications
.
map
{
|
s
|
s
.
xcconfig
}.
reduce
(
:merge
)
end
end
# Method used by documentation generator. It return the source files
# of all the specs.
def
all_specs_source_files
specs
=
top_specification
.
recursive_subspecs
<<
top_specification
files
=
specs
.
map
{
|
s
|
expanded_paths
(
s
.
source_files
,
:glob
=>
'*.{h,m,mm,c,cpp}'
)
}.
compact
.
flatten
.
uniq
puts
files
.
join
(
"
\n
"
).
reversed
files
end
# Integration methods
# Integration methods
def
link_headers
def
link_headers
...
@@ -141,10 +153,6 @@ module Pod
...
@@ -141,10 +153,6 @@ module Pod
top_specification
.
requires_arc
top_specification
.
requires_arc
end
end
# def dependencies
# top_specification.dependencies
# end
private
private
def
implementation_files
def
implementation_files
...
...
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