mutant 0.11.26 → 0.11.28
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.
- checksums.yaml +4 -4
- data/lib/mutant/cli/command/environment.rb +4 -0
- data/lib/mutant/cli/command.rb +10 -6
- data/lib/mutant/mutation/runner.rb +2 -0
- data/lib/mutant/mutator/node/literal/hash.rb +3 -1
- data/lib/mutant/mutator/node/send.rb +1 -0
- data/lib/mutant/reporter/cli/printer/env_progress.rb +3 -4
- data/lib/mutant/reporter/cli/printer/status_progressive.rb +0 -1
- data/lib/mutant/result.rb +0 -11
- data/lib/mutant/version.rb +1 -1
- data/lib/mutant/world.rb +4 -0
- metadata +5 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2580053028745a106b883c1468b4e0c4462d1e5e443f12533ca277149f603239
|
4
|
+
data.tar.gz: db5d4f28324b0846a9872b3a7b841e8dcdb84ae204f6c15def9f9381db064ea3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 125e846599d5bfbd7ec52d3f7bbcf78f53d2584b7dd447d9313954c10ff4e5176c59fec396833b97f81bcb4bb40d9fdcf1cc0ef138c3a53685af503b0f95678b
|
7
|
+
data.tar.gz: 2fb0163bfcdc01ed03fb34418a9522af0dab49e4fb8fa91cccf8c9e7cbbdcbd00551e2c36087ca8ee587bda317cc391a0bf7eae564be7834b53eff96873abd55
|
@@ -56,6 +56,10 @@ module Mutant
|
|
56
56
|
set(matcher: @config.matcher.add(attribute, value))
|
57
57
|
end
|
58
58
|
|
59
|
+
def effective_options
|
60
|
+
instance_of?(Environment) ? EMPTY_ARRAY : super()
|
61
|
+
end
|
62
|
+
|
59
63
|
# rubocop:disable Metrics/MethodLength
|
60
64
|
def add_environment_options(parser)
|
61
65
|
parser.separator('Environment:')
|
data/lib/mutant/cli/command.rb
CHANGED
@@ -6,7 +6,7 @@ module Mutant
|
|
6
6
|
class Command
|
7
7
|
include AbstractType, Anima.new(
|
8
8
|
:main,
|
9
|
-
:
|
9
|
+
:parent_names,
|
10
10
|
:print_profile,
|
11
11
|
:world,
|
12
12
|
:zombie
|
@@ -27,10 +27,10 @@ module Mutant
|
|
27
27
|
# @return [Command]
|
28
28
|
#
|
29
29
|
# rubocop:disable Metrics/ParameterLists
|
30
|
-
def self.parse(arguments:,
|
30
|
+
def self.parse(arguments:, parent_names: nil, print_profile: false, world:, zombie: false)
|
31
31
|
new(
|
32
32
|
main: nil,
|
33
|
-
|
33
|
+
parent_names: parent_names,
|
34
34
|
print_profile: print_profile,
|
35
35
|
world: world,
|
36
36
|
zombie: zombie
|
@@ -63,7 +63,7 @@ module Mutant
|
|
63
63
|
#
|
64
64
|
# @return [String]
|
65
65
|
def full_name
|
66
|
-
[*
|
66
|
+
[*parent_names, self.class.command_name].join(' ')
|
67
67
|
end
|
68
68
|
|
69
69
|
alias_method :print_profile?, :print_profile
|
@@ -97,13 +97,17 @@ module Mutant
|
|
97
97
|
add_global_options(parser)
|
98
98
|
add_subcommands(parser)
|
99
99
|
|
100
|
-
|
100
|
+
effective_options.each do |method_name|
|
101
101
|
2.times { parser.separator(nil) }
|
102
102
|
__send__(method_name, parser)
|
103
103
|
end
|
104
104
|
end
|
105
105
|
end
|
106
106
|
|
107
|
+
def effective_options
|
108
|
+
self.class::OPTIONS
|
109
|
+
end
|
110
|
+
|
107
111
|
def capture_main(&block)
|
108
112
|
@main = block
|
109
113
|
end
|
@@ -189,7 +193,7 @@ module Mutant
|
|
189
193
|
find_command(command_name).bind do |command|
|
190
194
|
command.parse(
|
191
195
|
arguments: arguments,
|
192
|
-
|
196
|
+
parent_names: [*parent_names, self.class::NAME],
|
193
197
|
print_profile: print_profile,
|
194
198
|
world: world,
|
195
199
|
zombie: zombie
|
@@ -206,6 +206,7 @@ module Mutant
|
|
206
206
|
emit(receiver) if receiver && !left_op_assignment?
|
207
207
|
end
|
208
208
|
|
209
|
+
# rubocop:disable Style/HashEachMethods - its not a hash ;)
|
209
210
|
def mutate_arguments
|
210
211
|
emit_type(receiver, selector)
|
211
212
|
remaining_children_with_index.each do |_node, index|
|
@@ -14,7 +14,6 @@ module Mutant
|
|
14
14
|
:coverage,
|
15
15
|
:env,
|
16
16
|
:killtime,
|
17
|
-
:overhead,
|
18
17
|
:runtime
|
19
18
|
)
|
20
19
|
|
@@ -25,7 +24,7 @@ module Mutant
|
|
25
24
|
[:info, 'Timeouts: %s', :amount_timeouts ],
|
26
25
|
[:info, 'Runtime: %0.2fs', :runtime ],
|
27
26
|
[:info, 'Killtime: %0.2fs', :killtime ],
|
28
|
-
[:info, '
|
27
|
+
[:info, 'Efficiency: %0.2f%%', :efficiency_percent ],
|
29
28
|
[:info, 'Mutations/s: %0.2f', :mutations_per_second ],
|
30
29
|
[:status, 'Coverage: %0.2f%%', :coverage_percent ]
|
31
30
|
].each(&:freeze)
|
@@ -50,8 +49,8 @@ module Mutant
|
|
50
49
|
coverage * 100
|
51
50
|
end
|
52
51
|
|
53
|
-
def
|
54
|
-
(
|
52
|
+
def efficiency_percent
|
53
|
+
(killtime / runtime) * 100
|
55
54
|
end
|
56
55
|
end # EnvProgress
|
57
56
|
end # Printer
|
data/lib/mutant/result.rb
CHANGED
@@ -50,17 +50,6 @@ module Mutant
|
|
50
50
|
|
51
51
|
private_constant(*constants(false))
|
52
52
|
|
53
|
-
# Mutant overhead running mutatet tests
|
54
|
-
#
|
55
|
-
# This is NOT the overhead of mutation testing, just an engine specific
|
56
|
-
# measurement for the efficiency of the parallelization engine, kill
|
57
|
-
# isolation etc.
|
58
|
-
#
|
59
|
-
# @return [Float]
|
60
|
-
def overhead
|
61
|
-
runtime - killtime
|
62
|
-
end
|
63
|
-
|
64
53
|
# Hook called when module gets included
|
65
54
|
#
|
66
55
|
# @param [Class, Module] host
|
data/lib/mutant/version.rb
CHANGED
data/lib/mutant/world.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mutant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Markus Schirp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: diff-lcs
|
@@ -30,20 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 3.
|
34
|
-
- - ">="
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: 3.2.2.4
|
33
|
+
version: 3.3.0
|
37
34
|
type: :runtime
|
38
35
|
prerelease: false
|
39
36
|
version_requirements: !ruby/object:Gem::Requirement
|
40
37
|
requirements:
|
41
38
|
- - "~>"
|
42
39
|
- !ruby/object:Gem::Version
|
43
|
-
version: 3.
|
44
|
-
- - ">="
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: 3.2.2.4
|
40
|
+
version: 3.3.0
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
name: regexp_parser
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -380,7 +374,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
380
374
|
- !ruby/object:Gem::Version
|
381
375
|
version: '0'
|
382
376
|
requirements: []
|
383
|
-
rubygems_version: 3.
|
377
|
+
rubygems_version: 3.5.3
|
384
378
|
signing_key:
|
385
379
|
specification_version: 4
|
386
380
|
summary: ''
|