Skip to content

Commit 8527e9c

Browse files
committed
Sync net/http RBS docs with RDoc
1 parent a0c42cc commit 8527e9c

File tree

3 files changed

+149
-69
lines changed

3 files changed

+149
-69
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ source "https://rubygems.org"
33
gemspec
44

55
gem "rake"
6+
gem "rdoc"
67
gem "rbs"
78
gem "steep"
89
gem "test-unit"

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)