crude-mutant 0.3.4 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/exe/cm +16 -4
- data/exe/crude-mutant +16 -4
- data/lib/crude_mutant/file_loader.rb +0 -1
- data/lib/crude_mutant/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19c815febd49e6c18227d79fb6bbfa5631daffd774815f463b03d6a388477977
|
4
|
+
data.tar.gz: 37a01fd449bb4f6936b6339a8a4a67f01e5361420a1071964f0f5df4fbac8937
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51e74c6a4b27d632a04773826254ed7bf66467761ba989a6c8a7183fe42e016603d416cd15f7503e63b93533a1c2267350c6fbcb26159d880cadbf9d2589d77b
|
7
|
+
data.tar.gz: e59ec07800f047ae6f676d358ee2605597617a58a945644feb77376e670c3d19b82848d7e1924f252d5d86532974306295b13dc5c3a5e3215689a383a9df24aa
|
data/Gemfile.lock
CHANGED
data/exe/cm
CHANGED
@@ -7,15 +7,27 @@ require "optparse"
|
|
7
7
|
file_to_mutate = ARGV.pop
|
8
8
|
test_command = ARGV.pop
|
9
9
|
|
10
|
-
Options = Struct.new(
|
10
|
+
Options = Struct.new(
|
11
|
+
:use_json_printer,
|
12
|
+
:section,
|
13
|
+
:section_total,
|
14
|
+
)
|
11
15
|
|
12
|
-
args = Options.new(false)
|
16
|
+
args = Options.new(false, 1, 1)
|
13
17
|
OptionParser.new do |opts|
|
14
18
|
opts.banner = "Usage: crude-mutant [options] [test command] [file to mutate]"
|
15
19
|
|
16
20
|
opts.on("-j", "--json", "Print JSON out to STDOUT") do |v|
|
17
21
|
args.use_json_printer = v
|
18
22
|
end
|
23
|
+
|
24
|
+
opts.on("-sSECTION", "--name=SECTION", "Number of current section when parallelizing") do |s|
|
25
|
+
args.section = s
|
26
|
+
end
|
27
|
+
|
28
|
+
opts.on("-sSECTION_TOTAL", "--name=SECTION_TOTAL", "Number of total sectionswhen parallelizing") do |s|
|
29
|
+
args.section_total = s
|
30
|
+
end
|
19
31
|
end.parse!
|
20
32
|
|
21
33
|
if !file_to_mutate || !test_command
|
@@ -29,9 +41,9 @@ end
|
|
29
41
|
printer = args.use_json_printer ? :json : :standard
|
30
42
|
|
31
43
|
if printer == :json
|
32
|
-
CrudeMutant.start(file_to_mutate, test_command, result_printer: printer)
|
44
|
+
CrudeMutant.start(file_to_mutate, test_command, result_printer: printer, section: args.section, total_sections: args.section_total)
|
33
45
|
else
|
34
|
-
CrudeMutant.start(file_to_mutate, test_command, result_printer: printer) do |progress|
|
46
|
+
CrudeMutant.start(file_to_mutate, test_command, result_printer: printer, section: args.section, total_sections: args.section_total) do |progress|
|
35
47
|
clear_string = ' ' * CrudeMutant::TerminalCalculator.new.calculate_length
|
36
48
|
$stdout.print clear_string
|
37
49
|
$stdout.print "\r"
|
data/exe/crude-mutant
CHANGED
@@ -7,15 +7,27 @@ require "optparse"
|
|
7
7
|
file_to_mutate = ARGV.pop
|
8
8
|
test_command = ARGV.pop
|
9
9
|
|
10
|
-
Options = Struct.new(
|
10
|
+
Options = Struct.new(
|
11
|
+
:use_json_printer,
|
12
|
+
:section,
|
13
|
+
:section_total,
|
14
|
+
)
|
11
15
|
|
12
|
-
args = Options.new(false)
|
16
|
+
args = Options.new(false, 1, 1)
|
13
17
|
OptionParser.new do |opts|
|
14
18
|
opts.banner = "Usage: crude-mutant [options] [test command] [file to mutate]"
|
15
19
|
|
16
20
|
opts.on("-j", "--json", "Print JSON out to STDOUT") do |v|
|
17
21
|
args.use_json_printer = v
|
18
22
|
end
|
23
|
+
|
24
|
+
opts.on("-sSECTION", "--name=SECTION", "Number of current section when parallelizing") do |s|
|
25
|
+
args.section = s
|
26
|
+
end
|
27
|
+
|
28
|
+
opts.on("-sSECTION_TOTAL", "--name=SECTION_TOTAL", "Number of total sectionswhen parallelizing") do |s|
|
29
|
+
args.section_total = s
|
30
|
+
end
|
19
31
|
end.parse!
|
20
32
|
|
21
33
|
if !file_to_mutate || !test_command
|
@@ -29,9 +41,9 @@ end
|
|
29
41
|
printer = args.use_json_printer ? :json : :standard
|
30
42
|
|
31
43
|
if printer == :json
|
32
|
-
CrudeMutant.start(file_to_mutate, test_command, result_printer: printer)
|
44
|
+
CrudeMutant.start(file_to_mutate, test_command, result_printer: printer, section: args.section, total_sections: args.section_total)
|
33
45
|
else
|
34
|
-
CrudeMutant.start(file_to_mutate, test_command, result_printer: printer) do |progress|
|
46
|
+
CrudeMutant.start(file_to_mutate, test_command, result_printer: printer, section: args.section, total_sections: args.section_total) do |progress|
|
35
47
|
clear_string = ' ' * CrudeMutant::TerminalCalculator.new.calculate_length
|
36
48
|
$stdout.print clear_string
|
37
49
|
$stdout.print "\r"
|
data/lib/crude_mutant/version.rb
CHANGED