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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 51ed84a8ca9009034c2d030ea2dadc24aaf984ac
4
- data.tar.gz: 072dfdf379e8285ee7688b9ae99cc4756403a8c3
3
+ metadata.gz: 88c6a87e619ad3f8d9264f845beac5000ebcd7d3
4
+ data.tar.gz: 205f57915123a4b81ec07b73b36362e1b17a3a4a
5
5
  SHA512:
6
- metadata.gz: f1f2f8ae6bf0b409f5ed5a9a2aadf5cee249e4d0d5a78757d2026932b295dc4669899fc91ca13e102b765ddb0145b7901361be9a6082e212047bbddd4d325841
7
- data.tar.gz: 0fa553b44b51f04c5dc93ced7f9cddf442141dee5f1ac0a06db1d986938c63bac12fd07197c8322d1cf5b76832099821c92b8633c975f74f90d8b90caec43fc2
6
+ metadata.gz: c546c3e593a2fe3679ce71e9a72e17a1296438b5e95de7066f44e843c1a906db861fc7028e82d81ce068eddd25699dcd4c069e76b11f8349ee71ae8660bb13db
7
+ data.tar.gz: 465f6ff0a51642e534001f7cb81c068a196042f0f4b50d6506f44dbff60e16d7d74d3a5143eb6b91d7afea83a5d9e96174c21e53d03c98bd5b5aaee005a1e04d
@@ -1,4 +1,4 @@
1
1
  module Bashcov
2
2
  # Bashcov version
3
- VERSION = "0.0.8"
3
+ VERSION = "0.0.9"
4
4
  end
@@ -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
@@ -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],
@@ -0,0 +1,9 @@
1
+ #!/bin/bash
2
+
3
+ cat > tmp.sh <<'BASH'
4
+ #!/bin/bash
5
+ rm -v $0
6
+ BASH
7
+
8
+ chmod +x tmp.sh
9
+ ./tmp.sh
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.8
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