bashcov 3.0.3 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -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: a6b65a0c0d70e2ae93acb297d3d89fe9de010f4dbc63b92a025504c50bb1100b
|
4
|
+
data.tar.gz: 1cf1037ed383e6f4f0764f6991c0371326dcde1ebe340e5264aae855d5281174
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 596e7890b99b1fa1c23ecc42a64d092aeaaa9f03f5fb7181261df5d695405e33b1557de8c4218b591ded6aab4d0ecbaaae0929b4bc69bb83d43cc36d45df60d0
|
7
|
+
data.tar.gz: f442d9628a530ffad4058727c93eb25c30241f9a2c74199ab26ace4e704431e44e94f586df5a4fb1e7316f9c5800ab436014c16b203571e8f4625ffe17b42dbd
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,16 @@
|
|
1
|
-
## Unreleased ([changes](https://github.com/infertux/bashcov/compare/v3.0
|
1
|
+
## Unreleased ([changes](https://github.com/infertux/bashcov/compare/v3.1.0...master))
|
2
2
|
|
3
3
|
* TBD
|
4
4
|
|
5
|
+
## v3.1.0, 2023-09-28 ([changes](https://github.com/infertux/bashcov/compare/v3.0.3...v3.1.0))
|
6
|
+
|
7
|
+
* [FEATURE] Better diagnostics for runner result specs
|
8
|
+
* [BUGFIX] Use `/usr/bin/env bash`
|
9
|
+
* [FEATURE] Initialize GitHub Actions workflow
|
10
|
+
* [MISC] Make `Detective#shellscript_syntax?` private
|
11
|
+
* [BUGFIX] Handle binary data
|
12
|
+
* [BUGFIX] Fix Rubocop violations
|
13
|
+
|
5
14
|
## v3.0.3, 2023-07-14 ([changes](https://github.com/infertux/bashcov/compare/v3.0.2...v3.0.3))
|
6
15
|
|
7
16
|
* [BUGFIX] Improve shebang detection (#74)
|
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.0
|
4
|
+
version: 3.1.0
|
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
|