-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathRakefile
42 lines (33 loc) · 868 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
require 'rubygems'
require 'bundler/setup'
require 'rspec/core/rake_task'
# 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.
namespace :gem do
Bundler::GemHelper.install_tasks
end
# Install the `spec` task so that we can run tests.
RSpec::Core::RakeTask.new
# Default task is to run the unit tests
task default: 'spec'
# require 'bundler/gem_helper'
task :test do
result = sh 'bash test/test.sh'
if result
puts 'Success!'
else
puts 'Failure!'
exit 1
end
end
def env
%w(LINODE_CLIENT_ID LINODE_API_KEY VAGRANT_LOG).reduce('') do |acc, key|
acc += "#{key}=#{ENV[key] || 'error'} "
end
end