Merge pull request #360 from kjwierenga/feature/require-posix-spawn

Feature/require posix spawn
This commit is contained in:
David Dollar
2013-05-03 12:55:16 -07:00
3 changed files with 29 additions and 4 deletions
+9
View File
@@ -34,6 +34,7 @@ class Foreman::CLI < Thor
end
def start(process=nil)
require_posix_spawn_for_ruby_18!
check_procfile!
load_environment!
engine.load_procfile(procfile)
@@ -137,6 +138,14 @@ private ######################################################################
end
end
def require_posix_spawn_for_ruby_18!
begin
Kernel.require 'posix/spawn' # Use Kernel explicitly so we can mock the require call in the spec
rescue LoadError
error "foreman requires gem `posix-spawn` on Ruby #{RUBY_VERSION}. Please `gem install posix-spawn`."
end if Foreman.ruby_18?
end
def procfile
case
when options[:procfile] then options[:procfile]