Skip to content

Commit f761545

Browse files
committed
Sync net/http RBS docs with RDoc
1 parent 2e1210e commit f761545

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"
@@ -13,6 +14,15 @@ namespace :rbs do
1314
t.ruby_opts << "-rtest_helper"
1415
t.test_files = FileList["test_sig/test_*.rb"]
1516
end
17+
18+
desc "Update public RBS comments from local RDoc"
19+
task :annotate do
20+
Dir.mktmpdir do |tmpdir|
21+
sh "rdoc", "--ri", "--output", "#{tmpdir}/doc", "--root=.", "lib", "doc"
22+
sh "rbs", "annotate", "--no-system", "--no-gems", "--no-site", "--no-home",
23+
"-d", "#{tmpdir}/doc", "sig/net-http.rbs"
24+
end
25+
end
1626
end
1727

1828
task :default => :test

0 commit comments

Comments
 (0)