crude-mutant 0.3.0 → 0.3.1
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 +15 -11
- data/exe/crude-mutant +15 -11
- 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: e70b37b0b5a157edeb24613ff822a65483e844373ba41e8514585bd3e8897f70
|
4
|
+
data.tar.gz: 8a61f0a7d82c58729811ac0bf4b4a92576869123d48db5ee46860a124b38bb2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e260299a873a4e96cecf423c8ed13adde08fb6afe7ea7b4a3905178bb5d2e9912e102e94b46922abbaa90ae2f94b4af0cd5057b3c6ef1f1076fb8bbe72c3d16c
|
7
|
+
data.tar.gz: b49afed2c1654bf48945057a31b60824caa25e96a7a5ad19fb22f4d843b4c4e14bc62397197c8699262f0da131529d9d7c36dd971a8260860ffd4ac62627e33a
|
data/Gemfile.lock
CHANGED
data/exe/cm
CHANGED
@@ -28,15 +28,19 @@ end
|
|
28
28
|
|
29
29
|
printer = args.use_json_printer ? :json : :standard
|
30
30
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
31
|
+
if printer == :json
|
32
|
+
CrudeMutant.start(file_to_mutate, test_command, result_printer: printer)
|
33
|
+
else
|
34
|
+
CrudeMutant.start(file_to_mutate, test_command, result_printer: printer) do |progress|
|
35
|
+
clear_string = ' ' * CrudeMutant::TerminalCalculator.new.calculate_length
|
36
|
+
$stdout.print clear_string
|
37
|
+
$stdout.print "\r"
|
38
|
+
|
39
|
+
completed = "Completed #{progress.run_results.size}/#{progress.total_runs_to_perform}"
|
40
|
+
average = "Average time per run: #{progress.avg_time.round(2)} second(s)"
|
41
|
+
eta_time = (progress.total_runs_to_perform - progress.run_results.size) * progress.avg_time
|
42
|
+
eta = "Estimated time of completion: #{eta_time.round(2)} seconds"
|
43
|
+
$stdout.print "#{completed} #{average} #{eta}\r"
|
44
|
+
$stdout.flush
|
45
|
+
end
|
42
46
|
end
|
data/exe/crude-mutant
CHANGED
@@ -28,15 +28,19 @@ end
|
|
28
28
|
|
29
29
|
printer = args.use_json_printer ? :json : :standard
|
30
30
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
31
|
+
if printer == :json
|
32
|
+
CrudeMutant.start(file_to_mutate, test_command, result_printer: printer)
|
33
|
+
else
|
34
|
+
CrudeMutant.start(file_to_mutate, test_command, result_printer: printer) do |progress|
|
35
|
+
clear_string = ' ' * CrudeMutant::TerminalCalculator.new.calculate_length
|
36
|
+
$stdout.print clear_string
|
37
|
+
$stdout.print "\r"
|
38
|
+
|
39
|
+
completed = "Completed #{progress.run_results.size}/#{progress.total_runs_to_perform}"
|
40
|
+
average = "Average time per run: #{progress.avg_time.round(2)} second(s)"
|
41
|
+
eta_time = (progress.total_runs_to_perform - progress.run_results.size) * progress.avg_time
|
42
|
+
eta = "Estimated time of completion: #{eta_time.round(2)} seconds"
|
43
|
+
$stdout.print "#{completed} #{average} #{eta}\r"
|
44
|
+
$stdout.flush
|
45
|
+
end
|
42
46
|
end
|
data/lib/crude_mutant/version.rb
CHANGED