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

Commit

Permalink
Shorten result (#135)
Browse files Browse the repository at this point in the history
* Shorten result

* Update CHANGELOG

* Update formatter
  • Loading branch information
thomasrockhu committed Feb 4, 2021
1 parent b04f1d1 commit 61f2343
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
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}"
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

0 comments on commit 61f2343

Please sign in to comment.