bashcov 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +2 -0
- data/bin/bashcov +1 -1
- data/lib/bashcov/runner.rb +4 -4
- data/lib/bashcov/version.rb +1 -1
- data/lib/bashcov.rb +12 -4
- metadata +2 -2
data/Gemfile
CHANGED
data/bin/bashcov
CHANGED
data/lib/bashcov/runner.rb
CHANGED
@@ -9,9 +9,9 @@ module Bashcov
|
|
9
9
|
# @return [Array] +stderr+ from the last run
|
10
10
|
attr_reader :stderr
|
11
11
|
|
12
|
-
# @param [String]
|
13
|
-
def initialize
|
14
|
-
@
|
12
|
+
# @param [String] command Command to run
|
13
|
+
def initialize command
|
14
|
+
@command = File.expand_path(command)
|
15
15
|
end
|
16
16
|
|
17
17
|
# Runs the command capturing +stdout+ and +stderr+.
|
@@ -104,7 +104,7 @@ module Bashcov
|
|
104
104
|
@stdout = []
|
105
105
|
@stderr = []
|
106
106
|
|
107
|
-
@command = "PS4='#{Xtrace.ps4}' #{@
|
107
|
+
@command = "PS4='#{Xtrace.ps4}' #{@command}"
|
108
108
|
end
|
109
109
|
|
110
110
|
def inject_xtrace_flag
|
data/lib/bashcov/version.rb
CHANGED
data/lib/bashcov.rb
CHANGED
@@ -27,8 +27,16 @@ module Bashcov
|
|
27
27
|
# @return [void]
|
28
28
|
def parse_options! args
|
29
29
|
OptionParser.new do |opts|
|
30
|
-
opts.
|
30
|
+
opts.program_name = 'bashcov'
|
31
31
|
opts.version = Bashcov::VERSION
|
32
|
+
opts.banner = <<-HELP.gsub!(/^ +/, '').gsub!("\t", ' ' * 4)
|
33
|
+
Usage: #{opts.program_name} [options] -- <command> [options]
|
34
|
+
Examples:
|
35
|
+
\t#{opts.program_name} script.sh
|
36
|
+
\t#{opts.program_name} --skip-uncovered script.sh
|
37
|
+
\t#{opts.program_name} -- script.sh --some --flags
|
38
|
+
\t#{opts.program_name} --skip-uncovered -- script.sh --some --flags
|
39
|
+
HELP
|
32
40
|
|
33
41
|
opts.separator "\nSpecific options:"
|
34
42
|
|
@@ -53,10 +61,10 @@ module Bashcov
|
|
53
61
|
|
54
62
|
end.parse!(args)
|
55
63
|
|
56
|
-
if args.
|
57
|
-
|
64
|
+
if args.empty?
|
65
|
+
abort("You must give exactly one command to execute.")
|
58
66
|
else
|
59
|
-
|
67
|
+
@options.command = args.join(' ')
|
60
68
|
end
|
61
69
|
end
|
62
70
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bashcov
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: simplecov
|