Skip to content

Commit 174b9b2

Browse files
committed
Sync net/http RBS docs with RDoc
1 parent b3db6ef commit 174b9b2

3 files changed

Lines changed: 151 additions & 69 deletions

File tree

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: 12 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"
@@ -12,4 +13,15 @@ task :steep do
1213
sh "steep check"
1314
end
1415

16+
namespace :rbs do
17+
desc "Update public RBS comments from local RDoc"
18+
task :annotate do
19+
Dir.mktmpdir do |tmpdir|
20+
sh "rdoc", "--ri", "--output", "#{tmpdir}/doc", "--root=.", "lib", "doc"
21+
sh "rbs", "annotate", "--no-system", "--no-gems", "--no-site", "--no-home",
22+
"-d", "#{tmpdir}/doc", "sig/net-http.rbs"
23+
end
24+
end
25+
end
26+
1527
task :default => :test

0 commit comments

Comments
 (0)