Executes commands with a clean environment
# File lib/appraisal/command.rb, line 6 def self.from_args(gemfile) command = ([$0] + ARGV.slice(1, ARGV.size)).join(' ') new(command, gemfile) end
# File lib/appraisal/command.rb, line 11 def initialize(command, gemfile = nil) @original_env = {} @gemfile = gemfile if command =~ %r^bundle/ @command = command else @command = "bundle exec #{command}" end end
# File lib/appraisal/command.rb, line 30 def exec announce with_clean_env { Kernel.exec(@command) } end
# File lib/appraisal/command.rb, line 21 def run announce with_clean_env do unless Kernel.system(@command) exit(1) end end end