Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### `0.4.3`
- #135 Shorten coverage message on formatter

### `0.4.2`
- #134 Wrap file creation in try/catch

Expand Down
3 changes: 2 additions & 1 deletion lib/codecov/formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ def format(report)
begin
result_path = File.join(::SimpleCov.coverage_path, RESULT_FILE_NAME)
File.write(result_path, result['codecov'])
puts "Coverage report generated to #{result_path}.\n#{result}"
overflow = result['coverage'].to_s.length > 256 ? '...' : ''
puts "Coverage report generated to #{result_path}.\n#{result['coverage'].to_s.[](0, 255)}#{overflow}"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@

rescue Errno::ENOENT => e
puts e
puts "Could not write coverage report to file.\n#{result}"
Expand Down
2 changes: 1 addition & 1 deletion lib/codecov/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Codecov
VERSION = '0.4.2'
VERSION = '0.4.3'
end