diff options
Diffstat (limited to 'lib/rdoc/options.rb')
-rw-r--r-- | lib/rdoc/options.rb | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/rdoc/options.rb b/lib/rdoc/options.rb index 55994c9dcc..7518e6cc54 100644 --- a/lib/rdoc/options.rb +++ b/lib/rdoc/options.rb @@ -105,6 +105,7 @@ class RDoc::Options generator_name generator_options generators + locale op_dir page_dir option_parser @@ -339,6 +340,10 @@ class RDoc::Options attr_reader :visibility + ## + # Indicates if files of test suites should be skipped + attr_accessor :skip_tests + def initialize loaded_options = nil # :nodoc: init_ivars override loaded_options if loaded_options @@ -386,6 +391,7 @@ class RDoc::Options @write_options = false @encoding = Encoding::UTF_8 @charset = @encoding.name + @skip_tests = true end def init_with map # :nodoc: @@ -560,9 +566,10 @@ class RDoc::Options @op_dir ||= 'doc' - @rdoc_include << "." if @rdoc_include.empty? root = @root.to_s - @rdoc_include << root unless @rdoc_include.include?(root) + if @rdoc_include.empty? || !@rdoc_include.include?(root) + @rdoc_include << root + end @exclude = self.exclude @@ -778,6 +785,13 @@ Usage: #{opt.program_name} [options] [names...] opt.separator nil + opt.on("--no-skipping-tests", nil, + "Don't skip generating documentation for test and spec files") do |value| + @skip_tests = false + end + + opt.separator nil + opt.on("--extension=NEW=OLD", "-E", "Treat files ending with .new as if they", "ended with .old. Using '-E cgi=rb' will", |