forked from rcodetools/rcodetools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
41 lines (32 loc) · 826 Bytes
/
Rakefile
File metadata and controls
41 lines (32 loc) · 826 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
30
31
32
33
34
35
36
37
38
39
40
41
PKG_REVISION = ".0"
require 'simplecov'
SimpleCov.start
task :coverage do
SimpleCov.command_name 'Unit Tests'
Rake::Task[:test].execute
end
$:.unshift "lib" if File.directory? "lib"
require 'rcodetools'
require 'rake/testtask'
RCT_VERSION = Rcodetools::VERSION
desc "Run the unit tests in pure-Ruby mode ."
Rake::TestTask.new(:test) do |t|
t.test_files = FileList['test/test*.rb']
t.verbose = true
end
task :default => :test
desc "install by setup.rb"
task :install do
sh "sudo ruby setup.rb install"
end
desc "make package"
task :package do
Dir.mkdir('pkg') unless FileTest.exist?('pkg')
sh "gem build rcodetools"
sh "mv rcodetools-#{RCT_VERSION}.gem pkg"
end
desc "release in RubyGems.org"
task :release => :package do
sh "gem push pkg/rcodetools-#{RCT_VERSION}.gem"
end
# vim: set sw=2 ft=ruby: