quality 25.0.0 → 26.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/quality/config.rb +1 -0
- data/lib/quality/linguist_source_file_globber.rb +12 -2
- data/lib/quality/rake/task.rb +1 -1
- data/lib/quality/runner.rb +1 -0
- data/lib/quality/tools/mdl.rb +27 -0
- data/lib/quality/version.rb +1 -1
- data/quality.gemspec +1 -0
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2273037269a7af1f185b729b587471d1516eb76a
|
4
|
+
data.tar.gz: 4253ffcd434143862235bb3db27aea804bf7f75d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12009b820c8d70742fb24c226c5f49ebacb8590328dd58135d10b0333b6787c1a2105cfb1630d4d5c28316fd5d6f1d216a1989f53acafdd4c45096e475fab67a
|
7
|
+
data.tar.gz: 6923b2aac536a2d7b6dcbbf35d65ff2e3d5e0826dd23c536639ee30323e85dfc84a93059cb89469a2323d015d90c57b9181f1616bb9e67b4e8d765a11874ef45
|
data/lib/quality/config.rb
CHANGED
@@ -43,7 +43,7 @@ module Quality
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def all_files
|
46
|
-
@
|
46
|
+
@all_files ||= begin
|
47
47
|
files = []
|
48
48
|
tree = @commit.target.tree
|
49
49
|
tree.walk(:preorder) do |root, file|
|
@@ -95,7 +95,7 @@ module Quality
|
|
95
95
|
def source_files
|
96
96
|
@source_files ||= begin
|
97
97
|
real_files_matching do |blob|
|
98
|
-
!blob.language.nil?
|
98
|
+
!blob.language.nil? && !blob.documentation?
|
99
99
|
end
|
100
100
|
end
|
101
101
|
end
|
@@ -112,5 +112,15 @@ module Quality
|
|
112
112
|
end
|
113
113
|
end
|
114
114
|
end
|
115
|
+
|
116
|
+
def real_files_of_type(file_type)
|
117
|
+
real_files_matching do |blob, _filename|
|
118
|
+
blob.language.to_s == file_type
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
def markdown_files
|
123
|
+
@markdown_files ||= real_files_of_type('Markdown')
|
124
|
+
end
|
115
125
|
end
|
116
126
|
end
|
data/lib/quality/rake/task.rb
CHANGED
@@ -85,7 +85,7 @@ module Quality
|
|
85
85
|
@dsl.define_task(ratchet_name) { @runner.run_ratchet }
|
86
86
|
@runner.tools.each do |tool_name, tool_exe|
|
87
87
|
@dsl.define_task(tool_name) do
|
88
|
-
@runner.run_quality_with_tool(tool_exe)
|
88
|
+
@runner.run_quality_with_tool(tool_name, tool_exe)
|
89
89
|
end
|
90
90
|
end
|
91
91
|
end
|
data/lib/quality/runner.rb
CHANGED
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Quality
|
4
|
+
module Tools
|
5
|
+
# Adds 'bigfiles' tool support to quality gem
|
6
|
+
module Mdl
|
7
|
+
private
|
8
|
+
|
9
|
+
def mdl_args
|
10
|
+
markdown_files.join(' ')
|
11
|
+
end
|
12
|
+
|
13
|
+
def quality_mdl
|
14
|
+
if mdl_args.empty?
|
15
|
+
puts 'No markdown files found--skipping mdl'
|
16
|
+
return
|
17
|
+
end
|
18
|
+
|
19
|
+
ratchet_quality_cmd('mdl',
|
20
|
+
args: mdl_args,
|
21
|
+
gives_error_code_on_violations: true) do |_line|
|
22
|
+
1
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/quality/version.rb
CHANGED
data/quality.gemspec
CHANGED
@@ -39,6 +39,7 @@ Gem::Specification.new do |s|
|
|
39
39
|
# flay 2.6.0 contained a command-line-parsing issue
|
40
40
|
s.add_runtime_dependency('flay', ['>= 2.4', '!= 2.6.0'])
|
41
41
|
s.add_runtime_dependency('rubocop')
|
42
|
+
s.add_runtime_dependency('mdl')
|
42
43
|
s.add_runtime_dependency('rubocop-rspec')
|
43
44
|
s.add_runtime_dependency('bigfiles', ['>= 0.1'])
|
44
45
|
s.add_runtime_dependency('punchlist', ['>= 1.1'])
|
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:
|
4
|
+
version: 26.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vince Broz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -128,6 +128,20 @@ dependencies:
|
|
128
128
|
- - ">="
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: '0'
|
131
|
+
- !ruby/object:Gem::Dependency
|
132
|
+
name: mdl
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
type: :runtime
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0'
|
131
145
|
- !ruby/object:Gem::Dependency
|
132
146
|
name: rubocop-rspec
|
133
147
|
requirement: !ruby/object:Gem::Requirement
|
@@ -331,6 +345,7 @@ files:
|
|
331
345
|
- lib/quality/tools/flay.rb
|
332
346
|
- lib/quality/tools/flog.rb
|
333
347
|
- lib/quality/tools/jscs.rb
|
348
|
+
- lib/quality/tools/mdl.rb
|
334
349
|
- lib/quality/tools/pep8.rb
|
335
350
|
- lib/quality/tools/punchlist.rb
|
336
351
|
- lib/quality/tools/rails_best_practices.rb
|