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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e093e8ccb4452695d43f5ffed178b51f7234288858e5a3534fb5aab92f6aba35
4
- data.tar.gz: 4f53989ea9d994c75df3ce5bf0b518902fa77f833995515123f85581ab57473f
3
+ metadata.gz: a6b65a0c0d70e2ae93acb297d3d89fe9de010f4dbc63b92a025504c50bb1100b
4
+ data.tar.gz: 1cf1037ed383e6f4f0764f6991c0371326dcde1ebe340e5264aae855d5281174
5
5
  SHA512:
6
- metadata.gz: 73f0e0d86193102a73999020b4027253e3642ed935fb4b3a42c594b79fa86553c908e4bfb8c3b904197a6e52ff2a7925ffe5fbbf56c63c882ce35dae289fd611
7
- data.tar.gz: c82225c38c2287a914623cd732d0c5e612dfc2f864b028d340246727fbf03755bd26bfcd3f212a361a22fa369ca5f70e9a637b34bf67c7ba45b98cf71943a4ff
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.3...master))
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)
@@ -58,13 +58,19 @@ module Bashcov
58
58
  def shellscript_shebang_line?(shebang)
59
59
  scanner = StringScanner.new(shebang)
60
60
 
61
- return false if scanner.scan(/#!\s*/).nil?
61
+ begin
62
+ return false if scanner.scan(/#!\s*/).nil?
62
63
 
63
- shell = scanner.scan(/\S+/)
64
+ shell = scanner.scan(/\S+/)
64
65
 
65
- return false if shell.nil?
66
+ return false if shell.nil?
66
67
 
67
- args = scanner.skip(/\s+/).nil? ? [] : scanner.rest.split(/\s+/)
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
@@ -3,5 +3,5 @@
3
3
  # :nodoc:
4
4
  module Bashcov
5
5
  # Current Bashcov version
6
- VERSION = "3.0.3"
6
+ VERSION = "3.1.0"
7
7
  end
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.3
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-07-14 00:00:00.000000000 Z
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.10
208
+ rubygems_version: 3.4.20
209
209
  signing_key:
210
210
  specification_version: 4
211
211
  summary: Code coverage tool for Bash