single_cov 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11ef65dfb536bd0a3194ea9668ac96975723fece04a0c4561c61c42a799427a3
4
- data.tar.gz: 15ac6753da7ff1b3f5a330c25660c1dcb9fb9fec17a8aaed2126e732f68977de
3
+ metadata.gz: db040981049890225a79a6a8fa56ef8cc32a09b1d64a6f2139b0a39df5d50d56
4
+ data.tar.gz: 29f47c8a26b0f1a59cfb580247a8919e0192953bd8173a7a54c745b7398edfbb
5
5
  SHA512:
6
- metadata.gz: e0f909a8774964b6d651f95e57aab1fec5fed9462a2e12ab932b9c1d43d249276b5ea5e79770b2ef3ab7eb3143dc067b463f5bfae1a0bdae88a5630b4c19dce6
7
- data.tar.gz: 6ecfeee0f58db257fd44f25a0606c8ef0d0064a0eadf024aee912836b599ec413d304846d026d84d6a8e97fcedb0db85bfd86b65f36622abc509e69c4d43e9eb
6
+ metadata.gz: 487db3f37ec46c3b0d0b53fb5be2de2dff18077276b91a0fd11093e7f21d0844ef9f33e10ccbda05ed92579d60b96e6ae4b498a9fa26abd0b75bdd509e736285
7
+ data.tar.gz: 4cf118a2d5bfed4cfa7bc357057ed0264b0db62b389e290c79445bbda78272eb377a8a14f16f1b6c3ab10d6a37db99a3e0fcfde11625b02862906108d0e9c573
@@ -1,3 +1,3 @@
1
1
  module SingleCov
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
data/lib/single_cov.rb CHANGED
@@ -32,7 +32,9 @@ module SingleCov
32
32
  next if uncovered.size == expected_uncovered
33
33
 
34
34
  # branches are unsorted and added to the end, only sort when necessary
35
- uncovered.sort! if branch_coverage
35
+ if branch_coverage
36
+ uncovered.sort_by! { |line_start, char_start, line_end, char_end| [line_start, char_start || 0] }
37
+ end
36
38
 
37
39
  uncovered.map! do |line_start, char_start, line_end, char_end|
38
40
  char_start ? "#{file}:#{line_start}:#{char_start}-#{line_end}:#{char_end}" : "#{file}:#{line_start}"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: single_cov
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-27 00:00:00.000000000 Z
11
+ date: 2018-04-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: michael@grosser.it