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
b86595a3
Commit
b86595a3
authored
May 03, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into git-cache
* master: [Installer] Don't generate documenation if already installed
parents
4fc9be47
fcc94b68
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
documentation.rb
lib/cocoapods/generator/documentation.rb
+4
-0
installer.rb
lib/cocoapods/installer.rb
+6
-1
integration_spec.rb
spec/integration_spec.rb
+2
-0
No files found.
lib/cocoapods/generator/documentation.rb
View file @
b86595a3
...
@@ -74,6 +74,10 @@ module Pod
...
@@ -74,6 +74,10 @@ module Pod
options
+=
spec_appledoc_options
options
+=
spec_appledoc_options
end
end
def
already_installed?
Pathname
.
new
(
File
.
expand_path
(
"~/Library/Developer/Shared/Documentation/DocSets/org.cocoapods.
#{
name
.
gsub
(
/ /
,
'-'
)
}
.docset"
)).
exist?
end
def
generate
(
install
=
false
)
def
generate
(
install
=
false
)
options
=
appledoc_options
options
=
appledoc_options
options
+=
[
'--output'
,
@target_path
.
to_s
]
options
+=
[
'--output'
,
@target_path
.
to_s
]
...
...
lib/cocoapods/installer.rb
View file @
b86595a3
...
@@ -60,8 +60,13 @@ module Pod
...
@@ -60,8 +60,13 @@ module Pod
end
end
if
(
should_install
&&
config
.
generate_docs?
)
||
config
.
force_doc?
if
(
should_install
&&
config
.
generate_docs?
)
||
config
.
force_doc?
doc_generator
=
Generator
::
Documentation
.
new
(
pod
)
if
doc_generator
.
already_installed?
puts
"Using Existing Documentation for
#{
pod
.
specification
}
"
.
green
if
config
.
verbose?
else
puts
"Installing Documentation for
#{
pod
.
specification
}
"
.
green
if
config
.
verbose?
puts
"Installing Documentation for
#{
pod
.
specification
}
"
.
green
if
config
.
verbose?
Generator
::
Documentation
.
new
(
pod
).
generate
(
config
.
doc_install?
)
doc_generator
.
generate
(
config
.
doc_install?
)
end
end
end
end
end
end
end
...
...
spec/integration_spec.rb
View file @
b86595a3
...
@@ -208,6 +208,8 @@ else
...
@@ -208,6 +208,8 @@ else
dependency
'SSToolkit'
dependency
'SSToolkit'
end
end
Pod
::
Generator
::
Documentation
.
any_instance
.
stubs
(
:already_installed?
).
returns
(
false
)
installer
=
SpecHelper
::
Installer
.
new
(
podfile
)
installer
=
SpecHelper
::
Installer
.
new
(
podfile
)
installer
.
install!
installer
.
install!
...
...
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