Skip to content

Commit 9b7151a

Browse files
committed
Sync net/http RBS docs with RDoc
1 parent 32743c4 commit 9b7151a

2 files changed

Lines changed: 148 additions & 69 deletions

File tree

Rakefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
require "bundler/gem_tasks"
22
require "rake/testtask"
3+
require "tmpdir"
34

45
Rake::TestTask.new(:test) do |t|
56
t.libs << "test/lib"
@@ -18,6 +19,15 @@ namespace :rbs do
1819
t.ruby_opts << "-rtest_helper"
1920
t.test_files = FileList["test_sig/test_*.rb"]
2021
end
22+
23+
desc "Update public RBS comments from local RDoc"
24+
task :annotate do
25+
Dir.mktmpdir do |tmpdir|
26+
sh "rdoc", "--ri", "--output", "#{tmpdir}/doc", "--root=.", "lib", "doc"
27+
sh "rbs", "annotate", "--no-system", "--no-gems", "--no-site", "--no-home",
28+
"-d", "#{tmpdir}/doc", "sig/net-http.rbs"
29+
end
30+
end
2131
end
2232

2333
task :default => :test

0 commit comments

Comments
 (0)