mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
sync_default_gems: Add rdoc-ref command to test
This commit is contained in:
parent
df588440ee
commit
2b5d4fe28d
1 changed files with 11 additions and 0 deletions
|
@ -642,6 +642,17 @@ when "--message-filter"
|
|||
abort unless ARGV.size == 2
|
||||
message_filter(*ARGV)
|
||||
exit
|
||||
when "rdoc-ref"
|
||||
ARGV.shift
|
||||
pattern = ARGV.empty? ? %w[*.c *.rb *.rdoc] : ARGV
|
||||
result = pipe_readlines(%W"git grep -z -l -F [https://docs.ruby-lang.org/en/master/ --" + pattern)
|
||||
result.inject(false) do |changed, file|
|
||||
if replace_rdoc_ref(file)
|
||||
puts "replaced rdoc-ref in #{file}"
|
||||
changed = true
|
||||
end
|
||||
changed
|
||||
end
|
||||
when nil, "-h", "--help"
|
||||
puts <<-HELP
|
||||
\e[1mSync with upstream code of default libraries\e[0m
|
||||
|
|
Loading…
Reference in a new issue