Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Commit 61f2343

Browse files
authored
Shorten result (#135)
* Shorten result * Update CHANGELOG * Update formatter
1 parent b04f1d1 commit 61f2343

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### `0.4.3`
2+
- #135 Shorten coverage message on formatter
3+
14
### `0.4.2`
25
- #134 Wrap file creation in try/catch
36

lib/codecov/formatter.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ def format(report)
2020
begin
2121
result_path = File.join(::SimpleCov.coverage_path, RESULT_FILE_NAME)
2222
File.write(result_path, result['codecov'])
23-
puts "Coverage report generated to #{result_path}.\n#{result}"
23+
overflow = result['coverage'].to_s.length > 256 ? '...' : ''
24+
puts "Coverage report generated to #{result_path}.\n#{result['coverage'].to_s.[](0, 255)}#{overflow}"
2425
rescue Errno::ENOENT => e
2526
puts e
2627
puts "Could not write coverage report to file.\n#{result}"

lib/codecov/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module Codecov
4-
VERSION = '0.4.2'
4+
VERSION = '0.4.3'
55
end

0 commit comments

Comments
 (0)