class Travis::Client::Job

Public Instance Methods

allow_failures?() click to toggle source
# File lib/travis/client/job.rb, line 33
def allow_failures?
  return false unless config.include? 'matrix' and config['matrix'].include? 'allow_failures'
  config['matrix']['allow_failures'].any? do |allow|
    allow.all? { |key, value| config[key] == value }
  end
end
branch_info() click to toggle source
# File lib/travis/client/job.rb, line 29
def branch_info
  build.branch_info
end
delete_log(reason = {}) click to toggle source
# File lib/travis/client/job.rb, line 48
def delete_log(reason = {})
  log.delete_body(reason)
end
duration() click to toggle source
# File lib/travis/client/job.rb, line 40
def duration
  attributes['duration'] ||= begin
    start  = started_at  || Time.now
    finish = finished_at || Time.now
    (finish - start).to_i
  end
end
inspect_info() click to toggle source
# File lib/travis/client/job.rb, line 56
def inspect_info
  "#{repository.slug}##{number}"
end
pull_request?() click to toggle source
# File lib/travis/client/job.rb, line 21
def pull_request?
  build.pull_request?
end
push?() click to toggle source
# File lib/travis/client/job.rb, line 25
def push?
  build.push?
end
pusher_channels() click to toggle source
# File lib/travis/client/job.rb, line 52
def pusher_channels
  build.pusher_channels + ["job-#{id}"]
end