diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-26 05:56:26 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-26 05:56:26 +0000 |
commit | 98c7058bf7b3eab91c62a77cb10b09f6c8ed368e (patch) | |
tree | a90e594c950a1e3160a69f90a9e6215242937ef7 /lib/rdoc/rdoc.rb | |
parent | ee83dc3fe49ac23321a055a2a4b337499d2494eb (diff) |
Merge RDoc 6.0.3 from upstream.
It fixed the several bugs that was found after RDoc 6 releasing.
From: SHIBATA Hiroshi <[email protected]>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/rdoc.rb')
-rw-r--r-- | lib/rdoc/rdoc.rb | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb index 68775c8be1..31a92b3bec 100644 --- a/lib/rdoc/rdoc.rb +++ b/lib/rdoc/rdoc.rb @@ -36,11 +36,6 @@ class RDoc::RDoc GENERATORS = {} ## - # File pattern to exclude - - attr_accessor :exclude - - ## # Generator instance used for creating output attr_accessor :generator @@ -93,7 +88,6 @@ class RDoc::RDoc def initialize @current = nil - @exclude = nil @generator = nil @last_modified = {} @old_siginfo = nil @@ -116,7 +110,7 @@ class RDoc::RDoc def gather_files files files = ["."] if files.empty? - file_list = normalized_file_list files, true, @exclude + file_list = normalized_file_list files, true, @options.exclude file_list = file_list.uniq @@ -188,7 +182,7 @@ class RDoc::RDoc error "#{dir} exists and is not a directory" unless File.directory? dir begin - open flag_file do |io| + File.open flag_file do |io| unless force then Time.parse io.gets @@ -232,8 +226,11 @@ option) def update_output_dir(op_dir, time, last = {}) return if @options.dry_run or not @options.update_output_dir + unless ENV['SOURCE_DATE_EPOCH'].nil? + time = Time.at(ENV['SOURCE_DATE_EPOCH'].to_i).gmtime + end - open output_flag_file(op_dir), "w" do |f| + File.open output_flag_file(op_dir), "w" do |f| f.puts time.rfc2822 last.each do |n, t| f.puts "#{n}\t#{t.rfc2822}" @@ -261,7 +258,7 @@ option) patterns.split.each do |patt| candidates = Dir.glob(File.join(in_dir, patt)) - result.concat normalized_file_list(candidates) + result.concat normalized_file_list(candidates, false, @options.exclude) end result @@ -469,8 +466,6 @@ The internal error was: exit end - @exclude = @options.exclude - unless @options.coverage_report then @last_modified = setup_output_dir @options.op_dir, @options.force_update end |