mutant 0.3.0.beta6 → 0.3.0.beta7
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/Rakefile +0 -21
- data/config/flay.yml +1 -1
- data/config/mutant.yml +2 -0
- data/config/reek.yml +2 -3
- data/lib/mutant/constants.rb +1 -1
- data/lib/mutant/matcher/method.rb +1 -1
- data/lib/mutant/mutator/node/noop.rb +1 -1
- data/lib/mutant/zombifier.rb +2 -0
- data/mutant.gemspec +1 -1
- data/spec/unit/mutant/mutator/node/define/mutation_spec.rb +11 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92ef8b77a7307525dfa389089d65fa060ff58d03
|
4
|
+
data.tar.gz: 31fbcfab2667cc6e4777bef50cf8561c2f8aa1e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f64c6da579a3a5c6d86c4b7547d8197536fbc1aa6f98132e52cb7fed15bfc93a4a87818dfbd10a5b38a355e1bf47cc73d6441444f208c3ac06b746bc8ef24fac
|
7
|
+
data.tar.gz: 1d5a18099e4b35cd21e3bdfe0e316a306fdaa86b5c6cbd29c4fd1aabf5e9685a18815f59660c54bc2c3689565268ed5d00bce0e48c5ed4c6f213c9500da7ff6a
|
data/Rakefile
CHANGED
@@ -1,23 +1,2 @@
|
|
1
1
|
require 'devtools'
|
2
2
|
Devtools.init_rake_tasks
|
3
|
-
|
4
|
-
class Rake::Task
|
5
|
-
def overwrite(&block)
|
6
|
-
@actions.clear
|
7
|
-
enhance(&block)
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
|
-
Rake.application.load_imports
|
12
|
-
|
13
|
-
Rake::Task['metrics:mutant'].overwrite do
|
14
|
-
$stderr.puts "Mutant self mutation (Zombie) is deactivated"
|
15
|
-
# project = Devtools.project
|
16
|
-
# require File.expand_path('../spec/support/zombie.rb', __FILE__)
|
17
|
-
# Zombie.setup
|
18
|
-
# status = Zombie::CLI.run(%W(::Mutant --rspec-dm2))
|
19
|
-
# if status.nonzero?
|
20
|
-
# $stderr.puts 'Zombie task is not successful'
|
21
|
-
# $stderr.puts 'Not fatal at this point of development, will be fixed before release of 0.3.0'
|
22
|
-
# end
|
23
|
-
end
|
data/config/flay.yml
CHANGED
data/config/mutant.yml
ADDED
data/config/reek.yml
CHANGED
@@ -50,9 +50,7 @@ NestedIterators:
|
|
50
50
|
max_allowed_nesting: 1
|
51
51
|
ignore_iterators: []
|
52
52
|
NilCheck:
|
53
|
-
enabled:
|
54
|
-
exclude:
|
55
|
-
- Mutant::Matcher::Method#skip?
|
53
|
+
enabled: false
|
56
54
|
RepeatedConditional:
|
57
55
|
enabled: true
|
58
56
|
exclude:
|
@@ -79,6 +77,7 @@ TooManyStatements:
|
|
79
77
|
- Mutant::Reporter::CLI#colorized_diff
|
80
78
|
- Mutant::Reporter::CLI::Printer::Config::Runner#run
|
81
79
|
- Mutant#self.singleton_subclass_instance
|
80
|
+
- Mutant::Zombifier::File#self.find_uncached
|
82
81
|
max_statements: 6
|
83
82
|
UncommunicativeMethodName:
|
84
83
|
enabled: true
|
data/lib/mutant/constants.rb
CHANGED
@@ -61,6 +61,6 @@ module Mutant
|
|
61
61
|
:xstr, :def, :defs, :case, :when, :ivar, :lvar, :cvar, :gvar,
|
62
62
|
:back_ref, :const, :nth_ref, :class, :sclass, :yield,
|
63
63
|
:match_with_lvasgn, :match_current_line, :irange, :erange,
|
64
|
-
:or_asgn
|
64
|
+
:or_asgn, :kwbegin
|
65
65
|
].to_set.freeze
|
66
66
|
end # Mutant,
|
@@ -6,7 +6,7 @@ module Mutant
|
|
6
6
|
|
7
7
|
# Methods within rbx kernel directory are precompiled and their source
|
8
8
|
# cannot be accessed via reading source location
|
9
|
-
BLACKLIST =
|
9
|
+
BLACKLIST = %r(\A#{Regexp.union('kernel/', '(eval)')}).freeze
|
10
10
|
|
11
11
|
# Enumerate matches
|
12
12
|
#
|
@@ -16,7 +16,7 @@ module Mutant
|
|
16
16
|
:ivar, :restarg, :casgn, :masgn, :resbody, :retry, :arg_expr,
|
17
17
|
:kwrestarg, :kwoptarg, :kwarg, :undef, :module, :cbase, :empty,
|
18
18
|
:alias, :for, :xstr, :back_ref, :nth_ref, :class, :sclass, :match_with_lvasgn,
|
19
|
-
:match_current_line, :or_asgn
|
19
|
+
:match_current_line, :or_asgn, :kwbegin
|
20
20
|
)
|
21
21
|
|
22
22
|
private
|
data/lib/mutant/zombifier.rb
CHANGED
data/mutant.gemspec
CHANGED
@@ -2,6 +2,17 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe Mutant::Mutator, 'def' do
|
4
4
|
|
5
|
+
context 'empty' do
|
6
|
+
let(:source) { 'def foo; end' }
|
7
|
+
|
8
|
+
let(:mutations) do
|
9
|
+
mutations = []
|
10
|
+
mutations << 'def foo; ::Object.new; end'
|
11
|
+
end
|
12
|
+
|
13
|
+
it_should_behave_like 'a mutator'
|
14
|
+
end
|
15
|
+
|
5
16
|
context 'with no arguments' do
|
6
17
|
let(:source) { 'def foo; true; false; end' }
|
7
18
|
|
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.3.0.
|
4
|
+
version: 0.3.0.beta7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Markus Schirp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parser
|
@@ -177,6 +177,7 @@ files:
|
|
177
177
|
- config/devtools.yml
|
178
178
|
- config/flay.yml
|
179
179
|
- config/flog.yml
|
180
|
+
- config/mutant.yml
|
180
181
|
- config/reek.yml
|
181
182
|
- config/yardstick.yml
|
182
183
|
- lib/mutant.rb
|