mutator_rails 0.1.12 → 0.1.13

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: b547ea5440c2d68112bde66ea3a3da09af3c62fd
4
- data.tar.gz: ddf6637316256ada619c281076f8f45e1cb4f298
3
+ metadata.gz: 600e3473299edbe93df5cbe7f41e81753aea4778
4
+ data.tar.gz: 5003f80cffbfbac186234d0032022787425c1e83
5
5
  SHA512:
6
- metadata.gz: 56bd1a4f4e6105177f7fc0134fc30291f5968dfee542f313cc8b2f8de43aa103b23920e416625cab5460b89fa4df6f961847d424065ecf295a80c82d2fc807f2
7
- data.tar.gz: 99c38df3ce10cbe56e77251d4ba9e3e8dd7c277dcb0f0d5fc1504c3590c62ea9145749f51f3e3dd7b1c45d5cef82763ca64e10df6c65db086fb27c742c2c0158
6
+ metadata.gz: 84caecf2ac2888ea63308f06a6e0c228d90598663ef9cd66645bdd3995d6788002f10862887f536665d6e7c7d9872ee36f5a145362035a6d308e33cead941c71
7
+ data.tar.gz: 9779717102cd1ff5f7013d9b695d064ce9261554d9bc6456ff1e6a8bb81dd859ce07e0e76ffa50c6e99192e786f65ba2d659fa5b114ab111d4d9191400e48c2d
data/.codeclimate.yml CHANGED
@@ -1,5 +1,6 @@
1
1
  ---
2
- engines:
2
+ version: "2"
3
+ plugins:
3
4
  bundler-audit:
4
5
  enabled: true
5
6
  duplication:
@@ -11,10 +12,6 @@ engines:
11
12
  enabled: true
12
13
  rubocop:
13
14
  enabled: true
14
- ratings:
15
- paths:
16
- - Gemfile.lock
17
- - "**.rake"
18
- - "**.rb"
19
- exclude_paths:
15
+
16
+ exclude_patterns:
20
17
  - bin/
data/CHANGELOG.md CHANGED
@@ -8,8 +8,23 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
8
8
 
9
9
  ### Added
10
10
 
11
+ - Add -j1 fallback and failure tracking to statistics.
12
+ [I50](https://github.com/dinj-oss/mutator_rails/issues/50) [PR49](https://github.com/dinj-oss/mutator_rails/pull/49)
13
+
14
+ - Add check for pending migrations that fail jobs.
15
+ [I57](https://github.com/dinj-oss/mutator_rails/issues/57) [PR60](https://github.com/dinj-oss/mutator_rails/pull/60)
16
+
17
+
11
18
  ### Changed
12
19
 
20
+ - Sort the -j1 and failure lists to keep them in order for GIT.
21
+ [I56](https://github.com/dinj-oss/mutator_rails/issues/56) [PR61](https://github.com/dinj-oss/mutator_rails/pull/61)
22
+
23
+
24
+ - Upgrade for rails security issues.
25
+ [I58](https://github.com/dinj-oss/mutator_rails/issues/58) [PR59](https://github.com/dinj-oss/mutator_rails/pull/59)
26
+
27
+
13
28
  ### Removed
14
29
 
15
30
  ## [0.1.11] - 2018-05-04
data/Gemfile.lock CHANGED
@@ -7,41 +7,45 @@ GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
9
  abstract_type (0.0.7)
10
- actioncable (5.1.0)
11
- actionpack (= 5.1.0)
10
+ actioncable (5.2.2.1)
11
+ actionpack (= 5.2.2.1)
12
12
  nio4r (~> 2.0)
13
- websocket-driver (~> 0.6.1)
14
- actionmailer (5.1.0)
15
- actionpack (= 5.1.0)
16
- actionview (= 5.1.0)
17
- activejob (= 5.1.0)
13
+ websocket-driver (>= 0.6.1)
14
+ actionmailer (5.2.2.1)
15
+ actionpack (= 5.2.2.1)
16
+ actionview (= 5.2.2.1)
17
+ activejob (= 5.2.2.1)
18
18
  mail (~> 2.5, >= 2.5.4)
19
19
  rails-dom-testing (~> 2.0)
20
- actionpack (5.1.0)
21
- actionview (= 5.1.0)
22
- activesupport (= 5.1.0)
20
+ actionpack (5.2.2.1)
21
+ actionview (= 5.2.2.1)
22
+ activesupport (= 5.2.2.1)
23
23
  rack (~> 2.0)
24
- rack-test (~> 0.6.3)
24
+ rack-test (>= 0.6.3)
25
25
  rails-dom-testing (~> 2.0)
26
26
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
27
- actionview (5.1.0)
28
- activesupport (= 5.1.0)
27
+ actionview (5.2.2.1)
28
+ activesupport (= 5.2.2.1)
29
29
  builder (~> 3.1)
30
30
  erubi (~> 1.4)
31
31
  rails-dom-testing (~> 2.0)
32
32
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
33
- activejob (5.1.0)
34
- activesupport (= 5.1.0)
33
+ activejob (5.2.2.1)
34
+ activesupport (= 5.2.2.1)
35
35
  globalid (>= 0.3.6)
36
- activemodel (5.1.0)
37
- activesupport (= 5.1.0)
38
- activerecord (5.1.0)
39
- activemodel (= 5.1.0)
40
- activesupport (= 5.1.0)
41
- arel (~> 8.0)
42
- activesupport (5.1.0)
36
+ activemodel (5.2.2.1)
37
+ activesupport (= 5.2.2.1)
38
+ activerecord (5.2.2.1)
39
+ activemodel (= 5.2.2.1)
40
+ activesupport (= 5.2.2.1)
41
+ arel (>= 9.0)
42
+ activestorage (5.2.2.1)
43
+ actionpack (= 5.2.2.1)
44
+ activerecord (= 5.2.2.1)
45
+ marcel (~> 0.3.1)
46
+ activesupport (5.2.2.1)
43
47
  concurrent-ruby (~> 1.0, >= 1.0.2)
44
- i18n (~> 0.7)
48
+ i18n (>= 0.7, < 2)
45
49
  minitest (~> 5.1)
46
50
  tzinfo (~> 1.1)
47
51
  adamantium (0.2.0)
@@ -51,7 +55,7 @@ GEM
51
55
  abstract_type (~> 0.0.7)
52
56
  adamantium (~> 0.2)
53
57
  equalizer (~> 0.0.11)
54
- arel (8.0.0)
58
+ arel (9.0.0)
55
59
  ast (2.3.0)
56
60
  axiom-types (0.1.1)
57
61
  descendants_tracker (~> 0.0.4)
@@ -67,32 +71,34 @@ GEM
67
71
  concord (0.1.5)
68
72
  adamantium (~> 0.2.0)
69
73
  equalizer (~> 0.0.9)
70
- concurrent-ruby (1.0.5)
71
- crass (1.0.4)
74
+ concurrent-ruby (1.1.5)
75
+ crass (1.0.5)
72
76
  descendants_tracker (0.0.4)
73
77
  thread_safe (~> 0.3, >= 0.3.1)
74
78
  diff-lcs (1.3)
75
79
  docile (1.1.5)
76
80
  equalizer (0.0.11)
77
- erubi (1.6.0)
78
- globalid (0.4.0)
81
+ erubi (1.8.0)
82
+ globalid (0.4.2)
79
83
  activesupport (>= 4.2.0)
80
- i18n (0.8.1)
84
+ i18n (1.6.0)
85
+ concurrent-ruby (~> 1.0)
81
86
  ice_nine (0.11.2)
82
87
  json (2.1.0)
83
- loofah (2.2.2)
88
+ loofah (2.3.1)
84
89
  crass (~> 1.0.2)
85
90
  nokogiri (>= 1.5.9)
86
- mail (2.6.5)
87
- mime-types (>= 1.16, < 4)
91
+ mail (2.7.1)
92
+ mini_mime (>= 0.1.1)
93
+ marcel (0.3.3)
94
+ mimemagic (~> 0.3.2)
88
95
  memoizable (0.4.2)
89
96
  thread_safe (~> 0.3, >= 0.3.1)
90
- method_source (0.8.2)
91
- mime-types (3.1)
92
- mime-types-data (~> 3.2015)
93
- mime-types-data (3.2016.0521)
94
- mini_portile2 (2.3.0)
95
- minitest (5.10.2)
97
+ method_source (0.9.2)
98
+ mimemagic (0.3.3)
99
+ mini_mime (1.0.1)
100
+ mini_portile2 (2.4.0)
101
+ minitest (5.11.3)
96
102
  morpher (0.2.6)
97
103
  abstract_type (~> 0.0.7)
98
104
  adamantium (~> 0.2.0)
@@ -121,42 +127,43 @@ GEM
121
127
  mutant-rspec (0.8.14)
122
128
  mutant (~> 0.8.14)
123
129
  rspec-core (>= 3.4.0, < 3.7.0)
124
- nio4r (2.0.0)
125
- nokogiri (1.8.2)
126
- mini_portile2 (~> 2.3.0)
130
+ nio4r (2.3.1)
131
+ nokogiri (1.10.5)
132
+ mini_portile2 (~> 2.4.0)
127
133
  parallel (1.11.2)
128
134
  parser (2.4.0.0)
129
135
  ast (~> 2.2)
130
136
  procto (0.0.3)
131
- rack (2.0.5)
132
- rack-test (0.6.3)
133
- rack (>= 1.0)
134
- rails (5.1.0)
135
- actioncable (= 5.1.0)
136
- actionmailer (= 5.1.0)
137
- actionpack (= 5.1.0)
138
- actionview (= 5.1.0)
139
- activejob (= 5.1.0)
140
- activemodel (= 5.1.0)
141
- activerecord (= 5.1.0)
142
- activesupport (= 5.1.0)
143
- bundler (>= 1.3.0, < 2.0)
144
- railties (= 5.1.0)
137
+ rack (2.0.6)
138
+ rack-test (1.1.0)
139
+ rack (>= 1.0, < 3)
140
+ rails (5.2.2.1)
141
+ actioncable (= 5.2.2.1)
142
+ actionmailer (= 5.2.2.1)
143
+ actionpack (= 5.2.2.1)
144
+ actionview (= 5.2.2.1)
145
+ activejob (= 5.2.2.1)
146
+ activemodel (= 5.2.2.1)
147
+ activerecord (= 5.2.2.1)
148
+ activestorage (= 5.2.2.1)
149
+ activesupport (= 5.2.2.1)
150
+ bundler (>= 1.3.0)
151
+ railties (= 5.2.2.1)
145
152
  sprockets-rails (>= 2.0.0)
146
153
  rails-dom-testing (2.0.3)
147
154
  activesupport (>= 4.2.0)
148
155
  nokogiri (>= 1.6)
149
156
  rails-html-sanitizer (1.0.4)
150
157
  loofah (~> 2.2, >= 2.2.2)
151
- railties (5.1.0)
152
- actionpack (= 5.1.0)
153
- activesupport (= 5.1.0)
158
+ railties (5.2.2.1)
159
+ actionpack (= 5.2.2.1)
160
+ activesupport (= 5.2.2.1)
154
161
  method_source
155
162
  rake (>= 0.8.7)
156
- thor (>= 0.18.1, < 2.0)
163
+ thor (>= 0.19.0, < 2.0)
157
164
  rainbow (2.2.2)
158
165
  rake
159
- rake (12.3.0)
166
+ rake (12.3.2)
160
167
  reek (4.7.2)
161
168
  codeclimate-engine-rb (~> 0.4.0)
162
169
  parser (>= 2.4.0.0, < 2.5)
@@ -184,13 +191,13 @@ GEM
184
191
  sprockets (3.7.2)
185
192
  concurrent-ruby (~> 1.0)
186
193
  rack (> 1, < 3)
187
- sprockets-rails (3.2.0)
194
+ sprockets-rails (3.2.1)
188
195
  actionpack (>= 4.0)
189
196
  activesupport (>= 4.0)
190
197
  sprockets (>= 3.0.0)
191
- thor (0.19.4)
198
+ thor (0.20.3)
192
199
  thread_safe (0.3.6)
193
- tzinfo (1.2.3)
200
+ tzinfo (1.2.5)
194
201
  thread_safe (~> 0.1)
195
202
  unparser (0.2.6)
196
203
  abstract_type (~> 0.0.7)
@@ -205,21 +212,24 @@ GEM
205
212
  coercible (~> 1.0)
206
213
  descendants_tracker (~> 0.0, >= 0.0.3)
207
214
  equalizer (~> 0.0, >= 0.0.9)
208
- websocket-driver (0.6.5)
215
+ websocket-driver (0.7.0)
209
216
  websocket-extensions (>= 0.1.0)
210
- websocket-extensions (0.1.2)
217
+ websocket-extensions (0.1.3)
211
218
 
212
219
  PLATFORMS
213
220
  ruby
214
221
 
215
222
  DEPENDENCIES
223
+ actionview (>= 5.1.6.2)
216
224
  adamantium (~> 0.2.0)
217
225
  bundler (~> 1.15)
218
226
  codeclimate-test-reporter
219
227
  concord (~> 0.1.4)
228
+ loofah (>= 2.3.1)
220
229
  mutant (~> 0.8.14)
221
230
  mutant-rspec (~> 0.8.14)
222
231
  mutator_rails!
232
+ nokogiri (>= 1.10.4)
223
233
  procto (~> 0.0.3)
224
234
  rails (>= 4.0)
225
235
  rake (~> 12.0)
@@ -231,4 +241,4 @@ DEPENDENCIES
231
241
  rspec_junit_formatter
232
242
 
233
243
  BUNDLED WITH
234
- 1.16.1
244
+ 1.17.2
@@ -11,7 +11,9 @@ module MutatorRails
11
11
  'total',
12
12
  'pct killed',
13
13
  'mutations per sec',
14
- 'runtime'].join("\t") + "\n").freeze
14
+ 'runtime',
15
+ 'failure',
16
+ 'j1'].join("\t") + "\n").freeze
15
17
 
16
18
  def initialize(*)
17
19
  super
@@ -22,7 +24,7 @@ module MutatorRails
22
24
  def to_s
23
25
  return '' unless complete?
24
26
 
25
- [link, kills, alive, total, pct, mutations_per_sec, runtime].join("\t")
27
+ [link, kills, alive, total, pct, mutations_per_sec, runtime, failure, j1].join("\t")
26
28
  rescue
27
29
  ''
28
30
  end
@@ -48,7 +50,7 @@ module MutatorRails
48
50
  end
49
51
 
50
52
  def j1
51
- content.match(/Jobs:.+?(\d+)$/)[1].to_i.eql(1) rescue false
53
+ content.match(/Jobs:.+?(\d+)$/)[1].to_i rescue 2
52
54
  end
53
55
 
54
56
  def link
@@ -101,7 +101,8 @@ module MutatorRails
101
101
 
102
102
  def failed?(log)
103
103
  content = File.read(log)
104
- /Failures:/ === content
104
+ /Failures:/ === content ||
105
+ /ActiveRecord::PendingMigrationError/ === content
105
106
  end
106
107
 
107
108
  def log_correct?
@@ -32,6 +32,7 @@ module MutatorRails
32
32
 
33
33
  def failures
34
34
  header = false
35
+ l = []
35
36
  content.each do |detail|
36
37
  failure = detail[7]
37
38
  if failure
@@ -39,9 +40,10 @@ module MutatorRails
39
40
  failure_header
40
41
  header = true
41
42
  end
42
- stats << detail[0]
43
+ l << " . " + detail[0]
43
44
  end
44
45
  end
46
+ @stats += l.sort if l.any?
45
47
  end
46
48
 
47
49
  def failure_header
@@ -51,16 +53,18 @@ module MutatorRails
51
53
 
52
54
  def fallback_to_j1
53
55
  header = false
56
+ l = []
54
57
  content.each do |detail|
55
58
  failure = detail[8]
56
- if failure
59
+ if failure.eql?(1)
57
60
  unless header
58
61
  j1_header
59
62
  header = true
60
63
  end
61
- stats << detail[0]
64
+ l << " . " + detail[0]
62
65
  end
63
66
  end
67
+ @stats += l.sort if l.any?
64
68
  end
65
69
 
66
70
  def j1_header
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MutatorRails
4
- VERSION = '0.1.12'
4
+ VERSION = '0.1.13'
5
5
  end
@@ -1,3 +1,3 @@
1
- log kills alive total pct killed mutations per sec runtime
2
- =HYPERLINK("models/test.log","Export::ActivityExporter") 73 26 99 73.737 1.559 63.52
3
- =HYPERLINK("models/test2.log","Export::ActivityExporter2") 73 26 99 73.737 1.559 63.52
1
+ log kills alive total pct killed mutations per sec runtime failure j1
2
+ =HYPERLINK("models/test.log","Export::ActivityExporter") 73 26 99 73.737 1.559 63.52 true 6
3
+ =HYPERLINK("models/test2.log","Export::ActivityExporter2") 73 26 99 73.737 1.559 63.52 false 1
@@ -73,6 +73,8 @@ Requires: ["./config/environment.rb"]
73
73
  (71/99) 73% - killtime: 346.07s runtime: 62.51s overhead: -283.56s
74
74
  (73/99) 73% - killtime: 354.33s runtime: 63.52s overhead: -290.81s
75
75
 
76
+ Failures:
77
+
76
78
  -----------------------
77
79
  Mutant configuration:
78
80
  Matcher: #<Mutant::Matcher::Config match_expressions: [Export::ActivityExporter]>
@@ -5,7 +5,7 @@ Module#name from: XPath returned name(.). Fix your lib to follow normal ruby sem
5
5
  Mutant configuration:
6
6
  Matcher: #<Mutant::Matcher::Config match_expressions: [Export::ActivityExporter2]>
7
7
  Integration: Mutant::Integration::Rspec
8
- Jobs: 6
8
+ Jobs: 1
9
9
  Includes: []
10
10
  Requires: ["./config/environment.rb"]
11
11
  (00/99) 100% - killtime: 0.00s runtime: 0.00s overhead: 0.00s
@@ -77,7 +77,7 @@ Requires: ["./config/environment.rb"]
77
77
  Mutant configuration:
78
78
  Matcher: #<Mutant::Matcher::Config match_expressions: [Export::ActivityExporter2]>
79
79
  Integration: Mutant::Integration::Rspec
80
- Jobs: 6
80
+ Jobs: 1
81
81
  Includes: []
82
82
  Requires: ["./config/environment.rb"]
83
83
  Subjects: 3
@@ -6,6 +6,12 @@ and 146 killed (73.7%)
6
6
 
7
7
  0 module(s) were fully mutated (0.0%)
8
8
 
9
+ The following modules remain with failures (check log):
10
+ . Export::ActivityExporter
11
+
12
+ The following modules fell back to non-parallel(-j1):
13
+ . Export::ActivityExporter2
14
+
9
15
  The following modules had most alive mutations (top 10):
10
16
  . Export::ActivityExporter (26)
11
17
  . Export::ActivityExporter2 (26)
@@ -19,6 +19,7 @@ Gem::Specification.new do |gem|
19
19
  gem.files = `git ls-files`.split("\n")
20
20
  gem.test_files = `git ls-files -- {spec}/*`.split("\n")
21
21
 
22
+ gem.add_development_dependency 'actionview', '>= 5.1.6.2'
22
23
  gem.add_development_dependency 'bundler', '~> 1.15'
23
24
  gem.add_development_dependency 'rake', '~> 12.0'
24
25
  gem.add_development_dependency 'rails', '>= 4.0'
@@ -34,4 +35,6 @@ Gem::Specification.new do |gem|
34
35
  gem.add_development_dependency 'procto', '~> 0.0.3'
35
36
  gem.add_development_dependency 'adamantium', '~> 0.2.0'
36
37
  gem.add_development_dependency 'reek', '~> 4.7.2'
38
+ gem.add_development_dependency 'nokogiri', '>= 1.10.4'
39
+ gem.add_development_dependency 'loofah', '>= 2.3.1'
37
40
  end
@@ -19,6 +19,12 @@ and 146 killed (73.7%)
19
19
 
20
20
  0 module(s) were fully mutated (0.0%)
21
21
 
22
+ The following modules remain with failures (check log):
23
+ . Export::ActivityExporter
24
+
25
+ The following modules fell back to non-parallel(-j1):
26
+ . Export::ActivityExporter2
27
+
22
28
  The following modules had most alive mutations (top 10):
23
29
  . Export::ActivityExporter (26)
24
30
  . Export::ActivityExporter2 (26)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mutator_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Chambers
@@ -9,8 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-07-13 00:00:00.000000000 Z
12
+ date: 2019-12-05 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: actionview
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: 5.1.6.2
21
+ type: :development
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: 5.1.6.2
14
28
  - !ruby/object:Gem::Dependency
15
29
  name: bundler
16
30
  requirement: !ruby/object:Gem::Requirement
@@ -221,6 +235,34 @@ dependencies:
221
235
  - - "~>"
222
236
  - !ruby/object:Gem::Version
223
237
  version: 4.7.2
238
+ - !ruby/object:Gem::Dependency
239
+ name: nokogiri
240
+ requirement: !ruby/object:Gem::Requirement
241
+ requirements:
242
+ - - ">="
243
+ - !ruby/object:Gem::Version
244
+ version: 1.10.4
245
+ type: :development
246
+ prerelease: false
247
+ version_requirements: !ruby/object:Gem::Requirement
248
+ requirements:
249
+ - - ">="
250
+ - !ruby/object:Gem::Version
251
+ version: 1.10.4
252
+ - !ruby/object:Gem::Dependency
253
+ name: loofah
254
+ requirement: !ruby/object:Gem::Requirement
255
+ requirements:
256
+ - - ">="
257
+ - !ruby/object:Gem::Version
258
+ version: 2.3.1
259
+ type: :development
260
+ prerelease: false
261
+ version_requirements: !ruby/object:Gem::Requirement
262
+ requirements:
263
+ - - ">="
264
+ - !ruby/object:Gem::Version
265
+ version: 2.3.1
224
266
  description: Automate mutation testing to find weaknesses in code
225
267
  email:
226
268
  - tim@possibilogy.com