forked from grid5000/restfully
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
47 lines (39 loc) · 920 Bytes
/
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
require 'rubygems'
require 'rake'
require 'rspec/core/rake_task'
ROOT_DIR = File.dirname(__FILE__)
require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'restfully'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
desc "Run Tests"
RSpec::Core::RakeTask.new(:spec) do |t|
t.rcov = false
t.pattern = 'spec/**/*_spec.rb'
end
desc "Run Test coverage"
RSpec::Core::RakeTask.new(:rcov) do |t|
t.rcov = true
t.pattern = 'spec/**/*_spec.rb'
t.rcov_opts = ['-Ispec', '--exclude', 'spec']
end
task :default => :spec
task :clean do
Dir.chdir(ROOT_DIR) do
rm_f "*.gem"
end
end
task :build => :clean do
Dir.chdir(ROOT_DIR) do
sh "gem build restfully.gemspec"
end
end
task :install => :build do
Dir.chdir(ROOT_DIR) do
sh "gem install #{Dir["*.gem"].last}"
end
end