-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrakefile.rb
More file actions
28 lines (24 loc) · 599 Bytes
/
Copy pathrakefile.rb
File metadata and controls
28 lines (24 loc) · 599 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
require "bundler/gem_tasks"
require "minitest/test_task"
Minitest::TestTask.create(:test) do |t|
t.test_globs = ["spec/**/*_spec.rb"]
t.verbose = false
t.warning = !ENV['RUBYOPT']&.match?(/-W0/)
end
namespace :yard do
desc "Run local YARD documentation server"
task :server do
`rm -rf ./.yardoc`
Thread.new do
sleep 2
`open http://localhost:8808`
end
`yard server -r`
end
end
Rake::Task[:test].enhance do
if ENV['RUBYOPT']&.match?(/-W0/)
puts "⚠️ Ruby warnings are disabled, remove -W0 from RUBYOPT to enable."
end
end
task :default => :test