Class: BuildEval::Server::TravisOrg

Inherits:
Object
  • Object
show all
Defined in:
lib/build_eval/server/travis_org.rb

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ TravisOrg

Returns a new instance of TravisOrg.


6
7
8
9
# File 'lib/build_eval/server/travis_org.rb', line 6

def initialize(args)
  @username = args[:username]
  @branch   = args[:branch]
end

Instance Method Details

#build_result(build_name, branch_name) ⇒ Object


11
12
13
14
15
16
17
18
# File 'lib/build_eval/server/travis_org.rb', line 11

def build_result(build_name, branch_name)
  repository_path = "#{@username}/#{build_name}"
  BuildEval::Result::BuildResult.create(
    build_name:  repository_path,
    branch_name: branch_name,
    status_name: BuildEval::Travis.last_build_status(repository_path: repository_path, branch: branch_name)
  )
end

#to_sObject


20
21
22
# File 'lib/build_eval/server/travis_org.rb', line 20

def to_s
  "Travis CI Org #{@username}"
end