-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathRakefile
64 lines (53 loc) · 1.25 KB
/
Rakefile
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
require "bundler/gem_tasks"
require "rake/clean"
require "rake/testtask"
CLEAN.include("**/*.gem", "**/*.rbc")
namespace :example do
desc "Run the notify (tail) example program"
task :notify do
ruby "-Ilib examples/example_notify.rb"
end
desc "Run the read example program"
task :read do
ruby "-Ilib examples/example_read.rb"
end
desc "Run the write example program"
task :write do
ruby "-Ilib examples/example_write.rb"
end
end
namespace :event_source do
desc "Install the RubyMsg event source"
task :install do
sh "ruby -Ilib misc/install_msg.rb"
end
end
Rake::TestTask.new do |t|
t.warning = true
t.verbose = true
end
namespace :test do
Rake::TestTask.new(:eventlog) do |t|
t.warning = true
t.verbose = true
t.test_files = Dir["test/test_eventlog.rb"]
end
Rake::TestTask.new(:mc) do |t|
t.warning = true
t.verbose = true
t.test_files = Dir["test/test_mc.rb"]
end
end
begin
require "yard" unless defined?(YARD)
YARD::Rake::YardocTask.new(:docs)
rescue LoadError
puts "yard is not available. bundle install first to make sure all dependencies are installed."
end
task :console do
require "irb"
require "irb/completion"
ARGV.clear
IRB.start
end
task default: :test