bashcov 3.0.3 → 3.1.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 +14 -1
- data/bin/bashcov +5 -1
- data/lib/bashcov/detective.rb +12 -4
- data/lib/bashcov/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 990b9c0f5d06fd5c3723feec6685802a6f2eba9fc7b9f79b1b053b686698ef60
|
4
|
+
data.tar.gz: 165df7619caabdf60f8260dc77f8a50d07c73c74eb795d5ff5cee86bdc053214
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfa1c1f08b8980a1c967c550e786ae3cfc2074f80a6f6644c01a654eea3fea482dcf3a75f2a8ff04664e24379b0cbf0514ebb0cd5e40c7616106e9ae1e2d3e71
|
7
|
+
data.tar.gz: af2e936ba1684b5cc70f270b94f89c8020dcb9deb86605d71872f7316b6aeb30833ba5cc80aa9f6980a66fddc9a3cce75fcacc4cbab6ff2292ab598a8401d7f8
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,20 @@
|
|
1
|
-
## Unreleased ([changes](https://github.com/infertux/bashcov/compare/v3.
|
1
|
+
## Unreleased ([changes](https://github.com/infertux/bashcov/compare/v3.1.1...master))
|
2
2
|
|
3
3
|
* TBD
|
4
4
|
|
5
|
+
## v3.1.1, 2023-09-28 ([changes](https://github.com/infertux/bashcov/compare/v3.1.0...v3.1.1))
|
6
|
+
|
7
|
+
* [BUGFIX] Make sure StringIO is loaded when `--mute` is used
|
8
|
+
|
9
|
+
## v3.1.0, 2023-09-28 ([changes](https://github.com/infertux/bashcov/compare/v3.0.3...v3.1.0))
|
10
|
+
|
11
|
+
* [FEATURE] Better diagnostics for runner result specs
|
12
|
+
* [BUGFIX] Use `/usr/bin/env bash`
|
13
|
+
* [FEATURE] Initialize GitHub Actions workflow
|
14
|
+
* [MISC] Make `Detective#shellscript_syntax?` private
|
15
|
+
* [BUGFIX] Handle binary data
|
16
|
+
* [BUGFIX] Fix Rubocop violations
|
17
|
+
|
5
18
|
## v3.0.3, 2023-07-14 ([changes](https://github.com/infertux/bashcov/compare/v3.0.2...v3.0.3))
|
6
19
|
|
7
20
|
* [BUGFIX] Improve shebang detection (#74)
|
data/bin/bashcov
CHANGED
@@ -32,7 +32,11 @@ SimpleCov.at_exit do
|
|
32
32
|
# XXX: suppress output from https://github.com/colszowka/simplecov-html/blob/9ec41504ab139fabfaddfc786dfdab5d6aca0bab/lib/simplecov-html.rb#L25
|
33
33
|
# See https://github.com/infertux/bashcov/issues/53
|
34
34
|
original_stdout = $stdout
|
35
|
-
|
35
|
+
|
36
|
+
if Bashcov.mute
|
37
|
+
require "stringio"
|
38
|
+
$stdout = StringIO.new
|
39
|
+
end
|
36
40
|
|
37
41
|
result.format!
|
38
42
|
ensure
|
data/lib/bashcov/detective.rb
CHANGED
@@ -58,13 +58,19 @@ module Bashcov
|
|
58
58
|
def shellscript_shebang_line?(shebang)
|
59
59
|
scanner = StringScanner.new(shebang)
|
60
60
|
|
61
|
-
|
61
|
+
begin
|
62
|
+
return false if scanner.scan(/#!\s*/).nil?
|
62
63
|
|
63
|
-
|
64
|
+
shell = scanner.scan(/\S+/)
|
64
65
|
|
65
|
-
|
66
|
+
return false if shell.nil?
|
66
67
|
|
67
|
-
|
68
|
+
args = scanner.skip(/\s+/).nil? ? [] : scanner.rest.split(/\s+/)
|
69
|
+
rescue ArgumentError
|
70
|
+
# Handle "invalid byte sequence in UTF-8" from `StringScanner`. Can
|
71
|
+
# happen when trying to read binary data (e.g. .pngs).
|
72
|
+
return false
|
73
|
+
end
|
68
74
|
|
69
75
|
shell_basename = File.basename(shell)
|
70
76
|
|
@@ -80,6 +86,8 @@ module Bashcov
|
|
80
86
|
SHELLSCRIPT_EXTENSIONS.include? File.extname(filename)
|
81
87
|
end
|
82
88
|
|
89
|
+
private
|
90
|
+
|
83
91
|
# @param [String,Pathname] filename the name of the file to be checked
|
84
92
|
# @return [Boolean] whether +filename+'s text matches valid shell syntax
|
85
93
|
# @note assumes that +filename+ is readable and refers to a regular file
|
data/lib/bashcov/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bashcov
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cédric Félizard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: simplecov
|
@@ -205,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
205
205
|
- !ruby/object:Gem::Version
|
206
206
|
version: '0'
|
207
207
|
requirements: []
|
208
|
-
rubygems_version: 3.4.
|
208
|
+
rubygems_version: 3.4.20
|
209
209
|
signing_key:
|
210
210
|
specification_version: 4
|
211
211
|
summary: Code coverage tool for Bash
|