Class: CiInACan::Build

Inherits:
Object
  • Object
show all
Defined in:
lib/ci_in_a_can/build.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#branchObject

Returns the value of attribute branch.



9
10
11
# File 'lib/ci_in_a_can/build.rb', line 9

def branch
  @branch
end

#created_atObject

Returns the value of attribute created_at.



9
10
11
# File 'lib/ci_in_a_can/build.rb', line 9

def created_at
  @created_at
end

#git_sshObject

Returns the value of attribute git_ssh.



9
10
11
# File 'lib/ci_in_a_can/build.rb', line 9

def git_ssh
  @git_ssh
end

#idObject

Returns the value of attribute id.



9
10
11
# File 'lib/ci_in_a_can/build.rb', line 9

def id
  @id
end

#local_locationObject

Returns the value of attribute local_location.



9
10
11
# File 'lib/ci_in_a_can/build.rb', line 9

def local_location
  @local_location
end

#repoObject

Returns the value of attribute repo.



9
10
11
# File 'lib/ci_in_a_can/build.rb', line 9

def repo
  @repo
end

#shaObject

Returns the value of attribute sha.



9
10
11
# File 'lib/ci_in_a_can/build.rb', line 9

def sha
  @sha
end

Class Method Details

.parse(content) ⇒ Object



13
14
15
# File 'lib/ci_in_a_can/build.rb', line 13

def self.parse content
  GithubBuildParser.new.parse content
end

Instance Method Details

#commandsObject



17
18
19
20
# File 'lib/ci_in_a_can/build.rb', line 17

def commands
  commands = CiInACan::Repo.find(repo).build_commands
  commands.count > 0 ? commands : ['bundle install', 'bundle exec rake']
end