forked from adrahon/vagrant-kvm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
38 lines (30 loc) · 1.09 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
require 'rubygems'
require 'bundler/setup'
# Immediately sync all stdout so that tools like buildbot can
# immediately load in the output.
$stdout.sync = true
$stderr.sync = true
# Change to the directory of this file.
Dir.chdir(File.expand_path("../", __FILE__))
# This installs the tasks that help with gem creation and
# publishing.
Bundler::GemHelper.install_tasks
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new
namespace :box do
desc 'Downloads and adds vagrant box for testing.'
task :add do
system 'bundle exec vagrant box add vagrant-kvm-specs http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box'
end
desc 'Prepares VirtualBox box for usage with KVM.'
task :prepare do
system 'bundle exec vagrant plugin install vagrant-mutate'
system 'bundle exec vagrant mutate vagrant-kvm-specs kvm'
system 'bundle exec vagrant box remove vagrant-kvm-specs virtualbox'
end
desc 'Removes testing vagrant box.'
task :remove do
system 'bundle exec vagrant box remove vagrant-kvm-specs kvm'
end
end
task :default => :spec