Permalink
Newer
Older
100644 49 lines (39 sloc) 1006 Bytes
@WIP start to modernize
Apr 16, 2012
1
#!/usr/bin/env rake
2
require "bundler/gem_tasks"
Jan 26, 2011
4
require 'rake'
5
require 'rake/testtask'
6
Rake::TestTask.new(:test) do |test|
@WIP start to modernize
Apr 16, 2012
7
test.libs << 'test'
Jan 26, 2011
8
test.pattern = 'test/**/test_*.rb'
9
test.verbose = true
10
end
11
12
task :test_separately do
13
Dir[File.expand_path('../test/**/test_*.rb', __FILE__)].each do |path|
15
system "rake test TEST=#{path}"
16
end
@WIP start to modernize
Apr 16, 2012
17
end
18
19
task :default => :test_separately
@WIP start to modernize
Apr 16, 2012
20
21
require 'yard'
22
YARD::Rake::YardocTask.new do |y|
23
y.options << '--no-private'
24
end
Feb 10, 2012
25
26
gemspec = eval(File.read(Dir["*.gemspec"].first))
27
28
desc "Validate the gemspec"
29
task :gemspec do
30
gemspec.validate
31
end
32
33
desc "Build gem locally"
34
task :build => :gemspec do
35
system "gem build #{gemspec.name}.gemspec"
36
FileUtils.mkdir_p "pkg"
37
FileUtils.mv "#{gemspec.name}-#{gemspec.version}.gem", "pkg"
38
end
39
40
desc "Install gem locally"
41
task :install => :build do
42
system "gem install pkg/#{gemspec.name}-#{gemspec.version}"
43
end
44
45
desc "Clean automatically generated files"
46
task :clean do
47
FileUtils.rm_rf "pkg"
48
end