bashcov 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/CHANGELOG.md +5 -1
- data/LICENSE.txt +1 -1
- data/README.md +1 -1
- data/bashcov.gemspec +3 -2
- data/lib/bashcov/version.rb +1 -1
- data/spec/bashcov/runner_spec.rb +10 -11
- data/spec/bashcov_spec.rb +9 -9
- data/spec/spec_helper.rb +6 -0
- metadata +40 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac9d65de9da45a8b6f30348d6f4b66c111ea5e4c
|
4
|
+
data.tar.gz: 16238fa1596b3f2e744509427b133bc97448307b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89908a21eabba58ec5a03f48005d9953e3ab9e06fff4ca6c34a1a5ada7631f7e053032ea21ebe52c20c77ca1c197b174eb1fe0bc4ffddd7e9593d75193bf04c8
|
7
|
+
data.tar.gz: b8d8d6891ea6ecf039f3e3b06fab85f9224e10af4b91982d845bd49dc326f95063d5bd08a25d2e4ac77e39c17e48c115501cdda47817e2c806dd2d2c93330e16
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,11 @@
|
|
1
|
-
## Unreleased ([changes](https://github.com/infertux/bashcov/compare/v1.0
|
1
|
+
## Unreleased ([changes](https://github.com/infertux/bashcov/compare/v1.1.0...master))
|
2
2
|
|
3
3
|
* TBD
|
4
4
|
|
5
|
+
## v1.1.0, 2015-02-20 ([changes](https://github.com/infertux/bashcov/compare/v1.0.1...v1.1.0))
|
6
|
+
|
7
|
+
* [FEATURE] Upgrade dependencies
|
8
|
+
|
5
9
|
## v1.0.1, 2013-03-21 ([changes](https://github.com/infertux/bashcov/compare/v1.0.0...v1.0.1))
|
6
10
|
|
7
11
|
* [BUGFIX] Allow to add SimpleCov filters.
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Bashcov [![Build Status](https://secure.travis-ci.org/infertux/bashcov.png?branch=master)](https://travis-ci.org/infertux/bashcov) [![Dependency Status](https://gemnasium.com/infertux/bashcov.png)](https://gemnasium.com/infertux/bashcov) [![Code Climate](https://codeclimate.com/github/infertux/bashcov.png)](https://codeclimate.com/github/infertux/bashcov)
|
1
|
+
# Bashcov [![Build Status](https://secure.travis-ci.org/infertux/bashcov.png?branch=master)](https://travis-ci.org/infertux/bashcov) [![Dependency Status](https://gemnasium.com/infertux/bashcov.png)](https://gemnasium.com/infertux/bashcov) [![Code Climate](https://codeclimate.com/github/infertux/bashcov.png)](https://codeclimate.com/github/infertux/bashcov) [![Coverage Status](https://coveralls.io/repos/infertux/bashcov/badge.png?branch=master)](https://coveralls.io/r/infertux/bashcov) [![Gem Version](http://img.shields.io/gem/v/bashcov.svg)](https://rubygems.org/gems/bashcov)
|
2
2
|
|
3
3
|
**Code coverage for Bash**
|
4
4
|
|
data/bashcov.gemspec
CHANGED
@@ -18,12 +18,13 @@ Gem::Specification.new do |gem|
|
|
18
18
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
19
19
|
gem.require_paths = ["lib"]
|
20
20
|
|
21
|
-
gem.add_dependency 'simplecov', '~> 0.
|
21
|
+
gem.add_dependency 'simplecov', '~> 0.9.1'
|
22
22
|
|
23
23
|
gem.add_development_dependency 'rake'
|
24
|
-
gem.add_development_dependency 'rspec'
|
24
|
+
gem.add_development_dependency 'rspec', '~> 3'
|
25
25
|
gem.add_development_dependency 'guard-rspec'
|
26
26
|
gem.add_development_dependency 'rb-inotify'
|
27
27
|
gem.add_development_dependency 'cane'
|
28
28
|
gem.add_development_dependency 'yard'
|
29
|
+
gem.add_development_dependency 'coveralls'
|
29
30
|
end
|
data/lib/bashcov/version.rb
CHANGED
data/spec/bashcov/runner_spec.rb
CHANGED
@@ -10,7 +10,7 @@ describe Bashcov::Runner do
|
|
10
10
|
|
11
11
|
describe "#run" do
|
12
12
|
it "finds commands in $PATH" do
|
13
|
-
Bashcov::Runner.new('ls -l').run.
|
13
|
+
expect(Bashcov::Runner.new('ls -l').run).to be_success
|
14
14
|
end
|
15
15
|
|
16
16
|
it "is fast", speed: :slow do
|
@@ -21,11 +21,11 @@ describe Bashcov::Runner do
|
|
21
21
|
pid = Process.spawn test_suite, out: '/dev/null', err: '/dev/null'
|
22
22
|
Process.wait pid
|
23
23
|
}
|
24
|
-
|
24
|
+
expect($?).to be_success
|
25
25
|
|
26
26
|
run = nil
|
27
27
|
t1 = Benchmark.realtime { run = Bashcov::Runner.new(test_suite).run }
|
28
|
-
run.
|
28
|
+
expect(run).to be_success
|
29
29
|
|
30
30
|
ratio = (ratio * iteration + t1 / t0) / (iteration + 1)
|
31
31
|
end
|
@@ -41,7 +41,7 @@ describe Bashcov::Runner do
|
|
41
41
|
|
42
42
|
it "adds the flags" do
|
43
43
|
runner.run
|
44
|
-
ENV['SHELLOPTS'].
|
44
|
+
expect(ENV['SHELLOPTS']).to eq('xtrace')
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
@@ -52,7 +52,7 @@ describe Bashcov::Runner do
|
|
52
52
|
|
53
53
|
it "merges the flags" do
|
54
54
|
runner.run
|
55
|
-
ENV['SHELLOPTS'].
|
55
|
+
expect(ENV['SHELLOPTS']).to eq('posix:xtrace')
|
56
56
|
end
|
57
57
|
end
|
58
58
|
end
|
@@ -60,15 +60,14 @@ describe Bashcov::Runner do
|
|
60
60
|
describe "#result" do
|
61
61
|
it "returns the expected coverage hash" do
|
62
62
|
runner.run
|
63
|
-
runner.result.
|
63
|
+
expect(runner.result).to eq expected_coverage
|
64
64
|
end
|
65
65
|
|
66
66
|
it "returns the correct coverage hash" do
|
67
67
|
runner.run
|
68
68
|
|
69
|
-
pending
|
70
|
-
|
71
|
-
end
|
69
|
+
pending # TODO: need a context-aware lexer to parse multiline instructions
|
70
|
+
expect(runner.result).to eq correct_coverage
|
72
71
|
end
|
73
72
|
|
74
73
|
context "with options.skip_uncovered = true" do
|
@@ -78,7 +77,7 @@ describe Bashcov::Runner do
|
|
78
77
|
|
79
78
|
it "does not include uncovered files" do
|
80
79
|
runner.run
|
81
|
-
(runner.result.keys & uncovered_files).
|
80
|
+
expect(runner.result.keys & uncovered_files).to be_empty
|
82
81
|
end
|
83
82
|
end
|
84
83
|
|
@@ -89,7 +88,7 @@ describe Bashcov::Runner do
|
|
89
88
|
|
90
89
|
it "does not print the command output" do
|
91
90
|
[$stdout, $stderr].each do |io|
|
92
|
-
io.
|
91
|
+
expect(io).not_to receive :write
|
93
92
|
end
|
94
93
|
|
95
94
|
runner.run
|
data/spec/bashcov_spec.rb
CHANGED
@@ -2,14 +2,14 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
shared_examples "a fatal error" do
|
4
4
|
it "outputs to stderr" do
|
5
|
-
$stderr.
|
5
|
+
expect($stderr).to receive(:write).at_least(:once)
|
6
6
|
ignore_exception { subject }
|
7
7
|
end
|
8
8
|
|
9
9
|
it "exits with non-zero" do
|
10
10
|
expect { subject }.to raise_error { |error|
|
11
|
-
error.
|
12
|
-
error.status.
|
11
|
+
expect(error).to be_a SystemExit
|
12
|
+
expect(error.status).not_to eq(0)
|
13
13
|
}
|
14
14
|
end
|
15
15
|
end
|
@@ -32,7 +32,7 @@ describe Bashcov do
|
|
32
32
|
|
33
33
|
it "sets it properly" do
|
34
34
|
subject
|
35
|
-
Bashcov.options.skip_uncovered.
|
35
|
+
expect(Bashcov.options.skip_uncovered).to be true
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
@@ -41,7 +41,7 @@ describe Bashcov do
|
|
41
41
|
|
42
42
|
it "sets it properly" do
|
43
43
|
subject
|
44
|
-
Bashcov.options.mute.
|
44
|
+
expect(Bashcov.options.mute).to be true
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
@@ -55,14 +55,14 @@ describe Bashcov do
|
|
55
55
|
before { @args << '--version' }
|
56
56
|
|
57
57
|
it "outputs to stdout" do
|
58
|
-
$stdout.
|
58
|
+
expect($stdout).to receive(:write).at_least(:once)
|
59
59
|
ignore_exception { subject }
|
60
60
|
end
|
61
61
|
|
62
62
|
it "exits with zero" do
|
63
63
|
expect { subject }.to raise_error { |error|
|
64
|
-
error.
|
65
|
-
error.status.
|
64
|
+
expect(error).to be_a SystemExit
|
65
|
+
expect(error.status).to eq(0)
|
66
66
|
}
|
67
67
|
end
|
68
68
|
end
|
@@ -71,7 +71,7 @@ describe Bashcov do
|
|
71
71
|
|
72
72
|
describe ".name" do
|
73
73
|
it "includes the version" do
|
74
|
-
Bashcov.name.
|
74
|
+
expect(Bashcov.name).to include Bashcov::VERSION
|
75
75
|
end
|
76
76
|
end
|
77
77
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
unless RUBY_ENGINE == 'rbx' # coverage support is broken on rbx
|
2
2
|
require 'simplecov'
|
3
|
+
require 'coveralls'
|
4
|
+
|
5
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
6
|
+
SimpleCov::Formatter::HTMLFormatter,
|
7
|
+
Coveralls::SimpleCov::Formatter
|
8
|
+
]
|
3
9
|
SimpleCov.start do
|
4
10
|
minimum_coverage 100
|
5
11
|
add_group "Sources", "lib"
|
metadata
CHANGED
@@ -1,111 +1,125 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bashcov
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.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:
|
11
|
+
date: 2015-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: simplecov
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.9.1
|
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.9.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '3'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: guard-rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rb-inotify
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: cane
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: yard
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: coveralls
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
102
116
|
- !ruby/object:Gem::Version
|
103
117
|
version: '0'
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
|
-
- -
|
122
|
+
- - ">="
|
109
123
|
- !ruby/object:Gem::Version
|
110
124
|
version: '0'
|
111
125
|
description: Code coverage tool for Bash
|
@@ -116,9 +130,9 @@ executables:
|
|
116
130
|
extensions: []
|
117
131
|
extra_rdoc_files: []
|
118
132
|
files:
|
119
|
-
- .gitignore
|
120
|
-
- .rspec
|
121
|
-
- .travis.yml
|
133
|
+
- ".gitignore"
|
134
|
+
- ".rspec"
|
135
|
+
- ".travis.yml"
|
122
136
|
- CHANGELOG.md
|
123
137
|
- CONTRIBUTING.md
|
124
138
|
- Gemfile
|
@@ -167,17 +181,17 @@ require_paths:
|
|
167
181
|
- lib
|
168
182
|
required_ruby_version: !ruby/object:Gem::Requirement
|
169
183
|
requirements:
|
170
|
-
- -
|
184
|
+
- - ">="
|
171
185
|
- !ruby/object:Gem::Version
|
172
186
|
version: '0'
|
173
187
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
188
|
requirements:
|
175
|
-
- -
|
189
|
+
- - ">="
|
176
190
|
- !ruby/object:Gem::Version
|
177
191
|
version: '0'
|
178
192
|
requirements: []
|
179
193
|
rubyforge_project:
|
180
|
-
rubygems_version: 2.
|
194
|
+
rubygems_version: 2.4.5
|
181
195
|
signing_key:
|
182
196
|
specification_version: 4
|
183
197
|
summary: Code coverage tool for Bash
|