Class: CiInACan::Run
- Inherits:
-
Object
- Object
- CiInACan::Run
- Defined in:
- lib/ci_in_a_can/run.rb
Instance Attribute Summary collapse
-
#branch ⇒ Object
Returns the value of attribute branch.
-
#build_id ⇒ Object
Returns the value of attribute build_id.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#passed ⇒ Object
Returns the value of attribute passed.
-
#repo ⇒ Object
Returns the value of attribute repo.
-
#sha ⇒ Object
Returns the value of attribute sha.
-
#test_result_id ⇒ Object
Returns the value of attribute test_result_id.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#branch ⇒ Object
Returns the value of attribute branch.
7 8 9 |
# File 'lib/ci_in_a_can/run.rb', line 7 def branch @branch end |
#build_id ⇒ Object
Returns the value of attribute build_id.
7 8 9 |
# File 'lib/ci_in_a_can/run.rb', line 7 def build_id @build_id end |
#created_at ⇒ Object
Returns the value of attribute created_at.
7 8 9 |
# File 'lib/ci_in_a_can/run.rb', line 7 def created_at @created_at end |
#passed ⇒ Object
Returns the value of attribute passed.
7 8 9 |
# File 'lib/ci_in_a_can/run.rb', line 7 def passed @passed end |
#repo ⇒ Object
Returns the value of attribute repo.
7 8 9 |
# File 'lib/ci_in_a_can/run.rb', line 7 def repo @repo end |
#sha ⇒ Object
Returns the value of attribute sha.
7 8 9 |
# File 'lib/ci_in_a_can/run.rb', line 7 def sha @sha end |
#test_result_id ⇒ Object
Returns the value of attribute test_result_id.
7 8 9 |
# File 'lib/ci_in_a_can/run.rb', line 7 def test_result_id @test_result_id end |
Class Method Details
.add(build, test_result) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/ci_in_a_can/run.rb', line 19 def self.add build, test_result data = { created_at: test_result.created_at, test_result_id: test_result.id, passed: test_result.passed, build_id: build.id, sha: build.sha, repo: build.repo, branch: build.branch } CiInACan::Persistence.save("test_run_list", test_result.created_at, data) end |
.all ⇒ Object
32 33 34 35 |
# File 'lib/ci_in_a_can/run.rb', line 32 def self.all blah = CiInACan::Persistence.hash_for("test_run_list") blah.sort_by { |x| x[0] }.reverse.map { |x| new x[1] } end |
Instance Method Details
#to_html ⇒ Object
15 16 17 |
# File 'lib/ci_in_a_can/run.rb', line 15 def to_html CiInACan::ViewModels::RunViewModel.new(self).to_html end |