mutant 0.9.9 → 0.9.10
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/.github/workflows/ci.yml +5 -5
- data/.rubocop.yml +203 -0
- data/Changelog.md +6 -0
- data/Gemfile.lock +23 -83
- data/README.md +25 -4
- data/lib/mutant.rb +0 -2
- data/lib/mutant/mutator/node/literal/range.rb +1 -1
- data/lib/mutant/reporter/cli/printer.rb +2 -2
- data/lib/mutant/reporter/cli/printer/mutation_result.rb +1 -1
- data/lib/mutant/subject/method/instance.rb +41 -2
- data/lib/mutant/version.rb +1 -1
- data/meta/range.rb +26 -0
- data/mutant.gemspec +7 -4
- data/spec/spec_helper.rb +37 -22
- data/spec/unit/mutant/reporter/cli/printer/env_result_spec.rb +1 -1
- data/spec/unit/mutant/reporter/cli/printer/mutation_progress_result_spec.rb +2 -2
- data/spec/unit/mutant/reporter/cli/printer/mutation_result_spec.rb +12 -12
- data/spec/unit/mutant/reporter/cli/printer/subject_result_spec.rb +1 -1
- data/spec/unit/mutant/reporter/cli/printer_spec.rb +4 -4
- data/spec/unit/mutant/reporter/cli_spec.rb +1 -1
- data/spec/unit/mutant/subject/method/instance_spec.rb +117 -22
- data/test_app/Gemfile.minitest +2 -0
- data/test_app/lib/test_app.rb +4 -0
- metadata +55 -21
- data/config/rubocop.yml +0 -205
- data/lib/mutant/color.rb +0 -40
- data/lib/mutant/diff.rb +0 -97
- data/spec/shared/base_behavior.rb +0 -45
- data/spec/support/test_app.rb +0 -7
- data/spec/support/warnings.yml +0 -6
- data/spec/unit/mutant/diff_spec.rb +0 -189
data/test_app/Gemfile.minitest
CHANGED
data/test_app/lib/test_app.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.9.
|
4
|
+
version: 0.9.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Markus Schirp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: abstract_type
|
@@ -84,14 +84,14 @@ dependencies:
|
|
84
84
|
name: diff-lcs
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '1.3'
|
90
90
|
type: :runtime
|
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: '1.3'
|
97
97
|
- !ruby/object:Gem::Dependency
|
@@ -184,14 +184,14 @@ dependencies:
|
|
184
184
|
requirements:
|
185
185
|
- - "~>"
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version: 0.4.
|
187
|
+
version: 0.4.8
|
188
188
|
type: :runtime
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
192
|
- - "~>"
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version: 0.4.
|
194
|
+
version: 0.4.8
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: variable
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -207,33 +207,75 @@ dependencies:
|
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: 0.0.1
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
|
-
name:
|
210
|
+
name: parallel
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
213
|
- - "~>"
|
214
214
|
- !ruby/object:Gem::Version
|
215
|
-
version:
|
215
|
+
version: '1.3'
|
216
216
|
type: :development
|
217
217
|
prerelease: false
|
218
218
|
version_requirements: !ruby/object:Gem::Requirement
|
219
219
|
requirements:
|
220
220
|
- - "~>"
|
221
221
|
- !ruby/object:Gem::Version
|
222
|
-
version:
|
222
|
+
version: '1.3'
|
223
223
|
- !ruby/object:Gem::Dependency
|
224
|
-
name:
|
224
|
+
name: rspec
|
225
225
|
requirement: !ruby/object:Gem::Requirement
|
226
226
|
requirements:
|
227
227
|
- - "~>"
|
228
228
|
- !ruby/object:Gem::Version
|
229
|
-
version: '
|
229
|
+
version: '3.9'
|
230
230
|
type: :development
|
231
231
|
prerelease: false
|
232
232
|
version_requirements: !ruby/object:Gem::Requirement
|
233
233
|
requirements:
|
234
234
|
- - "~>"
|
235
235
|
- !ruby/object:Gem::Version
|
236
|
-
version: '
|
236
|
+
version: '3.9'
|
237
|
+
- !ruby/object:Gem::Dependency
|
238
|
+
name: rspec-core
|
239
|
+
requirement: !ruby/object:Gem::Requirement
|
240
|
+
requirements:
|
241
|
+
- - "~>"
|
242
|
+
- !ruby/object:Gem::Version
|
243
|
+
version: '3.9'
|
244
|
+
type: :development
|
245
|
+
prerelease: false
|
246
|
+
version_requirements: !ruby/object:Gem::Requirement
|
247
|
+
requirements:
|
248
|
+
- - "~>"
|
249
|
+
- !ruby/object:Gem::Version
|
250
|
+
version: '3.9'
|
251
|
+
- !ruby/object:Gem::Dependency
|
252
|
+
name: rspec-its
|
253
|
+
requirement: !ruby/object:Gem::Requirement
|
254
|
+
requirements:
|
255
|
+
- - "~>"
|
256
|
+
- !ruby/object:Gem::Version
|
257
|
+
version: 1.2.0
|
258
|
+
type: :development
|
259
|
+
prerelease: false
|
260
|
+
version_requirements: !ruby/object:Gem::Requirement
|
261
|
+
requirements:
|
262
|
+
- - "~>"
|
263
|
+
- !ruby/object:Gem::Version
|
264
|
+
version: 1.2.0
|
265
|
+
- !ruby/object:Gem::Dependency
|
266
|
+
name: rubocop
|
267
|
+
requirement: !ruby/object:Gem::Requirement
|
268
|
+
requirements:
|
269
|
+
- - "~>"
|
270
|
+
- !ruby/object:Gem::Version
|
271
|
+
version: 0.79.0
|
272
|
+
type: :development
|
273
|
+
prerelease: false
|
274
|
+
version_requirements: !ruby/object:Gem::Requirement
|
275
|
+
requirements:
|
276
|
+
- - "~>"
|
277
|
+
- !ruby/object:Gem::Version
|
278
|
+
version: 0.79.0
|
237
279
|
description: Mutation Testing for Ruby.
|
238
280
|
email:
|
239
281
|
- mbj@schirp-dso.com
|
@@ -257,7 +299,6 @@ files:
|
|
257
299
|
- bin/mutant
|
258
300
|
- config/devtools.yml
|
259
301
|
- config/reek.yml
|
260
|
-
- config/rubocop.yml
|
261
302
|
- config/yardstick.yml
|
262
303
|
- docs/commercial-support.md
|
263
304
|
- docs/concurrency.md
|
@@ -284,10 +325,8 @@ files:
|
|
284
325
|
- lib/mutant/ast/types.rb
|
285
326
|
- lib/mutant/bootstrap.rb
|
286
327
|
- lib/mutant/cli.rb
|
287
|
-
- lib/mutant/color.rb
|
288
328
|
- lib/mutant/config.rb
|
289
329
|
- lib/mutant/context.rb
|
290
|
-
- lib/mutant/diff.rb
|
291
330
|
- lib/mutant/env.rb
|
292
331
|
- lib/mutant/expression.rb
|
293
332
|
- lib/mutant/expression/method.rb
|
@@ -507,7 +546,6 @@ files:
|
|
507
546
|
- spec/integration/mutant/rspec_spec.rb
|
508
547
|
- spec/integration/mutant/test_mutator_handles_types_spec.rb
|
509
548
|
- spec/integrations.yml
|
510
|
-
- spec/shared/base_behavior.rb
|
511
549
|
- spec/shared/framework_integration_behavior.rb
|
512
550
|
- spec/shared/method_matcher_behavior.rb
|
513
551
|
- spec/spec_helper.rb
|
@@ -516,8 +554,6 @@ files:
|
|
516
554
|
- spec/support/ice_nine_config.rb
|
517
555
|
- spec/support/ruby_vm.rb
|
518
556
|
- spec/support/shared_context.rb
|
519
|
-
- spec/support/test_app.rb
|
520
|
-
- spec/support/warnings.yml
|
521
557
|
- spec/support/xspec.rb
|
522
558
|
- spec/unit/mutant/ast/find_metaclass_containing_spec.rb
|
523
559
|
- spec/unit/mutant/ast/meta/optarg_spec.rb
|
@@ -532,7 +568,6 @@ files:
|
|
532
568
|
- spec/unit/mutant/clock_monotonic_spec.rb
|
533
569
|
- spec/unit/mutant/config_spec.rb
|
534
570
|
- spec/unit/mutant/context_spec.rb
|
535
|
-
- spec/unit/mutant/diff_spec.rb
|
536
571
|
- spec/unit/mutant/env_spec.rb
|
537
572
|
- spec/unit/mutant/expression/method_spec.rb
|
538
573
|
- spec/unit/mutant/expression/methods_spec.rb
|
@@ -648,7 +683,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
648
683
|
- !ruby/object:Gem::Version
|
649
684
|
version: '0'
|
650
685
|
requirements: []
|
651
|
-
rubygems_version: 3.
|
686
|
+
rubygems_version: 3.0.3
|
652
687
|
signing_key:
|
653
688
|
specification_version: 4
|
654
689
|
summary: ''
|
@@ -672,7 +707,6 @@ test_files:
|
|
672
707
|
- spec/unit/mutant/clock_monotonic_spec.rb
|
673
708
|
- spec/unit/mutant/config_spec.rb
|
674
709
|
- spec/unit/mutant/context_spec.rb
|
675
|
-
- spec/unit/mutant/diff_spec.rb
|
676
710
|
- spec/unit/mutant/env_spec.rb
|
677
711
|
- spec/unit/mutant/expression/method_spec.rb
|
678
712
|
- spec/unit/mutant/expression/methods_spec.rb
|
data/config/rubocop.yml
DELETED
@@ -1,205 +0,0 @@
|
|
1
|
-
inherit_from: ../.rubocop.yml
|
2
|
-
|
3
|
-
# Avoid parameter lists longer than five parameters.
|
4
|
-
ParameterLists:
|
5
|
-
Max: 3
|
6
|
-
CountKeywordArgs: true
|
7
|
-
|
8
|
-
# Avoid more than `Max` levels of nesting.
|
9
|
-
BlockNesting:
|
10
|
-
Max: 3
|
11
|
-
|
12
|
-
# Align with the style guide.
|
13
|
-
CollectionMethods:
|
14
|
-
Enabled: true
|
15
|
-
PreferredMethods:
|
16
|
-
collect: 'map'
|
17
|
-
inject: 'reduce'
|
18
|
-
find: 'detect'
|
19
|
-
find_all: 'select'
|
20
|
-
|
21
|
-
AccessModifierIndentation:
|
22
|
-
Enabled: false
|
23
|
-
|
24
|
-
# Limit line length
|
25
|
-
LineLength:
|
26
|
-
Max: 120
|
27
|
-
|
28
|
-
# Disable documentation checking until a class needs to be documented once
|
29
|
-
Documentation:
|
30
|
-
Enabled: false
|
31
|
-
|
32
|
-
# Permit
|
33
|
-
#
|
34
|
-
# boolean_check? or fail
|
35
|
-
#
|
36
|
-
# Reject
|
37
|
-
#
|
38
|
-
# if foo or bar
|
39
|
-
# ...
|
40
|
-
# end
|
41
|
-
AndOr:
|
42
|
-
EnforcedStyle: conditionals
|
43
|
-
|
44
|
-
# Do not favor modifier if/unless usage when you have a single-line body
|
45
|
-
IfUnlessModifier:
|
46
|
-
Enabled: false
|
47
|
-
|
48
|
-
# Allow case equality operator (in limited use within the specs)
|
49
|
-
CaseEquality:
|
50
|
-
Enabled: false
|
51
|
-
|
52
|
-
# Constants do not always have to use SCREAMING_SNAKE_CASE
|
53
|
-
ConstantName:
|
54
|
-
Enabled: false
|
55
|
-
|
56
|
-
# Not all trivial readers/writers can be defined with attr_* methods
|
57
|
-
TrivialAccessors:
|
58
|
-
Enabled: false
|
59
|
-
|
60
|
-
# Allow empty lines around class body
|
61
|
-
EmptyLinesAroundClassBody:
|
62
|
-
Enabled: false
|
63
|
-
|
64
|
-
# Allow empty lines around module body
|
65
|
-
EmptyLinesAroundModuleBody:
|
66
|
-
Enabled: false
|
67
|
-
|
68
|
-
# Allow empty lines around block body
|
69
|
-
EmptyLinesAroundBlockBody:
|
70
|
-
Enabled: false
|
71
|
-
|
72
|
-
# Allow multiple line operations to not require indentation
|
73
|
-
MultilineOperationIndentation:
|
74
|
-
Enabled: false
|
75
|
-
|
76
|
-
# Prefer String#% over Kernel#sprintf
|
77
|
-
FormatString:
|
78
|
-
EnforcedStyle: percent
|
79
|
-
|
80
|
-
# Use square brackets for literal Array objects
|
81
|
-
PercentLiteralDelimiters:
|
82
|
-
PreferredDelimiters:
|
83
|
-
'%': '{}'
|
84
|
-
'%i': '[]'
|
85
|
-
'%q': ()
|
86
|
-
'%Q': ()
|
87
|
-
'%r': '{}'
|
88
|
-
'%s': ()
|
89
|
-
'%w': '[]'
|
90
|
-
'%W': '[]'
|
91
|
-
'%x': ()
|
92
|
-
|
93
|
-
# Use %i[...] for arrays of symbols
|
94
|
-
SymbolArray:
|
95
|
-
Enabled: true
|
96
|
-
|
97
|
-
# Prefer #kind_of? over #is_a?
|
98
|
-
ClassCheck:
|
99
|
-
EnforcedStyle: kind_of?
|
100
|
-
|
101
|
-
# Do not prefer double quotes to be used when %q or %Q is more appropriate
|
102
|
-
Style/RedundantPercentQ:
|
103
|
-
Enabled: false
|
104
|
-
|
105
|
-
# Allow a maximum ABC score
|
106
|
-
Metrics/AbcSize:
|
107
|
-
Max: 21.02
|
108
|
-
|
109
|
-
Metrics/BlockLength:
|
110
|
-
Exclude:
|
111
|
-
- 'spec/**/*.rb'
|
112
|
-
- 'mutant.gemspec'
|
113
|
-
|
114
|
-
# Buggy cop, returns false positive for our code base
|
115
|
-
NonLocalExitFromIterator:
|
116
|
-
Enabled: false
|
117
|
-
|
118
|
-
# To allow alignment of similar expressions we want to allow more than one
|
119
|
-
# space around operators:
|
120
|
-
#
|
121
|
-
# let(:a) { bar + something }
|
122
|
-
# let(:b) { foobar + something }
|
123
|
-
#
|
124
|
-
SpaceAroundOperators:
|
125
|
-
Enabled: false
|
126
|
-
|
127
|
-
# We use parallel assignments with great success
|
128
|
-
ParallelAssignment:
|
129
|
-
Enabled: false
|
130
|
-
|
131
|
-
# Allow additional specs
|
132
|
-
ExtraSpacing:
|
133
|
-
AllowForAlignment: true
|
134
|
-
|
135
|
-
# Buggy
|
136
|
-
FormatParameterMismatch:
|
137
|
-
Enabled: false
|
138
|
-
|
139
|
-
# Different preference
|
140
|
-
SignalException:
|
141
|
-
EnforcedStyle: semantic
|
142
|
-
|
143
|
-
# Do not use `alias`
|
144
|
-
Alias:
|
145
|
-
EnforcedStyle: prefer_alias_method
|
146
|
-
|
147
|
-
# Do not waste my horizontal or vertical space
|
148
|
-
Layout/FirstArrayElementIndentation:
|
149
|
-
Enabled: false
|
150
|
-
|
151
|
-
# Prefer
|
152
|
-
#
|
153
|
-
# some_receiver
|
154
|
-
# .foo
|
155
|
-
# .bar
|
156
|
-
# .baz
|
157
|
-
#
|
158
|
-
# Over
|
159
|
-
#
|
160
|
-
# some_receiver.foo
|
161
|
-
# .bar
|
162
|
-
# .baz
|
163
|
-
MultilineMethodCallIndentation:
|
164
|
-
EnforcedStyle: indented
|
165
|
-
|
166
|
-
# Prefer `public_send` and `__send__` over `send`
|
167
|
-
Send:
|
168
|
-
Enabled: true
|
169
|
-
|
170
|
-
Layout/HashAlignment:
|
171
|
-
EnforcedColonStyle: table
|
172
|
-
EnforcedHashRocketStyle: table
|
173
|
-
Layout/EmptyLineAfterGuardClause:
|
174
|
-
Enabled: false
|
175
|
-
Layout/SpaceInsideArrayLiteralBrackets:
|
176
|
-
Enabled: false
|
177
|
-
Lint/BooleanSymbol:
|
178
|
-
Enabled: false
|
179
|
-
Lint/InterpolationCheck:
|
180
|
-
Enabled: false
|
181
|
-
Lint/MissingCopEnableDirective:
|
182
|
-
Enabled: false
|
183
|
-
Lint/UnifiedInteger:
|
184
|
-
Enabled: false
|
185
|
-
Naming/FileName:
|
186
|
-
Enabled: false
|
187
|
-
Style/AccessModifierDeclarations:
|
188
|
-
Enabled: false
|
189
|
-
Style/CommentedKeyword:
|
190
|
-
Enabled: false
|
191
|
-
Style/MixinGrouping:
|
192
|
-
Enabled: false
|
193
|
-
Style/RaiseArgs:
|
194
|
-
Enabled: false
|
195
|
-
Style/RescueStandardError:
|
196
|
-
Enabled: false
|
197
|
-
Style/StderrPuts:
|
198
|
-
Enabled: false
|
199
|
-
# suggesting single letter variablesl bah
|
200
|
-
Naming/RescuedExceptionsVariableName:
|
201
|
-
Enabled: false
|
202
|
-
# false positive on private keywords
|
203
|
-
Layout/IndentationWidth:
|
204
|
-
Enabled: false
|
205
|
-
|
data/lib/mutant/color.rb
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Mutant
|
4
|
-
# Class to colorize strings
|
5
|
-
class Color
|
6
|
-
include Adamantium::Flat, Concord.new(:code)
|
7
|
-
|
8
|
-
# Format text with color
|
9
|
-
#
|
10
|
-
# @param [String] text
|
11
|
-
#
|
12
|
-
# @return [String]
|
13
|
-
def format(text)
|
14
|
-
"\e[#{code}m#{text}\e[0m"
|
15
|
-
end
|
16
|
-
|
17
|
-
NONE = Class.new(self) do
|
18
|
-
|
19
|
-
# Format null color
|
20
|
-
#
|
21
|
-
# @param [String] text
|
22
|
-
#
|
23
|
-
# @return [String]
|
24
|
-
# the argument string
|
25
|
-
def format(text)
|
26
|
-
text
|
27
|
-
end
|
28
|
-
|
29
|
-
private
|
30
|
-
|
31
|
-
def initialize; end
|
32
|
-
|
33
|
-
end.new
|
34
|
-
|
35
|
-
RED = Color.new(31)
|
36
|
-
GREEN = Color.new(32)
|
37
|
-
BLUE = Color.new(34)
|
38
|
-
|
39
|
-
end # Color
|
40
|
-
end # Mutant
|