bashcov 1.5.1 → 1.6.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 +6 -1
- data/Rakefile +1 -1
- data/bashcov.gemspec +4 -6
- data/lib/bashcov.rb +1 -1
- data/lib/bashcov/field_stream.rb +1 -1
- data/lib/bashcov/lexer.rb +5 -5
- data/lib/bashcov/version.rb +1 -1
- data/lib/bashcov/xtrace.rb +1 -1
- metadata +12 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69ae560709ca922d5768a2755b4c9f9fa0de60d9
|
4
|
+
data.tar.gz: c0ccca240348b0736dca3357af5412c98159466a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7032cb66094fa7f79ae7916eb93dc58e814d5e46cac8fce6a0006ec8370c9f18a8aba2de2a9f642e5c984e3a992e28e98cd59664a8d5828afa45bf33c5f6f5bf
|
7
|
+
data.tar.gz: 2ed6423accb917c077797224efe9644668349be5adb05ccd32b37413b8904bc1a560b566c871cde50331017bcd557ffdb6e75309822bd0cd58481ae0a6666f91
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,12 @@
|
|
1
|
-
## Unreleased ([changes](https://github.com/infertux/bashcov/compare/v1.
|
1
|
+
## Unreleased ([changes](https://github.com/infertux/bashcov/compare/v1.6.0...master))
|
2
2
|
|
3
3
|
* TBD
|
4
4
|
|
5
|
+
## v1.6.0, 2017-10-24 ([changes](https://github.com/infertux/bashcov/compare/v1.5.1...v1.6.0))
|
6
|
+
|
7
|
+
* [BUGFIX] Don't crash when files contain invalid UTF-8 characters (#27)
|
8
|
+
* [FEATURE] Upgrade SimpleCov dependency to 0.15
|
9
|
+
|
5
10
|
## v1.5.1, 2017-03-10 ([changes](https://github.com/infertux/bashcov/compare/v1.5.0...v1.5.1))
|
6
11
|
|
7
12
|
* [BUGFIX] Fix incorrect coverage for some multiline strings (#26)
|
data/Rakefile
CHANGED
data/bashcov.gemspec
CHANGED
@@ -21,16 +21,14 @@ Gem::Specification.new do |gem|
|
|
21
21
|
gem.executables = gem.files.grep(%r{\Abin/}).map { |f| File.basename(f) }
|
22
22
|
gem.require_paths = ["lib"]
|
23
23
|
|
24
|
-
gem.required_ruby_version = ">= 2.2.
|
24
|
+
gem.required_ruby_version = ">= 2.2.7"
|
25
25
|
|
26
|
-
gem.add_dependency "simplecov", "~> 0.
|
26
|
+
gem.add_dependency "simplecov", "~> 0.15"
|
27
27
|
|
28
|
+
gem.add_development_dependency "coveralls"
|
29
|
+
gem.add_development_dependency "mutant-rspec"
|
28
30
|
gem.add_development_dependency "rake"
|
29
31
|
gem.add_development_dependency "rspec"
|
30
|
-
gem.add_development_dependency "mutant-rspec"
|
31
|
-
# TODO: forcing version for Ruby 2.4 compat, remove when mutant Gem is fixed
|
32
|
-
gem.add_development_dependency "regexp_parser", ">= 0.4.2"
|
33
32
|
gem.add_development_dependency "rubocop"
|
34
33
|
gem.add_development_dependency "yard"
|
35
|
-
gem.add_development_dependency "coveralls"
|
36
34
|
end
|
data/lib/bashcov.rb
CHANGED
data/lib/bashcov/field_stream.rb
CHANGED
data/lib/bashcov/lexer.rb
CHANGED
@@ -7,13 +7,13 @@ module Bashcov
|
|
7
7
|
# coverage
|
8
8
|
class Lexer
|
9
9
|
# Lines starting with one of these tokens are irrelevant for coverage
|
10
|
-
IGNORE_START_WITH = %w
|
10
|
+
IGNORE_START_WITH = %w[# function].freeze
|
11
11
|
|
12
12
|
# Lines ending with one of these tokens are irrelevant for coverage
|
13
|
-
IGNORE_END_WITH = %w
|
13
|
+
IGNORE_END_WITH = %w[(].freeze
|
14
14
|
|
15
15
|
# Lines containing only one of these keywords are irrelevant for coverage
|
16
|
-
IGNORE_IS = %w
|
16
|
+
IGNORE_IS = %w[esac if then else elif fi while do done { } ;;].freeze
|
17
17
|
|
18
18
|
# @param [String] filename File to analyze
|
19
19
|
# @param [Hash] coverage Coverage with executed lines marked
|
@@ -30,7 +30,7 @@ module Bashcov
|
|
30
30
|
# Process and complete initial coverage.
|
31
31
|
# @return [void]
|
32
32
|
def complete_coverage
|
33
|
-
lines =
|
33
|
+
lines = IO.read(@filename).encode("utf-8", invalid: :replace).lines
|
34
34
|
|
35
35
|
lines.each_with_index do |line, lineno|
|
36
36
|
# heredoc
|
@@ -46,7 +46,7 @@ module Bashcov
|
|
46
46
|
)
|
47
47
|
|
48
48
|
# multiline string concatenated with newlines
|
49
|
-
%w
|
49
|
+
%w[' "].each do |char|
|
50
50
|
mark_multiline(
|
51
51
|
lines, lineno,
|
52
52
|
/\A[^\n]+[\s=]+#{char}[^#{char}]*#{char}/m,
|
data/lib/bashcov/version.rb
CHANGED
data/lib/bashcov/xtrace.rb
CHANGED
@@ -19,7 +19,7 @@ module Bashcov
|
|
19
19
|
|
20
20
|
# [Array<String>] A collection of Bash internal variables to expand in the
|
21
21
|
# {PS4}
|
22
|
-
FIELDS = %w
|
22
|
+
FIELDS = %w[${LINENO-} ${BASH_SOURCE-} ${PWD-} ${OLDPWD-}].freeze
|
23
23
|
|
24
24
|
class << self
|
25
25
|
attr_writer :delimiter, :ps4
|
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: 1.
|
4
|
+
version: 1.6.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: 2017-
|
11
|
+
date: 2017-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: simplecov
|
@@ -16,16 +16,16 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.15'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.15'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: coveralls
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name: rspec
|
42
|
+
name: mutant-rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
@@ -67,21 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: 0.4.2
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: 0.4.2
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rubocop
|
70
|
+
name: rspec
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
86
72
|
requirements:
|
87
73
|
- - ">="
|
@@ -95,7 +81,7 @@ dependencies:
|
|
95
81
|
- !ruby/object:Gem::Version
|
96
82
|
version: '0'
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
84
|
+
name: rubocop
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
100
86
|
requirements:
|
101
87
|
- - ">="
|
@@ -109,7 +95,7 @@ dependencies:
|
|
109
95
|
- !ruby/object:Gem::Version
|
110
96
|
version: '0'
|
111
97
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
98
|
+
name: yard
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
114
100
|
requirements:
|
115
101
|
- - ">="
|
@@ -160,7 +146,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
160
146
|
requirements:
|
161
147
|
- - ">="
|
162
148
|
- !ruby/object:Gem::Version
|
163
|
-
version: 2.2.
|
149
|
+
version: 2.2.7
|
164
150
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
151
|
requirements:
|
166
152
|
- - ">="
|
@@ -168,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
154
|
version: '0'
|
169
155
|
requirements: []
|
170
156
|
rubyforge_project:
|
171
|
-
rubygems_version: 2.6.
|
157
|
+
rubygems_version: 2.6.13
|
172
158
|
signing_key:
|
173
159
|
specification_version: 4
|
174
160
|
summary: Code coverage tool for Bash
|