Sha256: f16ce4d5bca460b9a0353795aa61004c2abb985e12b4292593da65219961f9be
Contents?: true
Size: 996 Bytes
Versions: 3
Compression:
Stored size: 996 Bytes
Contents
require 'travis/client' module Travis module Client class Build < Entity include States # @!parse attr_reader :repository_id, :commit_id, :number, :pull_request, :config, :state, :started_at, :finished_at, :duration, :job_ids attributes :repository_id, :commit_id, :number, :pull_request, :config, :state, :started_at, :finished_at, :duration, :job_ids time :started_at, :finished_at alias pull_request? pull_request # @!parse attr_reader :repository, :commit, :jobs has :repository, :commit, :jobs one :build many :builds aka :branches def restart session.restart(self) end def push? not pull_request? end def pr_number commit.compare_url[/\d+$/] if pull_request? end def branch_info pull_request? ? "Pull Request ##{pr_number}" : commit.branch end def inspect_info "#{repository.slug}##{number}" end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
travis-1.4.0 | lib/travis/client/build.rb |
travis-1.3.1 | lib/travis/client/build.rb |
travis-1.3.0 | lib/travis/client/build.rb |