mutant 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e280c60019ecc32329702fe88d92f9d4b3cecee3
4
- data.tar.gz: b50a351a93d04b9edad1aa75f4e90778009abd21
3
+ metadata.gz: 6371f3e97aa6120ac485ee0d58ca0a2ca0c89f91
4
+ data.tar.gz: ea79944a38986b4d5fa4efe087a8f71e97ff42eb
5
5
  SHA512:
6
- metadata.gz: a5d1a4c2c5906b2444e1133cf31b057a570258d5fa32ee4cc08642ddf74111ef8f860ea2d9bd8f1a8e0f7d9e97f88c5671ea928c3e81ba7cbf650c1588ef4de8
7
- data.tar.gz: c285616c375874b12af6097e12b6e6386b83c0c70faf8e409f63a03ba9c7f9140f5bd14ce3491439e0c161d17f739d91ac96abc6628d62bff20d673098a72da5
6
+ metadata.gz: 67106c04fa6f31ec05b96804708370398d50fb919f6ddf4cd5e53c3ac978e1e2888b817218ad5f5cd8236ade4a7d81994cb8f0694f7f04058be235af232ff579
7
+ data.tar.gz: 353469ce25504bf6910f6ee2fe1786d207d48c53932ed243a89b367a3718c98d0c50ff04e23bef5df09c6d29cf7e096e9595ce42d666aa1eec670befc4cd7029
data/.rubocop.yml ADDED
@@ -0,0 +1,7 @@
1
+ AllCops:
2
+ Includes:
3
+ - 'Gemfile'
4
+ Excludes:
5
+ - 'Gemfile.devtools'
6
+ - 'vendor/**'
7
+ - 'benchmarks/**'
data/.travis.yml CHANGED
@@ -1,23 +1,10 @@
1
1
  language: ruby
2
- before_install: gem install bundler
3
- bundler_args: --without yard guard benchmarks
4
2
  script: "bundle exec rake ci"
5
3
  rvm:
6
4
  - 1.9.3
7
5
  - 2.0.0
8
- - ruby-head
9
- - rbx-19mode
10
- matrix:
11
- include:
12
- - rvm: jruby-19mode
13
- env: JRUBY_OPTS="$JRUBY_OPTS --debug"
14
- - rvm: jruby-head
15
- env: JRUBY_OPTS="$JRUBY_OPTS --debug"
16
- allow_failures:
17
- - rvm: ruby-head # Broken at this time, rvm issue on travis
18
- - rvm: rbx-19mode # Broken at this time, yard/yardstick issue
19
- - rvm: jruby-19mode # No fork(2) support, workaround planned
20
- - rvm: jruby-head # No fork(2) support, workaround planned
6
+ - 2.1.0
7
+ - rbx
21
8
  notifications:
22
9
  irc:
23
10
  channels:
data/Changelog.md CHANGED
@@ -1,3 +1,13 @@
1
+ # v0.3.3 2014-01-11
2
+
3
+ Changes:
4
+
5
+ * Bump dependency to unparser-0.1.8 that fixes dozens of non reported issues.
6
+
7
+ Bugfixes:
8
+
9
+ * Fix crash on attribute assignments nodes: https://github.com/mbj/mutant/issues/149
10
+
1
11
  # v0.3.2 2013-12-31
2
12
 
3
13
  Bugfixes:
data/config/flay.yml CHANGED
@@ -1,3 +1,3 @@
1
1
  ---
2
2
  threshold: 18
3
- total_score: 788
3
+ total_score: 784
data/config/rubocop.yml CHANGED
@@ -1,3 +1,5 @@
1
+ inherit_from: ../.rubocop.yml
2
+
1
3
  # General note about rubocop.
2
4
  # It does NOT allow to silence a specific rule violation.
3
5
  # For that reason I sometimes have to disable a whole cop where
@@ -10,9 +12,6 @@ AllCops:
10
12
  - 'Gemfile'
11
13
  - 'Gemfile.triage'
12
14
  - 'mutant.gemspec'
13
- Excludes:
14
- - '**/vendor/**'
15
- - '**/benchmarks/**'
16
15
 
17
16
  # Avoid parameter lists longer than five parameters.
18
17
  ParameterLists:
data/lib/mutant.rb CHANGED
@@ -42,6 +42,7 @@ module Parser
42
42
  and not or if when case while until while_post
43
43
  until_post for break next redo return resbody
44
44
  kwbegin begin retry preexe postexe iflipflop eflipflop
45
+ shadowarg
45
46
  ).map(&:to_sym).to_set.freeze
46
47
  end # Meta
47
48
  end # Parser
data/lib/mutant/color.rb CHANGED
@@ -3,19 +3,7 @@
3
3
  module Mutant
4
4
  # Class to colorize strings
5
5
  class Color
6
- include Adamantium::Flat
7
-
8
- # Initialize color object
9
- #
10
- # @param [Fixnum] code
11
- #
12
- # @return [undefined]
13
- #
14
- # @api private
15
- #
16
- def initialize(code)
17
- @code = code
18
- end
6
+ include Adamantium::Flat, Concord.new(:code)
19
7
 
20
8
  # Format text with color
21
9
  #
@@ -16,7 +16,8 @@ module Mutant
16
16
  :kwrestarg, :kwoptarg, :kwarg, :undef, :module, :empty,
17
17
  :alias, :for, :xstr, :back_ref, :class,
18
18
  :sclass, :match_with_lvasgn, :match_current_line, :while_post,
19
- :until_post, :preexe, :postexe, :iflipflop, :eflipflop, :kwsplat
19
+ :until_post, :preexe, :postexe, :iflipflop, :eflipflop, :kwsplat,
20
+ :shadowarg
20
21
  )
21
22
 
22
23
  private
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Mutant
4
4
  # The current mutant version
5
- VERSION = '0.3.2'.freeze
5
+ VERSION = '0.3.3'.freeze
6
6
  end # Mutant
data/mutant.gemspec CHANGED
@@ -18,10 +18,12 @@ Gem::Specification.new do |gem|
18
18
  gem.extra_rdoc_files = %w[TODO LICENSE]
19
19
  gem.executables = %w[mutant]
20
20
 
21
+ gem.required_ruby_version = '>= 1.9.3'
22
+
21
23
  gem.add_runtime_dependency('parser', '~> 2.1.0')
22
24
  gem.add_runtime_dependency('procto', '~> 0.0.2')
23
25
  gem.add_runtime_dependency('abstract_type', '~> 0.0.7')
24
- gem.add_runtime_dependency('unparser', '~> 0.1.6')
26
+ gem.add_runtime_dependency('unparser', '~> 0.1.8')
25
27
  gem.add_runtime_dependency('ice_nine', '~> 0.9')
26
28
  gem.add_runtime_dependency('descendants_tracker', '~> 0.0.1')
27
29
  gem.add_runtime_dependency('adamantium', '~> 0.1')
@@ -12,7 +12,7 @@ describe Mutant::Mutator::Node::Generic, 'match_current_line' do
12
12
  mutations << 'true if true'
13
13
  mutations << 'true if false'
14
14
  mutations << 'true if nil'
15
- mutations << 'true if !(//)'
15
+ mutations << s(:if, s(:send, s(:match_current_line, s(:regexp, s(:regopt))), :!), s(:true), nil)
16
16
  mutations << 'true if /a\A/'
17
17
  mutations << 'nil'
18
18
  end
@@ -55,6 +55,23 @@ describe Mutant::Mutator, 'send' do
55
55
  it_should_behave_like 'a mutator'
56
56
  end
57
57
 
58
+ context 'attribute assign' do
59
+ let(:source) { 'foo.bar=baz' }
60
+
61
+ let(:mutations) do
62
+ mutations = []
63
+ mutations << 'foo'
64
+ mutations << 'nil'
65
+ mutations << 'foo.bar=nil'
66
+ mutations << 'foo.bar'
67
+ mutations << 'baz'
68
+ # This one could probably be removed
69
+ mutations << 'nil.bar=baz'
70
+ end
71
+
72
+ it_should_behave_like 'a mutator'
73
+ end
74
+
58
75
  context 'index assign' do
59
76
  let(:source) { 'foo[bar]=baz' }
60
77
 
metadata CHANGED
@@ -1,201 +1,201 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mutant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
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-12-31 00:00:00.000000000 Z
11
+ date: 2014-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parser
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: 2.1.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 2.1.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: procto
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: 0.0.2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.0.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: abstract_type
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: 0.0.7
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.0.7
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: unparser
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.1.6
61
+ version: 0.1.8
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.1.6
68
+ version: 0.1.8
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: ice_nine
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0.9'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.9'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: descendants_tracker
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: 0.0.1
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: 0.0.1
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: adamantium
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ~>
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0.1'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ~>
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0.1'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: equalizer
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ~>
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
117
  version: 0.0.7
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ~>
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: 0.0.7
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: inflecto
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ~>
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
131
  version: 0.0.2
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ~>
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: 0.0.2
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: anima
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ~>
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
145
  version: 0.1.1
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ~>
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
152
  version: 0.1.1
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: concord
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ~>
157
+ - - "~>"
158
158
  - !ruby/object:Gem::Version
159
159
  version: 0.1.4
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ~>
164
+ - - "~>"
165
165
  - !ruby/object:Gem::Version
166
166
  version: 0.1.4
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: rspec
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - ~>
171
+ - - "~>"
172
172
  - !ruby/object:Gem::Version
173
173
  version: 2.14.1
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ~>
178
+ - - "~>"
179
179
  - !ruby/object:Gem::Version
180
180
  version: 2.14.1
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: bundler
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ~>
185
+ - - "~>"
186
186
  - !ruby/object:Gem::Version
187
187
  version: '1.3'
188
- - - '>='
188
+ - - ">="
189
189
  - !ruby/object:Gem::Version
190
190
  version: 1.3.5
191
191
  type: :development
192
192
  prerelease: false
193
193
  version_requirements: !ruby/object:Gem::Requirement
194
194
  requirements:
195
- - - ~>
195
+ - - "~>"
196
196
  - !ruby/object:Gem::Version
197
197
  version: '1.3'
198
- - - '>='
198
+ - - ">="
199
199
  - !ruby/object:Gem::Version
200
200
  version: 1.3.5
201
201
  description: Mutation testing for ruby
@@ -208,10 +208,11 @@ extra_rdoc_files:
208
208
  - TODO
209
209
  - LICENSE
210
210
  files:
211
- - .gitignore
212
- - .rspec
213
- - .ruby-gemset
214
- - .travis.yml
211
+ - ".gitignore"
212
+ - ".rspec"
213
+ - ".rubocop.yml"
214
+ - ".ruby-gemset"
215
+ - ".travis.yml"
215
216
  - Changelog.md
216
217
  - Gemfile
217
218
  - Gemfile.devtools
@@ -457,17 +458,17 @@ require_paths:
457
458
  - lib
458
459
  required_ruby_version: !ruby/object:Gem::Requirement
459
460
  requirements:
460
- - - '>='
461
+ - - ">="
461
462
  - !ruby/object:Gem::Version
462
- version: '0'
463
+ version: 1.9.3
463
464
  required_rubygems_version: !ruby/object:Gem::Requirement
464
465
  requirements:
465
- - - '>='
466
+ - - ">="
466
467
  - !ruby/object:Gem::Version
467
468
  version: '0'
468
469
  requirements: []
469
470
  rubyforge_project:
470
- rubygems_version: 2.0.14
471
+ rubygems_version: 2.2.0
471
472
  signing_key:
472
473
  specification_version: 4
473
474
  summary: Mutation testing tool for ruby under MRI and Rubinius