rspec-circleci-coverage 0.1.115 → 0.1.547

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b9feebfba2b70ce3ecfbcd897d62cb96cd7aa2ec5f20e8e60b3be6e8eb46ae9
4
- data.tar.gz: e90d63d0fcb66d7f1e1c756f30a5aac1ec152b2f2225a029dfdb9c807ca71ff8
3
+ metadata.gz: c5bbd8eab02b5adf1c557a904167e0dfcf0710b65e7d7415386677ed6f652212
4
+ data.tar.gz: 60268440fafc4c52434084db4f13ccb4908c2dc60e306d5eaea24abad768e561
5
5
  SHA512:
6
- metadata.gz: ab90a4ad3df9ec1227903f6d95f1294ee4e659bdd263c7c58aa97d4d00ee07c7278415315d6544ac918288abc31c3e9d0bdfabb9661e787622c9a89089b4a62f
7
- data.tar.gz: 4a63be12eccf3dbe22eb42dcf61b6dbf77a59ba7cd7f77e5fc66391af6316b8dad1d5365aee78a0e3469d453ccb706ec274c98d93a8001f0e3b0097337334c73
6
+ metadata.gz: 88ebd58e035311667f002f56a067b47ddcf0a810d6a5ed98523e993796fcb2010b15612787fab921355e7978349b749a9da3dd61cb94c29e8c4fc425b977c2b9
7
+ data.tar.gz: ab1a40f1ddc948b49ffb8a11e60d7f0c4d89d04804b35eb58184cc53fbe27b6e859bcbdce38afbf4ec7aa8933609a0794ddbdf0704316dbc38017e5106c64311
@@ -78,25 +78,16 @@ module RSpec
78
78
 
79
79
  before_lines = extract_lines(@before_coverage[file])
80
80
 
81
- # Find lines that were executed during this test
82
- executed_lines = []
83
- lines.each_with_index do |count, index|
84
- next if count.nil?
81
+ # Any line whose count increased means this test executed the file.
82
+ executed = lines.each_with_index.any? do |count, index|
83
+ next false if count.nil?
85
84
  # Treat a missing before-count as 0 so the first render of an
86
85
  # eval'd file (e.g. a compiled template) is attributed to this test.
87
86
  before_count = before_lines ? (before_lines[index] || 0) : 0
88
-
89
- # Line was executed if count increased
90
- if count > before_count
91
- executed_lines << (index + 1) # Line numbers are 1-indexed
92
- end
87
+ count > before_count
93
88
  end
94
89
 
95
- # Only add if lines were executed
96
- if executed_lines.any?
97
- relative_file = relative_path(file)
98
- @coverage_data[relative_file][test_key] = executed_lines
99
- end
90
+ @coverage_data[relative_path(file)][test_key] = true if executed
100
91
  end
101
92
  end
102
93
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-circleci-coverage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.115
4
+ version: 0.1.547
5
5
  platform: ruby
6
6
  authors:
7
7
  - CircleCI