ruby / rdoc

RDoc produces HTML and online documentation for Ruby projects.
https://ruby.github.io/rdoc/
Other
833 stars 437 forks source link

While installing gem, Parsing Sources halts at specific file #350

Closed sigurdsvela closed 8 years ago

sigurdsvela commented 9 years ago

To reproduce the problem

git clone --recursive https://github.com/sigurdsvela/boot _boot; cd _boot; cd lib/templates; git submodule update; pwd; cd -; gem build boot.gemspec; sudo gem install boot-*;

If you don't wan't to run my untrusted code: Here's the partial of the output I get with the -V(verbose) flag

[...]
/Library/Ruby/Gems/2.0.0/gems/boot-0.1.0/lib/templates/gitignores/Sass.gitignore
/Library/Ruby/Gems/2.0.0/gems/boot-0.1.0/lib/templates/gitignores/Scala.gitignore
/Library/Ruby/Gems/2.0.0/gems/boot-0.1.0/lib/templates/gitignores/Scrivener.gitignore
/Library/Ruby/Gems/2.0.0/gems/boot-0.1.0/lib/templates/gitignores/Sdcc.gitignore
/Library/Ruby/Gems/2.0.0/gems/boot-0.1.0/lib/templates/gitignores/SeamGen.gitignore
/Library/Ruby/Gems/2.0.0/gems/boot-0.1.0/lib/templates/gitignores/SketchUp.gitignore
/Library/Ruby/Gems/2.0.0/gems/boot-0.1.0/lib/templates/gitignores/Stella.gitignore
/Library/Ruby/Gems/2.0.0/gems/boot-0.1.0/lib/templates/gitignores/SugarCRM.gitignore
/Library/Ruby/Gems/2.0.0/gems/boot-0.1.0/lib/templates/gitignores/Swift.gitignore
/Library/Ruby/Gems/2.0.0/gems/boot-0.1.0/lib/templates/gitignores/Symfony.gitignore
/Library/Ruby/Gems/2.0.0/gems/boot-0.1.0/lib/templates/gitignores/SymphonyCMS.gitignore
/Library/Ruby/Gems/2.0.0/gems/boot-0.1.0/lib/templates/gitignores/TeX.gitignore
/Library/Ruby/Gems/2.0.0/gems/boot-0.1.0/lib/templates/gitignores/Textpattern.gitignore
/Library/Ruby/Gems/2.0.0/gems/boot-0.1.0/lib/templates/gitignores/TurboGears2.gitignore
/Library/Ruby/Gems/2.0.0/gems/boot-0.1.0/lib/templates/gitignores/Typo3.gitignore
/Library/Ruby/Gems/2.0.0/gems/boot-0.1.0/lib/templates/gitignores/Umbraco.gitignore
/Library/Ruby/Gems/2.0.0/gems/boot-0.1.0/lib/templates/gitignores/Unity.gitignore
/Library/Ruby/Gems/2.0.0/gems/boot-0.1.0/lib/templates/gitignores/VVVV.gitignore
/Library/Ruby/Gems/2.0.0/gems/boot-0.1.0/lib/templates/gitignores/VisualStudio.gitignore
/Library/Ruby/Gems/2.0.0/gems/boot-0.1.0/lib/templates/gitignores/Waf.gitignore
/Library/Ruby/Gems/2.0.0/gems/boot-0.1.0/lib/templates/gitignores/WordPress.gitignore
/Library/Ruby/Gems/2.0.0/gems/boot-0.1.0/lib/templates/gitignores/Xojo.gitignore
/Library/Ruby/Gems/2.0.0/gems/boot-0.1.0/lib/templates/gitignores/Yeoman.gitignore
/Library/Ruby/Gems/2.0.0/gems/boot-0.1.0/lib/templates/gitignores/Yii.gitignore
/Library/Ruby/Gems/2.0.0/gems/boot-0.1.0/lib/templates/gitignores/ZendFramework.gitignore
/Library/Ruby/Gems/2.0.0/gems/boot-0.1.0/lib/templates/gitignores/Zephir.gitignore
/usr/bin/boot
Successfully installed boot-0.1.0
Parsing documentation for boot-0.1.0
Parsing sources...
 83% [1163/1386]  lib/templates/wordpress/wp-includes/js/mediaelement/bigplay.svg

The file content of bigplay.svg: image/svg+xml; charset=us-ascii

<?xml version="1.0" standalone="no"?>
<svg id="bigplay" viewBox="0 0 100 200" style="background-color:#ffffff00" version="1.1"
    xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve"
    x="0px" y="0px" width="100px" height="200px"
>
    <g id="dark">
        <path id="Polygon"  d="M 72.5 49.5 L 38.75 68.9856 L 38.75 30.0144 L 72.5 49.5 Z" fill="#ffffff" opacity="0.75" />
        <path id="Ellipse" d="M 13 50.5 C 13 29.7891 29.7891 13 50.5 13 C 71.2109 13 88 29.7891 88 50.5 C 88 71.2109 71.2109 88 50.5 88 C 29.7891 88 13 71.2109 13 50.5 Z" stroke="#ffffff" stroke-width="5" fill="none" opacity="0.75"/>
    </g>
    <g id="light">
        <path id="Polygon2"  d="M 72.5 149.5 L 38.75 168.9856 L 38.75 130.0144 L 72.5 149.5 Z" fill="#ffffff" opacity="1.0" />
        <path id="Ellipse2" d="M 13 150.5 C 13 129.7891 29.7891 113 50.5 113 C 71.2109 113 88 129.7891 88 150.5 C 88 171.211 71.2109 188 50.5 188 C 29.7891 188 13 171.211 13 150.5 Z" stroke="#ffffff" stroke-width="5" fill="none" opacity="1.0"/>
    </g>
</svg>
zzak commented 8 years ago

RDoc probably shouldn't try to parse any svg files, and if we can ignore them this bug should go away for you.

Alternatively you can tell rdoc which files to include and ignore from your own projects or gems, using the .document file.