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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b1caaf5f7b8854335f10e83107ce7a443f9b50cb
4
- data.tar.gz: 1440254e0f569de2e2c4df888c3b2bababe02766
3
+ metadata.gz: 92ef8b77a7307525dfa389089d65fa060ff58d03
4
+ data.tar.gz: 31fbcfab2667cc6e4777bef50cf8561c2f8aa1e2
5
5
  SHA512:
6
- metadata.gz: 33ae0a73e48e7cb631e71a9a3b8b06e50d0b5eaea9f70d344721a5abef2ae2716240323deda83084cd6d8353faa2cd14cb87312b06c41a3a5ce47da3f4bb5dfd
7
- data.tar.gz: 1dcac1455027b2546f685f1d910e745f0b0dbb5fb08d7c08746d5f9b7b3449309e680b155f2bc783b2f40122e8193178e6c162a28ed53d7d54e3cec762319044
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
@@ -1,3 +1,3 @@
1
1
  ---
2
2
  threshold: 16
3
- total_score: 616
3
+ total_score: 632
data/config/mutant.yml ADDED
@@ -0,0 +1,2 @@
1
+ name: mutant
2
+ namespace: Mutant
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: true
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
@@ -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 = /\Akernel\//.freeze
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
@@ -118,6 +118,8 @@ module Mutant
118
118
  # @raise [RuntimeError]
119
119
  # if file cannot be found
120
120
  #
121
+ # @api private
122
+ #
121
123
  def self.find(logical_name)
122
124
  return if STOP.include?(logical_name)
123
125
  CACHE.fetch(logical_name) do
data/mutant.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = 'mutant'
5
- gem.version = '0.3.0.beta6'
5
+ gem.version = '0.3.0.beta7'
6
6
  gem.authors = [ 'Markus Schirp' ]
7
7
  gem.email = [ 'mbj@schirp-dso.com' ]
8
8
 
@@ -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.beta6
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-28 00:00:00.000000000 Z
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