pronto-simplecov 0.10.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -1
- data/lib/pronto/pronto_simplecov/runner.rb +5 -1
- data/lib/pronto/pronto_simplecov/version.rb +1 -1
- data/spec/data/test/test.rb +9 -0
- data/spec/pronto/pronto_simplecov/runner_spec.rb +8 -3
- metadata +27 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2977c8a07ed699e5c48c1ac53ccf4db909a12769d9c026886f013fcbbab8062e
|
4
|
+
data.tar.gz: 720cab8aa46430dc74615e0cb44179257d9f1c12c121e040b3da515dfbe20272
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7cb255e74de5bf84573f3b67de56aeb0a9e674bfc08636888a5fdd2181adecf947e115217f6df0620ae5437322a8d0a44b59399036a4818dc159a21fe7863fc9
|
7
|
+
data.tar.gz: 98a59b536b63fba059635e68eab64fce044e7c2f93fd93831c96c0c13976f7c066b78c3c9169d9c48a97eeb0f75474dfe91e6f31de7e9d920cc316ffb619a7de
|
data/CHANGELOG.md
CHANGED
@@ -10,6 +10,12 @@ All notable changes to this project will be documented in this file.
|
|
10
10
|
|
11
11
|
### Fixed
|
12
12
|
|
13
|
+
## [0.10.1] - 2020-01-27
|
14
|
+
|
15
|
+
### Fixed
|
16
|
+
|
17
|
+
- Exception when being run with simplecov >0.20.0 and no coverage (#5)
|
18
|
+
|
13
19
|
## [0.10.0] - 2019-08-25
|
14
20
|
|
15
21
|
### Added
|
@@ -30,7 +36,8 @@ All notable changes to this project will be documented in this file.
|
|
30
36
|
|
31
37
|
- First release
|
32
38
|
|
33
|
-
[
|
39
|
+
[unreleased]: https://github.com/dsander/pronto-simplecov/compare/v0.10.1...HEAD
|
40
|
+
[0.10.1]: https://github.com/dsander/pronto-simplecov/compare/v0.10.0...v0.10.1
|
34
41
|
[0.10.0]: https://github.com/dsander/pronto-simplecov/compare/v0.1.1...v0.10.0
|
35
42
|
[0.1.1]: https://github.com/dsander/pronto-simplecov/compare/v0.1.0...v0.1.1
|
36
43
|
[0.1.0]: https://github.com/dsander/pronto-simplecov/compare/e020a804f16c5df8f1d45d1f921955928a669dd6...v0.1.0
|
@@ -22,7 +22,11 @@ module Pronto
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def coverage
|
25
|
-
@coverage ||=
|
25
|
+
@coverage ||= begin
|
26
|
+
merged_result = SimpleCov::ResultMerger.merged_result
|
27
|
+
return {} if merged_result.nil?
|
28
|
+
Hash[merged_result.files.map { |file| [file.filename, file] }]
|
29
|
+
end
|
26
30
|
end
|
27
31
|
end
|
28
32
|
end
|
@@ -17,22 +17,27 @@ describe Pronto::ProntoSimplecov::Runner do
|
|
17
17
|
end
|
18
18
|
|
19
19
|
it 'returns nothing when unchanged lines are uncovered' do
|
20
|
-
files = [SimpleCov::SourceFile.new(File.expand_path('spec/data/test/test.rb'), [0, 0, 0, 1, 1, 1, 1, 1, 1])]
|
20
|
+
files = [SimpleCov::SourceFile.new(File.expand_path('spec/data/test/test.rb'), {"lines" => [0, 0, 0, 1, 1, 1, 1, 1, 1]})]
|
21
21
|
expect(SimpleCov::ResultMerger).to receive_message_chain(:merged_result, :files).and_return(files)
|
22
22
|
expect(runner.run).to eq([])
|
23
23
|
end
|
24
24
|
|
25
25
|
it 'only creates messages for uncovered lines' do
|
26
|
-
files = [SimpleCov::SourceFile.new(File.expand_path('spec/data/test/test.rb'), [1, 1, 1, 1, 1, 1, 0, 1, 1])]
|
26
|
+
files = [SimpleCov::SourceFile.new(File.expand_path('spec/data/test/test.rb'), {"lines" => [1, 1, 1, 1, 1, 1, 0, 1, 1]})]
|
27
27
|
expect(SimpleCov::ResultMerger).to receive_message_chain(:merged_result, :files).and_return(files)
|
28
28
|
expect(runner.run.length).to eq(1)
|
29
29
|
expect(runner.run.first.msg).to eq('This change has no test coverage')
|
30
30
|
end
|
31
31
|
|
32
32
|
it 'it irgnores empt lines' do
|
33
|
-
files = [SimpleCov::SourceFile.new(File.expand_path('spec/data/test/test.rb'), [1, 1, 1, 1, nil, 1, 1, 1, 1])]
|
33
|
+
files = [SimpleCov::SourceFile.new(File.expand_path('spec/data/test/test.rb'), {"lines" => [1, 1, 1, 1, nil, 1, 1, 1, 1]})]
|
34
34
|
expect(SimpleCov::ResultMerger).to receive_message_chain(:merged_result, :files).and_return(files)
|
35
35
|
expect(runner.run).to eq([])
|
36
36
|
end
|
37
|
+
|
38
|
+
it 'still works when SimpleCov::ResultMerger.merged_result returns nil' do
|
39
|
+
expect(SimpleCov::ResultMerger).to receive(:merged_result).and_return(nil)
|
40
|
+
expect(runner.run).to eq([])
|
41
|
+
end
|
37
42
|
end
|
38
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pronto-simplecov
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dominik Sander
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pronto
|
@@ -44,28 +44,28 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '2'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,6 +115,7 @@ files:
|
|
115
115
|
- spec/data/test.git/refs/heads/master
|
116
116
|
- spec/data/test.git/refs/heads/methods
|
117
117
|
- spec/data/test.git/tags
|
118
|
+
- spec/data/test/test.rb
|
118
119
|
- spec/pronto/pronto_simplecov/runner_spec.rb
|
119
120
|
- spec/pronto/simplecov_spec.rb
|
120
121
|
- spec/spec_helper.rb
|
@@ -137,32 +138,33 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
138
|
- !ruby/object:Gem::Version
|
138
139
|
version: '0'
|
139
140
|
requirements: []
|
140
|
-
rubygems_version: 3.0.
|
141
|
+
rubygems_version: 3.0.3
|
141
142
|
signing_key:
|
142
143
|
specification_version: 4
|
143
144
|
summary: Pronto runner for Simplecov, reports changed lines without coverage.
|
144
145
|
test_files:
|
145
|
-
- spec/
|
146
|
-
- spec/
|
147
|
-
- spec/
|
146
|
+
- spec/data/test.git/index
|
147
|
+
- spec/data/test.git/HEAD
|
148
|
+
- spec/data/test.git/tags
|
148
149
|
- spec/data/test.git/config
|
150
|
+
- spec/data/test.git/hooks/ctags
|
151
|
+
- spec/data/test.git/hooks/post-commit
|
152
|
+
- spec/data/test.git/hooks/post-merge
|
153
|
+
- spec/data/test.git/hooks/post-rewrite
|
154
|
+
- spec/data/test.git/hooks/post-checkout
|
155
|
+
- spec/data/test.git/COMMIT_EDITMSG
|
149
156
|
- spec/data/test.git/objects/ad/52e9109d5f31fae0c554d85d4bd5f2ded2acec
|
150
157
|
- spec/data/test.git/objects/44/b65751859967fd2795b983288c32abac207693
|
158
|
+
- spec/data/test.git/objects/ff/1926a8d1686b0d3474f012db0b352c74d43563
|
151
159
|
- spec/data/test.git/objects/9f/80eedc9b95982d9e69b3e96c1f98b337b8349b
|
152
160
|
- spec/data/test.git/objects/af/9d20dfd9a150a907fccf6e8b344f5ff9e466f4
|
153
161
|
- spec/data/test.git/objects/fa/6f28ab49f1793671180802d6a410ce99ce11af
|
154
|
-
- spec/data/test.git/
|
155
|
-
- spec/data/test.git/
|
156
|
-
- spec/data/test.git/HEAD
|
162
|
+
- spec/data/test.git/refs/heads/master
|
163
|
+
- spec/data/test.git/refs/heads/methods
|
157
164
|
- spec/data/test.git/logs/HEAD
|
158
|
-
- spec/data/test.git/logs/refs/heads/methods
|
159
165
|
- spec/data/test.git/logs/refs/heads/master
|
160
|
-
- spec/data/test.git/
|
161
|
-
- spec/data/test.
|
162
|
-
- spec/
|
163
|
-
- spec/
|
164
|
-
- spec/
|
165
|
-
- spec/data/test.git/refs/heads/methods
|
166
|
-
- spec/data/test.git/refs/heads/master
|
167
|
-
- spec/data/test.git/index
|
168
|
-
- spec/data/test.git/COMMIT_EDITMSG
|
166
|
+
- spec/data/test.git/logs/refs/heads/methods
|
167
|
+
- spec/data/test/test.rb
|
168
|
+
- spec/spec_helper.rb
|
169
|
+
- spec/pronto/pronto_simplecov/runner_spec.rb
|
170
|
+
- spec/pronto/simplecov_spec.rb
|