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
3e7fc5f1
Commit
3e7fc5f1
authored
Mar 18, 2012
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MRI 1.9.3 does not convert Pathname to String in Open3.popen.
parent
34b12c12
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
docs_generator.rb
lib/cocoapods/docs_generator.rb
+5
-3
docs_generator_spec.rb
spec/unit/docs_generator_spec.rb
+8
-5
No files found.
lib/cocoapods/docs_generator.rb
View file @
3e7fc5f1
...
@@ -74,7 +74,7 @@ module Pod
...
@@ -74,7 +74,7 @@ module Pod
def
generate
(
install
=
false
)
def
generate
(
install
=
false
)
options
=
generate_appledoc_options
options
=
generate_appledoc_options
options
+=
[
'--output'
,
@target_path
]
options
+=
[
'--output'
,
@target_path
.
to_s
]
options
+=
[
'--keep-intermediate-files'
]
options
+=
[
'--keep-intermediate-files'
]
options
+=
install
?
[
'-create-docset'
]
:
[
'--no-create-docset'
]
options
+=
install
?
[
'-create-docset'
]
:
[
'--no-create-docset'
]
@target_path
.
mkpath
@target_path
.
mkpath
...
@@ -83,7 +83,7 @@ module Pod
...
@@ -83,7 +83,7 @@ module Pod
end
end
end
end
def
appledoc
(
options
)
def
appledoc
(
options
)
unless
self
.
class
.
appledoc_installed?
unless
self
.
class
.
appledoc_installed?
puts
"
\n
[!] Skipping documentation generation because appledoc can't be found."
unless
config
.
silent?
puts
"
\n
[!] Skipping documentation generation because appledoc can't be found."
unless
config
.
silent?
return
return
...
@@ -91,7 +91,9 @@ module Pod
...
@@ -91,7 +91,9 @@ module Pod
arguments
=
[]
arguments
=
[]
arguments
+=
options
arguments
+=
options
arguments
+=
[
'--print-settings'
]
if
config
.
verbose?
arguments
+=
[
'--print-settings'
]
if
config
.
verbose?
arguments
+=
files
arguments
+=
files
.
map
(
&
:to_s
)
#p arguments
puts
"appledoc
#{
arguments
.
join
(
"' '"
)
}
"
Open3
.
popen3
(
'appledoc'
,
*
arguments
)
do
|
i
,
o
,
e
|
Open3
.
popen3
(
'appledoc'
,
*
arguments
)
do
|
i
,
o
,
e
|
if
config
.
verbose?
if
config
.
verbose?
puts
o
.
read
.
chomp
puts
o
.
read
.
chomp
...
...
spec/unit/docs_generator_spec.rb
View file @
3e7fc5f1
...
@@ -7,11 +7,6 @@ describe Pod::DocsGenerator do
...
@@ -7,11 +7,6 @@ describe Pod::DocsGenerator do
@pod
=
Pod
::
LocalPod
.
new
(
fixture_spec
(
'banana-lib/BananaLib.podspec'
),
@sandbox
)
@pod
=
Pod
::
LocalPod
.
new
(
fixture_spec
(
'banana-lib/BananaLib.podspec'
),
@sandbox
)
copy_fixture_to_pod
(
'banana-lib'
,
@pod
)
copy_fixture_to_pod
(
'banana-lib'
,
@pod
)
@doc_installer
=
Pod
::
DocsGenerator
.
new
(
@pod
)
@doc_installer
=
Pod
::
DocsGenerator
.
new
(
@pod
)
@doc_installer
.
generate
end
after
do
@sandbox
.
implode
end
end
it
'returns reads correctly the Pod documentation'
do
it
'returns reads correctly the Pod documentation'
do
...
@@ -50,6 +45,14 @@ describe Pod::DocsGenerator do
...
@@ -50,6 +45,14 @@ describe Pod::DocsGenerator do
end
end
if
Pod
::
DocsGenerator
.
appledoc_installed?
if
Pod
::
DocsGenerator
.
appledoc_installed?
before
do
@doc_installer
.
generate
end
after
do
@sandbox
.
implode
end
it
'creates the html'
do
it
'creates the html'
do
File
.
directory?
(
@sandbox
.
root
+
"Documentation/BananaLib/html"
).
should
.
be
.
true
File
.
directory?
(
@sandbox
.
root
+
"Documentation/BananaLib/html"
).
should
.
be
.
true
index
=
(
@sandbox
.
root
+
'Documentation/BananaLib/html/index.html'
).
read
index
=
(
@sandbox
.
root
+
'Documentation/BananaLib/html/index.html'
).
read
...
...
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