lib/frontkick/result.rb in frontkick-0.3.4 vs lib/frontkick/result.rb in frontkick-0.3.5
- old
+ new
@@ -1,10 +1,12 @@
module Frontkick
class Result
attr_accessor :stdout, :stderr, :exit_code, :duration
alias :status :exit_code
alias :status= :exit_code=
+ alias :exitstatus :exit_code # for compatibility with Open3 Process::Status
+ alias :exitstatus= :exit_code= # for compatibility with Open3 Process::Status
def initialize(params)
@stdout = params[:stdout] || ""
@stderr = params[:stderr] || ""
@exit_code = params[:exit_code] || 0
@@ -20,8 +22,9 @@
end
def successful?
@exit_code == 0
end
+ alias :success? :successful? # for compatibility with Open3 Process::Status
end
CommandResult = Result # for lower version compatibility
end