-
Notifications
You must be signed in to change notification settings - Fork 5
/
Rakefile
70 lines (58 loc) · 1.59 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
66
67
68
69
70
require 'rake'
require 'rake/clean'
require 'rake/testtask'
CLEAN.include("**/*.gem")
namespace :gem do
desc 'Create the win32-pipe gem'
task :create => [:clean] do
require 'rubygems/package'
spec = eval(IO.read('win32-pipe.gemspec'))
spec.signing_key = File.join(Dir.home, '.ssh', 'gem-private_key.pem')
Gem::Package.build(spec, true)
end
desc 'Install the win32-pipe gem'
task :install => [:create] do
file = Dir['*.gem'].first
sh "gem install -l #{file}"
end
end
namespace :example do
desc 'Run the asynchronous client example program'
task :async_client do
ruby '-Ilib examples/example_client_async.rb'
end
desc 'Run the client example program'
task :client do
ruby '-Ilib examples/example_client.rb'
end
desc 'Run the asynchronous server example program'
task :async_server do
ruby '-Ilib examples/example_server_async.rb'
end
desc 'Run the server example program'
task :server do
ruby '-Ilib examples/example_server.rb'
end
end
namespace :test do
Rake::TestTask.new(:base) do |test|
test.warning = true
test.verbose = true
test.test_files = FileList['test\test_win32_pipe.rb']
end
Rake::TestTask.new(:client) do |test|
test.warning = true
test.verbose = true
test.test_files = FileList['test\test_win32_pipe_client.rb']
end
Rake::TestTask.new(:server) do |test|
test.warning = true
test.verbose = true
test.test_files = FileList['test\test_win32_pipe_server.rb']
end
Rake::TestTask.new(:all) do |test|
test.warning = true
test.verbose = true
end
end
task :default => 'test:all'