voicemeeter-rb/rakefile

57 lines
1.2 KiB
Plaintext
Raw Normal View History

require "rake/testtask"
2023-07-21 09:34:26 +01:00
HERE = __dir__
desc "Creates the base :test task"
Rake::TestTask.new do |t|
t.pattern = "test/test_*.rb"
end
2023-07-21 09:34:26 +01:00
namespace :t do
desc "Runs Voicemeeter basic tests"
task :basic do
ENV["KIND"] = "basic"
Rake::Task[:test].invoke
end
desc "Runs Voicemeeter banana tests"
task :banana do
ENV["KIND"] = "banana"
Rake::Task[:test].invoke
end
desc "Runs Voicemeeter potato tests"
task :potato do
ENV["KIND"] = "potato"
Rake::Task[:test].invoke
end
end
task default: ["t:potato"]
task basic: ["t:basic"]
task banana: ["t:banana"]
task potato: ["t:potato"]
task :all do
Rake.application.in_namespace(:t) { |namespace| namespace.tasks.each { |t| t.invoke and Rake::Task[:test].reenable } }
end
namespace :e do
desc "Runs the events example"
task :events do
filepath = File.join(HERE, "examples", "events", "main.rb")
ruby filepath
end
desc "Runs the midi example"
task :midi do
filepath = File.join(HERE, "examples", "midi", "main.rb")
ruby filepath
end
desc "Runs the obs example"
task :obs do
2023-08-11 00:50:10 +01:00
filepath = File.join(HERE, "examples", "obs", "main.rb")
ruby filepath
end
2023-07-21 09:34:26 +01:00
end