Module: CodeclimateCi::Report
- Defined in:
- lib/codeclimate_ci/report.rb
Class Method Summary collapse
- .good_code(gpa_diff) ⇒ Object
- .invalid_credentials ⇒ Object
- .result_not_ready(retry_count, branch) ⇒ Object
- .rounded_diff_value(gpa_diff) ⇒ Object
- .worse_code(gpa_diff) ⇒ Object
Class Method Details
.good_code(gpa_diff) ⇒ Object
13 14 15 |
# File 'lib/codeclimate_ci/report.rb', line 13 def good_code(gpa_diff) puts "Gpa score has improved to #{rounded_diff_value(gpa_diff)} points. Go on..." end |
.invalid_credentials ⇒ Object
17 18 19 |
# File 'lib/codeclimate_ci/report.rb', line 17 def invalid_credentials puts 'Invalid credentials given. Please check your codeclimate_api_token and repo_id.' end |
.result_not_ready(retry_count, branch) ⇒ Object
5 6 7 |
# File 'lib/codeclimate_ci/report.rb', line 5 def result_not_ready(retry_count, branch) puts "Retry #{retry_count}. #{branch} branch analyze is not ready or branch does not exist" end |
.rounded_diff_value(gpa_diff) ⇒ Object
21 22 23 |
# File 'lib/codeclimate_ci/report.rb', line 21 def rounded_diff_value(gpa_diff) gpa_diff.abs.round(2) end |
.worse_code(gpa_diff) ⇒ Object
9 10 11 |
# File 'lib/codeclimate_ci/report.rb', line 9 def worse_code(gpa_diff) puts "Code in your branch became worse on #{rounded_diff_value(gpa_diff)} points" end |