forked from cosmo0920/windows-api
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRakefile
More file actions
30 lines (26 loc) · 723 Bytes
/
Rakefile
File metadata and controls
30 lines (26 loc) · 723 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
29
require 'rake'
require 'rake/clean'
require 'rake/testtask'
require 'rbconfig'
include Config
desc 'Install the windows-api library (non-gem)'
task :install do
sitelibdir = CONFIG["sitelibdir"]
installdir = File.join(sitelibdir, 'windows')
Dir.mkdir(installdir) unless File.exists?(installdir)
file = "lib/windows/api.rb"
FileUtils.cp(file, installdir, :verbose => true)
end
desc 'Build the windows-api gem'
task :gem do
spec = eval(IO.read('windows-api.gemspec'))
Gem::Builder.new(spec).buildend
task :install_gem => [:gem] do
file = Dir["*.gem"].first
sh "gem install #{file}"
end
Rake::TestTask.new do |test|
test.warning = true
test.verbose = true
end