forked from chef/win32-eventlog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
65 lines (54 loc) · 1.36 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
65
require 'rake'
require 'rake/clean'
require 'rake/testtask'
CLEAN.include('**/*.gem', '**/*.rbc')
namespace :gem do
desc 'Create the win32-eventlog gem'
task :create => [:clean] do
spec = eval(IO.read('win32-eventlog.gemspec'))
Gem::Builder.new(spec).build
end
desc 'Install the win32-eventlog gem'
task :install => [:create] do
ruby 'win32-eventlog.gemspec'
file = Dir["*.gem"].first
sh "gem install #{file}"
end
end
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
task :default => :test