diff --git a/.gitignore b/.gitignore index 835dcd0..99789c4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ .ruby-version Gemfile.lock +Gemfile.local vendor +vmpooler.yaml +.bundle +coverage diff --git a/Gemfile b/Gemfile index 4fef816..79aa1c2 100644 --- a/Gemfile +++ b/Gemfile @@ -23,3 +23,13 @@ group :test do gem 'simplecov', '>= 0.11.2' gem 'yarjuf', '>= 2.0' end + +# Evaluate Gemfile.local if it exists +if File.exists? "#{__FILE__}.local" + instance_eval(File.read("#{__FILE__}.local")) +end + +# Evaluate ~/.gemfile if it exists +if File.exists?(File.join(Dir.home, '.gemfile')) + instance_eval(File.read(File.join(Dir.home, '.gemfile'))) +end diff --git a/vmpooler b/vmpooler index 20eba53..fd8d557 100755 --- a/vmpooler +++ b/vmpooler @@ -26,4 +26,11 @@ manager = Thread.new { ).execute! } +if ENV['VMPOOLER_DEBUG'] + trap("INT") { + puts "Shutting down." + [api, manager].each { |t| t.exit } + } +end + [api, manager].each { |t| t.join }