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
end
def
files
@pod
.
source_files
(
false
)
.
map
(
&
:to_s
)
@pod
.
all_specs_source_files
.
map
(
&
:to_s
)
end
def
index_file
@pod
.
chdir
do
Dir
.
glob
(
'README*'
,
File
::
FNM_CASEFOLD
).
first
end
@pod
.
readme_file
end
def
spec_appledoc_options
...
...
@@ -66,8 +64,7 @@ module Pod
'--keep-undocumented-objects'
,
'--keep-undocumented-members'
,
'--keep-intermediate-files'
,
'--exit-threshold'
,
'2'
# appledoc exits with 1 if a warning was logged
'--exit-threshold'
,
'2'
# appledoc terminates with an exits status of 1 if a warning was logged
]
index
=
index_file
options
+=
[
'--index-desc'
,
index
]
if
index
...
...
lib/cocoapods/installer.rb
View file @
b263097e
...
...
@@ -55,7 +55,8 @@ module Pod
unless
pod
.
exists?
downloader
=
Downloader
.
for_pod
(
pod
)
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
)
pod
.
clean
if
config
.
clean
end
...
...
@@ -69,7 +70,7 @@ module Pod
puts
"-> Installing documentation"
if
config
.
verbose?
doc_generator
.
generate
(
config
.
doc_install?
)
else
puts
"-> Using existing documentation"
puts
"-> Using existing documentation"
if
config
.
verbose?
end
end
...
...
lib/cocoapods/local_pod.rb
View file @
b263097e
...
...
@@ -102,15 +102,17 @@ module Pod
end
def
readme_file
expanded_paths
(
%w[
README* readme*
]
).
first
expanded_paths
(
%w[
README{*,.*} readme{*,.*}
]
).
first
end
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
# TODO: implement case insensitive search
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
def
header_files
...
...
@@ -121,6 +123,16 @@ module Pod
specifications
.
map
{
|
s
|
s
.
xcconfig
}.
reduce
(
:merge
)
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
def
link_headers
...
...
@@ -141,10 +153,6 @@ module Pod
top_specification
.
requires_arc
end
# def dependencies
# top_specification.dependencies
# end
private
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