mutant 0.9.4 → 0.9.9
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 +121 -0
- data/Changelog.md +26 -0
- data/Gemfile +0 -15
- data/Gemfile.lock +47 -58
- data/Gemfile.shared +7 -0
- data/LICENSE +1 -1
- data/README.md +72 -23
- data/config/reek.yml +1 -0
- data/config/rubocop.yml +10 -3
- data/docs/commercial-support.md +14 -0
- data/lib/mutant.rb +5 -1
- data/lib/mutant/ast.rb +0 -9
- data/lib/mutant/ast/find_metaclass_containing.rb +48 -0
- data/lib/mutant/ast/meta/send.rb +0 -6
- data/lib/mutant/bootstrap.rb +0 -36
- data/lib/mutant/cli.rb +6 -50
- data/lib/mutant/color.rb +0 -3
- data/lib/mutant/config.rb +0 -8
- data/lib/mutant/context.rb +0 -3
- data/lib/mutant/diff.rb +0 -17
- data/lib/mutant/env.rb +0 -6
- data/lib/mutant/expression/method.rb +6 -6
- data/lib/mutant/expression/methods.rb +6 -6
- data/lib/mutant/expression/parser.rb +0 -6
- data/lib/mutant/integration.rb +0 -18
- data/lib/mutant/isolation/fork.rb +0 -22
- data/lib/mutant/license.rb +12 -1
- data/lib/mutant/matcher.rb +0 -14
- data/lib/mutant/matcher/config.rb +0 -11
- data/lib/mutant/matcher/method.rb +0 -31
- data/lib/mutant/matcher/method/instance.rb +0 -8
- data/lib/mutant/matcher/method/metaclass.rb +86 -0
- data/lib/mutant/matcher/method/singleton.rb +0 -25
- data/lib/mutant/matcher/methods.rb +17 -28
- data/lib/mutant/matcher/namespace.rb +0 -10
- data/lib/mutant/matcher/scope.rb +2 -4
- data/lib/mutant/meta.rb +1 -3
- data/lib/mutant/meta/example/dsl.rb +0 -21
- data/lib/mutant/meta/example/verification.rb +1 -21
- data/lib/mutant/mutation.rb +0 -3
- data/lib/mutant/mutator.rb +1 -29
- data/lib/mutant/mutator/node.rb +1 -66
- data/lib/mutant/mutator/node/and_asgn.rb +0 -3
- data/lib/mutant/mutator/node/argument.rb +0 -15
- data/lib/mutant/mutator/node/arguments.rb +0 -20
- data/lib/mutant/mutator/node/begin.rb +0 -3
- data/lib/mutant/mutator/node/binary.rb +0 -23
- data/lib/mutant/mutator/node/block.rb +0 -15
- data/lib/mutant/mutator/node/break.rb +0 -3
- data/lib/mutant/mutator/node/case.rb +0 -9
- data/lib/mutant/mutator/node/class.rb +0 -3
- data/lib/mutant/mutator/node/conditional_loop.rb +0 -3
- data/lib/mutant/mutator/node/const.rb +0 -3
- data/lib/mutant/mutator/node/define.rb +0 -11
- data/lib/mutant/mutator/node/defined.rb +0 -3
- data/lib/mutant/mutator/node/dstr.rb +0 -3
- data/lib/mutant/mutator/node/dsym.rb +0 -3
- data/lib/mutant/mutator/node/generic.rb +0 -51
- data/lib/mutant/mutator/node/if.rb +0 -12
- data/lib/mutant/mutator/node/index.rb +0 -27
- data/lib/mutant/mutator/node/kwbegin.rb +0 -3
- data/lib/mutant/mutator/node/literal.rb +0 -3
- data/lib/mutant/mutator/node/literal/array.rb +0 -6
- data/lib/mutant/mutator/node/literal/boolean.rb +0 -4
- data/lib/mutant/mutator/node/literal/float.rb +0 -9
- data/lib/mutant/mutator/node/literal/hash.rb +0 -9
- data/lib/mutant/mutator/node/literal/integer.rb +0 -9
- data/lib/mutant/mutator/node/literal/nil.rb +0 -3
- data/lib/mutant/mutator/node/literal/range.rb +0 -6
- data/lib/mutant/mutator/node/literal/regex.rb +0 -6
- data/lib/mutant/mutator/node/literal/string.rb +0 -3
- data/lib/mutant/mutator/node/literal/symbol.rb +0 -3
- data/lib/mutant/mutator/node/masgn.rb +0 -3
- data/lib/mutant/mutator/node/match_current_line.rb +0 -3
- data/lib/mutant/mutator/node/mlhs.rb +0 -3
- data/lib/mutant/mutator/node/named_value/access.rb +2 -14
- data/lib/mutant/mutator/node/named_value/constant_assignment.rb +0 -9
- data/lib/mutant/mutator/node/named_value/variable_assignment.rb +0 -6
- data/lib/mutant/mutator/node/next.rb +0 -3
- data/lib/mutant/mutator/node/noop.rb +0 -3
- data/lib/mutant/mutator/node/nthref.rb +0 -3
- data/lib/mutant/mutator/node/op_asgn.rb +0 -3
- data/lib/mutant/mutator/node/or_asgn.rb +0 -3
- data/lib/mutant/mutator/node/procarg_zero.rb +0 -3
- data/lib/mutant/mutator/node/regopt.rb +0 -6
- data/lib/mutant/mutator/node/resbody.rb +0 -6
- data/lib/mutant/mutator/node/rescue.rb +2 -19
- data/lib/mutant/mutator/node/return.rb +0 -3
- data/lib/mutant/mutator/node/sclass.rb +20 -0
- data/lib/mutant/mutator/node/send.rb +3 -62
- data/lib/mutant/mutator/node/send/attribute_assignment.rb +0 -9
- data/lib/mutant/mutator/node/send/binary.rb +0 -11
- data/lib/mutant/mutator/node/send/conditional.rb +0 -3
- data/lib/mutant/mutator/node/splat.rb +0 -3
- data/lib/mutant/mutator/node/super.rb +0 -3
- data/lib/mutant/mutator/node/when.rb +0 -19
- data/lib/mutant/mutator/node/yield.rb +0 -3
- data/lib/mutant/mutator/node/zsuper.rb +0 -3
- data/lib/mutant/mutator/util/array.rb +0 -6
- data/lib/mutant/mutator/util/symbol.rb +0 -3
- data/lib/mutant/parallel.rb +0 -13
- data/lib/mutant/parallel/driver.rb +0 -10
- data/lib/mutant/parallel/worker.rb +0 -22
- data/lib/mutant/registry.rb +2 -7
- data/lib/mutant/reporter/cli.rb +0 -5
- data/lib/mutant/reporter/cli/format.rb +1 -10
- data/lib/mutant/reporter/cli/printer.rb +0 -40
- data/lib/mutant/reporter/cli/printer/env_progress.rb +0 -15
- data/lib/mutant/reporter/cli/printer/isolation_result.rb +0 -18
- data/lib/mutant/reporter/cli/printer/mutation_progress_result.rb +0 -5
- data/lib/mutant/reporter/cli/printer/mutation_result.rb +0 -21
- data/lib/mutant/reporter/cli/printer/status_progressive.rb +0 -8
- data/lib/mutant/reporter/cli/printer/subject_progress.rb +0 -9
- data/lib/mutant/repository/diff.rb +1 -13
- data/lib/mutant/repository/diff/ranges.rb +0 -11
- data/lib/mutant/result.rb +0 -3
- data/lib/mutant/runner.rb +0 -18
- data/lib/mutant/runner/sink.rb +0 -5
- data/lib/mutant/subject.rb +0 -8
- data/lib/mutant/subject/method.rb +0 -3
- data/lib/mutant/subject/method/instance.rb +0 -5
- data/lib/mutant/subject/method/metaclass.rb +30 -0
- data/lib/mutant/transform.rb +0 -92
- data/lib/mutant/version.rb +1 -1
- data/lib/mutant/warnings.rb +0 -6
- data/lib/mutant/zombifier.rb +4 -34
- data/meta/and.rb +0 -2
- data/meta/array.rb +0 -3
- data/meta/begin.rb +0 -3
- data/meta/block.rb +0 -3
- data/meta/break.rb +0 -1
- data/meta/case.rb +0 -6
- data/meta/casgn.rb +0 -3
- data/meta/cvasgn.rb +0 -1
- data/meta/def.rb +0 -7
- data/meta/ensure.rb +0 -1
- data/meta/false.rb +0 -1
- data/meta/gvasgn.rb +0 -1
- data/meta/hash.rb +0 -4
- data/meta/if.rb +0 -5
- data/meta/ivasgn.rb +0 -1
- data/meta/kwbegin.rb +0 -1
- data/meta/lvasgn.rb +0 -1
- data/meta/match_current_line.rb +0 -1
- data/meta/next.rb +0 -1
- data/meta/or.rb +0 -2
- data/meta/regexp.rb +0 -1
- data/meta/rescue.rb +0 -6
- data/meta/sclass.rb +12 -0
- data/meta/send.rb +0 -4
- data/meta/true.rb +0 -1
- data/meta/until.rb +0 -1
- data/meta/while.rb +0 -2
- data/meta/yield.rb +0 -1
- data/mutant.gemspec +4 -3
- data/mutant.sh +12 -0
- data/spec/integrations.yml +3 -1
- data/spec/support/corpus.rb +3 -3
- data/spec/support/ruby_vm.rb +1 -2
- data/spec/support/shared_context.rb +3 -3
- data/spec/support/xspec.rb +2 -2
- data/spec/unit/mutant/ast/find_metaclass_containing_spec.rb +64 -0
- data/spec/unit/mutant/expression/methods_spec.rb +7 -2
- data/spec/unit/mutant/license_spec.rb +17 -5
- data/spec/unit/mutant/matcher/method/metaclass_spec.rb +108 -0
- data/spec/unit/mutant/matcher/methods/metaclass_spec.rb +62 -0
- data/spec/unit/mutant/matcher/namespace_spec.rb +3 -1
- data/spec/unit/mutant/matcher/scope_spec.rb +11 -1
- data/spec/unit/mutant/meta/example_spec.rb +3 -3
- data/spec/unit/mutant/mutator/node_spec.rb +1 -6
- data/spec/unit/mutant/parallel/driver_spec.rb +4 -4
- data/spec/unit/mutant/parallel/worker_spec.rb +5 -5
- data/spec/unit/mutant/parallel_spec.rb +7 -7
- data/spec/unit/mutant/registry_spec.rb +52 -25
- data/spec/unit/mutant/repository/diff/ranges_spec.rb +2 -2
- data/spec/unit/mutant/subject/method/metaclass_spec.rb +63 -0
- data/test_app/lib/test_app.rb +1 -0
- data/test_app/lib/test_app/metaclasses.rb +108 -0
- metadata +43 -16
- data/.circleci/config.yml +0 -53
- data/lib/mutant/variable.rb +0 -282
- data/spec/unit/mutant/variable_spec.rb +0 -618
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e6e6e125d0e2736934ed481945e35eada9a1b8fffaf05641a5410a2ed25b9b20
|
|
4
|
+
data.tar.gz: 13e2b48cbc500aab1ef792ccbaff86de593337f7213bdcf7d0d81afa21e7a641
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7a3bfbaffad39ee2bc7cf41a07c19031704c26c7d05ba9b3f07d59d3b82965311c0822aec10ab359570fc8c3d3235f36d461fbe39cddb6349997b2b8bd0fa5d3
|
|
7
|
+
data.tar.gz: a1caa7e5f3318001137239c613ddd50bdeabe981fa132f4e9e5a383019a24a53075da121b290e98dcb61c93a1900f79f8e1207ce7ac282d049b2af0351b26e64
|
|
@@ -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: 30
|
|
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: ./mutant.sh
|
|
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
|
data/Changelog.md
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
# v0.9.9 2020-09-25
|
|
2
|
+
|
|
3
|
+
+ Add support for mutating methods inside eigenclasses `class <<`. [#1009](https://github.com/mbj/mutant/pull/1009)
|
|
4
|
+
- Remove `<` -> `<=` and `>` -> `>=` mutations as non canonical. [#1020](https://github.com/mbj/mutant/pull/1020)
|
|
5
|
+
- Remove `true` -> `nil` and `false` -> `nil` mutations as non canonical. [#1018](https://github.com/mbj/mutant/pull/1018)
|
|
6
|
+
|
|
7
|
+
# v0.9.8 2020-08-02
|
|
8
|
+
|
|
9
|
+
* Change to generic catch all node mutator. This allows better cross parser version compatibility.
|
|
10
|
+
|
|
11
|
+
# v0.9.7 2020-07-22
|
|
12
|
+
|
|
13
|
+
* Bump parser dependency to 2.7.1, note this still does not support Ruby 2.7 syntax.
|
|
14
|
+
But it supports running bundling with that parser version.
|
|
15
|
+
* Nail diff-lcs to 1.3 till output difference for 1.4 can be addressed.
|
|
16
|
+
|
|
17
|
+
# v0.9.6 2020-04-20
|
|
18
|
+
|
|
19
|
+
* Dependencies upgrade, should not change user facing semantics.
|
|
20
|
+
* Bump license nudge to 40s
|
|
21
|
+
|
|
22
|
+
# v0.9.5 2020-02-02
|
|
23
|
+
|
|
24
|
+
* Change to 2.7 parser series.
|
|
25
|
+
This does not drop support for < 2.7 but enables to in the future add full Ruby 2.7 support.
|
|
26
|
+
|
|
1
27
|
# v0.9.4 2020-01-03
|
|
2
28
|
|
|
3
29
|
* Bump unparser dependency
|
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
|
data/Gemfile.lock
CHANGED
|
@@ -1,56 +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.
|
|
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 (
|
|
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
14
|
mprelude (~> 0.1.0)
|
|
51
|
-
parser (~> 2.
|
|
15
|
+
parser (~> 2.7.1)
|
|
52
16
|
procto (~> 0.0.2)
|
|
53
17
|
unparser (~> 0.4.6)
|
|
18
|
+
variable (~> 0.0.1)
|
|
54
19
|
|
|
55
20
|
GEM
|
|
56
21
|
remote: https://rubygems.org/
|
|
@@ -64,7 +29,7 @@ GEM
|
|
|
64
29
|
abstract_type (~> 0.0.7)
|
|
65
30
|
adamantium (~> 0.2)
|
|
66
31
|
equalizer (~> 0.0.11)
|
|
67
|
-
ast (2.4.
|
|
32
|
+
ast (2.4.1)
|
|
68
33
|
axiom-types (0.1.1)
|
|
69
34
|
descendants_tracker (~> 0.0.4)
|
|
70
35
|
ice_nine (~> 0.11.0)
|
|
@@ -78,6 +43,23 @@ GEM
|
|
|
78
43
|
equalizer (~> 0.0.9)
|
|
79
44
|
descendants_tracker (0.0.4)
|
|
80
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)
|
|
81
63
|
diff-lcs (1.3)
|
|
82
64
|
docile (1.3.2)
|
|
83
65
|
equalizer (0.0.11)
|
|
@@ -93,7 +75,7 @@ GEM
|
|
|
93
75
|
sexp_processor (~> 4.8)
|
|
94
76
|
ice_nine (0.11.2)
|
|
95
77
|
jaro_winkler (1.5.4)
|
|
96
|
-
json (2.3.
|
|
78
|
+
json (2.3.1)
|
|
97
79
|
kwalify (0.7.2)
|
|
98
80
|
memoizable (0.4.2)
|
|
99
81
|
thread_safe (~> 0.3, >= 0.3.1)
|
|
@@ -105,19 +87,18 @@ GEM
|
|
|
105
87
|
ice_nine (~> 0.11.1)
|
|
106
88
|
procto (~> 0.0.2)
|
|
107
89
|
mutant-license (0.1.0)
|
|
108
|
-
parallel (1.19.
|
|
109
|
-
parser (2.
|
|
110
|
-
ast (~> 2.4.
|
|
90
|
+
parallel (1.19.2)
|
|
91
|
+
parser (2.7.1.4)
|
|
92
|
+
ast (~> 2.4.1)
|
|
111
93
|
path_expander (1.1.0)
|
|
112
|
-
powerpack (0.1.2)
|
|
113
94
|
procto (0.0.3)
|
|
114
95
|
psych (3.1.0)
|
|
115
96
|
rainbow (3.0.0)
|
|
116
97
|
rake (12.3.3)
|
|
117
|
-
reek (5.
|
|
98
|
+
reek (5.6.0)
|
|
118
99
|
codeclimate-engine-rb (~> 0.4.0)
|
|
119
100
|
kwalify (~> 0.7.0)
|
|
120
|
-
parser (>= 2.5.0.0, < 2.
|
|
101
|
+
parser (>= 2.5.0.0, < 2.8, != 2.5.1.1)
|
|
121
102
|
psych (~> 3.1.0)
|
|
122
103
|
rainbow (>= 2.0, < 4.0)
|
|
123
104
|
rspec (3.8.0)
|
|
@@ -136,31 +117,40 @@ GEM
|
|
|
136
117
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
137
118
|
rspec-support (~> 3.8.0)
|
|
138
119
|
rspec-support (3.8.3)
|
|
139
|
-
rubocop (0.
|
|
120
|
+
rubocop (0.79.0)
|
|
140
121
|
jaro_winkler (~> 1.5.1)
|
|
141
122
|
parallel (~> 1.10)
|
|
142
|
-
parser (>= 2.
|
|
143
|
-
powerpack (~> 0.1)
|
|
123
|
+
parser (>= 2.7.0.1)
|
|
144
124
|
rainbow (>= 2.2.2, < 4.0)
|
|
145
125
|
ruby-progressbar (~> 1.7)
|
|
146
|
-
unicode-display_width (
|
|
126
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
|
147
127
|
ruby-progressbar (1.10.1)
|
|
148
|
-
ruby_parser (3.14.
|
|
128
|
+
ruby_parser (3.14.2)
|
|
149
129
|
sexp_processor (~> 4.9)
|
|
150
|
-
sexp_processor (4.
|
|
130
|
+
sexp_processor (4.15.0)
|
|
151
131
|
simplecov (0.16.1)
|
|
152
132
|
docile (~> 1.1)
|
|
153
133
|
json (>= 1.8, < 3)
|
|
154
134
|
simplecov-html (~> 0.10.0)
|
|
155
135
|
simplecov-html (0.10.2)
|
|
156
136
|
thread_safe (0.3.6)
|
|
157
|
-
unicode-display_width (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)
|
|
158
148
|
virtus (1.0.5)
|
|
159
149
|
axiom-types (~> 0.1)
|
|
160
150
|
coercible (~> 1.0)
|
|
161
151
|
descendants_tracker (~> 0.0, >= 0.0.3)
|
|
162
152
|
equalizer (~> 0.0, >= 0.0.9)
|
|
163
|
-
yard (0.9.
|
|
153
|
+
yard (0.9.25)
|
|
164
154
|
yardstick (0.9.9)
|
|
165
155
|
yard (~> 0.8, >= 0.8.7.2)
|
|
166
156
|
|
|
@@ -168,11 +158,10 @@ PLATFORMS
|
|
|
168
158
|
ruby
|
|
169
159
|
|
|
170
160
|
DEPENDENCIES
|
|
171
|
-
devtools
|
|
161
|
+
devtools (~> 0.1.25)
|
|
172
162
|
mutant!
|
|
173
163
|
mutant-license!
|
|
174
164
|
parallel (~> 1.3)
|
|
175
|
-
unparser!
|
|
176
165
|
|
|
177
166
|
BUNDLED WITH
|
|
178
|
-
1.
|
|
167
|
+
2.1.2
|
data/Gemfile.shared
CHANGED
|
@@ -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/
|
|
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,40 +1,59 @@
|
|
|
1
1
|
mutant
|
|
2
2
|
======
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+

|
|
5
5
|
[](https://rubygems.org/gems/mutant)
|
|
6
6
|
[](https://mutation-testing.slack.com/messages/mutant)
|
|
7
7
|
|
|
8
8
|
## What is Mutant?
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
An automated code review tool, with a side effect of producing semantic code coverage
|
|
11
|
+
metrics.
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
Think of mutant as an expert developer that simplifies your code while making sure that all tests pass.
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
Coverage becomes a meaningful metric!
|
|
15
|
+
That developer never has a bad day and is always ready to jump on your PR.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Each reported simplification signifies either:
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
* Learn something new about the semantics of Ruby and your direct and indirect dependencies.
|
|
19
|
+
A) A piece of code that does more than the tests ask for.
|
|
20
|
+
You can probably use the simplified version of the code. OR:
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
B) If you have a reason to not take the simplified version as it violates a requirement:
|
|
23
|
+
There was no test that proves the extra requirement. Likely you are missing an
|
|
24
|
+
important test for that requirement.
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
On extensive mutant use A) happens more often than B), which leads to overall less code enter
|
|
27
|
+
your repository at higher confidence for both the author and the reviewer.
|
|
28
|
+
|
|
29
|
+
BTW: Mutant is a mutation testing tool, which is a form of code coverage.
|
|
30
|
+
But each reported uncovered mutation is actually a call to action, just like a flag in a code review
|
|
31
|
+
would be.
|
|
32
|
+
|
|
33
|
+
## Getting started:
|
|
34
|
+
|
|
35
|
+
* Start with reading the [nomenclature](/docs/nomenclature.md). No way around that one, sorry.
|
|
26
36
|
* Then select and setup your [integration](/docs/nomenclature.md#integration), also make sure
|
|
27
37
|
you can reproduce the examples in the integration specific documentation.
|
|
28
|
-
*
|
|
29
|
-
|
|
30
|
-
|
|
38
|
+
* Use mutant during code reviews and on CI in [incremental](/docs/incremental.md) mode.
|
|
39
|
+
* Do not merge code with new alive mutations. If you really must bypass:
|
|
40
|
+
Add the subjects with open problems to the ignored subjects.
|
|
41
|
+
|
|
42
|
+
## Ruby Versions
|
|
43
|
+
|
|
44
|
+
Mutant currently only works on cRuby/MRI. Starting with version 2.5.x. It supports all syntax features up to and
|
|
45
|
+
including Ruby 2.6.
|
|
46
|
+
|
|
47
|
+
Support for 2.7 syntax features is pending, see unparser issue: https://github.com/mbj/unparser/issues/129.
|
|
48
|
+
|
|
49
|
+
Mutant will work under Ruby 2.7 just fine, unless a 2.7 syntax feature is used. This will be resolved shortly.
|
|
31
50
|
|
|
32
51
|
## Licensing
|
|
33
52
|
|
|
34
53
|
Mutant was recently transitioned commercial software, with a free usage plan for opensource projects.
|
|
35
54
|
|
|
36
55
|
Commercial projects have to acquire a license per developer, with unlimited repositories
|
|
37
|
-
per developer.
|
|
56
|
+
per developer. CI usage for licensed developers is included.
|
|
38
57
|
|
|
39
58
|
Opensource projects have to acquire their free license per repository.
|
|
40
59
|
|
|
@@ -56,22 +75,52 @@ The mutant license gem contains metadata that allows mutant to verify licensed u
|
|
|
56
75
|
For commercial licenses mutant checks the git commit author or the configured git email
|
|
57
76
|
to be in the set of licensed developers.
|
|
58
77
|
|
|
59
|
-
For opensource licenses mutant checks the git remotes against the
|
|
78
|
+
For opensource licenses mutant checks the git remotes against the licensed git repositories.
|
|
60
79
|
This allows the project maintainer to sign up and not bother collaborators with the details.
|
|
61
80
|
|
|
62
|
-
There are, apart from initial license gem installation, no remote
|
|
81
|
+
There are, apart from initial license gem installation, no remote interaction for
|
|
63
82
|
license validation.
|
|
64
83
|
|
|
65
|
-
|
|
84
|
+
### Getting an Opensource license
|
|
85
|
+
|
|
86
|
+
As stated above: Opensource projects of any kind are free to use mutant.
|
|
87
|
+
|
|
88
|
+
Just mail [me](mailto:mbj@schirp-dso.com?subject=Mutant%20Opensource%20License): Please
|
|
89
|
+
include:
|
|
90
|
+
|
|
91
|
+
* Just the git remote URL of your repository. Repository can be anywhere, must not be on Github, just has to be public.
|
|
92
|
+
|
|
93
|
+
I do not need any more details.
|
|
94
|
+
|
|
95
|
+
### Getting a commercial license
|
|
96
|
+
|
|
97
|
+
Mutant offers a per developer subscription a monthly plan for 30$, or an annual plan for 300$.
|
|
98
|
+
|
|
99
|
+
Above 10 developer licensees per customer I'm open to negotiate more discounts.
|
|
100
|
+
|
|
101
|
+
Should you want to procure a commercial mutant license please [mail me](mailto:mbj@schirp-dso.com?subject=Mutant%20Commercial%20License).
|
|
102
|
+
|
|
103
|
+
Please include the following information:
|
|
104
|
+
|
|
105
|
+
* Your invoice address, including your Tax ID (For EU customers VAT-ID is mandatory)
|
|
106
|
+
* Per licensed user the git author email address as returned by `git config user.email`
|
|
107
|
+
|
|
108
|
+
Also feel free to ask any other question I forgot to proactively answer here.
|
|
109
|
+
|
|
110
|
+
#### Payment methods
|
|
111
|
+
|
|
112
|
+
* For monthly subscriptions: Exclusively CC.
|
|
113
|
+
* For annual subscriptions: CC (worldwide) or ACH (US) / SEPA (EU) wire transfer.
|
|
66
114
|
|
|
67
|
-
|
|
115
|
+
#### Pricing Why?
|
|
68
116
|
|
|
69
|
-
|
|
117
|
+
The idea is to charge 1$ per developer per day. Mutant reduces the time spend on code reviews.
|
|
70
118
|
|
|
71
|
-
|
|
72
|
-
Yearly prepayments with discounts are available.
|
|
119
|
+
This time saved should be worth way more than the 1$ per day.
|
|
73
120
|
|
|
74
|
-
|
|
121
|
+
If you think this is not true for your code base, either my claims are wrong our your use of mutant is wrong.
|
|
122
|
+
I'd be happy to hear about your case as I'm certainly willing to help you in using mutant right, and in case
|
|
123
|
+
I'm wrong I'd be happy to improve mutant to the point I'm right again.
|
|
75
124
|
|
|
76
125
|
## Topics
|
|
77
126
|
|