bashcov 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bashcov/version.rb +1 -1
- data/lib/bashcov/xtrace.rb +2 -2
- data/spec/support/test_app.rb +1 -0
- data/spec/test_app/scripts/delete.sh +9 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88c6a87e619ad3f8d9264f845beac5000ebcd7d3
|
4
|
+
data.tar.gz: 205f57915123a4b81ec07b73b36362e1b17a3a4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c546c3e593a2fe3679ce71e9a72e17a1296438b5e95de7066f44e843c1a906db861fc7028e82d81ce068eddd25699dcd4c069e76b11f8349ee71ae8660bb13db
|
7
|
+
data.tar.gz: 465f6ff0a51642e534001f7cb81c068a196042f0f4b50d6506f44dbff60e16d7d74d3a5143eb6b91d7afea83a5d9e96174c21e53d03c98bd5b5aaee005a1e04d
|
data/lib/bashcov/version.rb
CHANGED
data/lib/bashcov/xtrace.rb
CHANGED
@@ -17,7 +17,6 @@ module Bashcov
|
|
17
17
|
end
|
18
18
|
|
19
19
|
# Parses xtrace output and computes coverage
|
20
|
-
# @raise [RuntimeError] on invalid files
|
21
20
|
# @return [Hash] Hash of executed files with coverage information
|
22
21
|
def files
|
23
22
|
files = {}
|
@@ -30,7 +29,8 @@ module Bashcov
|
|
30
29
|
filename = File.expand_path(match[:filename], Bashcov.root_directory)
|
31
30
|
next if File.directory? filename
|
32
31
|
unless File.file? filename
|
33
|
-
warn "Warning: #{filename} was executed but has been deleted since then."
|
32
|
+
warn "Warning: #{filename} was executed but has been deleted since then - skipping it."
|
33
|
+
next
|
34
34
|
end
|
35
35
|
|
36
36
|
lineno = match[:lineno].to_i - 1
|
data/spec/support/test_app.rb
CHANGED
@@ -30,6 +30,7 @@ def expected_coverage
|
|
30
30
|
{
|
31
31
|
"#{test_app}/never_called.sh" => [nil, nil, 0, nil],
|
32
32
|
"#{test_app}/scripts/case.sh" => [nil, nil, nil, 6, 1, nil, 0, 0, 1, nil, nil, nil, 1, 1, nil],
|
33
|
+
"#{test_app}/scripts/delete.sh" => [nil, nil, 1, nil, 0, 0, nil, 1, 1],
|
33
34
|
"#{test_app}/scripts/function.sh" => [nil, nil, nil, 2, nil, nil, nil, 1, 1, nil, nil, 1, 1, nil],
|
34
35
|
"#{test_app}/scripts/long_line.sh" => [nil, nil, 1, 1, 1, 0, nil],
|
35
36
|
"#{test_app}/scripts/nested/simple.sh" => [nil, nil, nil, nil, 1, 1, nil, 0, nil, nil, 1, nil, nil],
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bashcov
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cédric Félizard
|
@@ -143,6 +143,7 @@ files:
|
|
143
143
|
- spec/test_app/never_called.sh
|
144
144
|
- spec/test_app/scripts/README.md
|
145
145
|
- spec/test_app/scripts/case.sh
|
146
|
+
- spec/test_app/scripts/delete.sh
|
146
147
|
- spec/test_app/scripts/executable
|
147
148
|
- spec/test_app/scripts/function.sh
|
148
149
|
- spec/test_app/scripts/long_line.sh
|
@@ -189,6 +190,7 @@ test_files:
|
|
189
190
|
- spec/test_app/never_called.sh
|
190
191
|
- spec/test_app/scripts/README.md
|
191
192
|
- spec/test_app/scripts/case.sh
|
193
|
+
- spec/test_app/scripts/delete.sh
|
192
194
|
- spec/test_app/scripts/executable
|
193
195
|
- spec/test_app/scripts/function.sh
|
194
196
|
- spec/test_app/scripts/long_line.sh
|