mutant 0.9.3 → 0.9.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +121 -0
  3. data/Changelog.md +24 -0
  4. data/Gemfile +0 -15
  5. data/Gemfile.lock +56 -59
  6. data/Gemfile.shared +7 -0
  7. data/LICENSE +1 -1
  8. data/README.md +10 -1
  9. data/config/rubocop.yml +10 -3
  10. data/docs/commercial-support.md +14 -0
  11. data/lib/mutant.rb +4 -2
  12. data/lib/mutant/cli.rb +5 -5
  13. data/lib/mutant/integration.rb +1 -1
  14. data/lib/mutant/license.rb +2 -2
  15. data/lib/mutant/license/subscription/opensource.rb +1 -1
  16. data/lib/mutant/meta.rb +1 -3
  17. data/lib/mutant/meta/example/verification.rb +1 -1
  18. data/lib/mutant/mutator/node/generic.rb +0 -48
  19. data/lib/mutant/mutator/node/send.rb +1 -1
  20. data/lib/mutant/parallel.rb +1 -1
  21. data/lib/mutant/registry.rb +2 -7
  22. data/lib/mutant/reporter/cli/format.rb +1 -1
  23. data/lib/mutant/transform.rb +6 -5
  24. data/lib/mutant/version.rb +1 -1
  25. data/lib/mutant/zombifier.rb +2 -0
  26. data/mutant.gemspec +15 -13
  27. data/spec/integrations.yml +3 -1
  28. data/spec/support/corpus.rb +3 -3
  29. data/spec/support/ruby_vm.rb +1 -2
  30. data/spec/support/shared_context.rb +3 -3
  31. data/spec/support/xspec.rb +2 -2
  32. data/spec/unit/mutant/license_spec.rb +2 -2
  33. data/spec/unit/mutant/parallel/driver_spec.rb +4 -4
  34. data/spec/unit/mutant/parallel/worker_spec.rb +5 -5
  35. data/spec/unit/mutant/parallel_spec.rb +7 -7
  36. data/spec/unit/mutant/registry_spec.rb +52 -25
  37. data/spec/unit/mutant/repository/diff/ranges_spec.rb +2 -2
  38. metadata +44 -23
  39. data/.circleci/config.yml +0 -53
  40. data/lib/mutant/base.rb +0 -192
  41. data/lib/mutant/variable.rb +0 -282
  42. data/spec/unit/mutant/either_spec.rb +0 -247
  43. data/spec/unit/mutant/maybe_spec.rb +0 -60
  44. data/spec/unit/mutant/variable_spec.rb +0 -618
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 88d8955c5d10cb6d884c519e2e9472affa627ab71377f73bd0746f8e27aea1d5
4
- data.tar.gz: e4d07470181a24861d61e5f90a107fdcdc6da4f959392bf25c8bf6c8ce1e3628
3
+ metadata.gz: 5ac360cb601cc521059ca91167f18898ca897a7c475244e122c2fa46c80213b6
4
+ data.tar.gz: 557f073ba78b87381f7a424b198df8a6450e16b2f4bf3b3863ba370aa4fe7207
5
5
  SHA512:
6
- metadata.gz: 6906c7b02d2979d2f666735266a1c7220d75b6af35457ff54b021b3cf5306c1c4b94688eacfb685c46ee554353f91d6a78f6ac999e7535981f162e4b9d312a65
7
- data.tar.gz: '059b7da0f47093ec1a7416fd1c3492f3eb01ccd3741796ff4f97ddbf597d2fd37c102c2bacfd5268204115efb6fc428088225d18785e22febfb49ba0d625710c'
6
+ metadata.gz: d8375c95cab6deab2f6b460892e40c3922dc5adf2b2dc188f9a3ac459dfe5c5a453da543b4fb8f95e7596019989aca80cf01c66d49a3796ef678b3f48c30b136
7
+ data.tar.gz: 4dc79e273ef83112e0e4b2d4e6c74dd8f0bc0366537cb7efc5f71fbdd0a22a93ab29e8c7726c1a78224fc020a92b202eed2ab1ef9a534fd008f5a621779a7aa8
@@ -0,0 +1,121 @@
1
+ name: CI
2
+
3
+ on: push
4
+
5
+ jobs:
6
+ base:
7
+ name: Base steps
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - uses: actions/checkout@v2
11
+ - name: Check Whitespace
12
+ run: git diff --check -- HEAD~1
13
+ ruby-spec:
14
+ name: Unit Specs
15
+ runs-on: ${{ matrix.os }}
16
+ timeout-minutes: 5
17
+ strategy:
18
+ fail-fast: false
19
+ matrix:
20
+ ruby: ['2.6', '2.7']
21
+ os: [ubuntu-latest]
22
+ steps:
23
+ - uses: actions/checkout@v2
24
+ - uses: actions/setup-ruby@v1
25
+ with:
26
+ ruby-version: ${{ matrix.ruby }}
27
+ - run: |
28
+ gem install bundler
29
+ bundle install
30
+ - run: bundle exec rspec spec/unit
31
+ ruby-mutant:
32
+ name: Mutation coverage
33
+ runs-on: ${{ matrix.os }}
34
+ timeout-minutes: 5
35
+ strategy:
36
+ fail-fast: false
37
+ matrix:
38
+ ruby: ['2.6', '2.7']
39
+ os: [ubuntu-latest]
40
+ steps:
41
+ - uses: actions/checkout@v2
42
+ with:
43
+ fetch-depth: 0
44
+ - uses: actions/setup-ruby@v1
45
+ with:
46
+ ruby-version: ${{ matrix.ruby }}
47
+ - run: |
48
+ gem install bundler
49
+ bundle install
50
+ - run: bundle exec mutant --since HEAD~1 --zombie -- 'Mutant*'
51
+ ruby-integration-minitest:
52
+ name: Integration Minitest
53
+ runs-on: ${{ matrix.os }}
54
+ timeout-minutes: 5
55
+ strategy:
56
+ fail-fast: false
57
+ matrix:
58
+ ruby: ['2.6', '2.7']
59
+ os: [ubuntu-latest]
60
+ steps:
61
+ - uses: actions/checkout@v2
62
+ - uses: actions/setup-ruby@v1
63
+ with:
64
+ ruby-version: ${{ matrix.ruby }}
65
+ - run: gem list
66
+ - run: |
67
+ gem install bundler
68
+ bundle install
69
+ - run: bundle exec rspec spec/integration -e minitest
70
+ ruby-integration-rspec:
71
+ name: Integration RSpec
72
+ runs-on: ${{ matrix.os }}
73
+ timeout-minutes: 10
74
+ strategy:
75
+ fail-fast: false
76
+ matrix:
77
+ ruby: ['2.6', '2.7']
78
+ os: [ubuntu-latest]
79
+ steps:
80
+ - uses: actions/checkout@v2
81
+ - uses: actions/setup-ruby@v1
82
+ with:
83
+ ruby-version: ${{ matrix.ruby }}
84
+ - run: |
85
+ gem install bundler
86
+ bundle install
87
+ - run: bundle exec rspec spec/integration -e rspec
88
+ ruby-integration-generation:
89
+ name: Integration Mutation Generation
90
+ runs-on: ${{ matrix.os }}
91
+ timeout-minutes: 5
92
+ strategy:
93
+ fail-fast: false
94
+ matrix:
95
+ ruby: ['2.6', '2.7']
96
+ os: [ubuntu-latest]
97
+ steps:
98
+ - uses: actions/checkout@v2
99
+ - uses: actions/setup-ruby@v1
100
+ with:
101
+ ruby-version: ${{ matrix.ruby }}
102
+ - run: |
103
+ gem install bundler
104
+ bundle install
105
+ - run: bundle exec rspec spec/integration -e generation
106
+ ruby-rubocop:
107
+ name: Rubocop
108
+ runs-on: ${{ matrix.os }}
109
+ timeout-minutes: 5
110
+ strategy:
111
+ fail-fast: false
112
+ matrix:
113
+ ruby: ['2.7']
114
+ os: [ubuntu-latest]
115
+ steps:
116
+ - uses: actions/checkout@v2
117
+ - uses: actions/setup-ruby@v1
118
+ with:
119
+ ruby-version: ${{ matrix.ruby }}
120
+ - run: bundle install
121
+ - run: bundle exec rake metrics:rubocop
@@ -1,3 +1,27 @@
1
+ # v0.9.8 2020-08-02
2
+
3
+ * Change to generic catch all node mutator. This allows better cross parser version compatibility.
4
+
5
+ # v0.9.7 2020-07-22
6
+
7
+ * Bump parser dependency to 2.7.1, note this still does not support Ruby 2.7 syntax.
8
+ But it supports running bundling with that parser version.
9
+ * Nail diff-lcs to 1.3 till output difference for 1.4 can be addressed.
10
+
11
+ # v0.9.6 2020-04-20
12
+
13
+ * Dependencies upgrade, should not change user facing semantics.
14
+ * Bump license nudge to 40s
15
+
16
+ # v0.9.5 2020-02-02
17
+
18
+ * Change to 2.7 parser series.
19
+ This does not drop support for < 2.7 but enables to in the future add full Ruby 2.7 support.
20
+
21
+ # v0.9.4 2020-01-03
22
+
23
+ * Bump unparser dependency
24
+
1
25
  # v0.9.3 2020-01-03
2
26
 
3
27
  * Change to soft dependency on mutant-license.
data/Gemfile CHANGED
@@ -5,18 +5,3 @@ source 'https://rubygems.org'
5
5
  gemspec name: 'mutant'
6
6
 
7
7
  eval_gemfile File.expand_path('Gemfile.shared', __dir__)
8
-
9
- gem 'unparser', git: 'https://github.com/mbj/unparser.git'
10
-
11
- gem(
12
- 'devtools',
13
- git: 'https://github.com/mbj/devtools.git',
14
- ref: '26ba0a1053e6cf7b79fc72d513a73457f9a38ead'
15
- )
16
-
17
- # Mutant itself uses an opensource license key.
18
- # Scoped to https://github.com/mbj/mutant it'll
19
- # not be useful elsewhere.
20
- source 'https://oss:Px2ENN7S91OmWaD5G7MIQJi1dmtmYrEh@gem.mutant.dev' do
21
- gem 'mutant-license'
22
- end
@@ -1,55 +1,21 @@
1
- GIT
2
- remote: https://github.com/mbj/devtools.git
3
- revision: 26ba0a1053e6cf7b79fc72d513a73457f9a38ead
4
- ref: 26ba0a1053e6cf7b79fc72d513a73457f9a38ead
5
- specs:
6
- devtools (0.1.23)
7
- abstract_type (~> 0.0.7)
8
- adamantium (~> 0.2.0)
9
- anima (~> 0.3.0)
10
- concord (~> 0.1.5)
11
- flay (~> 2.12.0)
12
- flog (~> 4.6.2)
13
- procto (~> 0.0.3)
14
- rake (~> 12.3.0)
15
- reek (~> 5.3.0)
16
- rspec (~> 3.8.0)
17
- rspec-core (~> 3.8.0)
18
- rspec-its (~> 1.2.0)
19
- rubocop (~> 0.61.1)
20
- simplecov (~> 0.16.1)
21
- yard (~> 0.9.16)
22
- yardstick (~> 0.9.9)
23
-
24
- GIT
25
- remote: https://github.com/mbj/unparser.git
26
- revision: 157a5b3b43e9f1d540da74b1751dc2b6f7601c3b
27
- specs:
28
- unparser (0.4.6)
29
- abstract_type (~> 0.0.7)
30
- adamantium (~> 0.2.0)
31
- concord (~> 0.1.5)
32
- diff-lcs (~> 1.3)
33
- equalizer (~> 0.0.9)
34
- parser (~> 2.6.5)
35
- procto (~> 0.0.2)
36
-
37
1
  PATH
38
2
  remote: .
39
3
  specs:
40
- mutant (0.9.3)
4
+ mutant (0.9.8)
41
5
  abstract_type (~> 0.0.7)
42
6
  adamantium (~> 0.2.0)
43
7
  anima (~> 0.3.1)
44
8
  ast (~> 2.2)
45
9
  concord (~> 0.1.5)
46
- diff-lcs (~> 1.3)
10
+ diff-lcs (= 1.3)
47
11
  equalizer (~> 0.0.9)
48
12
  ice_nine (~> 0.11.1)
49
13
  memoizable (~> 0.4.2)
50
- parser (~> 2.6.5)
14
+ mprelude (~> 0.1.0)
15
+ parser (~> 2.7.1)
51
16
  procto (~> 0.0.2)
52
- unparser (~> 0.4.5)
17
+ unparser (~> 0.4.6)
18
+ variable (~> 0.0.1)
53
19
 
54
20
  GEM
55
21
  remote: https://rubygems.org/
@@ -63,7 +29,7 @@ GEM
63
29
  abstract_type (~> 0.0.7)
64
30
  adamantium (~> 0.2)
65
31
  equalizer (~> 0.0.11)
66
- ast (2.4.0)
32
+ ast (2.4.1)
67
33
  axiom-types (0.1.1)
68
34
  descendants_tracker (~> 0.0.4)
69
35
  ice_nine (~> 0.11.0)
@@ -77,6 +43,23 @@ GEM
77
43
  equalizer (~> 0.0.9)
78
44
  descendants_tracker (0.0.4)
79
45
  thread_safe (~> 0.3, >= 0.3.1)
46
+ devtools (0.1.26)
47
+ abstract_type (~> 0.0.7)
48
+ adamantium (~> 0.2.0)
49
+ anima (~> 0.3.0)
50
+ concord (~> 0.1.5)
51
+ flay (~> 2.12.0)
52
+ flog (~> 4.6.2)
53
+ procto (~> 0.0.3)
54
+ rake (~> 12.3.0)
55
+ reek (~> 5.6.0)
56
+ rspec (~> 3.8.0)
57
+ rspec-core (~> 3.8.0)
58
+ rspec-its (~> 1.2.0)
59
+ rubocop (~> 0.79.0)
60
+ simplecov (~> 0.16.1)
61
+ yard (~> 0.9.16)
62
+ yardstick (~> 0.9.9)
80
63
  diff-lcs (1.3)
81
64
  docile (1.3.2)
82
65
  equalizer (0.0.11)
@@ -92,24 +75,30 @@ GEM
92
75
  sexp_processor (~> 4.8)
93
76
  ice_nine (0.11.2)
94
77
  jaro_winkler (1.5.4)
95
- json (2.3.0)
78
+ json (2.3.1)
96
79
  kwalify (0.7.2)
97
80
  memoizable (0.4.2)
98
81
  thread_safe (~> 0.3, >= 0.3.1)
82
+ mprelude (0.1.0)
83
+ abstract_type (~> 0.0.7)
84
+ adamantium (~> 0.2.0)
85
+ concord (~> 0.1.5)
86
+ equalizer (~> 0.0.9)
87
+ ice_nine (~> 0.11.1)
88
+ procto (~> 0.0.2)
99
89
  mutant-license (0.1.0)
100
- parallel (1.19.1)
101
- parser (2.6.5.0)
102
- ast (~> 2.4.0)
90
+ parallel (1.19.2)
91
+ parser (2.7.1.4)
92
+ ast (~> 2.4.1)
103
93
  path_expander (1.1.0)
104
- powerpack (0.1.2)
105
94
  procto (0.0.3)
106
95
  psych (3.1.0)
107
96
  rainbow (3.0.0)
108
97
  rake (12.3.3)
109
- reek (5.3.2)
98
+ reek (5.6.0)
110
99
  codeclimate-engine-rb (~> 0.4.0)
111
100
  kwalify (~> 0.7.0)
112
- parser (>= 2.5.0.0, < 2.7, != 2.5.1.1)
101
+ parser (>= 2.5.0.0, < 2.8, != 2.5.1.1)
113
102
  psych (~> 3.1.0)
114
103
  rainbow (>= 2.0, < 4.0)
115
104
  rspec (3.8.0)
@@ -128,31 +117,40 @@ GEM
128
117
  diff-lcs (>= 1.2.0, < 2.0)
129
118
  rspec-support (~> 3.8.0)
130
119
  rspec-support (3.8.3)
131
- rubocop (0.61.1)
120
+ rubocop (0.79.0)
132
121
  jaro_winkler (~> 1.5.1)
133
122
  parallel (~> 1.10)
134
- parser (>= 2.5, != 2.5.1.1)
135
- powerpack (~> 0.1)
123
+ parser (>= 2.7.0.1)
136
124
  rainbow (>= 2.2.2, < 4.0)
137
125
  ruby-progressbar (~> 1.7)
138
- unicode-display_width (~> 1.4.0)
126
+ unicode-display_width (>= 1.4.0, < 1.7)
139
127
  ruby-progressbar (1.10.1)
140
- ruby_parser (3.14.1)
128
+ ruby_parser (3.14.2)
141
129
  sexp_processor (~> 4.9)
142
- sexp_processor (4.13.0)
130
+ sexp_processor (4.15.0)
143
131
  simplecov (0.16.1)
144
132
  docile (~> 1.1)
145
133
  json (>= 1.8, < 3)
146
134
  simplecov-html (~> 0.10.0)
147
135
  simplecov-html (0.10.2)
148
136
  thread_safe (0.3.6)
149
- unicode-display_width (1.4.1)
137
+ unicode-display_width (1.6.1)
138
+ unparser (0.4.7)
139
+ abstract_type (~> 0.0.7)
140
+ adamantium (~> 0.2.0)
141
+ concord (~> 0.1.5)
142
+ diff-lcs (~> 1.3)
143
+ equalizer (~> 0.0.9)
144
+ parser (>= 2.6.5)
145
+ procto (~> 0.0.2)
146
+ variable (0.0.1)
147
+ equalizer (~> 0.0.11)
150
148
  virtus (1.0.5)
151
149
  axiom-types (~> 0.1)
152
150
  coercible (~> 1.0)
153
151
  descendants_tracker (~> 0.0, >= 0.0.3)
154
152
  equalizer (~> 0.0, >= 0.0.9)
155
- yard (0.9.22)
153
+ yard (0.9.25)
156
154
  yardstick (0.9.9)
157
155
  yard (~> 0.8, >= 0.8.7.2)
158
156
 
@@ -160,11 +158,10 @@ PLATFORMS
160
158
  ruby
161
159
 
162
160
  DEPENDENCIES
163
- devtools!
161
+ devtools (~> 0.1.25)
164
162
  mutant!
165
163
  mutant-license!
166
164
  parallel (~> 1.3)
167
- unparser!
168
165
 
169
166
  BUNDLED WITH
170
- 1.17.3
167
+ 2.1.2
@@ -1,3 +1,10 @@
1
+ # Mutant itself uses an opensource license key.
2
+ # Scoped to https://github.com/mbj/mutant it'll
3
+ # not be useful elsewhere.
4
+ source 'https://oss:Px2ENN7S91OmWaD5G7MIQJi1dmtmYrEh@gem.mutant.dev' do
5
+ gem 'mutant-license'
6
+ end
7
+
1
8
  # Place for shared git sources, used for developing updates to depedencies
2
9
  # where the git sources (without this file) need to be consistently edited
3
10
  # into multiple Gemfiles.
data/LICENSE CHANGED
@@ -116,7 +116,7 @@ the net income of Schirp DSO LTD).
116
116
 
117
117
  6. Support, Maintenance and Services. Subject to the terms and conditions of
118
118
  this Agreement, as set forth in your invoice, and as set forth on the Mutant
119
- support page (https://github.com/mbj/mutant/wiki/Commercial-Support),
119
+ support page (https://github.com/mbj/mutant/blob/master/docs/commercial-support.md)
120
120
  support and maintenance services may be included with the purchase of your
121
121
  license subscription.
122
122
 
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  mutant
2
2
  ======
3
3
 
4
- [![Build Status](https://circleci.com/gh/mbj/mutant.svg?style=shield&circle-token=1afd77e8f0f9d0a11fd8f15f5d7b10270f4665e2)](https://circleci.com/gh/mbj/mutant/tree/master)
4
+ ![Build Status](https://github.com/mbj/mutant/workflows/CI/badge.svg)
5
5
  [![Gem Version](https://img.shields.io/gem/v/mutant.svg)](https://rubygems.org/gems/mutant)
6
6
  [![Slack Status](https://mutation-testing-slack.herokuapp.com/badge.svg)](https://mutation-testing.slack.com/messages/mutant)
7
7
 
@@ -29,6 +29,15 @@ On each detection of uncovered semantics you have the opportunity to:
29
29
  to test only the code you had been touching. See the [incremental](#only-mutating-changed-code)
30
30
  mutation testing documentation.
31
31
 
32
+ ## Ruby Versions
33
+
34
+ Mutant currently only works on cRuby/MRI. Starting with version 2.5.x. It supports all syntax features upto and
35
+ including Ruby 2.6.
36
+
37
+ Support for 2.7 syntax features is pending, see unparser issue: https://github.com/mbj/unparser/issues/129.
38
+
39
+ Mutant will work under Ruby 2.7 just fine, unless a 2.7 syntax feature is used. This will be resolved shortly.
40
+
32
41
  ## Licensing
33
42
 
34
43
  Mutant was recently transitioned commercial software, with a free usage plan for opensource projects.
@@ -99,7 +99,7 @@ ClassCheck:
99
99
  EnforcedStyle: kind_of?
100
100
 
101
101
  # Do not prefer double quotes to be used when %q or %Q is more appropriate
102
- UnneededPercentQ:
102
+ Style/RedundantPercentQ:
103
103
  Enabled: false
104
104
 
105
105
  # Allow a maximum ABC score
@@ -145,7 +145,7 @@ Alias:
145
145
  EnforcedStyle: prefer_alias_method
146
146
 
147
147
  # Do not waste my horizontal or vertical space
148
- IndentArray:
148
+ Layout/FirstArrayElementIndentation:
149
149
  Enabled: false
150
150
 
151
151
  # Prefer
@@ -167,7 +167,7 @@ MultilineMethodCallIndentation:
167
167
  Send:
168
168
  Enabled: true
169
169
 
170
- Layout/AlignHash:
170
+ Layout/HashAlignment:
171
171
  EnforcedColonStyle: table
172
172
  EnforcedHashRocketStyle: table
173
173
  Layout/EmptyLineAfterGuardClause:
@@ -196,3 +196,10 @@ Style/RescueStandardError:
196
196
  Enabled: false
197
197
  Style/StderrPuts:
198
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
+