quality 37.0.0 → 37.0.1
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/lib/quality/quality_checker.rb +5 -5
- data/lib/quality/version.rb +1 -1
- data/quality.gemspec +4 -2
- metadata +22 -3
- data/lib/quality/threshold.rb +0 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f3738877156fe9182600b12933dd6ccb263a9d8ec38b2e86944a5f7843e258f
|
4
|
+
data.tar.gz: bcdd36ad23df7f6848dc1d87afe56c884336e5f687c5ded25f93562c16db264f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b807ad9512e12db9b7c46cc5d424be2cf2d3e71507bcaeff5d19ee3f9990143426fea9c9a3a7517e019450911613e4433c8ea7f92ee5506f04ddfe5dfccfceb9
|
7
|
+
data.tar.gz: 010b14dbb8d410598db108bccb66389d25c7771fbeb6d32838a3f0fab23a395f0ddca138b75c6997bbfe4b3515f1c98cb1e374ed046c5d6361337e1d843c4c3a
|
@@ -3,7 +3,7 @@
|
|
3
3
|
require_relative 'command_output_processor'
|
4
4
|
require_relative 'process'
|
5
5
|
require_relative 'ruby_spawn'
|
6
|
-
|
6
|
+
require 'high_water_mark/threshold'
|
7
7
|
|
8
8
|
module Quality
|
9
9
|
# Runs a quality-checking, command, checks it agaist the existing
|
@@ -29,10 +29,10 @@ module Quality
|
|
29
29
|
@command_options = command_options
|
30
30
|
@verbose = verbose
|
31
31
|
@count_dir.mkdir(output_dir) unless @count_file.exists?(output_dir)
|
32
|
-
@threshold =
|
33
|
-
|
34
|
-
|
35
|
-
|
32
|
+
@threshold = HighWaterMark::Threshold.new(cmd,
|
33
|
+
count_io: count_io,
|
34
|
+
count_file: count_file,
|
35
|
+
output_dir: output_dir)
|
36
36
|
@process_class = process_class
|
37
37
|
end
|
38
38
|
|
data/lib/quality/version.rb
CHANGED
data/quality.gemspec
CHANGED
@@ -43,13 +43,15 @@ Gem::Specification.new do |s|
|
|
43
43
|
# https://github.com/bbatsov/rubocop#installation
|
44
44
|
s.add_runtime_dependency('mdl')
|
45
45
|
s.add_runtime_dependency('rubocop', '~> 0.78.0')
|
46
|
-
#
|
47
|
-
s.add_runtime_dependency('bigfiles', ['>= 0.1'])
|
46
|
+
# 0.2.0 had a fatal bug
|
47
|
+
s.add_runtime_dependency('bigfiles', ['>= 0.1', '!= 0.2.0'])
|
48
48
|
s.add_runtime_dependency('brakeman')
|
49
|
+
s.add_runtime_dependency('high_water_mark')
|
49
50
|
s.add_runtime_dependency('punchlist', ['>= 1.1'])
|
50
51
|
s.add_runtime_dependency('rails_best_practices')
|
51
52
|
s.add_runtime_dependency('rubocop-minitest')
|
52
53
|
s.add_runtime_dependency('rubocop-rake')
|
54
|
+
# 1.19.0 was a RuboCop 0.51.0 compatibility release
|
53
55
|
s.add_runtime_dependency('rubocop-rspec', ['>=1.19.0'])
|
54
56
|
# not directly required - this is to workaround this issue:
|
55
57
|
# https://github.com/octokit/octokit.rb/issues/1177
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quality
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 37.0.
|
4
|
+
version: 37.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vince Broz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -163,6 +163,9 @@ dependencies:
|
|
163
163
|
- - ">="
|
164
164
|
- !ruby/object:Gem::Version
|
165
165
|
version: '0.1'
|
166
|
+
- - "!="
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
version: 0.2.0
|
166
169
|
type: :runtime
|
167
170
|
prerelease: false
|
168
171
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -170,6 +173,9 @@ dependencies:
|
|
170
173
|
- - ">="
|
171
174
|
- !ruby/object:Gem::Version
|
172
175
|
version: '0.1'
|
176
|
+
- - "!="
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: 0.2.0
|
173
179
|
- !ruby/object:Gem::Dependency
|
174
180
|
name: brakeman
|
175
181
|
requirement: !ruby/object:Gem::Requirement
|
@@ -184,6 +190,20 @@ dependencies:
|
|
184
190
|
- - ">="
|
185
191
|
- !ruby/object:Gem::Version
|
186
192
|
version: '0'
|
193
|
+
- !ruby/object:Gem::Dependency
|
194
|
+
name: high_water_mark
|
195
|
+
requirement: !ruby/object:Gem::Requirement
|
196
|
+
requirements:
|
197
|
+
- - ">="
|
198
|
+
- !ruby/object:Gem::Version
|
199
|
+
version: '0'
|
200
|
+
type: :runtime
|
201
|
+
prerelease: false
|
202
|
+
version_requirements: !ruby/object:Gem::Requirement
|
203
|
+
requirements:
|
204
|
+
- - ">="
|
205
|
+
- !ruby/object:Gem::Version
|
206
|
+
version: '0'
|
187
207
|
- !ruby/object:Gem::Dependency
|
188
208
|
name: punchlist
|
189
209
|
requirement: !ruby/object:Gem::Requirement
|
@@ -448,7 +468,6 @@ files:
|
|
448
468
|
- lib/quality/rake/task.rb
|
449
469
|
- lib/quality/ruby_spawn.rb
|
450
470
|
- lib/quality/runner.rb
|
451
|
-
- lib/quality/threshold.rb
|
452
471
|
- lib/quality/tool.rb
|
453
472
|
- lib/quality/tools/bigfiles.rb
|
454
473
|
- lib/quality/tools/brakeman.rb
|
data/lib/quality/threshold.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Quality
|
4
|
-
# Calculate threshold for quality gem tool
|
5
|
-
class Threshold
|
6
|
-
attr_reader :tool_name
|
7
|
-
|
8
|
-
def initialize(tool_name,
|
9
|
-
count_file: File,
|
10
|
-
count_io: IO,
|
11
|
-
output_dir: 'metrics')
|
12
|
-
@tool_name = tool_name
|
13
|
-
@count_file = count_file
|
14
|
-
@count_io = count_io
|
15
|
-
@filename = File.join(output_dir, "#{tool_name}_high_water_mark")
|
16
|
-
end
|
17
|
-
|
18
|
-
def threshold
|
19
|
-
return @count_io.read(@filename).to_i if @count_file.exist?(@filename)
|
20
|
-
end
|
21
|
-
|
22
|
-
def write_violations(new_violations)
|
23
|
-
@count_file.open(@filename, 'w') do |file|
|
24
|
-
file.write(new_violations.to_s + "\n")
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|